TeamCOMPAS / COMPAS

COMPAS rapid binary population synthesis code
http://compas.science
MIT License
65 stars 66 forks source link

2nd Supernova not printing #517

Closed reinhold-willcox closed 3 years ago

reinhold-willcox commented 3 years ago

Describe the bug The 2nd SN is not printing if the first one is disruptive. This is a new change following PR #507 (sorry Simon to throw you under the bus!).

The issue can be fixed by reverting the line in BaseBinaryStar.cpp in that commit, from:

else if (IsDCO() && m_Time>(m_DCOFormationTime + m_TimeToCoalescence) && !IsUnbound()){
                            evolutionStatus = EVOLUTION_STATUS::STOPPED; 
                        } 

to

else if (IsDCO() && m_Time>(m_DCOFormationTime + m_TimeToCoalescence)){
                            evolutionStatus = EVOLUTION_STATUS::STOPPED; 
                        } 

However, that just opens up Simon's issue again, so this may require more thought. Also, I see I was tagged in the other PR, but I must have overlooked it, that's on me.

Label the issue urgency_moderate - This is a moderately urgent issue severity_moderate - This is a moderately severe bug

To Reproduce Steps to reproduce the behavior:

COMPAS -n 1 --random-seed 1253348 --initial-mass-1 7.774703670821885 --semi-major-axis 693.9547537158253 --initial-mass-2 6.628395253709512 --metallicity 0.0142 --eccentricity 0 --kick-theta-1 1.121298905520773 --kick-theta-2 -0.11028283259069305 --kick-phi-1 3.2789799698707145 --kick-phi-2 0.07861287414621784 --kick-mean-anomaly-1 5.386188554554972 --kick-mean-anomaly-2 5.452499790241414 --evolve-unbound TRUE --remnant-mass-prescription FRYER2012 --kick-magnitude-1 100 --kick-magnitude-2 100

This system results in 2 NSs (disrupted at first SN), but if run on the current version of dev, only one SN shows up in the output. (If the line above is corrected, both SNe appear).

Expected behavior Both SNe show up.

Versioning (please complete the following information):

ilyamandel commented 3 years ago

@reinhold-willcox -- I ran your code and can't reproduce the problem, I am getting two supernovae in the output file.

jeffriley commented 3 years ago

I can confirm Ilya's result - I executed the command specified above for both CSV file output and hdf5 file output (just in case) and got 2 entries in the SN file both times. I used v02.18.04.

@reinhold-willcox are you running a clean version of COMPAS (i.e. no custom changes)? If you are, can you check your build - maybe 'make clean' and do a clean build, and try again? If you continue to see only one entry in the SN file then we'll have to do a bit more investigation.

reinhold-willcox commented 3 years ago

I'm not seeing the behavior anymore, so I will close this issue unless/until it pops up again...