3052e98c8b
- More changes for #287 - Automatically source environment modules if it exists - Fix some typos |
||
---|---|---|
.. | ||
config | ||
docker | ||
README.md |
README.md
OpenFOAM-Infiniband-OpenMPI
This recipe shows how to run OpenFOAM on Linux using OpenMPI over Infiniband in an Azure Batch compute pool. Execution of this distributed workload requires the use of multi-instance tasks.
Configuration
Please see refer to this set of sample configuration files for this recipe.
Pool Configuration
The pool configuration should enable the following properties:
inter_node_communication_enabled
must be set totrue
per_job_auto_scratch
must be set totrue
. A job autoscratch is needed to share a common input data set between the nodes.max_tasks_per_node
must be set to 1 or omittedvm_configuration
must be definedplatform_image
must be definedpublisher
must be set toOpenLogic
offer
must be set toCentOS-HPC
sku
must be set to7.6
vm_size
should be an SR-IOV RDMA compatible VM size such asSTANDARD_HB60rs
orSTANDARD_HC44rs
Global Configuration
The global configuration should set the following properties:
docker_images
array must have a reference to a valid OpenFOAM image that can be run with Open MPI and Infiniband in a Docker container context. This can bevincentlabo/openfoam:openmpi-ib
which is published on Docker Hub.
Jobs Configuration
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/openfoam:openmpi-ib
.resource_files
should contain theset_up_sample.sh
script which set up the sample and export environement variables used bympi
options
.additional_docker_run_options
should contain the--cap-add=sys_nice
option.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
array can be emptypre_execution_command
should source theset_up_sample.sh
script.mpi
property must be definedruntime
should be set toopenmpi
options
should contains-np $np
,--hostfile $hostfile
, and-x $mpienvopts
. These options use the environemnt variables set by theset_up_sample.sh
script.
command
should contain the command to pass to thempirun
invocation. For this example, the applicationcommand
to run would be:simpleFoam -parallel
Dockerfile and supplementary files
The Dockerfile
for the Docker image can be found here. Please
note that you must agree with the
OpenFOAM license before using this Docker
image.