1

I want to call an MPI exectable from Julia in a Jupyter notebook.

Doing

cmd = Cmd(`mpiexec -np 4 name_of_executable`)
run(cmd)

creates 4 processes, but they all use 25% cpu on one core. Is there a way to have it run 100% on four separate cores?

Jeroen
  • 11
  • 1
  • Is this the same as if you run `mpiexec -np 4 name_of_executable` from the command line? – Alexander Morley Jan 12 '18 at 17:41
  • also is your environment and OS 64 bit / multi core......? check this [answer](https://stackoverflow.com/questions/11749182/assign-two-mpi-processes-per-core#answer-11749530) , might be related – AntJavaDev Jan 12 '18 at 17:51
  • Just a remark, no need for `Cmd(\`mpiexec -np 4 name_of_executable\`)`, `\`mpiexec -np 4 name_of_executable\`` is enough. – carstenbauer Jan 12 '18 at 17:55
  • @AlexanderMorley No, if I run the command from the command line, I get four processes, each taking up 100%, not 25% each on one core – Jeroen Jan 12 '18 at 19:14
  • @AntJavaDev I have tried two suggestions from the answer you link to. Adding the option "--map-by core -bind-to-core" to the command results in "A request was made to bind to that would result in binding more processes than cpus on a resource: #processes: 1 #cpus: 1" even though this is a multicore machine. Adding "-npersocket 4" gives the same result as before, 4 processes with 25% cpu each. – Jeroen Jan 12 '18 at 19:28
  • I also get the same result (4 processes with 25% cpu each) when issuing these commands from the REPL. – Jeroen Jan 12 '18 at 19:33
  • then maybe when being invoked from a 'third party' process , looks like its getting restricted to only 1 core per process as it doesnt really execute mpiexec. cant see any suggestion whether Julia runs on all cores – AntJavaDev Jan 13 '18 at 20:16

0 Answers0