SPECFEM3D docker build.
Forked from https://github.com/akrause2014/specfem3d with tweaks to produce a smaller docker image
Build the Docker container:
docker build -t specfem3d-docker:latest .
This creates a docker image with the tag "specfem3d-docker:latest". You can choose any tag name and also specify version.
Start the container and start a shell:
docker run -it <IMAGE_ID> /bin/sh
Compile and run the MPI example:
/home/mpiuser # mpirun --allow-run-as-root -n 4 --oversubscribe mpi_hello_world
Hello world from processor 3b285cd3e0f9, rank 0 out of 4 processors
Hello world from processor 3b285cd3e0f9, rank 1 out of 4 processors
Hello world from processor 3b285cd3e0f9, rank 2 out of 4 processors
Hello world from processor 3b285cd3e0f9, rank 3 out of 4 processors
Logging out will kill the container (and remove any data or changes you've made).
Two examples are includes which are designed ot be run on a single node
This is the default example distributed with SPECFEM3D source code. It is set to run on 4 processors on a single node. Start the container using a the run directory as a volume.
$ docker run -v `pwd`/example/example1:/home/mpiuser/example1 -it specfem3d-docker:latest /bin/sh
$ cd example1/
$ /bin/sh ./run.sh
This took about 25 mins to run on my laptop.
Is the check_absolute_amplitude_of_force_source_seismograms/ example from the SPECFEM3d source code
$ docker run -v `pwd`/example/example2:/home/mpiuser/example2 -it specfem3d-docker:latest /bin/sh
$ cd example2/
$ /bin/sh ./run.sh
This takes quite a while to run...
Is another homoegeous 1/2 space example corresponding to EXAMPLES/homogeneous_halfspace_HEX8_elastic_absorbing_Stacey_5sides
in the SPECFEM distribution
$ docker run -v `pwd`/example/example3:/home/mpiuser/example3 -it specfem3d-docker:latest /bin/sh
$ cd example3/
$ /bin/sh ./run.sh