PSims / BayesEoR

Code to estimate the power spectrum of redshifted 21-cm emission from interferometric observations, within a Bayesian forward modelling framework.
https://bayeseor.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

I/O error if output directory path is too many characters #32

Open jburba opened 1 month ago

jburba commented 1 month ago

It appears the fortran component(?) of MultiNest can only handle output file paths of <= 100 characters. If the output directory for the sampler output is too long, an error will be raised stating Fortran runtime error: File already opened in another unit. Examining the desired output directory, I can see a file with a name that is a truncation of the desired output directory name. For example, if the desired output directory is

/home/jburba/hydra_team/bayeseor/oscar-data/analysis/wn/airy/diam14.6/MN-Test-23-23-38-0-2-4.9E-03-2.63-2.82-lp-dPS-v1

which is 118 characters, upon encountering the aforementioned error I see a file in the parent directory named

/home/jburba/hydra_team/bayeseor/oscar-data/analysis/wn/airy/diam14.6/MN-Test-23-23-38-0-2-4.9E-03-2

which is 100 characters.

A workaround is to just write the output to the current working directory to minimize the length of the file path. This is slightly annoying, though. I'm not sure if there is a way to plumb the MultiNest code and adjust this.