Last active
August 29, 2015 14:13
-
-
Save jlehtoma/397474dd2d4773ed120d to your computer and use it in GitHub Desktop.
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
# Tell all slaves to return a message identifying themselves. | |
mpi.remote.exec(paste("I am",mpi.comm.rank(),"of",mpi.comm.size())) | |
mpi.remote.exec(paste(mpi.comm.get.parent())) | |
# Send execution commands to the slaves | |
x <- 5 | |
x <- mpi.remote.exec(rnorm, x) | |
x | |
mpi.close.Rslaves() | |
mpi.quit() |
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 | |
#SBATCH -J rmpi_job | |
#SBATCH -o output.txt | |
#SBATCH -e errors.txt | |
#SBATCH -t hh:mm:ss | |
#SBATCH --nodes=1 | |
#SBATCH --ntasks=12 | |
#SBATCH --mem-per-cpu=200 | |
# | |
module load R.latest | |
srun -n 12 Rmpi --no-save < rmpi_script.R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment