Missing SED file does not cause proper crash

Issue #7 closed
Thomas Glanzman created an issue

Running phoSim 3.4.2 with an instance catalog that points to a non-existent SED file causes phoSim to halt, but without: 1) identifying the missing SED file; or, 2) setting a non-zero return code. This makes it difficult to directly distinguish a successful vs unsuccessful run of phoSim in a large, production batch environment. When, in the case of thousands of SED files, it is also difficult to locate the problem SED file.

Please consider sending the name of the problem SED file to stdout, and returning a non-zero return code when this situation occurs.

Thank you.

Comments (4)

  1. Thomas Glanzman reporter

    This bug is still present in v3.5.3. One sees this, for example:

    [...] Photon Raytrace


    Installing Universe. Can't find SED file: /lustre/ki/pfs/fermi_scratch/lsst/TW-phoSim-r3/singleSensor/0/0/SEDs//lustre/ki/pfs/fermi_scratch/lsst/TW-phoSim-r3/singleSensor/0/0/spectra_files/specFile_6000487641804_59580.1396_r.dat Process Process-1: Traceback (most recent call last): File "/opt/TWWfsw/python27/lib/python2.7/multiprocessing/process.py", line 259, in bootstrap self.run() File "/opt/TWWfsw/python27/lib/python2.7/multiprocessing/process.py", line 115, in run self._target(self._args, *self._kwargs) File "/nfs/farm/g/lsst/u1/software/redhat6-x86_64-64bit-gcc44/phoSim/3.5.3/phosim.py", line 42, in jobChip runProgram("raytrace < raytrace"+fid+".pars", binDir) File "/nfs/farm/g/lsst/u1/software/redhat6-x86_64-64bit-gcc44/phoSim/3.5.3/phosim.py", line 66, in runProgram raise RuntimeError("Error running %s" % myCommand) RuntimeError: Error running /nfs/farm/g/lsst/u1/software/redhat6-x86_64-64bit-gcc44/phoSim/3.5.3/bin/raytrace < raytrace_230_R22_S11_E000.pars


    Which then exits with a return code of zero. When phoSim crashes without completing successfully, it must report a non-zero return code. This is especially important in large productions where the return code is the primary way to learn of something gone amiss.

  2. Log in to comment