[WIP] Compile against Fastscape on dealii master image#6984
[WIP] Compile against Fastscape on dealii master image#6984anne-glerum wants to merge 3 commits into
Conversation
| if [ "${{ matrix.image }}" == "geodynamics/aspect-tester:jammy-dealii-master" ]; then | ||
| cmake \ | ||
| -D CMAKE_BUILD_TYPE=Debug \ | ||
| -G 'Ninja' \ | ||
| -D CMAKE_CXX_FLAGS='-Werror' \ | ||
| -D ASPECT_ADDITIONAL_CXX_FLAGS='-O3 -Wdeprecated-declarations' \ | ||
| -D ASPECT_TEST_GENERATOR='Ninja' \ | ||
| -D ASPECT_PRECOMPILE_HEADERS=ON \ | ||
| -D ASPECT_UNITY_BUILD=ON \ | ||
| -D ASPECT_WITH_FASTSCAPE=ON \ | ||
| -D FASTSCAPE_DIR=/opt/fastscapelib-fortran/build/ \ | ||
| -D ASPECT_RUN_ALL_TESTS='${{ matrix.run-tests }}' \ | ||
| -D ASPECT_COMPARE_TEST_RESULTS='${{ matrix.compare-tests }}' \ | ||
| -D CMAKE_UNITY_BUILD_BATCH_SIZE=8 \ | ||
| .. | ||
| else | ||
| cmake \ | ||
| -D CMAKE_BUILD_TYPE=Debug \ | ||
| -G 'Ninja' \ | ||
| -D CMAKE_CXX_FLAGS='-Werror' \ | ||
| -D ASPECT_ADDITIONAL_CXX_FLAGS='-O3 -Wdeprecated-declarations' \ | ||
| -D ASPECT_TEST_GENERATOR='Ninja' \ | ||
| -D ASPECT_PRECOMPILE_HEADERS=ON \ | ||
| -D ASPECT_UNITY_BUILD=ON \ | ||
| -D ASPECT_RUN_ALL_TESTS='${{ matrix.run-tests }}' \ | ||
| -D ASPECT_COMPARE_TEST_RESULTS='${{ matrix.compare-tests }}' \ | ||
| -D CMAKE_UNITY_BUILD_BATCH_SIZE=8 \ | ||
| .. | ||
| fi |
There was a problem hiding this comment.
I agree with the idea, but I would recommend doing it differently (it also doesnt seem to work at the moment based on the output of the tester it is not compiling with fastscape).
Please add another matrix variable in lines 120-134 to the different configurations build-with-fastscape: "ON" or "OFF. Then you can just add these two lines to the cmake command instead of duplicating the command (maybe the second line isnt even necessary, I dont know how smart the ASPECT cmake search for fastscape is and if it considers environment variables):
-D ASPECT_WITH_FASTSCAPE='${{ matrix.build-with-fastscape }}' \
-D FASTSCAPE_DIR='$FASTSCAPE_DIR' \
There was a problem hiding this comment.
Yes, makes total sense!
Concerning setting the FASTSCAPE_DIR, locally I did have to give the CMake flag for it to find FastScape.
I'll just make this WIP untill I get it to work.
| -D ASPECT_PRECOMPILE_HEADERS=ON \ | ||
| -D ASPECT_UNITY_BUILD=ON \ | ||
| -D ASPECT_WITH_FASTSCAPE='${{ matrix.build-with-fastscape }}' \ | ||
| -D FASTSCAPE_DIR='$FASTSCAPE_DIR' \ |
There was a problem hiding this comment.
| -D FASTSCAPE_DIR='$FASTSCAPE_DIR' \ | |
| -D FASTSCAPE_DIR="${FASTSCAPE_DIR}" \ |
This PR includes CMake flags that link to FastScape during installation on the dealii master image.
It now checks which dealii image from the matrix is used to determine the CMake flags, but I'll look into changing the CMake FastScape settings so that CMake could pick up on FastScape automatically.
For all pull requests:
For new features/models or changes of existing features: