This recipe shows how to run the mpiBench benchmark on Linux using Intel MPI over Azure VM instances in an Azure Batch compute pool. Execution of this distributed workload requires the use of multi-instance tasks.
Execution under both Docker and Singularity are shown in this recipe.
Please see refer to the set of sample configuration files for
this recipe. The directory docker
will contain the Docker-based execution
while the singularity
directory will contain the Singularity-based
execution configuration.
The pool configuration should enable the following properties:
inter_node_communication_enabled
must be set totrue
max_tasks_per_node
must be set to 1 or omitted
The pool configuration should enable the following properties:
inter_node_communication_enabled
must be set totrue
max_tasks_per_node
must be set to 1 or omittedadditional_node_prep
should contains the commands necessary for installing Intel MPI on the node. For example:- yum install -y gcc gcc-c++ make ca-certificates wget - wget -q -O - http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/13651/l_mpi_2018.4.274.tgz | tar -xzf - - wget https://raw.githubusercontent.com/szarkos/AzureBuildCentOS/master/config/azure/IntelMPI-v2018.x-silent.cfg - mv -f ./IntelMPI-v2018.x-silent.cfg ./l_mpi_2018.4.274/silent.cfg - pushd ./l_mpi_2018.4.274 - ./install.sh --silent ./silent.cfg - popd
container_runtimes
should be set to installsingularity
The global configuration should set the following properties:
docker_images
array must have a reference to a valid mpiBench image that can be run with Intel MPI. This can bevincentlabo/mpibench:intelmpi
which is published on Docker Hub.
The global configuration should set the following properties:
singularity_images
array must have a reference to a valid mpiBench image that can be run with Intel MPI. This can belibrary://vincent.labonte/mpi/mpibench:intelmpi
which is published on Sylabs Cloud.
The jobs configuration should set the following properties within the tasks
array which should have a task definition containing:
docker_image
should be the name of the Docker image for this container invocation. For this example, this should bevincentlabo/mpibench:intelmpi
.command
should contain the command to pass to thempirun
invocation. For this example, we will run mpiBench with an ending message size of 1kB. The applicationcommand
to run would be:/mpiBench/mpiBench -e 1K
multi_instance
property must be definednum_instances
should be set topool_specification_vm_count_dedicated
,pool_specification_vm_count_low_priority
,pool_current_dedicated
, orpool_current_low_priority
coordination_command
should be unset ornull
. For pools withnative
container support, this command should be supplied if a non-standardsshd
is required.resource_files
should be unset or the array can be emptypre_execution_command
should source the Intelmpivars.sh
script. It is necessary toexport MANPATH=/usr/share/man
before sourcing the Intelmpivars.sh
script to prevent errors. The command should then be:export MANPATH=/usr/share/man; source /opt/intel/compilers_and_libraries/linux/mpi/bin64/mpivars.sh
mpi
property must be definedruntime
should be set tointelmpi
processes_per_node
should be set tonproc
The jobs configuration should set the following properties within the tasks
array which should have a task definition containing:
singularity_image
should be the name of the Singularity image for this container invocation. For this example, this should belibrary://vincent.labonte/mpi/mpibench:intelmpi
.command
should contain the command to pass to thempirun
invocation. For this example, we will run mpiBench with an ending message size of 1kB. The applicationcommand
to run would be:/mpiBench/mpiBench -e 1K
multi_instance
property must be definednum_instances
should be set topool_specification_vm_count_dedicated
,pool_specification_vm_count_low_priority
,pool_current_dedicated
, orpool_current_low_priority
coordination_command
should be unset ornull
.resource_files
should be unset or the array can be emptypre_execution_command
should source the Intelmpivars.sh
script:source /opt/intel/compilers_and_libraries/linux/mpi/bin64/mpivars.sh
mpi
property must be definedruntime
should be set tointelmpi
processes_per_node
should be set tonproc
The Dockerfile
for the Docker image can be found here.
The Singularity Definition file for the Singularity image can be found
here.