LLNL / zfp

Compressed numerical arrays that support high-speed random access
http://zfp.llnl.gov
BSD 3-Clause "New" or "Revised" License
754 stars 152 forks source link

Compilation issues with zfp #213

Closed qwj118 closed 10 months ago

qwj118 commented 10 months ago

I have successfully run zfp in my previous system. But due to some reasons, I replaced the system. There was a problem compiling again, which troubled me for a long time. When I execute this command: cmake --build . --config Release

Error message:

[ 92%] Building C object utils/CMakeFiles/zfpcmd.dir/zfp.c.o
[ 94%] Linking C executable ../bin/zfp
/../root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/ld: /../support/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/lib/libgomp.so.1: undefined reference to '__pgi_uacc_downloads'
/../root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/ld: /../support/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/lib/libgomp.so.1: undefined reference to '__pgi_nvomp_drain_async'
/../root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/ld: /../support/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/lib/libgomp.so.1: undefined reference to '__pgi_uacc_free_internal'
/../root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/ld: /../support/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/lib/libgomp.so.1: undefined reference to '__pgi_uacc_upstart'
......
/../root/usr/bin/../libexec/gcc/x86_64-redhat-linux/11/ld: /../support/nvidia/hpc_sdk/Linux_x86_64/22.11/compilers/lib/libgomp.so.1: undefined reference to '__pgi_uacc_updone'
collect2: error: ld returned 1 exit status
gmake[2]: *** [utils/CMakeFiles/zfpcmd.dir/build.make:98: bin/zfp] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:916: utils/CMakeFiles/zfpcmd.dir/all] Error 2
gmake: *** [Makefile:146: all]Error 2

CentOS Linux release 7.6.1810 (Core)

gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)

cmake version 3.24.4

I guess it's a problem with the system environment, but I don't know exactly where the problem is. Can you help me answer this question? Thank you.

lindstro commented 10 months ago

This seems like some kind of misconfiguration with your environment, with a weird interaction between gcc and pgi, rather than an issue with zfp. Based on the error you're seeing, it's possible that you can get around the error by disabling OpenMP by adding -DZFP_WITH_OPENMP=OFF to your CMake line. You might also try a google search on the error.

qwj118 commented 10 months ago

After disabling, it can be compiled normally. Thank you very much for your answer. Wishing you a pleasant life.