Skip to content

Instantly share code, notes, and snippets.

@zonca
Last active December 15, 2015 22:39
Show Gist options
  • Select an option

  • Save zonca/5334225 to your computer and use it in GitHub Desktop.

Select an option

Save zonca/5334225 to your computer and use it in GitHub Desktop.
IPython parallel setup on Carver at NERSC
#PBS -S /bin/bash
#PBS -l nodes={n/2}:ppn=2
#PBS -l walltime=3:00:00,pvmem=10GB
#PBS -N ipc
#PBS -q usplanck
#PBS -j oe
#PBS -o ipc.out
#PBS -A usplanck
#PBS -V
cd $PBS_O_WORKDIR
which ipengine
mpirun -np {n} ipengine
#!/usr/bin/env bash
rm ~/.config/ipython/profile_default/pbs.engine.template
ln -s ~/.config/ipython/profile_default/pbs.engine.template.ppn$1 ~/.config/ipython/profile_default/pbs.engine.template
echo Setting ipc ppn to $1
ipcluster start --n=$[$1*$2]
c.IPClusterStart.controller_launcher_class = 'LocalControllerLauncher'
c.IPClusterStart.engine_launcher_class = 'PBS'
c.PBSLauncher.batch_template_file = u'~/.config/ipython/profile_default/pbs.engine.template'
#PBS -S /bin/bash
#PBS -l nodes={n/8}:ppn=8
#PBS -l walltime=3:00:00
#PBS -N ipc
#PBS -q usplanck
#PBS -j oe
#PBS -o ipc.out
#PBS -A usplanck
#PBS -V
cd $PBS_O_WORKDIR
which ipengine
mpirun -np {n} ipengine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment