-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility issues with NVIDIA compilers. #6
Comments
For the first one, does compiling with -DR123_USE_INTRIN_H=0 resolve the problem? I'm pretty sure that ABM change was contributed, will check when I have a moment. For the second, I suppose I could move the __PGI ifdef earlier, or the CUDACC test later, but this feels fragile. It may be better for me to add checks for explicit definition first (e.g. if defined(R123_USE_NVCC_FEATURES) so that one can avoid the autodetection attempts and find a way through the feature maze. I'll see if I can set up an nvc/nvc++ test environment. |
Thanks for taking a look! Yes, for the first one then |
Does this patch fix the second issue? (autodetection should work, but if you would also care to test with -DR123_USE_AUTOFEATURES=0 -DR123_PGCCFEATURES and ensure that works, that would be helpful in verifying that the future escape route is also available to you e.g. if a future nvc decides to define OPENCL_VERSION, for example |
With that patch on top of (and in these tests, |
Sounds good, thanks for testing it. And just to check I'm understanding this correctly, is it satisfactory thatt nvc++ -cuda takes you down the PGI/NVHPC path (i.e. pgfeatures.h)? Wondering if there's also a need for a new nvhpcfeatures.h that combines the old pgfeatures.h as well as cuda definitions? I also see that we're including various compilers for host code in nvcc features (for host code), so I might need to add the protective R123_USE_AUTOFEATURES checks there too, once I figure out what was actually going on in that particular maze. |
My understanding is that even with So far I have not come across any issues that require a mix of PGI/CUDA features for Historically we have compiled wrappers around Random123 methods using (For what it's worth, we always use |
We have recently noticed two issues with Random123 compatibility with the NVIDIA HPC SDK compilers (formerly PGI).
The first issue is that recent versions (21.11+) of
nvc
andnvc++
are more enthusiastic about detecting and enabling support for ABM instructions (see: https://forums.developer.nvidia.com/t/21-11-tp-behaviour/198115). This is problematic because Random123 assumes that if ABM/__ABM__
is enabled thenintrin.h
will be available, which is a poor assumption:random123/include/Random123/features/pgccfeatures.h
Lines 153 to 159 in 1f9bd25
This is not correct both on our systems and those of some of our users, and leads to errors such as
A second issue is that recent versions of
nvc
andnvc++
support a-cuda
option, which is required when compiling for certain types of GPU offload. When invoked in this mode, the compilers define the__CUDACC__
macro, which means they are detected asnvcc
instead of PGI-like compilers:random123/include/Random123/features/compilerfeatures.h
Lines 205 to 212 in 1f9bd25
In our case this actually sidesteps the first issue, but that appears to just be by accident. Is is less clear if this is really a bug, but it appears to be unintentional behaviour.
(See BlueBrain/CoreNeuron#724 for more information.)
The text was updated successfully, but these errors were encountered: