Open giltirn opened 1 month ago
Update:
I tried compiling the spec adios2@2.9.2 % oneapi
on Sunspot instead, using the otherwise same environment as above, and found that it compiled successfully without the MPI link errors and also produces an adios2-config that gives the expected output
ckelly@uan-0002:~/bld/chimbuko_spack_env_9_12_24/adios2_env_vers_test> /home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/adios2-2.9.2-kiiwf3oo2qouajt4lpfrqevwuxb2xxsx/bin/adios2-config --cxx-flags
-DADIOS2_USE_MPI -isystem /home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/adios2-2.9.2-kiiwf3oo2qouajt4lpfrqevwuxb2xxsx/include
This suggests that both issues (possibly related, although I can't see how they would be) stem from changes between 2.9.2 and 2.10.0.
For more information regarding the MPI link issue, the build of 2.10.0 fails with
1139 [ 75%] Linking CXX executable ../../../../bin/adios2_remote_server
1140 cd /tmp/ckelly/spack-stage/spack-stage-adios2-2.10.0-rkkwyaqfyxywyk55hmmr7ow625kcbfje/spack-build-rkkwyaq/source/adios2/toolkit/remote && /home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack
/linux-sles15-x86_64/oneapi-2024.04.15.002/cmake-3.27.9-34sy6yon6urhi5e6szgdlk7kcvjlakgr/bin/cmake -E cmake_link_script CMakeFiles/adios2_remote_server.dir/link.txt --verbose=1
1141 /home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/lib/spack/env/oneapi/icpx -O3 -DNDEBUG CMakeFiles/adios2_remote_server.dir/remote_server.cpp.o CMakeFiles/adios2_remote_server.dir/remote_common.cp
p.o -o ../../../../bin/adios2_remote_server -Wl,-rpath,/tmp/ckelly/spack-stage/spack-stage-adios2-2.10.0-rkkwyaqfyxywyk55hmmr7ow625kcbfje/spack-build-rkkwyaq/lib64:/home/ckelly/bld/chimbuko_spack_
env_9_12_24/spack/opt/spack/linux-sles15-x86_64/gcc-12.2.0/c-blosc2-2.11.1-r4lknhue5cmioynluyak4dupnoqjpfxn/lib64:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/one
api-2024.04.15.002/zstd-1.5.6-rjqalogquhy65go25uuaolps5e4npyaj/lib:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/gcc-12.2.0/lz4-1.9.4-jeh3svnxgjqkufwqc6zosl7mo5trs
5yb/lib:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/zlib-ng-2.1.6-2sjoqerebjgnkrjzjleemexeuha6mswe/lib:/home/ckelly/bld/chimbuko_spack_env_
9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/zfp-0.5.5-5n2irrjgchglgzqjaoidvapjftko4fhz/lib64:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::: ../../../../lib64/libadios2_evpath.so.2.10.0 ../../../../lib64/libadios2_core.so.2.10.0 ../../../../lib64/libadios2_ffs.so.2.10.0 ../../../../li
b64/libadios2_atl.so.2.10.0 -pthread -ldl -Wl,-rpath-link,/tmp/ckelly/spack-stage/spack-stage-adios2-2.10.0-rkkwyaqfyxywyk55hmmr7ow625kcbfje/spack-build-rkkwyaq/lib64:/home/ckelly/bld/chimbuko_spac
k_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/gcc-12.2.0/c-blosc2-2.11.1-r4lknhue5cmioynluyak4dupnoqjpfxn/lib64:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/o
neapi-2024.04.15.002/zstd-1.5.6-rjqalogquhy65go25uuaolps5e4npyaj/lib:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/gcc-12.2.0/lz4-1.9.4-jeh3svnxgjqkufwqc6zosl7mo5t
rs5yb/lib:/home/ckelly/bld/chimbuko_spack_env_9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/zlib-ng-2.1.6-2sjoqerebjgnkrjzjleemexeuha6mswe/lib:/home/ckelly/bld/chimbuko_spack_en
v_9_12_24/spack/opt/spack/linux-sles15-x86_64/oneapi-2024.04.15.002/zfp-0.5.5-5n2irrjgchglgzqjaoidvapjftko4fhz/lib64
>> 1142 /usr/bin/ld: ../../../../lib64/libadios2_core.so.2.10.0: undefined reference to `MPI_Abort'
>> 1143 /usr/bin/ld: ../../../../lib64/libadios2_core.so.2.10.0: undefined reference to `MPI_Bcast'
>> 1144 /usr/bin/ld: ../../../../lib64/libadios2_core.so.2.10.0: undefined reference to `MPI_Barrier'
>> 1145 icpx: error: linker command failed with exit code 1 (use -v to see invocation)
>> 1146 make[2]: *** [source/adios2/toolkit/remote/CMakeFiles/adios2_remote_server.dir/build.make:120: bin/adios2_remote_server] Error 1
1147 make[2]: Leaving directory '/tmp/ckelly/spack-stage/spack-stage-adios2-2.10.0-rkkwyaqfyxywyk55hmmr7ow625kcbfje/spack-build-rkkwyaq'
>> 1148 make[1]: *** [CMakeFiles/Makefile2:1257: source/adios2/toolkit/remote/CMakeFiles/adios2_remote_server.dir/all] Error 2
1149 make[1]: Leaving directory '/tmp/ckelly/spack-stage/spack-stage-adios2-2.10.0-rkkwyaqfyxywyk55hmmr7ow625kcbfje/spack-build-rkkwyaq'
>> 1150 make: *** [Makefile:139: all] Error 2
My first thought was that this issue would affect every binary but it may also be just adios2_remote_server
as I notice that this application did not exist in 2.9.2.
Describe the bug I built adios2@2.10.0 via spack on Sunspot using the icpx compiler and found adios2-config does not include the "-I" or "-isystem" prefix to the include path:
A build with gcc and openmpi in a Docker test environment running on a local machine produces the following
which has the "-isystem" prefix.
This missing prefix is preventing libraries using adios2 from being built with spack.
To Reproduce
Here is a complete spack environment:
Please note that the adios2 binaries will fail to link due to the following issue:
suggesting one of the dependent libraries on this system includes MPI symbols for some reason. A workaround is to hack the spack package (var/spack/repos/builtin/packages/adios2/package.py) to include the following
args.append("-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath=/opt/aurora/24.086.0/CNDA/mpich/20231026/mpich-ofi-all-icc-default-pmix-gpu-drop20231026/lib/ -L/opt/aurora/24.086.0/CNDA/mpich/20231026/mpich-ofi-all-icc-default-pmix-gpu-drop20231026/lib/ -lmpi")
when putting together the cmake args.Expected behavior The output of "adios2-config --cxx-flags" should include "-I" or "-isystem" before the include path
Desktop:
oneapi@2024.04.15.002 cmake cmake@3.27.7
built via spack with specadios2@2.10.0%oneapi@2024.04.15.002 cflags='-fp-model=precise' cxxflags='-fp-model=precise' fflags='-fp-model=precise' ~aws+blosc2+bzip2~campaign~cuda~dataspaces+fortran~hdf5~ipo~kokkos+libcatalyst~libpressio+mgard+mpi~pic+png~python~rocm+sst~sycl+sz+zfp build_system=cmake build_type=Release generator=make arch=linux-sles15-x86_64