Problem with array length between kinetic_feedback and remove_list subroutine

28 views
Skip to first unread message

yvonne_fichtner

unread,
Feb 16, 2023, 9:12:36 AM2/16/23
to ramses_users
Hello all,
In the kinetic_feedback (in the file feedback.f90) subroutine, the remove_list (in the file remove_list.f90) and add_free_cond (in the file add_list.f90) subroutines are being called.These routines take as input arrays (ind_part, ok, and in remove_list: ind_grid) and an integer called np.
The arrays are initialized in remove_list and add_free_cond with the dimension 1 to nvector and then loops are performed over them from 1 to np. However, in the calling functions (kinetic_feedback, kill_entire_cloud in the file sink_particle.f90, check_tree in particle_tree.f90), these arrays are initialized with dimensions from 1 to np (np might be named differently in these routines).While e.g. the kill_entire_cloud routine makes sure that np<=nvector, the kinetic_feedback routine has no such check implemented.
In kinetic_feedback, np is the number of SN events on that cpu in that coarse time step.
I was now wondering what happens if np>nvector in the SN routine (if many SN happen on 1 cpu at the same coarse time step).
The loops in remove_list and add_free_cond will then run to a higher value than the arrays have been initialized, however this issue is not spotted in the compiler when using the flags for a production run.
Thank you for your answer.

Fichtner

lukec...@gmail.com

unread,
May 24, 2023, 1:11:37 PM5/24/23
to ramses_users
Hi Fichtner,

I have had this happen in a zoom simulation, and the run crashed. In the end I just used a large value of nvector to push the run to the finish. Did you implement the check for nvector?

Best,
Luke
Reply all
Reply to author
Forward
0 new messages