Skip to content
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

Missing OpenMP target dependency on testsweeper #194

Open
devreal opened this issue Jul 7, 2024 · 4 comments
Open

Missing OpenMP target dependency on testsweeper #194

devreal opened this issue Jul 7, 2024 · 4 comments

Comments

@devreal
Copy link

devreal commented Jul 7, 2024

Description

Trying to build SLATE on Frontier with the Cray compiler leads to this linking error:

[100%] Linking CXX executable testsweeper_tester
cd /ccs/home/jschuchart/src/slate/slate/build/testsweeper/test && /autofs/nccs-svm1_sw/frontier/spack-envs/base/opt/linux-sles15-x86_64/gcc-7.5.0/cmake-3.23.2-4r4mpiba7cwdw2hlakh5i7tchi64s3qd/bin/cmake -E cmake_link_script CMakeFiles/testsweeper_tester.dir/link.txt --verbose=1
/opt/cray/pe/craype/2.7.23/bin/CC -O3 -DNDEBUG CMakeFiles/testsweeper_tester.dir/test.cc.o CMakeFiles/testsweeper_tester.dir/test_sort.cc.o -o testsweeper_tester  -Wl,-rpath,/ccs/home/jschuchart/src/slate/slate/build/testsweeper ../libtestsweeper.so 
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: _cray$mt_kmpc_fork_call_with_flags
>>> referenced by ../libtestsweeper.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: omp_get_wtime
>>> referenced by ../libtestsweeper.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __kmpc_master
>>> referenced by ../libtestsweeper.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: omp_get_num_threads
>>> referenced by ../libtestsweeper.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __kmpc_end_master
>>> referenced by ../libtestsweeper.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: omp_get_thread_num
>>> referenced by ../libtestsweeper.so

Steps To Reproduce

  1. Checkout current master
  2. Run cmake:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=CC -DCMAKE_Fortran_COMPILER=ftn -DENABLE_HIP=ON -DCMAKE_HIP_FLAGS="-L${MPICH_DIR}/lib -lmpi ${CRAY_XPMEM_POST_LINK_OPTS} -lxpmem ${PE_MPICH_GTL_DIR_amd_gfx90a} ${PE_MPICH_GTL_LIBS_amd_gfx90a} -I${MPICH_DIR}/include" -DHIP_ROOT_DIR=${OLCF_ROCM_ROOT} -DBLAS_LIBRARIES=/ccs/home/bouteilla/parsec/dplasma/spock.debug/OpenBLAS/lib/libopenblas.so -DBLAS_INCLUDE_DIRS=/ccs/home/bouteilla/parsec/dplasma/spock.debug/OpenBLAS/include

It appears that the testsweeper should depend on the OpenMP target. If I manually run the compiler command with -fopenmp the link succeeds:

$ /opt/cray/pe/craype/2.7.23/bin/CC -O3 -DNDEBUG CMakeFiles/testsweeper_tester.dir/test.cc.o CMakeFiles/testsweeper_tester.dir/test_sort.cc.o -o testsweeper_tester  -Wl,-rpath,/ccs/home/jschuchart/src/slate/slate/build/testsweeper ../libtestsweeper.so -fopenmp

Environment

$ module list

Currently Loaded Modules:
  1) craype-x86-trento    4) perftools-base/22.12.0                  7) cray-dsmml/0.2.2   10) cmake/3.23.2             13) cce/17.0.0             16) lfs-wrapper/0.0.1    19) cray-mpich/8.1.28
  2) libfabric/1.15.2.0   5) xpmem/2.6.2-2.5_2.22__gd067c3f.shasta   8) PrgEnv-cray/8.3.3  11) rocm/5.7.1               14) darshan-runtime/3.4.0  17) DefApps/default      20) craype/2.7.23
  3) craype-network-ofi   6) cray-pmi/6.1.8                          9) boost/1.79.0       12) craype-accel-amd-gfx90a  15) hsi/default            18) cray-libsci/23.12.5
@devreal
Copy link
Author

devreal commented Jul 24, 2024

This seems to be fixed after a git pull.

@devreal devreal closed this as completed Jul 24, 2024
@devreal
Copy link
Author

devreal commented Jul 30, 2024

Not fixed, happens with rocm/5.7.1 on Frontier. Reopening

@devreal devreal reopened this Jul 30, 2024
@mgates3
Copy link
Collaborator

mgates3 commented Jul 30, 2024

Did it work with a different ROCm version, when you closed the issue?
What version of SLATE (git log --oneline -n 1)?
I presume you've done git submodule update so the submodules are in sync with the SLATE version.

@devreal
Copy link
Author

devreal commented Jul 30, 2024

Correct, it works with rocm/6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants