0

In R/snowfall, when initialize cluster with type 'MPI', it show error message. Anyone can help? Thanks!

library(snowfall)
library(Rmpi)
sfInit(parallel=TRUE,cpus=3,type='MPI')
sfStop()

When run sfInit(parallel=TRUE,cpus=3,type='MPI') , the error message occur as below:

Library Rmpi loaded.
Error in Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count,  : 
  Internal MPI error!, error stack:
MPI_Comm_spawn(cmd="/usr/bin/env", argv=0x0000029F97E7E448, maxprocs=3, MPI_INFO_NULL, root=0, MPI_COMM_SELF, intercomm=0x0000029FF870FCF8, errors=0x0000029FF6B92140) failed
Internal MPI error!  FAILspawn not supported without process manager
Error in sfInit(parallel = TRUE, cpus = 3, type = "MPI") : 
  Starting of snow cluster failed! Error in Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count,  : 
  Internal MPI error!, error stack:
MPI_Comm_spawn(cmd="/usr/bin/env", argv=0x0000029F97E7E448, maxprocs=3, MPI_INFO_NULL, root=0, MPI_COMM_SELF, intercomm=0x0000029FF870FCF8, errors=0x0000029FF6B92140) failed
Internal MPI error!  FAILspawn not supported without process manager
 Error in Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count,  : 
  Internal MPI error!, error stack:
MPI_Comm_spawn(cmd="/usr/bin/env", argv=0x0000029F97E7E448, maxprocs=3, MPI_INFO_NULL, root=0, MPI_COMM_SELF, intercomm=0x0000029FF870FCF8, errors=0x0000029FF6B92140) failed
Internal MPI error!  FAILspawn not supported without process manager
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
anderwyang
  • 1,801
  • 4
  • 18
  • How are you starting your program? Normally you need something like ```mpirun``` to run an MPI program. – loris Feb 17 '22 at 09:59
  • So something like ```mpirun -np 1 Rscript rmpi-test.r``` Normally ```-np``` is used to specify how many MPI tasks should be started, but Rmpi does this internally and thus needs just one task to start its own controller process. – loris Feb 17 '22 at 10:07
  • Thanks for your replay. I have nothing progress about my code – anderwyang Feb 18 '22 at 05:02

0 Answers0