Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 671 Bytes

mpi.mdx

File metadata and controls

30 lines (20 loc) · 671 Bytes
title sidebar_label
Message Passing Interface (MPI) Basics
MPI Basics

MPI Hello World

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

Resources