From 13205de1693bfab92476dcdfff77e87ec46b277d Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Mon, 12 Jan 2026 09:31:37 +0100 Subject: [PATCH] Fix for rare crash of ILL_IN4 / MPI (see e.g. https://new-nightly.mcstas.org/2026-01-06_output.html) --- mcstas-comps/examples/ILL/ILL_IN4/ILL_IN4.instr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mcstas-comps/examples/ILL/ILL_IN4/ILL_IN4.instr b/mcstas-comps/examples/ILL/ILL_IN4/ILL_IN4.instr index 2bab5ce7bd..7b7e995e6e 100644 --- a/mcstas-comps/examples/ILL/ILL_IN4/ILL_IN4.instr +++ b/mcstas-comps/examples/ILL/ILL_IN4/ILL_IN4.instr @@ -329,6 +329,10 @@ INITIALIZE %{ #pragma acc update device( environment_thickness ) + #ifdef USE_MPI + /* In case of MPI mode, add an MPI_Barrier to ensure no node runs on an uncompleted/non-existentt Dirac2D.sqw */ + MPI_Barrier(MPI_COMM_WORLD); + #endif %}