Dear PhysiCell Team,
My name is Janina Schreiber and I am currently employed at the Life Science Department of the Barcelona Supercomputing Center, where I am working with Dr. Miguel Ponce de Leon. There, I am testing different model exploration algorithms for the optimization of drug therapies on heterogeneous tumors using the cancer-immune model of PhysiCell. TIn addition, I make use of EMEWS.
I am writing you because I hope for your help concerning the following problem I encountered:
I downloaded the following repository:
https://github.com/MathCancer/PhysiCell-EMEWS-2
and tested different algorithms that seek to minimize the tumor cell count. When analyzing the results I found that quite a lot of simulations returned -1. The reason seems to be a segmentation fault in some of the simulations. I copied the config.xml that caused the problem and ran the simulation locally to see if it was a problem with the specifications on the supercomputer, but the same error occurred locally as well.
Since I changed only a subset of parameters in the config.xml file I assumed it is not necessarily a wrong specification. Instead, I upgraded PhysiCell to version 1.8 to the newest version. However, the 2D model no longer exists and with a few adaptations I compiled the old model with the new PhysiCell version but the error was reproduced with the addition that the tumor radius grew to infinite. In the attachment, you can find the PhysiCellv18_config.xml which I used to run the model in the new PhysiCell version. Certainly, I could switch to the 3D model, but for our approaches, it is more convenient to have a relatively "fast" simulation of the tumor.
I put one of the PhysiCell_settings.xml files causing the error as well as the error message in the attachment (seg:fault_original.png for the old PhysiCell version on a local machine and seg_fault_PhysiCellv1.8.png for the updated PhysiCell version run in MareNostrum using EMEWS).
It would be of great help if you could give me a suggestion on what is going wrong or how I could fix this issue.
Please let me know if you need any additional information.
Thank you a lot in advance!
Kind regards,
Janina
Hi Janina,
If you're willing to test an upgraded version (to 1.9.0) of that model, could you try:
https://github.com/rheiland/PhysiCell-EMEWS-2
and try to run:
.../PhysiCell-src$ cancer-immune-EMEWS2 PhysiCellv18_config-2.xml
You can "diff" the two .xml files to see what I changed in the "-2" version.
thanks for the detailed ticket and please let us know how it goes,
Randy
FYI: It seems I was overly optimistic. I just saw that later .svg files (after ~9 hrs) had cells' y-values going off to infinity. Would need to dig a bit deeper as to why.
Hello Mr Heiland,
Thank you a lot for your fast reply, it is very helpful to me! I was running two setups (with different values for immune_apoptosis_rate, attachment_rate and so on) and up to know the outputs seem to be fine. I did not have any infinite values yet. However, I will let you know if I encounter any problems or if I reproduce the error you mentioned.
Best, Janina
Last edit: Janina Schreiber 2021-07-13
Dear Mr. Heiland,
I let go of the project for some time, but finally I found the error.
The list of neighbor cells was not properly updated when a cell was deleted, only the list of attached cells.
I am not a c++ expert, but I adapted the code and it seems to work fine. In case you are interested to review it, I attached the PhysiCell.cpp that I adapted. The functions added are termed
void Cell::remove_dead_cell_from_neighbor(Cell* pRemoveMe) line 2455
void Cell::remove_dead_cell_from_all_neighbors(void) line 2517
I also attached the output of the final !
Best,
Janina
Here the PhysiCell.cpp
Interesting.
I think we could add these as suggested, and also modify the default destructor to make sure this happens. (May also want ot add it to the divide function.)
I'll want ot check this carefully, but I think we could put this into 1.9.2
Okay, I am interested in your feedback, so please let me know if you agree with this fix.
I am looking forward to hearing from you.