2

I am running the snow-test.R script as written on the site:

https://hpcf.umbc.edu/other-packages/how-to-run-r-programs-on-maya/

The script is run on a cluster using SLURM with the command:

mpirun -np 1 R CMD BATCH --no-save --no-restore snow-test.R out.dat

The R version is 3.5.1. Although the script runs and displays the result, it hangs at the end. Thus, I need to kill the process manually from the SLURM queue with scancel command.

Also, when I change the R version to 3.4.4 using the same scripts, R cannot run the script, it complains with the message:

Error in Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count,  : 
  MPI_ERR_SPAWN: could not spawn processes
Calls: makeMPIcluster -> <Anonymous> -> .Call
Execution halted

Thanks.

Werner Hertzog
  • 2,002
  • 3
  • 24
  • 36
armando
  • 1,360
  • 2
  • 13
  • 30
  • Maybe because you use `-np 1` so only one task, and the script tries to communicate between tasks. Did you try with other `np` values? – Chelmy88 Sep 24 '19 at 13:50
  • yes, -np with other values didn't work with any version I wrote above – armando Sep 24 '19 at 18:18
  • Did you try with `Rscript --vanilla` instead of `R CMD BATCH --no-save --no-restore`? Sometimes `R CMD BATCH` is problematic when multiple processes try to modify the same out file... – Nairolf Sep 28 '19 at 02:20
  • I tried your suggestion, thanks, however, the outcome is the same. R hangs. – armando Sep 28 '19 at 18:16

0 Answers0