title | sidebar_label |
---|---|
Message Passing Interface (MPI) Basics |
MPI Basics |
import CodeBlock from '@theme/CodeBlock'; import MPI_hello_world from '!!raw-loader!/src/29_MPI_hello_world.f90';
{MPI_hello_world}
Compile the code:
mpif90 29_MPI_hello_world.f90 -o 29_MPI_hello_world.out
# if you are using intel compiler
mpiifort 29_MPI_hello_world.f90 -o 29_MPI_hello_world.out
Let's run on 4 processors:
mpirun -np 4 ./29_MPI_hello_world.out