PyFstat issueshttps://gitlab.aei.uni-hannover.de/GregAshton/PyFstat/-/issues2020-02-05T10:48:39Zhttps://gitlab.aei.uni-hannover.de/GregAshton/PyFstat/-/issues/13Potentially dangerous (on clusters) temp-file naming policy in Writer.predict...2020-02-05T10:48:39ZReinhard PrixPotentially dangerous (on clusters) temp-file naming policy in Writer.predict_Fstat()In debugging some confusing behavior/problems of pyFstat on a cluster, I noticed that the method predict_fstat() of the class Writer, in make_sfts.py:257 uses the 'label' argument to construct the filename for the temporary internal fil...In debugging some confusing behavior/problems of pyFstat on a cluster, I noticed that the method predict_fstat() of the class Writer, in make_sfts.py:257 uses the 'label' argument to construct the filename for the temporary internal file ('temporyFile') in the *user's home-dir* they launched the jobs from.
This is potentially confusing/dangerous, as it's not documented (I believe) and as there's also the argument 'outdir', which is more obvious to be required to be unique on cluster runs.
What can happen here is that someone uses the same label for all jobs of a cluster run, gives every job a unique 'outdir', and still jobs will fall over themselves when all trying to read-read-delete the same temporary file in predict_fstat().
As as fix I would simply suggest to place that temporary file inside the 'outdir' as well, then there should be no problems.Gregory AshtonGregory Ashtonhttps://gitlab.aei.uni-hannover.de/GregAshton/PyFstat/-/issues/2why int(fmin) in run_makefakedata?2020-01-14T10:50:08ZDavid Keiteldavid.keitel@ligo.orgwhy int(fmin) in run_makefakedata?Hi again Greg, last one from me for now, and since I don't know if it's a simple bug or an intended hack, this is just an issue and not a merge request yet: Writer.run_makefakedata() has the line
`cl.append('--fmin={}'.format(int(self.f...Hi again Greg, last one from me for now, and since I don't know if it's a simple bug or an intended hack, this is just an issue and not a merge request yet: Writer.run_makefakedata() has the line
`cl.append('--fmin={}'.format(int(self.fmin)))`
which, if I'm trying to work with a relatively narrow band around the injection Freq, will make MFDv5 fail with a signal/datarange mismatch error, because the --Band is not increased and hence the whole SFT range is just shifted downwards, away from the injection.
For me just removing that int() and making sure myself that the band is wide enough seems to work fine in all use cases so far, though I guess you might have introduced it as an extra security padding? But in that case I'd suggest to increase the Band as well, and ideally to make it optional.Gregory AshtonGregory Ashton