ornladios / ADIOS2

Next generation of ADIOS developed in the Exascale Computing Program
https://adios2.readthedocs.io/en/latest/index.html
Apache License 2.0
268 stars 125 forks source link

pgi linking error on perlmutter #3511

Open guj opened 1 year ago

guj commented 1 year ago

===> Machine : Perlmutter ===> Modules loaded:
cmake, PrgEnv-nvidia

===> suggestion from adios read the doc (may not have impact) makelocalrc $(dirname $(which pgc++)) -gcc $(which gcc) -gpp \ $(which g++) -g77 $(which gfortran) -o -net 1>${HOME}/.mypgirc 2>/dev/null

===> CMake command
cmake -DCC=nvcc -DFC=nvfortran -D-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./install-nvidia -S ADIOS2 -B build-nvidia

===> Error saw: [ 39%] Linking CXX shared library ../../lib64/libadios2_fortran_mpi.so nvlink error : Undefined reference to '_adios2_parameters_mod_21' in 'CMakeFiles/adios2_fortran_mpi.dir/modules/adios2_adios_init_mpi_smod.F90.o' pgacclnk: child process exit status 2: /opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/bin/tools/nvdd make[2]: [bindings/Fortran/CMakeFiles/adios2_fortran_mpi.dir/build.make:148: lib64/libadios2_fortran_mpi.so.2.9.0] Error 2 make[1]: [CMakeFiles/Makefile2:4077: bindings/Fortran/CMakeFiles/adios2_fortran_mpi.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

===> work around: added "bindings/Fortran/CMakeFiles/adios2_fortran.dir/modules/adios2_parameters_mod.f90.o" to the link files that use adios fortran library.

halehawk commented 1 year ago

I met the same problem on our gust.ucar machine with modules: 1) ncarenv/22.12 (S) 4) craype/2.7.19 7) cmake/3.25.0 2) nvhpc/22.11 5) cray-mpich/8.1.21 3) cuda/11.7.1 6) ncarcompilers/0.7.2 I'd like to know if this problem is solved. Thanks for the work around solution, I added this line to the following files: ../testing/adios2/bindings/fortran/CMakeLists.txt ../examples/hello/bpWriter/CMakeLists.txt ../testing/adios2/bindings/fortran/CMakeLists.txt ../bindings/Fortran/CMakeLists.txt ../examples/hello/bpReader/CMakeLists.txt