You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mpi_container.def 1.3 kB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. Bootstrap: docker
  2. From: ubuntu:latest
  3. %files
  4. mpi_pingpong.c /opt
  5. %environment
  6. export OMPI_DIR=/home0/opt/openmpi
  7. export SINGULARITY_OMPI_DIR=$OMPI_DIR
  8. export SINGULARITYENV_APPEND_PATH=$OMPI_DIR/bin
  9. export SINGULAIRTYENV_APPEND_LD_LIBRARY_PATH=$OMPI_DIR/lib
  10. %post
  11. echo "Installing required packages..."
  12. apt-get update && apt-get install -y wget git bash gcc gfortran g++ make file
  13. echo "Installing Open MPI"
  14. export OMPI_DIR=/home0/opt/openmpi
  15. export OMPI_VERSION=4.0.3
  16. export OMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-$OMPI_VERSION.tar.bz2"
  17. mkdir -p /tmp/ompi
  18. mkdir -p /opt
  19. chmod a+w /opt/
  20. chmod a+r /opt/
  21. ls -la /tmp/ompi
  22. # Download
  23. cd /tmp/ompi && wget -O openmpi-$OMPI_VERSION.tar.bz2 $OMPI_URL && tar -xjf openmpi-$OMPI_VERSION.tar.bz2
  24. ls -la
  25. # Compile and install
  26. cd /tmp/ompi/openmpi-$OMPI_VERSION && ./configure --prefix=$OMPI_DIR && make install
  27. # Set env variables so we can compile our application
  28. export PATH=$OMPI_DIR/bin:$PATH
  29. export LD_LIBRARY_PATH=$OMPI_DIR/lib:$LD_LIBRARY_PATH
  30. export MANPATH=$OMPI_DIR/share/man:$MANPATH
  31. # rm -r tmp/mpi
  32. echo "Compiling the MPI application..."
  33. cd /opt && mpicc -o mpi_pingpong mpi_pingpong.c

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.