We use preCICE to couple our CFD code ReFRESCO to Code Aster. Recently, I have upgraded our Intel compiler from oneapi 2021.4 to 2023.1 and this results in an error when running a test-case.
In the job file of the test-case, the following two commands are executed:
The simulation runs fine, creating correct output, and both the python-script and refresco seem to conclude correctly (at least, the last lines of both codes are executed correctly). But after the refresco simulation had finished, the job gives the following error and then stalls:
malloc(): unsorted double linked list corrupted
malloc(): unsorted double linked list corrupted
malloc(): unsorted double linked list corrupted
corrupted double-linked list
I am not sure where this error is coming from and whether this is a preCICE-issue, but perhaps you have seen it before. When I switch back from oneapi 2023 to 2021, the error disappears. Any help would be greatly appreciated!
System specifications: Rocky Linux 8.10, preCICE 2.5.0, oneapi/compiler/2023.1.0, oneapi/mkl/2023.1.0, oneapi/mpi/2021.9.0.
@Martijn_drdw this could be anything and from different layers (calling code, bindings, preCICE library, …), and the log is too little to understand where this originates from. Should be related to some destructor or explicit deallocation calls:
One debugging approach would be to run some of the solver dummies or the quickstart tutorial and see if you get something similar.
I know you have other restrictions and it is complex to handle so many different codes, but I anyway would highly recommend that you upgrade to the latest preCICE (currently v3.2.0). Upgrading should not be so difficult, we have porting guides:
I have tried your first suggestion and ran the solver dummies c and cpp, so without using ReFRESCO and Code Aster. This gives the same error:
...
...
preCICE: Time window completed
preCICE: iteration: 1 of 2 (min 2), time-window: 3 of 2, time: 2, time-window-size: 1, max-time-step-size: 0, ongoing: no, time-window-complete: yes,
DUMMY: Advancing in time
preCICE: Close communication channels
DUMMY: Closing C solver dummy...
corrupted double-linked list
Aborted (core dumped)
I then ran this test for several other configurations, using different compilers to compile preCICE 2.5.0 or 3.1.2, and found the following:
compiler precice result
----------------------------------
intel 2021 ifort 2.5.0 ok
intel 2023 ifort 2.5.0 crash
intel 2023 ifort 3.1.2 crash
intel 2023 ifx 3.1.2 ok
So the problem seems to occur only when I compile precice with the 2023 ifort compiler.