Install Fastscape in a dockerized ASPECT

Hi all,

I am new to the ASPECT. I have successfully installed the dockerized ASPECT in both my Macbook (x86, macOS14.5) and Raspberry Pi 5 (arm64, with Ubuntu Linux). My purpose in installing ASPECT in Raspberry Pi is not to run real simulations but to serve as a way for me to learn the Linux system. The successful running of ASPECT on Pi itself is pretty fun.

The general workflow I try to install fastscape is the following (after reading the post How to run cookbook "fastscape_eroding_box.prm"? and consulting with ChatGPT):

(1) docker pull the lastest ASPECT (3.1.0-pre) and docker run -it geodynamics/aspect

(2) Once I am in the docker (at /home/dealii/aspect), I clone the fastscape using git clone https://github.com/Djneu/fastscapelib-fortran, and then create a “build” folder under this path.

(3) Under /home/dealii/aspect/fastscapelib-fortran/build, I run cmake -DBUILD_FASTSCAPELIB_SHARED=ON .. and then make. No errors and warnings.

(4) Then I goto /home/dealii/aspect and create a “build” folder, in which I run

cmake -DASPECT_WITH_FASTSCAPE=ON \
      -DFASTSCAPE_DIR=/home/dealii/aspect/fastscapelib-fortran/build \
      ..

After running the above “cmake”, I see output such like:

"-- Using ASPECT_WITH_FASTSCAPE = ‘ON’ …
– FastScape library found at /home/dealii/aspect/fastscapelib-fortran/build … " and “-- Linking ASPECT against Fastscape …”

(5) Build ASPECT using make -j2

On Ubuntu Linux, no errors and no warnings. Complete at 100%.

(6) Then I do export GFORTRAN_CONVERT_UNIT='big_endian', source ~/.bashrc, and confirm with echo $GFORTRAN_CONVERT_UNIT. The output is big_endian without ’ ’ (see How to run cookbook "fastscape_eroding_box.prm"?)

(7) run “fastscape_eroding_box.prm”. Error shows “There is no such subsection to be entered: Mesh deformation.Fastscape”.

(8) I check the following things:

  • libfastscapelib_fortran.so existed in the /home/dealii/aspect/fastscapelib-fortran/build
  • run ldd ./aspect, I see all linked shared library but see no linked libfastscapelib_fortran.so.

I think I am getting close but somehow failed… that is so far what I can get on Raspberry Pi with Ubuntu. On my MacBook, step (5) was failed at 73% (sorry I forgot to record the error message).

Any suggestions are much appreciated! Thanks!

Hi Wenrong,
Your approach seems correct to me at first glance. Two clarifications:

  • In your point (7), do you take care to execute the ASPECT executable in your new build folder (the one you compiled and linked ASPECT against Fastscape in)? Because if you just run aspect you likely run the ASPECT that was precompiled in the container.
  • When you run ldd ./aspect do you do this in your new build folder? Because if you do this in the root folder you may have the same problem I mentioned in the first point.

If those two things dont clear up the issue let us know, we can try to reproduce the issue. It may also be worth thinking about modifying our base image to always come with a precompiled Fastscape.

Cheers,
Rene

Hi Rene, thanks for replying to my message! This morning, I cleaned my docker and re-did all the steps I mentioned without errors and warnings in my Raspberry Pi (arm64, ubuntu Linux). For your two questions:

  • At step (7), I ran the executable aspect in my /home/dealii/aspect/build, by running /home/dealii/aspect/build/aspect fastscape_eroding_box.prm (I was in the path of /home/dealii/aspect/cookbooks/fast_eroding_box). Still the same error There is no such subsection to be entered: Mesh deformaton.Fastscape.

  • I ran ldd ./aspect under /home/dealii/aspect/build, I can see all other linked shared libraries but still no libfastscapelib_fortran.so despite the file does exist under home/dealli/aspect/fastscapelib-fortran/build and the cmake output message saying FastScape library found at /home/dealii/aspect/fastscapelib-fortran/build

  • which aspect gives the original one in the docker: /home/dealii/aspect/bin/aspect. I understand that the new executable aspect intended to couple with Fastscape is the one /home/dealii/aspect/build/aspect, but using the new executable aspect still does not work.

Thanks,

Wenrong