MultiNest MPI not working
It looks like the recent changes to the pymultinest
implementation have broken the MPI compatibility. I think it's because of the use of the temporary directory.
I think there are two ways around this:
- use a deterministic temporary directory name
- allow users to turn off the temporary directory usage.
Thoughts? @gregory.ashton
*****************************************************
MultiNest v3.10
Copyright Farhan Feroz & Mike Hobson
Release Jul 2015
no. of live points = 100
dimensionality = 9
*****************************************************
Starting MultiNest
Traceback (most recent call last):
File "fast_tutorial.py", line 106, in <module>
injection_parameters=injection_parameters, outdir=outdir, label=label)
File "/Users/colm/modules/bilby/bilby/core/sampler/__init__.py", line 178, in run_sampler
result = sampler.run_sampler()
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 186, in run_sampler
self.temporary_outputfiles_basename = temporary_outputfiles_basename
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 147, in temporary_outputfiles_basename
self.outputfiles_basename, self.temporary_outputfiles_basename
File "/opt/anaconda3/envs/dev/lib/python3.7/shutil.py", line 368, in copytree
raise Error(errors)
shutil.Error: [('outdir/pm_fast_tutorial/post_equal_weights.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/post_equal_weights.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/post_equal_weights.dat'"), ('outdir/pm_fast_tutorial/resume.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/resume.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/resume.dat'"), ('outdir/pm_fast_tutorial/live.points', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/live.points', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/live.points'"), ('outdir/pm_fast_tutorial/ev.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/ev.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/ev.dat'"), ('outdir/pm_fast_tutorial/summary.txt', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/summary.txt', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/summary.txt'"), ('outdir/pm_fast_tutorial/stats.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/stats.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/stats.dat'"), ('outdir/pm_fast_tutorial/phys_live.points', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmp_c1pz_a1/phys_live.points', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/phys_live.points'")]
Traceback (most recent call last):
File "fast_tutorial.py", line 106, in <module>
injection_parameters=injection_parameters, outdir=outdir, label=label)
File "/Users/colm/modules/bilby/bilby/core/sampler/__init__.py", line 178, in run_sampler
result = sampler.run_sampler()
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 186, in run_sampler
self.temporary_outputfiles_basename = temporary_outputfiles_basename
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 147, in temporary_outputfiles_basename
self.outputfiles_basename, self.temporary_outputfiles_basename
File "/opt/anaconda3/envs/dev/lib/python3.7/shutil.py", line 368, in copytree
raise Error(errors)
shutil.Error: [('outdir/pm_fast_tutorial/stats.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpof4eyttp/stats.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/stats.dat'"), ('outdir/pm_fast_tutorial/phys_live.points', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpof4eyttp/phys_live.points', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/phys_live.points'"), ('outdir/pm_fast_tutorial/post_separate.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpof4eyttp/post_separate.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/post_separate.dat'"), ('outdir/pm_fast_tutorial', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpof4eyttp/', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial'")]
Traceback (most recent call last):
File "fast_tutorial.py", line 106, in <module>
injection_parameters=injection_parameters, outdir=outdir, label=label)
File "/Users/colm/modules/bilby/bilby/core/sampler/__init__.py", line 178, in run_sampler
result = sampler.run_sampler()
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 186, in run_sampler
self.temporary_outputfiles_basename = temporary_outputfiles_basename
File "/Users/colm/modules/bilby/bilby/core/sampler/pymultinest.py", line 147, in temporary_outputfiles_basename
self.outputfiles_basename, self.temporary_outputfiles_basename
File "/opt/anaconda3/envs/dev/lib/python3.7/shutil.py", line 368, in copytree
raise Error(errors)
shutil.Error: [('outdir/pm_fast_tutorial/ev.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/ev.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/ev.dat'"), ('outdir/pm_fast_tutorial/summary.txt', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/summary.txt', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/summary.txt'"), ('outdir/pm_fast_tutorial/stats.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/stats.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/stats.dat'"), ('outdir/pm_fast_tutorial/phys_live.points', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/phys_live.points', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/phys_live.points'"), ('outdir/pm_fast_tutorial/post_separate.dat', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/post_separate.dat', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial/post_separate.dat'"), ('outdir/pm_fast_tutorial', '/var/folders/ch/sb6js20s48xbkqbd4tn70j9m0000gn/T/tmpdppblma0/', "[Errno 2] No such file or directory: 'outdir/pm_fast_tutorial'")]