OpenSHMEM target links in implementation-specific libraries
tonycurtis opened this issue · 8 comments
Testing with OSSS OpenSHMEM, the compile process fails with
[ 60%] Linking CXX executable circustent
cd /lustre/home/arcurtis/circustent/build/src/CircusTent && /lustre/projects/global/software/a64fx/cmake/3.18.4/bin/cmake -E cmake_link_script CMakeFiles/circustent.dir/link.txt --verbose=1
/lustre/home/arcurtis/opt/osss-ucx/ucx/git/pmix/3.2.2/bin/oshcxx -O3 -std=c++11 -Wall -D_ENABLE_OPENSHMEM_ CMakeFiles/circustent.dir/CT_Main.cpp.o CMakeFiles/circustent.dir/CTOpts.cpp.o Impl/CT_OPENSHMEM/CMakeFiles/CT_SHMEM_OBJS.dir/CT_SHMEM.cpp.o Impl/CT_OPENSHMEM/CMakeFiles/CT_SHMEM_OBJS.dir/CT_SHMEM_IMPL.c.o -o circustent -loshmem -lmpi
/usr/bin/ld: cannot find -loshmem
/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make[2]: *** [src/CircusTent/CMakeFiles/circustent.dir/build.make:122: src/CircusTent/circustent] Error 1
make[2]: Leaving directory '/lustre/home/arcurtis/circustent/build'
make[1]: *** [CMakeFiles/Makefile2:397: src/CircusTent/CMakeFiles/circustent.dir/all] Error 2
make[1]: Leaving directory '/lustre/home/arcurtis/circustent/build'
make: *** [Makefile:160: all] Error 2
Tony, thanks for sending in a bug! Can you provide some more details on your OSS OpenSHMEM version? Is this a release version or from a specific commit?
Hi John, it's the latest commit, but it would be true for any version. -loshmem -lmpi
is presumably meant to be from Open-MPI and they are explicitly linked via cmake.
$ CC=oshcc CXX=oshcxx cmake -DENABLE_OPENSHMEM=ON ..
Tony, I'll try to get a new OpenSHMEM build running and triage this.
I can do a PR if you like
I have a fix in the works that fixes the link issue and the warnings associated with mpp/shmem.h. I'm updating the documentation now...
Tony, can you confirm that commit 66a4e2c builds for you before i close the issue?
Yep, it works. That's what I did...
Thanks Tony!