python - Unable to correctly run a personal job on the Beowulf cluster. Example job works fine -


i've set beowulf cluster using 1 master node , 2 client nodes. client nodes share master node's /home/mpiuser/ directory , automatically update whenever directory changed on master node. have run example compiled cpi file given when downloading mpich2 following command

$ mpiexec -f hosts -n 3 /home/mpiuser/mpich2-1.4.1/examples/cpi 

which gives following output

process 0 of 3 on master process 2 of 3 on slave2 process 1 of 3 on slave1 pi approximately 3.1415926544231318, error 0.0000000008333387 wall clock time = 0.001477 

then when try , run python file created here: /home/mpiuser/development/fact_test.py, using command

$ mpiexec -f hosts -n 3 /home/mpiuser/development/fact_test.py 

i following errors

[proxy:0:0@master] hydu_create_process (./utils/launch/launch.c:69): execvp error on file /home/mpiuser/development/fact_test.py (permission denied) [proxy:0:1@slave1] hydu_create_process (./utils/launch/launch.c:69): execvp error on file /home/mpiuser/development/fact_test.py (permission denied) [proxy:0:2@slave2] hydu_create_process (./utils/launch/launch.c:69): execvp error on file /home/mpiuser/development/fact_test.py (permission denied) 

additionally, can correctly names of master , client nodes input , output:

$ mpirun --machinefile hosts hostname master slave1 slave2 

i'm not quite sure error coming from. additional information: mpich2 version: 1.4.1 python version: 3.5.2

fact_test.py:

import scipy sp import time  def factorial_func(i):     return sp.math.factorial(i)  if __name__ == "__main__":     = 1e5     t0 = time.time()     fac = factorial_func(i)     t1 = time.time()     print(t1-t0) 

if need more information i'd happy provide it. thanks!

can run /home/mpiuser/development/fact_test.py on login node ?

i doubt since - there no magic header use python interpreter - file might not executable

one option add @ beginning of file

#!/usr/bin/python 

and then

chmod 755 /home/mpiuser/development/fact_test.py 

and other option manually use python interpreter, mpiexec command become

mpiexec -f hosts -n 3 python /home/mpiuser/development/fact_test.py 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -