SeisSol / PUMGen

Mesh generation for SeisSol
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Adapt to simmetrix version 2024 breaking changes #73

Closed Thomas-Ulrich closed 4 months ago

Thomas-Ulrich commented 4 months ago

Adapt to simmetrix version 2024 breaking changes, else getting:

In file included from /tmp/ulrich/spack-stage/spack-stage-pumgen-develop-ka7zjktnacsvr64yndeb66rttqwc25x4/spack-src/src/pumgen.cpp:50:
/tmp/ulrich/spack-stage/spack-stage-pumgen-develop-ka7zjktnacsvr64yndeb66rttqwc25x4/spack-src/src/input/SimModSuite.h: In constructor 'SimModSuite::SimModSuite(const char*, int, const char*, const char*, const char*, const char*, int, const char*, bool, const char*)':
/tmp/ulrich/spack-stage/spack-stage-pumgen-develop-ka7zjktnacsvr64yndeb66rttqwc25x4/spack-src/src/input/SimModSuite.h:162:7: error: 'VolumeMesher_setSmoothing' was not declared in this scope; did you mean 'VolumeMesher_setSmoothType'?
  162 |       VolumeMesher_setSmoothing(volumeMesher, MeshAtt.volumeSmoothingLevel);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
      |       VolumeMesher_setSmoothType

Also did the proposed changed by the support of simmetrix:

If you look at the GeomSim Release notes for SimModSuite 2024.0, you will see that GM_attManager now takes an additional argument. We don't expose SModel_attManager through the API, you should change the code to use GM_attManager(), which is defined in SimModel.h. Since you know in your code that your model contains an attribute manager (as it was saved in SimModeler), you can pass in false for the new argument create.
So your new call for line 451 would be: pAManager attMngr = GM_attManager(m_model,false);

to avoid this other error:

     89    /usr/bin/ld: CMakeFiles/pumgen.dir/src/pumgen.cpp.o: in function `SimModSuite::SimModSuite(char const*, int, char const*, char const*, char const*, char const*, int, char const*, bool, char const*)':
  >> 90    pumgen.cpp:(.text._ZN11SimModSuiteC2EPKciS1_S1_S1_S1_iS1_bS1_[_ZN11SimModSuiteC5EPKciS1_S1_S1_S1_iS1_bS1_]+0x14fb): undefined reference to `SModel_attManager(SModel*)'
  >> 91    collect2: error: ld returned 1 exit status
  >> 92    make[2]: *** [CMakeFiles/pumgen.dir/build.make:313: pumgen] Error 1
     93    make[2]: Leaving directory '/tmp/ulrich/spack-stage/spack-stage-pumgen-2024-nk6xmysfsfdgs65kdim52h4opw3z7vg5/spack-build-nk6xmys'
  >> 94    make[1]: *** [CMakeFiles/Makefile2:88: CMakeFiles/pumgen.dir/all] Error 2
     95    make[1]: Leaving directory '/tmp/ulrich/spack-stage/spack-stage-pumgen-2024-nk6xmysfsfdgs65kdim52h4opw3z7vg5/spack-build-nk6xmys'
  >> 96    make: *** [Makefile:139: all] Error 2

I tested that it compiles with both 2023 and 2024 versions.