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

compilation fails when simmetrix is enabled and sim_discrete is disabled #120

Closed
cwsmith opened this issue Nov 7, 2024 · 1 comment
Closed
Labels
bug Something isn't working simmetrix

Comments

@cwsmith
Copy link

cwsmith commented Nov 7, 2024

Disabling SimDiscrete results in a linking error (details below).

The cmake option is here:

option(SIM_DISCRETE "Use Simmetrix discrete modeling" ON)
if (SIM_DISCRETE)
set(SIM_CAD_LIB_NAMES SimDiscrete ${SIM_CAD_LIB_NAMES})
endif()

Is SimDiscrete required? If so, what functionality needs it?

environment

module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
module load gcc/12.3.0-iil3lno mpich/4.1.1-xpoyz4t cuda/12.1.1-zxa4msk
module load cmake
module load simmetrix-simmodsuite/2025.0-241025dev-rirnzju

cmake config

build error

[ 49%] Linking CXX executable describe
cd /space/cwsmith/omegahSimDebug/buildOmegahHostSim_discreteoff/src && /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/cmake-3.26.3-2duxfcdiykykfynkadpp2m2y6zrmuvz4/bin/cmake -E cmake_link_script CMakeFiles/describe.dir/link.txt --verbose=1
/opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-7.4.0/gcc-12.3.0-iil3lnovyknyxf7pec36wljem3fntjd5/bin/g++ -g -Wl,-rpath -Wl,/opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/mpich-4.1.1-xpoyz4tqgfxtrm6m7qq67q4ccp5pnlre/lib CMakeFiles/describe.dir/describe.cpp.o -o describe  -Wl,-rpath,/space/cwsmith/omegahSimDebug/buildOmegahHostSim_discreteoff/src:/opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/libtirpc-1.2.6-k2lf3byep5phz3y6ei7xm4pdbw5jwusn/lib:/opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/zlib-1.2.13-mjocrm2cwyth6kvpmj3yrg52ulwd64ow/lib:/opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/mpich-4.1.1-xpoyz4tqgfxtrm6m7qq67q4ccp5pnlre/lib:::::::: libomega_h.so /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimField.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimAdvMeshing.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimPartitionedMesh-mpi.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimMeshing.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimMeshTools.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimModel.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/simmetrix-simmodsuite-2023.1-230907dev-jquex4zn5d7xd2ohri3xzbsrvubonoex/lib/x64_rhel8_gcc83/libSimPartitionWrapper-mpich4.1.1.a /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/libtirpc-1.2.6-k2lf3byep5phz3y6ei7xm4pdbw5jwusn/lib/libtirpc.so /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/zlib-1.2.13-mjocrm2cwyth6kvpmj3yrg52ulwd64ow/lib/libz.so /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/mpich-4.1.1-xpoyz4tqgfxtrm6m7qq67q4ccp5pnlre/lib/libmpicxx.so /opt/scorec/spack/rhel9/v0201_4/install/linux-rhel9-x86_64/gcc-12.3.0/mpich-4.1.1-xpoyz4tqgfxtrm6m7qq67q4ccp5pnlre/lib/libmpi.so 
/usr/bin/ld: libomega_h.so: undefined reference to `SimDiscrete_start(int)'
/usr/bin/ld: libomega_h.so: undefined reference to `SimDiscrete_stop(int)'
collect2: error: ld returned 1 exit status
@cwsmith cwsmith added bug Something isn't working simmetrix labels Nov 7, 2024
@cwsmith
Copy link
Author

cwsmith commented Nov 7, 2024

With commit ad94723 a new cmake argument is supported Omega_h_USE_SimDiscrete. It is off by default.

When it is disabled only Simmetrix GeomSim models can be loaded. When it is enabled Simmetrix discrete models can also be loaded. Note, both GeomSim and discrete models have the .smd extension.

The mixed mesh tests here:

omega_h/src/CMakeLists.txt

Lines 432 to 442 in ad94723

if(Omega_h_USE_SimDiscrete)
osh_add_exe(mixed_writeMesh)
set(TEST_EXES ${TEST_EXES} mixed_writeMesh)
test_func(run_mixed_writeMesh 1 ./mixed_writeMesh
${CMAKE_SOURCE_DIR}/meshes)
osh_add_exe(mixed_test)
set(TEST_EXES ${TEST_EXES} mixed_test)
test_func(run_mixed_test 1 ./mixed_test
${CMAKE_SOURCE_DIR}/meshes)
endif()

create and load discrete models so they are now conditional on Omega_h_USE_SimDiscrete.

@cwsmith cwsmith closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working simmetrix
Projects
None yet
Development

No branches or pull requests

1 participant