Skip to content

Instantly share code, notes, and snippets.

View jcwright77's full-sized avatar

John C. Wright jcwright77

View GitHub Profile
@jcwright77
jcwright77 / CPS-FR_Readme.md
Last active August 26, 2019 14:31
CPS-FR job example
View CPS-FR_Readme.md

Slurm script for CPS-FR 2019 class.

@jcwright77
jcwright77 / ssh_create.txt
Last active August 25, 2019 11:41
ssh_key_create
View ssh_create.txt
#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/
@jcwright77
jcwright77 / cpi_nse.slurm
Created January 30, 2017 22:15
SLURM script for parallel jobs
View cpi_nse.slurm
#!/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.
@jcwright77
jcwright77 / cpi_parallel.c
Last active July 14, 2021 10:23
MPI parallel and serial fortran and c examples that calculate PI
View cpi_parallel.c
#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 );