The starter documentation is helpful. It would be good to explain how to compile OpenMPI since the default installation may not have all features a user may want. As an example to run a Java application, the following is required after setting up a cluster with SLURM on Ubuntu 20.04.
sudo apt-get install openjdk-11-jdk build-essential
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.2.tar.gz
tar -xf openmpi-4.1.2.tar.gz
cd openmpi-4.1.2
./configure --prefix=$HOME/openmpi-4.1.2-install --enable-mpi-java --enable-mpi-fortran \
--with-ofi=/opt/amazon/efa --disable-man-pages
make
make install
cd ..
wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
tar -xf openjdk-11+28_linux-x64_bin.tar.gz
Since the home directory is shared to the compute nodes, but software installed using the package manager, apt in this case is not, run time dependencies need to be placed in the home directory or some other shared directory or an AMI created - in this case, the extra required dependency OpenJDK 11 is downloaded directly. To run an example java program, first compile an example program on the head node
cd openmpi-4.1.2/examples
$HOME/openmpi-4.1.2-install/bin/mpijavac Hello.java
then create a SLURM submission script, in this case
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.
The starter documentation is helpful. It would be good to explain how to compile OpenMPI since the default installation may not have all features a user may want. As an example to run a Java application, the following is required after setting up a cluster with SLURM on Ubuntu 20.04.
Since the home directory is shared to the compute nodes, but software installed using the package manager, apt in this case is not, run time dependencies need to be placed in the home directory or some other shared directory or an AMI created - in this case, the extra required dependency OpenJDK 11 is downloaded directly. To run an example java program, first compile an example program on the head node
then create a SLURM submission script, in this case
then place the following in
submit.sh
:then submit the job
Further notes