Skip to content

Commit

Permalink
Add gpaw-23.6.0-1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcindulak committed Oct 20, 2023
1 parent 7cc956a commit c9b2849
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Discover the sha by removing the @sha part and running: timeout 5 docker buildx build --pull --no-cache .
# Dockerhub does not show the overall sha https://github.com/docker/roadmap/issues/262
FROM fedora:37@sha256:f99efcddc4dd6736d8a88cc1ab6722098ec1d77dbf7aed9a7a514fc997ca08e0
FROM fedora:38@sha256:8285246bd5fad4e76e17a71c88dee34c49e2f227dab4ce7df704b592f8e72d41

# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETPLATFORM
Expand All @@ -13,8 +13,8 @@ RUN echo uname -m $(uname -m)
LABEL name="GPAW Openmpi" \
url="https://wiki.fysik.dtu.dk/gpaw/"

ENV GPAW_VERSION 22.8.0
ENV FEDORA_RELEASE 2.fc37
ENV GPAW_VERSION 23.6.0
ENV FEDORA_RELEASE 1.fc38

RUN set -x \
&& dnf install -y \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ First, make sure you are able to run the `docker run hello-world` example https:
Then test the basic GPAW functionality

```sh
docker run --rm -it marcindulak/gpaw-openmpi:latest bash -c '. /etc/profile.d/modules.sh&& module use /usr/share/modulefiles&& module load mpi/openmpi && mpiexec --allow-run-as-root -np 2 python3 -c "import gpaw.mpi; print(gpaw.mpi.rank)"'
docker run --rm -it marcindulak/gpaw-openmpi:latest bash -c '. /etc/profile.d/modules.sh&& module use /usr/share/modulefiles&& module load mpi/openmpi && PYTHONPATH=$MPI_PYTHON3_SITEARCH OMP_NUM_THREADS=1 mpiexec --allow-run-as-root -np 2 python3 -c "import gpaw.mpi; print(gpaw.mpi.rank)"'
```

**Note**: if on MS Windows you are getting 'image operating system "linux" cannot be used on this platform' follow https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers
Expand Down Expand Up @@ -48,7 +48,7 @@ docker compose -f docker-compose.myjob.yml down
## Run a job manually

```sh
docker run --name myjob --rm -it -v "$(pwd)/myjob:/mnt" marcindulak/gpaw-openmpi:latest bash -c '. /etc/profile.d/modules.sh&& module use /usr/share/modulefiles&& module load mpi/openmpi && cd /mnt&& mpiexec --allow-run-as-root -np 2 python3 h2.py'
docker run --name myjob --rm -it -v "$(pwd)/myjob:/mnt" marcindulak/gpaw-openmpi:latest bash -c '. /etc/profile.d/modules.sh&& module use /usr/share/modulefiles&& module load mpi/openmpi && cd /mnt&& PYTHONPATH=$MPI_PYTHON3_SITEARCH OMP_NUM_THREADS=1 mpiexec --allow-run-as-root -np 2 python3 h2.py'
```

## Examine the created output file
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ services:
module use /usr/share/modulefiles
module load mpi/openmpi
cd /mnt
export PYTHONPATH=$MPI_PYTHON3_SITEARCH
export OMP_NUM_THREADS=1
mpiexec --allow-run-as-root -np 1 python3 h2.py && grep "Free energy" h2.txt
2 changes: 2 additions & 0 deletions docker-compose.myjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ services:
module use /usr/share/modulefiles
module load mpi/openmpi
cd /mnt
export PYTHONPATH=$MPI_PYTHON3_SITEARCH
export OMP_NUM_THREADS=1
mpiexec --allow-run-as-root -np 2 python3 h2.py && grep "Free energy" h2.txt
2 changes: 2 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
. /etc/profile.d/modules.sh
module use /usr/share/modulefiles
module load mpi/openmpi
export PYTHONPATH=$MPI_PYTHON3_SITEARCH
export OMP_NUM_THREADS=1
python3 -c "import gpaw.mpi; print(gpaw.mpi.rank)"
cat <<'EOF' > h2.py
from ase import Atoms
Expand Down

0 comments on commit c9b2849

Please sign in to comment.