Created
December 2, 2018 15:37
-
-
Save DaisukeMiyamoto/26f53fa021e15d62cffd1182226e6749 to your computer and use it in GitHub Desktop.
test mpi job for AWS ParallelCluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mpi.h> | |
#include <stdio.h> | |
int main() { | |
int size; | |
int rank; | |
MPI_Init(NULL, NULL); | |
MPI_Comm_size(MPI_COMM_WORLD, &size); | |
MPI_Comm_rank(MPI_COMM_WORLD, &rank); | |
printf("Hello world from rank %d out of %d processors\n", rank, size); | |
MPI_Finalize(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#$ -cwd | |
#$ -pe mpi 4 | |
module load mpi/openmpi-x86_64 | |
mpiexec /shared/hello1/a.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment