Skip to content

[WIP] Compile against Fastscape on dealii master image#6984

Open
anne-glerum wants to merge 3 commits into
geodynamics:mainfrom
anne-glerum:build_tester_against_fastscape
Open

[WIP] Compile against Fastscape on dealii master image#6984
anne-glerum wants to merge 3 commits into
geodynamics:mainfrom
anne-glerum:build_tester_against_fastscape

Conversation

@anne-glerum
Copy link
Copy Markdown
Contributor

@anne-glerum anne-glerum commented May 22, 2026

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:

  • I have tested my new feature locally to ensure it is correct.
  • I have created a testcase for the new feature/benchmark in the tests/ directory.
  • I have added a changelog entry in the doc/modules/changes directory that will inform other users of my change.

Comment thread .github/workflows/linux.yml Outdated
Comment on lines +146 to +174
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' \

Copy link
Copy Markdown
Contributor Author

@anne-glerum anne-glerum May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@anne-glerum anne-glerum changed the title Compile against Fastscape on dealii master image [WIP] Compile against Fastscape on dealii master image May 22, 2026
-D ASPECT_PRECOMPILE_HEADERS=ON \
-D ASPECT_UNITY_BUILD=ON \
-D ASPECT_WITH_FASTSCAPE='${{ matrix.build-with-fastscape }}' \
-D FASTSCAPE_DIR='$FASTSCAPE_DIR' \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-D FASTSCAPE_DIR='$FASTSCAPE_DIR' \
-D FASTSCAPE_DIR="${FASTSCAPE_DIR}" \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants