Raytrace errors when simulating event file
I'm working on updating my custom Scorpio/Gemini telescope ISC from working with PhoSim version 5.2.13 to 5.5.4.
When I run a simulation with the line "eventfile 1" in my command file, the raytrace errors and aborts. My terminal command uses the parameters "-p 1 -t 1" so that only 1 thread and 1 core are used.
The last time I successfully created event files was with version 5.2.13.
PhoSim version: 5.5.4
Catalog file: examples/small_catalog
Command file: examples/nobackground (with the line "eventfile 1" added)
Other note: In the file "source/raytrace/parameters.h" I have to change the value of the line "MAX_SURF" to 50.
This is the exact output:
Number of Sources: 11436
Photons: 3.72e+08 Photons/cm^2/s: 5.05e+01
----------------------------------------------------------------------------------------------------
Photon Raytrace
commit none
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Type Sources Photons/Electrons ( Sat , Rem , Rej , Acc )% Time (s) Events/s
----------------------------------------------------------------------------------------------------
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
Aborted (core dumped)
Comments (5)
-
-
reporter Thanks John, that seems to work. In the small_catalog file I had to reduce the magnitude range for both stars and galaxies to 24-30 before it would complete the simulation. It resulted in 9.6e7 photons for 10,565 sources. The resulting eventfile is 1.6 GiB in size.
-
Ok good. I’ll get someone to make it more elegantly tell you that it can’t allocate enough memory.
-
There is a more graceful fix for this now coming in v5.6. closing this thread.
-
- changed status to resolved
resolved in v5.6
- Log in to comment
Landon-
Can you check it with a smaller number of sources or some fainter sources. It may just be running out of memory, because when you turn on event file it has to save a ton of information for each photon before that ultimately goes to the FITS file. I could be wrong, but I am guessing that it says it is making 3e8 photons from 11,436 sources that that may be many gigabytes of data. See if you can just reduce the input or shorten the exposure or something to get it working with less photons. Tell me if that works.
John