Table of Contents |
---|
MPI versions
There are many different versions of MPI available on HPC.
The versions of MPI depend heavily on which compilers support various pieces of code.
Intel MPI
Intel provides a toolkit that encompasses their built-in compilers and MPI functionality.
...
Info |
---|
The source /gpfs/sharedfs1/admin/hpc2.0/apps/intel/oneapi/2024.2.1/setvars.sh line enables the Intel oneAPI environment to be able to call MPI successfully. Without the source line above, Intel’s built-in MPI will not be able to understand what components are available and which ones to use for the pml framework. |
OpenMPI
OpenMPI is an open source High Performance Message Passing Library.
...
Code Block |
---|
#!/bin/bash #SBATCH -N 1 #SBATCH -n 126 #SBATCH -p general #SBATCH --mail-type=END #Options are ALL,END,BEGIN #SBATCH --mail-user=first.lastname@uconn.edu module purge module load openmpi/5.0.5 mpirun -np 8 ./programHere |
Basic Hello World MPI code example
Code Block |
---|
PROGRAM hello_world_mpi include 'mpif.h' integer process_Rank, size_Of_Cluster, ierror, tag call MPI_INIT(ierror) call MPI_COMM_SIZE(MPI_COMM_WORLD, size_Of_Cluster, ierror) call MPI_COMM_RANK(MPI_COMM_WORLD, process_Rank, ierror) print *, 'Hello World from process: ', process_Rank, 'of ', size_Of_Cluster call MPI_FINALIZE(ierror) END PROGRAM |