Skip to content

batearedcollie/specfem3d-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker image for SPECFEM3D_Cartesian

SPECFEM3D docker build.

Forked from https://github.com/akrause2014/specfem3d with tweaks to produce a smaller docker image

Build

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.

Run container

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).

Examples

Two examples are includes which are designed ot be run on a single node

Example 1

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.

Example 2

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...

Example 3

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Fortran 82.4%
  • Shell 11.0%
  • Dockerfile 4.4%
  • C 1.4%
  • Gnuplot 0.8%