The C++ wrapper functions (mui_barrier_, mui_forget_upper_) expect pointers to pass-by-reference mui_barrier_3d_f cpp file L11241
The Fortran interface declarations use value attribute, which passes by value mui_barrier_3d_f f90 file L14439
This causes segfaults when these functions are called. This should reproduce the error with current wrappers:
call mui_barrier_3d_f(uniface_3d, 1.0_c_double)
call mui_forget_upper_3d_f(uniface_3d, 2.0_c_double, 1_c_int)
github codepilot (Claude) identified this discrepancy with all flavors of the barrier and forget functions. It seems correct for other functions but I did not do a thorough review.
Removing the value declaration on non-interface related variables for the barrier and forget functions alleviated the segfaults I was experiencing.
I am currently using 2024 source (hash 7b0e83b). However, I don't believe the wrappers have changed in 3 years so I believe this bug persists for the current version.
The C++ wrapper functions (mui_barrier_, mui_forget_upper_) expect pointers to pass-by-reference mui_barrier_3d_f cpp file L11241
The Fortran interface declarations use value attribute, which passes by value mui_barrier_3d_f f90 file L14439
This causes segfaults when these functions are called. This should reproduce the error with current wrappers:
github codepilot (Claude) identified this discrepancy with all flavors of the barrier and forget functions. It seems correct for other functions but I did not do a thorough review.
Removing the value declaration on non-interface related variables for the barrier and forget functions alleviated the segfaults I was experiencing.
I am currently using 2024 source (hash 7b0e83b). However, I don't believe the wrappers have changed in 3 years so I believe this bug persists for the current version.