You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a crash when optimizing bmad-doc/tao_examples/optics_matching
Minimal Working Example
cd bmad-doc/tao_examples/optics_matching
tao
Tao> use var quad
quad[1:6] Using: 1:6
Tao> set global optimizer = de
Tao> run
Optimizing with: de
Type ``.'' to stop the optimizer before it's finished.
Differential evolution optimizer, population: 30
[INFO] lattice_bookkeeper:
Stale bookkeeping status flags detected at element: P2\Q1 (0>>5).
Please contact DCS!
Status: 2 2 1 1 1
[INFO] lattice_bookkeeper:
Stale bookkeeping lord_status flags detected.
Please contact DCS!
Status: 2 2 1 1 1
tao(50503,0x1706b7000) malloc: *** error for object 0x6000024cc040: pointer being freed was not allocated
tao(50503,0x1706b7000) malloc: *** set a breakpoint in malloc_error_break to debug
Compiler and Operating system
macOS with gcc14
The text was updated successfully, but these errors were encountered:
@DavidSagan I am also seeing this bug on my conda install on macOS (with openMP).
When using the CLASSE cluster compiled release (without openMP) I do not get this bug with DE optimizer. I am guessing this has something to do with openMP.
The solution is that the tao_super_universe struct has to be duplicated so that there is one per thread. There is a lot of bookkeeping for this so in the meantime I will revert the code to using the non-openMP version of DE.
Update: The work to be done involves making the super_universe a local variable and not global. This means modifying nearly all of the routines in Tao to take the super_universe as an argument and modifying all the calls to the routines to add this argument. Also super_universe creation and destruction code needs to be implement that properly handles all the pointers that are used in the structures. This would be a good job for a student.
Describe the bug
There is a crash when optimizing
bmad-doc/tao_examples/optics_matching
Minimal Working Example
Compiler and Operating system
macOS with gcc14
The text was updated successfully, but these errors were encountered: