I have a relatively complex Fortran 2003 code that I would like to compile with the
PGI Community Edition Version 19.10 in view of exploiting OpenACC pragmas.
In the current version of the code, such pragmas are inexistent.
This code compiles and links well when I don’t include the option “-acc”.
When I add the “-acc” option to the other options (“-fast -Minfo=all -Kieee -Mr8 -Mr8intrinsics”), I am
getting an error in the link phase:
nvlink error : Undefined reference to ‘_reference_cells_21’ in ‘CMakeFiles/mesh_partitionningTest.dir/mesh_partitionningTest.f90.o’
pgacclnk: child process exit status 2: /home/lanteri/opt/pgi/linux86-64-llvm/19.10/bin/pgnvd
make[2]: *** [bin/mesh_partitionningTest] Erreur 2
make[1]: *** [tst/mesh_partitionning/CMakeFiles/mesh_partitionningTest.dir/all] Erreur 2
make: *** [all] Erreur 2
The mesh_partitionningTest.f90 executable is actually linked with a library of modules.
When I use the “nm” command on this library and look for the “reference_cells” occurences, I obtain:
00000000001f9080 T reference_cells_
000000000047f040 B reference_cells_0
0000000000489380 B reference_cells_2
0000000000449980 D reference_cells_21
0000000000481c00 B reference_cells_8
When I remove the “-acc” option, the occurrences are:
00000000004620c0 B reference_cells_0
0000000000440a00 D reference_cells_10
000000000046c400 B reference_cells_2
0000000000464c80 B reference_cells_8
It seems that the “expected” underscore at the end of the reference has been removed
when using the “-acc” option.
Thanks in advance for your help!