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
OpenMP dependency not found with Nvidia HPC SDK #8058
Comments
@scivision I think you're the only one with access to the Nvidia compilers. |
The Nvidia HPC SDK should be accessible to everyone as long as you accept Nvidia's EULA. |
I don't have the Nvidia compiler anymore |
I think then we're at "patches welcome". I'd be happy to review something though. |
It seems like my initial assessment was wrong, the Nvidia HPC SDK does indeed support the The following preprocessor flags (the order is important) will result in def get_preprocess_only_args(self) -> T.List[str]:
return ['-Mcpp', '-E'] |
@dcbaker Could you or anyone else comment on the above proposed changes? |
Does that still work with the PGI compiler, if it does just flipping it makes sense, otherwise some kind of inheritance based override make sense. |
Yes, I tested with both |
One challenge I find when testing a custom Could anyone advice on what is the correct course so that the flags appear in the correct order? |
Let’s consider https://github.com/dftd4/dftd4, which requires OpenMP, as an example. Meson fails to detect OpenMP with $ CC=nvc FC=nvfortran meson setup --default-library static NVIDIA
…
Fortran compiler for the host machine: nvfortran (nvidia_hpc 22.1-0)
Fortran linker for the host machine: nvfortran pgi 22.1-0
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: nvc (nvidia_hpc 22.1-0)
C linker for the host machine: nvc pgi 22.1-0
Run-time dependency OpenMP found: NO (tried system)
config/meson.build:42:2: ERROR: Dependency "openmp" not found, tried system
Then what happens if $ CC=pgcc FC=pgfortran meson setup --default-library static PGI
…
Fortran compiler for the host machine: pgfortran (pgi 22.1-0)
Fortran linker for the host machine: pgfortran pgi 22.1-0
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: pgcc (pgi 22.1-0)
C linker for the host machine: pgcc pgi 22.1-0
Run-time dependency OpenMP found: YES 3.1
… So a workaround is to use old PGI names, but
|
I met a similar problem. To Reproduce
main.cpp file:
Expected behavior
nvidia hpc compile command: It will failed with ERROR: Dependency “openmp” not found, tried system. note: my nvidia hpc compiler installed in /mnt/f/work/nvhpc/Linux_x86_64/23.5/compilers/bin system parameters
I have also post this issue on nvidia forums for some comments with nvidia hpc compiler. |
Describe the bug
When using
openmp = dependency('openmp')
with Nvidia HPC SDK and Meson0.56.0
OpenMP is not detected.To Reproduce
Have
openmp = dependency('openmp')
and runCC=nvc meson setup builddir
Expected behavior
Expected OpenMP to be detected since it is supported by Nvidia HPC SDK according to their documentation.
I expect the issue to be that Nvidia (previously PGI) still does not define
_OPENMP
. In the code there is a special handling ofpgi
and that should probably be extended tonvidia_hpc
. As per the link above the new Nvidia HPC SDK compilers should support version4.5
(except for the offloading capabilities).system parameters
0.56.0
20.7
and20.9
The text was updated successfully, but these errors were encountered: