Skip to content

Commit

Permalink
fedora sockets images for nwchem 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edoapra committed Mar 16, 2020
1 parent 1472c89 commit 37f3e86
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
51 changes: 51 additions & 0 deletions nwchem-700.fedora.sockets/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM fedora:32

MAINTAINER Edoardo Apra <[email protected]>

RUN dnf install -y python-devel gcc-gfortran openblas openmpi-devel scalapack-openmpi-devel openssh-clients which bzip2 patch make perl findutils hostname git \
&& dnf clean all \
&& useradd -c 'NWChem user' -m -d /home/nwchem -s /bin/bash nwchem

USER nwchem
ENV NWCHEM_TOP="/home/nwchem/nwchem-7.0.0" \
PATH=$PATH:/home/nwchem/nwchem-7.0.0/bin/LINUX64:/usr/lib64/openmpi/bin/:/home/nwchem/nwchem-7.0.0/QA/:PATH \
NWCHEM_TARGET=LINUX64 \
NWCHEM_MODULES="all python" \
BLASOPT="/usr/lib64/libopenblas.so.0 -lpthread -lrt" \
LAPACK_LIB="/usr/lib64/libopenblas.so.0 -lpthread -lrt" \
BLAS_SIZE=4 \
USE_64TO32=y \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib64/openmpi/lib" \
SCALAPACK="-L/usr/lib64/openmpi/lib -lscalapack " \
USE_MPI=y \
USE_MPIF=y \
USE_MPIF4=y \
ARMCI_NETWORK=SOCKETS \
NWCHEM_EXECUTABLE=/home/nwchem/nwchem-7.0.0/bin/LINUX64/nwchem \
NWCHEM_BASIS_LIBRARY=/home/nwchem/nwchem-7.0.0/src/basis/libraries/ \
NWCHEM_NWPW_LIBRARY=/home/nwchem/nwchem-7.0.0/src/nwpw/libraryps/ \
FFIELD=amber \
AMBER_1=/home/nwchem/nwchem-7.0.0/src/data/amber_s/ \
AMBER_2=/home/nwchem/nwchem-7.0.0/src/data/amber_q/ \
AMBER_3=/home/nwchem/nwchem-7.0.0/src/data/amber_x/ \
AMBER_4=/home/nwchem/nwchem-7.0.0/src/data/amber_u/ \
SPCE=/home/nwchem/nwchem-7.0.0/src/data/solvents/spce.rst \
CHARMM_S=/home/nwchem/nwchem-7.0.0/src/data/charmm_s/ \
CHARMM_X=/home/nwchem/nwchem-7.0.0/src/data/charmm_x/ \
OMPI_MCA_btl_vader_single_copy_mechanism=none
#ENV ELPA="-I/usr/lib64/gfortran/modules/openmpi -L/usr/lib64/openmpi/lib -lelpa"
RUN cd /home/nwchem; curl -SL https://github.com/nwchemgit/nwchem/releases/download/v7.0.0-release/nwchem-7.0.0-release.revision-2c9a1c7c-src.2020-02-26.tar.bz2 | tar jxf - \
&& cd nwchem-7.0.0/src \
&& sed -i 's|-march=native||' config/makefile.h \
&& sed -i 's|-mtune=native|-mtune=generic|' config/makefile.h \
&& sed -i 's|-mfpmath=sse||' config/makefile.h \
&& sed -i 's|-msse3||' config/makefile.h \
&& ls -lrt \
&& make nwchem_config \
&& make -j3

#WORKDIR /home/nwchem/nwchem-7.0.0/QA
#ENTRYPOINT ["runtests.mpi.unix","procs","3"]
WORKDIR /data
ENTRYPOINT ["/bin/bash"]
#ENTRYPOINT ["mpirun","-np","3","nwchem"]
27 changes: 27 additions & 0 deletions nwchem-700.fedora.sockets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Based on earlier work by Vladimir Konjkov

Builds a NWChem 7.0.0 binary using all modules and ARMCI_NETWORK=SOCKETS

### Build Instructions

The file Dockerfile can be used by tying the command

docker build -t nwchem-700.fedora.sockets .

### Usage

The following command will run NWChem on 1 processor (will remove the hardwired value later ...)

docker run --entrypoint='mpirun' -v [host_dir]:/data nwchem-700.fedora.sockets nwchem [input.nw]

### Examples

#### Modifiy mpirun options

The following command will run NWChem on 3 processors

docker run --entrypoint='mpirun' -v /home/edo/nwchem/tests:/data nwchem-700.fedora.sockets -np 3 nwchem /data/bar_lcwpbe

Get shell on the Docker container

docker run -v /home/edo/nwchem/tests:/data -it nwchem-700.fedora.sockets

0 comments on commit 37f3e86

Please sign in to comment.