Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into zihua/testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Ulrich committed May 22, 2024
2 parents b5564d5 + 1df2e65 commit b1ba9b0
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ RUN git clone --recursive --depth 1 --single-branch --branch v2.2.7 https://gith
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release -DSCOREC_CXX_FLAGS="-Wno-error=array-bounds" \
&& make -j$(nproc) && make install

RUN git clone --recursive https://github.com/SeisSol/PUMGen.git \
RUN git clone --recursive --branch v1.0.1 https://github.com/SeisSol/PUMGen.git \
&& cd PUMGen \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/home/tools -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ The Docker container contains an interactive learning environment (Jupyter) whic
## Installation

Please install [Docker](https://docs.docker.com/engine/install/), launch the Docker Desktop and then run

(i) For Frontera and all Intel/AMD machines:
- use label: hps-2024-frontera

(ii) Macs with M1/M2/M3 ARM CPUs:
- use label: hps-2024-remote-arm
```bash
docker pull seissol/training
docker pull seissol/training:{label}
```

## Training

After installation, run
```bash
docker run -p 53155:53155 seissol/training
docker run -p 53155:53155 seissol/training:{label}
```
or run the [start.sh](start.sh) script.

Expand Down
48 changes: 48 additions & 0 deletions source_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

# source this file to load the modules to run the paraview and jupyter notebook in frontera VNC

echo "TACC: unloading xalt"
module unload xalt

echo "MNMN: install python libraries"
ml gcc/9
ml swr/21.2.5 qt5/5.14.2 oneapi_rk/2021.4.0
ml paraview/5.11
module load python3/3.9.2


export PATH="$PATH:$HOME/.local"
# pip install --user obspy cartopy

# urllib compatibility
pip uninstall -y urllib3
pip install --user 'urllib3<2.0'
pip install --user vtk pyvista
pip install --user --update gmsh
pip install --user scipy matplotlib pyproj

cp /work2/10000/jwjeremy/share/libgmsh.so.4.11.1 ~/.local/lib/libgmsh.so.4.11

echo "MNMN: load appatainer module"
module load tacc-apptainer

#
SHARED_PATH="/your/path/to/container/"
SIF_NAME="training_latest.sif"

if [ ! -f $SIF_NAME ]; then
if [ ! -f $SHARED_PATH/$SIF_NAME ]; then
# load the image if no image exists in the shared directory
echo "MNMN: pull the appatainer image"
apptainer pull -F docker://seissol/training:hps-2024-frontera
else
# create symlink to the shared directory
echo "MNMN: create symlink to the shared directory"
ln -s $SHARED_PATH/$SIF_NAME $SIF_NAME
fi
fi


echo "To run jupyter notebook:"
echo "swr -p 1 jupyter notebook"
8 changes: 6 additions & 2 deletions tpv13/tpv13.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
"source": [
"You can also visualize the SeisSol output in Paraview on your local machine. For that, you have to copy the files from your Docker container. \n",
"\n",
"Do you remember the name of your container? Type the following command in the terminal of your local machine and replace my_docker by the name of your container and my_output by the output file you want to copy: \n",
"The following commands allow you to copy the simulation output from docker to the native filesystem of your machine. Type the commands in the terminal of your local machine: \n",
"\n"
]
},
Expand All @@ -298,7 +298,11 @@
"metadata": {},
"outputs": [],
"source": [
"docker cp my_docker:/home/training/tpv13/my_output ."
"# Execute on your local machine, not within this notebook!",
"\n",
"export my_docker=$(docker ps --format \"{{.Names}}\")",
"\n",
"docker cp ${my_docker}:/home/training/tpv13/output ."
]
},
{
Expand Down

0 comments on commit b1ba9b0

Please sign in to comment.