Slurm script for CPS-FR 2019 class.
This file contains 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
#make key | |
ssh-keygen -f <keyname> -C this is a test | |
#verify passphrase | |
ssh-keygen -y -f <keyname> | |
#install key locally | |
# optionally create .ssh | |
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
cp -p <keyname> <keyname.pub> ~/.ssh/ |
This file contains 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 | |
# submit with sbatch cpi_nse.slurm | |
# commandline arguments may instead by supplied with #SBATCH <flag> <value> | |
# commandline arguments override these values | |
# Number of nodes | |
#SBATCH -N 32 | |
# Number of processor core (32*32=1024, psfc, mit and emiliob nodes have 32 cores per node) | |
#SBATCH -n 1024 | |
# specify how long your job needs. Be HONEST, it affects how long the job may wait for its turn. |
This file contains 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> | |
#include <math.h> | |
/* module load gcc */ | |
/* module load mpich/ge/gcc/64/3.1 */ | |
/* Compile me with 'mpicc -o cpi-parallel cpi-parallel.c' */ | |
double f( double ); |