roryk / ipython-cluster-helper

Tool to easily start up an IPython cluster on different schedulers.
148 stars 23 forks source link

CalledProcessError #49

Open thomasklau opened 7 years ago

thomasklau commented 7 years ago

with cluster_view(scheduler="slurm", queue="hsph", num_jobs=20) as view: view.map(time_waster, range(20))

CalledProcessError Traceback (most recent call last)

in () ----> 1 with cluster_view(scheduler="slurm", queue=None, num_jobs=20) as view: 2 view.map(time_waster, range(20)) /share/PI/rondror/software/miniconda/lib/python2.7/contextlib.pyc in __enter__(self) 15 def __enter__(self): 16 try: ---> 17 return self.gen.next() 18 except StopIteration: 19 raise RuntimeError("generator didn't yield") /home/thomklau/.local/lib/python2.7/site-packages/cluster_helper/cluster.pyc in cluster_view(scheduler, queue, num_jobs, cores_per_job, profile, start_wait, extra_params, retries, direct, wait_for_all_engines) 1103 profile=profile, start_wait=start_wait, extra_params=extra_params, 1104 retries=retries, direct=direct, -> 1105 wait_for_all_engines=wait_for_all_engines) 1106 try: 1107 yield cluster_view.view /home/thomklau/.local/lib/python2.7/site-packages/cluster_helper/cluster.pyc in __init__(self, scheduler, queue, num_jobs, cores_per_job, profile, start_wait, extra_params, retries, direct, wait_for_all_engines) 971 if self.profile is None: 972 self.has_throwaway = True --> 973 self.profile = create_throwaway_profile() 974 else: 975 # ensure we have an .ipython directory to prevent issues /home/thomklau/.local/lib/python2.7/site-packages/cluster_helper/cluster.pyc in create_throwaway_profile() 1169 cmd = [sys.executable, "-E", "-c", "from IPython import start_ipython; start_ipython()", 1170 "profile", "create", profile, "--parallel"] -> 1171 subprocess.check_call(cmd) 1172 return profile 1173 /share/PI/rondror/software/miniconda/lib/python2.7/subprocess.pyc in check_call(*popenargs, **kwargs) 538 if cmd is None: 539 cmd = popenargs[0] --> 540 raise CalledProcessError(retcode, cmd) 541 return 0 542 CalledProcessError: Command '['/share/PI/rondror/software/miniconda/bin/python', '-E', '-c', 'from IPython import start_ipython; start_ipython()', 'profile', 'create', '036ed3ce-159d-11e7-a1f1-40167e11fcaf', '--parallel']' returned non-zero exit status 1
roryk commented 7 years ago

Hi Thomas,

What does running

/share/PI/rondror/software/miniconda/bin/python -E -c 'from IPython import start_ipython; start_ipython()' profile create 036ed3ce-159d-11e7-a1f1-40167e11fcaf --parallel

return if you run it on the command line? I am guessing that there is a permissions issue or it otherwise can't create the temporary profile directory.

thomasklau commented 7 years ago

It looks fine:

[thomklau@gpu-9-8 ~]$ /share/PI/rondror/software/miniconda/bin/python -E -c 'from IPython import start_ipython; start_ipython()' profile create 036ed3ce-159d-11e7-a1f1-40167e11fcaf --parallel [ProfileCreate] Generating default config file: u'/home/thomklau/.ipython/profile_036ed3ce-159d-11e7-a1f1-40167e11fcaf/ipython_config.py' [ProfileCreate] Generating default config file: u'/home/thomklau/.ipython/profile_036ed3ce-159d-11e7-a1f1-40167e11fcaf/ipython_kernel_config.py' [ProfileCreate] Generating default config file: u'/home/thomklau/.ipython/profile_036ed3ce-159d-11e7-a1f1-40167e11fcaf/ipcontroller_config.py' [ProfileCreate] Generating default config file: u'/home/thomklau/.ipython/profile_036ed3ce-159d-11e7-a1f1-40167e11fcaf/ipengine_config.py' [ProfileCreate] Generating default config file: u'/home/thomklau/.ipython/profile_036ed3ce-159d-11e7-a1f1-40167e11fcaf/ipcluster_config.py'

Thomas Lau

On Thu, Mar 30, 2017 at 5:05 PM, Rory Kirchner notifications@github.com wrote:

Hi Thomas,

What does running

/share/PI/rondror/software/miniconda/bin/python -E -c 'from IPython import start_ipython; start_ipython()' profile create 036ed3ce-159d-11e7-a1f1-40167e11fcaf --parallel

return if you run it on the command line? I am guessing that there is a permissions issue or it otherwise can't create the temporary profile directory.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/roryk/ipython-cluster-helper/issues/49#issuecomment-290579227, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnivQXnImCb33NwaaMAegiS1gbu7_wFks5rrEMsgaJpZM4MvB6Y .

roryk commented 7 years ago

Thanks. Hm, that is strange. If you run it and do echo $? it returns a 0?