MPICluster - 1 High Performance Computing COIS 4350H Winter...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 High Performance Computing COIS 4350H Winter 2010 Week 2: (Very) Basic MPI and How to use the cluster Message Passing Interface: 6 Basic MPI Routines MPI_Init (Initializes MPI) MPI_Finalize (Terminates MPI) MPI_Comm_size (Determines number of processor) MPI_Comm_rank (Determines unique process id) MPI_Send (Send a message) MPI_Recv (receive a message) First MPI Program #include <mpi.h> main(int argc, char *argv) { int nprocs, rank; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); printf("From process %d out of %d, Hello World!\n", rank, nprocs); MPI_Finalize(); } How to use the cluster ssh to 209.42.118.70 After logging in for the first time, using the username and pwd emailed to you, please change your password. To run a job on the cluster, follow the following steps 1.create your C file (for example myfile.c) using nano 2.compile your program with the fol owing command: mpicc myfile.c –o myfile 3.Submit your job to the cluster by using a modified version of the script shown in the screenshot below. This file is 3....
View Full Document

This note was uploaded on 02/14/2010 for the course COMPUTER S COIS-3030 taught by Professor Hircock during the Spring '10 term at Trent University.

Page1 / 2

MPICluster - 1 High Performance Computing COIS 4350H Winter...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online