From b5663ce77c13bdc243fcba3f917d4dbea1742bd5 Mon Sep 17 00:00:00 2001
From: mads-bertelsen-agentic
<301266180+mads-bertelsen-agentic@users.noreply.github.com>
Date: Wed, 26 Aug 2026 12:10:52 +0200
Subject: [PATCH 01/13] Add nowritefile parameter to all Union loggers and
abs_loggers
The nowritefile parameter, already standard for monitors, skips writing
output data to disk when set. This adds the same feature to all Union
logger and abs_logger components: a new int nowritefile=0 setting
parameter, a documentation line under %P, and the save section wrapped
in an if (!nowritefile) statement.
Union_abs_logger_nD already had the parameter and inherits the
if-statement from Monitor_nD through SAVE INHERIT; its documentation
line was corrected from 'Not functional for Union version'.
---
.../union/Union_abs_logger_1D_space.comp | 13 ++++++++-----
.../Union_abs_logger_1D_space_event.comp | 7 +++++--
.../union/Union_abs_logger_1D_space_tof.comp | 13 ++++++++-----
...ion_abs_logger_1D_space_tof_to_lambda.comp | 13 ++++++++-----
.../union/Union_abs_logger_1D_time.comp | 13 ++++++++-----
.../union/Union_abs_logger_2D_space.comp | 13 ++++++++-----
.../union/Union_abs_logger_event.comp | 7 +++++--
mcstas-comps/union/Union_abs_logger_nD.comp | 2 +-
mcstas-comps/union/Union_logger_1D.comp | 13 ++++++++-----
mcstas-comps/union/Union_logger_2DQ.comp | 13 ++++++++-----
mcstas-comps/union/Union_logger_2D_kf.comp | 13 ++++++++-----
.../union/Union_logger_2D_kf_time.comp | 19 +++++++++++--------
mcstas-comps/union/Union_logger_2D_space.comp | 13 ++++++++-----
.../union/Union_logger_2D_space_time.comp | 19 +++++++++++--------
mcstas-comps/union/Union_logger_3D_space.comp | 19 +++++++++++--------
15 files changed, 116 insertions(+), 74 deletions(-)
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space.comp b/mcstas-comps/union/Union_abs_logger_1D_space.comp
index cd1cb0ff41..34b975f5bf 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space.comp
@@ -67,6 +67,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -81,7 +82,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space
SETTING PARAMETERS(string target_geometry="NULL",
yheight, n=100,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -519,10 +520,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
- this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
- this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
- &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
+ this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
+ this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
+ &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_event.comp b/mcstas-comps/union/Union_abs_logger_1D_space_event.comp
index 5fdd6587cb..758e6d50f4 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space_event.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space_event.comp
@@ -77,6 +77,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -90,7 +91,7 @@
DEFINE COMPONENT Union_abs_logger_1D_space_event
SETTING PARAMETERS(string target_geometry="NULL", yheight, int n, int fake_event=0,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -615,7 +616,9 @@ TRACE
SAVE
%{
- Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars));
+ if (!nowritefile) {
+ Monitor_nD_Save (&(this_abs_storage.DEFS), &(this_abs_storage.Vars));
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
index b321f4c2d7..0a70dac097 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
@@ -70,6 +70,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_space_tof
SETTING PARAMETERS(string target_geometry="NULL",
yheight, n=0.2,
time_min=0, time_max=1, time_bins=100,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -580,10 +581,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
+ this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
+ *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
index 4469011a5a..23caf39d63 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
@@ -101,6 +101,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -119,7 +120,7 @@ SETTING PARAMETERS(string target_geometry="NULL",
lambda_m_min=-1, lambda_m_max=-1, lambda_m_bins=-1,
lambda_t_min=-1, lambda_t_max=-1, lambda_t_bins=-1,
relative_measured=0, relative_min=0.5, relative_max=1.5, relative_bins=100,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -784,10 +785,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
+ this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
+ *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_1D_time.comp b/mcstas-comps/union/Union_abs_logger_1D_time.comp
index 4023fe0cf8..5fac10a8aa 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_time.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_time.comp
@@ -71,6 +71,7 @@
* init: [string] name of Union_init component (typically "init", default)
* time_min: [s] Minimum time to log
* time_max: [s] Maximum time to log
+* nowritefile: [1] If set, logger will skip writing to disk
*
* OUTPUT PARAMETERS:
*
@@ -85,7 +86,7 @@ DEFINE COMPONENT Union_abs_logger_1D_time
DEFINITION PARAMETERS ()
SETTING PARAMETERS(string target_geometry="NULL",
time_min=0, time_max, n=100,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
OUTPUT PARAMETERS ()
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -503,10 +504,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
- this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
- this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
- &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_1D (this_abs_storage.Detector_1D.title_string, this_abs_storage.Detector_1D.string_axis, this_abs_storage.Detector_1D.string_axis_value,
+ this_abs_storage.Detector_1D.string_axis_short, this_abs_storage.Detector_1D.min, this_abs_storage.Detector_1D.max,
+ this_abs_storage.Detector_1D.bins, &this_abs_storage.Detector_1D.Array_N[0], &this_abs_storage.Detector_1D.Array_p[0],
+ &this_abs_storage.Detector_1D.Array_p2[0], this_abs_storage.Detector_1D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_2D_space.comp b/mcstas-comps/union/Union_abs_logger_2D_space.comp
index 69c24cf643..50d62142fa 100644
--- a/mcstas-comps/union/Union_abs_logger_2D_space.comp
+++ b/mcstas-comps/union/Union_abs_logger_2D_space.comp
@@ -77,6 +77,7 @@
* order_volume: [1] Only log rays that have scattered n times in the same geometry, -1 for all orders
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then access logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -92,7 +93,7 @@ DEFINE COMPONENT Union_abs_logger_2D_space
SETTING PARAMETERS(string target_geometry="NULL",
string D_direction_1="x", D1_min=-0.2, D1_max=5, n1=0.2,
string D_direction_2="z", D2_min=-0.2, D2_max=5, n2=0.2,
- string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -641,10 +642,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
+ this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
+ *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_event.comp b/mcstas-comps/union/Union_abs_logger_event.comp
index 3d325c0f2a..36b4b28b69 100644
--- a/mcstas-comps/union/Union_abs_logger_event.comp
+++ b/mcstas-comps/union/Union_abs_logger_event.comp
@@ -73,6 +73,7 @@
* ybins: [1] Number of bins along y in logging volume
* zbns: [1] Number of bins along z in logging volume
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -87,7 +88,7 @@ DEFINE COMPONENT Union_abs_logger_event
SETTING PARAMETERS(string target_geometry="NULL", string filename="NULL",
xwidth=0, xbins=0, yheight=0, ybins=0, zdepth=0, zbins=0,
- order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init")
+ order_total=-1, order_volume=-1, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -693,7 +694,9 @@ TRACE
SAVE
%{
- Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars);
+ if (!nowritefile) {
+ Monitor_nD_Save (&this_abs_storage.DEFS, &this_abs_storage.Vars);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_abs_logger_nD.comp b/mcstas-comps/union/Union_abs_logger_nD.comp
index d765f1e0fa..85f2623e9f 100644
--- a/mcstas-comps/union/Union_abs_logger_nD.comp
+++ b/mcstas-comps/union/Union_abs_logger_nD.comp
@@ -102,7 +102,7 @@
* username9: [str] Name assigned to User9
* restore_neutron: [0|1] Not functional for Union version
* geometry: [str] Name of an OFF file to specify a complex geometry detector
-* nowritefile: [1] Not functional for Union version
+* nowritefile: [1] If set, logger will skip writing to disk
* nexus_bins: [1] NeXus mode only: store component BIN information
(-1 disable, 0 enable for list mode monitor, 1 enable for any montor)
*
* OUTPUT PARAMETERS:
diff --git a/mcstas-comps/union/Union_logger_1D.comp b/mcstas-comps/union/Union_logger_1D.comp
index d2a0eccf9b..e859b8893a 100644
--- a/mcstas-comps/union/Union_logger_1D.comp
+++ b/mcstas-comps/union/Union_logger_1D.comp
@@ -58,6 +58,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -70,7 +71,7 @@
DEFINE COMPONENT Union_logger_1D
-SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init")
+SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL", min_value, max_value, n1=90, string variable="time",string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -588,10 +589,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value,
- this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins,
- &this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0],
- this_storage.Detector_1D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_1D (this_storage.Detector_1D.title_string, this_storage.Detector_1D.string_axis, this_storage.Detector_1D.string_axis_value,
+ this_storage.Detector_1D.string_axis_short, this_storage.Detector_1D.min, this_storage.Detector_1D.max, this_storage.Detector_1D.bins,
+ &this_storage.Detector_1D.Array_N[0], &this_storage.Detector_1D.Array_p[0], &this_storage.Detector_1D.Array_p2[0],
+ this_storage.Detector_1D.Filename);
+ }
%}
diff --git a/mcstas-comps/union/Union_logger_2DQ.comp b/mcstas-comps/union/Union_logger_2DQ.comp
index 5fbb7104b5..dfbd3bcace 100644
--- a/mcstas-comps/union/Union_logger_2DQ.comp
+++ b/mcstas-comps/union/Union_logger_2DQ.comp
@@ -60,6 +60,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, uwsing the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -76,7 +77,7 @@ SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",
string Q_direction_1="x", Q1_min=-5,Q1_max=5, n1=90,
string Q_direction_2="z", Q2_min=-5,Q2_max=5, n2=90,
string filename="NULL", order_total=0, order_volume=0,
- order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
+ order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -669,10 +670,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
- this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
- this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
- *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
+ this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
+ this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
+ *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_logger_2D_kf.comp b/mcstas-comps/union/Union_logger_2D_kf.comp
index 1255d5db55..fd8e214138 100644
--- a/mcstas-comps/union/Union_logger_2D_kf.comp
+++ b/mcstas-comps/union/Union_logger_2D_kf.comp
@@ -61,6 +61,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -73,7 +74,7 @@
DEFINE COMPONENT Union_logger_2D_kf
-SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
+SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -671,10 +672,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
- this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
- this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
- *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
+ this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
+ this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
+ *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_logger_2D_kf_time.comp b/mcstas-comps/union/Union_logger_2D_kf_time.comp
index 2e13a9d533..30c0292360 100644
--- a/mcstas-comps/union/Union_logger_2D_kf_time.comp
+++ b/mcstas-comps/union/Union_logger_2D_kf_time.comp
@@ -65,6 +65,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -77,7 +78,7 @@
DEFINE COMPONENT Union_logger_2D_kf_time
-SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, time_min=0, time_max=1,string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
+SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL", Q1_min=-5, Q1_max=5, Q2_min=-5, Q2_max=5, time_min=0, time_max=1,string Q_direction_1="x", string Q_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -744,14 +745,16 @@ SAVE
%{
// Write to disk
- for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
- sprintf (number_string, "%d", loop_index);
- sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
+ if (!nowritefile) {
+ for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
+ sprintf (number_string, "%d", loop_index);
+ sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
- DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
- this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
- this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
- &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
+ this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
+ this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
+ &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ }
}
%}
diff --git a/mcstas-comps/union/Union_logger_2D_space.comp b/mcstas-comps/union/Union_logger_2D_space.comp
index b6e6353ae8..5ca1c7d43f 100644
--- a/mcstas-comps/union/Union_logger_2D_space.comp
+++ b/mcstas-comps/union/Union_logger_2D_space.comp
@@ -62,6 +62,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -77,7 +78,7 @@ DEFINE COMPONENT Union_logger_2D_space
SETTING PARAMETERS(string target_geometry="NULL", string target_process="NULL",
string D_direction_1="x", D1_min=-5, D1_max=5, n1=90,
string D_direction_2="z", D2_min=-5, D2_max=5, n2=90,
- string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init")
+ string filename="NULL", order_total=0, order_volume=0, order_volume_process=0, logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -704,10 +705,12 @@ TRACE
SAVE
%{
// Write to disk
- DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
- this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
- this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
- *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ if (!nowritefile) {
+ DETECTOR_OUT_2D (this_storage.Detector_2D.title_string, this_storage.Detector_2D.string_axis_1, this_storage.Detector_2D.string_axis_2,
+ this_storage.Detector_2D.D1min, this_storage.Detector_2D.D1max, this_storage.Detector_2D.D2min, this_storage.Detector_2D.D2max,
+ this_storage.Detector_2D.bins_1, this_storage.Detector_2D.bins_2, *this_storage.Detector_2D.Array_N, *this_storage.Detector_2D.Array_p,
+ *this_storage.Detector_2D.Array_p2, this_storage.Detector_2D.Filename);
+ }
%}
FINALLY
diff --git a/mcstas-comps/union/Union_logger_2D_space_time.comp b/mcstas-comps/union/Union_logger_2D_space_time.comp
index 30186e9127..dde39c985a 100644
--- a/mcstas-comps/union/Union_logger_2D_space_time.comp
+++ b/mcstas-comps/union/Union_logger_2D_space_time.comp
@@ -65,6 +65,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] Name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -77,7 +78,7 @@
DEFINE COMPONENT Union_logger_2D_space_time
-SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-5,D1_max=5,D2_min=-5,D2_max=5,time_min=0,time_max=1,string D_direction_1="x", string D_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
+SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-5,D1_max=5,D2_min=-5,D2_max=5,time_min=0,time_max=1,string D_direction_1="x", string D_direction_2="z",string filename="NULL", n1=90, n2=90, time_bins=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -767,14 +768,16 @@ SAVE
%{
// Write to disk
- for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
- sprintf (number_string, "%d", loop_index);
- sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
+ if (!nowritefile) {
+ for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
+ sprintf (number_string, "%d", loop_index);
+ sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
- DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
- this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
- this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
- &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
+ this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
+ this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
+ &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ }
}
%}
diff --git a/mcstas-comps/union/Union_logger_3D_space.comp b/mcstas-comps/union/Union_logger_3D_space.comp
index cc6980e428..96b5e68218 100644
--- a/mcstas-comps/union/Union_logger_3D_space.comp
+++ b/mcstas-comps/union/Union_logger_3D_space.comp
@@ -67,6 +67,7 @@
* order_volume_process: [1] Only log rays that scatter for the n'th time in the same geometry, using the same process
* logger_conditional_extend_index: [1] If a conditional is used with this logger, the result of each conditional calculation can be made available in extend as a array called "logger_conditional_extend", and one would then acces logger_conditional_extend[n] if logger_conditional_extend_index is set to n
* init: [string] name of Union_init component (typically "init", default)
+* nowritefile: [1] If set, logger will skip writing to disk
*
* CALCULATED PARAMETERS:
*
@@ -79,7 +80,7 @@
DEFINE COMPONENT Union_logger_3D_space
-SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-1,D1_max=1,D2_min=-1,D2_max=1,D3_min=-1,D3_max=1,string D_direction_1="x", string D_direction_2="z", string D_direction_3="z",string filename="NULL", n1=90, n2=90, n3=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init")
+SETTING PARAMETERS(string target_geometry="NULL",string target_process="NULL",D1_min=-1,D1_max=1,D2_min=-1,D2_max=1,D3_min=-1,D3_max=1,string D_direction_1="x", string D_direction_2="z", string D_direction_3="z",string filename="NULL", n1=90, n2=90, n3=10, order_total=0,order_volume=0,order_volume_process=0,logger_conditional_extend_index=-1, string init="init", int nowritefile=0)
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
@@ -828,14 +829,16 @@ SAVE
%{
// Write to disk
- for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
- sprintf (number_string, "%d", loop_index);
- sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
+ if (!nowritefile) {
+ for (loop_index = 0; loop_index < this_storage.Detector_3D.bins_3; loop_index++) {
+ sprintf (number_string, "%d", loop_index);
+ sprintf (part_filename, "%s_%s", this_storage.Detector_3D.Filename, number_string);
- DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
- this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
- this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
- &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ DETECTOR_OUT_2D (this_storage.Detector_3D.title_string, this_storage.Detector_3D.string_axis_1, this_storage.Detector_3D.string_axis_2,
+ this_storage.Detector_3D.D1min, this_storage.Detector_3D.D1max, this_storage.Detector_3D.D2min, this_storage.Detector_3D.D2max,
+ this_storage.Detector_3D.bins_1, this_storage.Detector_3D.bins_2, &this_storage.Detector_3D.Array_N[loop_index][0][0],
+ &this_storage.Detector_3D.Array_p[loop_index][0][0], &this_storage.Detector_3D.Array_p2[loop_index][0][0], part_filename);
+ }
}
%}
From 2b989e18342fa1cd8135c57b0319526977b176d9 Mon Sep 17 00:00:00 2001
From: mads-bertelsen-agentic
<301266180+mads-bertelsen-agentic@users.noreply.github.com>
Date: Thu, 27 Aug 2026 11:29:54 +0200
Subject: [PATCH 02/13] Run mccode-clangformat on changed Union logger files
---
mcstas-comps/union/Union_abs_logger_1D_space_tof.comp | 7 ++++---
.../union/Union_abs_logger_1D_space_tof_to_lambda.comp | 7 ++++---
mcstas-comps/union/Union_abs_logger_2D_space.comp | 7 ++++---
mcstas-comps/union/Union_logger_2D_kf_time.comp | 9 +++------
mcstas-comps/union/Union_logger_2D_space_time.comp | 9 +++------
mcstas-comps/union/Union_logger_3D_space.comp | 3 +--
6 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
index 0a70dac097..a77dd7e185 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof.comp
@@ -583,9 +583,10 @@ SAVE
// Write to disk
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min,
+ this_abs_storage.Detector_2D.D2max, this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2,
+ *this_abs_storage.Detector_2D.Array_N, *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2,
+ this_abs_storage.Detector_2D.Filename);
}
%}
diff --git a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
index 23caf39d63..5dde860950 100644
--- a/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
+++ b/mcstas-comps/union/Union_abs_logger_1D_space_tof_to_lambda.comp
@@ -787,9 +787,10 @@ SAVE
// Write to disk
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min,
+ this_abs_storage.Detector_2D.D2max, this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2,
+ *this_abs_storage.Detector_2D.Array_N, *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2,
+ this_abs_storage.Detector_2D.Filename);
}
%}
diff --git a/mcstas-comps/union/Union_abs_logger_2D_space.comp b/mcstas-comps/union/Union_abs_logger_2D_space.comp
index 50d62142fa..65cd32a239 100644
--- a/mcstas-comps/union/Union_abs_logger_2D_space.comp
+++ b/mcstas-comps/union/Union_abs_logger_2D_space.comp
@@ -644,9 +644,10 @@ SAVE
// Write to disk
if (!nowritefile) {
DETECTOR_OUT_2D (this_abs_storage.Detector_2D.title_string, this_abs_storage.Detector_2D.string_axis_1, this_abs_storage.Detector_2D.string_axis_2,
- this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min, this_abs_storage.Detector_2D.D2max,
- this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2, *this_abs_storage.Detector_2D.Array_N,
- *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2, this_abs_storage.Detector_2D.Filename);
+ this_abs_storage.Detector_2D.D1min, this_abs_storage.Detector_2D.D1max, this_abs_storage.Detector_2D.D2min,
+ this_abs_storage.Detector_2D.D2max, this_abs_storage.Detector_2D.bins_1, this_abs_storage.Detector_2D.bins_2,
+ *this_abs_storage.Detector_2D.Array_N, *this_abs_storage.Detector_2D.Array_p, *this_abs_storage.Detector_2D.Array_p2,
+ this_abs_storage.Detector_2D.Filename);
}
%}
diff --git a/mcstas-comps/union/Union_logger_2D_kf_time.comp b/mcstas-comps/union/Union_logger_2D_kf_time.comp
index 30c0292360..a7a22f20d3 100644
--- a/mcstas-comps/union/Union_logger_2D_kf_time.comp
+++ b/mcstas-comps/union/Union_logger_2D_kf_time.comp
@@ -320,8 +320,7 @@ SHARE
[storage->temp_2D_kf_t_data.elements[index].index_3]++;
storage->Detector_3D.Array_p[storage->temp_2D_kf_t_data.elements[index].index_1][storage->temp_2D_kf_t_data.elements[index].index_2]
- [storage->temp_2D_kf_t_data.elements[index].index_3]
- += storage->temp_2D_kf_t_data.elements[index].weight;
+ [storage->temp_2D_kf_t_data.elements[index].index_3] += storage->temp_2D_kf_t_data.elements[index].weight;
storage->Detector_3D.Array_p2[storage->temp_2D_kf_t_data.elements[index].index_1][storage->temp_2D_kf_t_data.elements[index].index_2]
[storage->temp_2D_kf_t_data.elements[index].index_3]
@@ -344,12 +343,10 @@ SHARE
[storage->temp_2D_kf_t_data.elements[index].index_3]++;
storage->Detector_3D.Array_p[storage->temp_2D_kf_t_data.elements[index].index_1][storage->temp_2D_kf_t_data.elements[index].index_2]
- [storage->temp_2D_kf_t_data.elements[index].index_3]
- += final_weight;
+ [storage->temp_2D_kf_t_data.elements[index].index_3] += final_weight;
storage->Detector_3D.Array_p2[storage->temp_2D_kf_t_data.elements[index].index_1][storage->temp_2D_kf_t_data.elements[index].index_2]
- [storage->temp_2D_kf_t_data.elements[index].index_3]
- += final_weight * final_weight;
+ [storage->temp_2D_kf_t_data.elements[index].index_3] += final_weight * final_weight;
}
clear_temp_2D_kf_t (data_union);
}
diff --git a/mcstas-comps/union/Union_logger_2D_space_time.comp b/mcstas-comps/union/Union_logger_2D_space_time.comp
index dde39c985a..fbae255ee8 100644
--- a/mcstas-comps/union/Union_logger_2D_space_time.comp
+++ b/mcstas-comps/union/Union_logger_2D_space_time.comp
@@ -340,8 +340,7 @@ SHARE
[storage->temp_2DS_t_data.elements[index].index_3]++;
storage->Detector_3D.Array_p[storage->temp_2DS_t_data.elements[index].index_1][storage->temp_2DS_t_data.elements[index].index_2]
- [storage->temp_2DS_t_data.elements[index].index_3]
- += storage->temp_2DS_t_data.elements[index].weight;
+ [storage->temp_2DS_t_data.elements[index].index_3] += storage->temp_2DS_t_data.elements[index].weight;
storage->Detector_3D.Array_p2[storage->temp_2DS_t_data.elements[index].index_1][storage->temp_2DS_t_data.elements[index].index_2]
[storage->temp_2DS_t_data.elements[index].index_3]
@@ -364,12 +363,10 @@ SHARE
[storage->temp_2DS_t_data.elements[index].index_3]++;
storage->Detector_3D.Array_p[storage->temp_2DS_t_data.elements[index].index_1][storage->temp_2DS_t_data.elements[index].index_2]
- [storage->temp_2DS_t_data.elements[index].index_3]
- += final_weight;
+ [storage->temp_2DS_t_data.elements[index].index_3] += final_weight;
storage->Detector_3D.Array_p2[storage->temp_2DS_t_data.elements[index].index_1][storage->temp_2DS_t_data.elements[index].index_2]
- [storage->temp_2DS_t_data.elements[index].index_3]
- += final_weight;
+ [storage->temp_2DS_t_data.elements[index].index_3] += final_weight;
}
clear_temp_2DS_t (data_union);
}
diff --git a/mcstas-comps/union/Union_logger_3D_space.comp b/mcstas-comps/union/Union_logger_3D_space.comp
index 96b5e68218..ebf20ae88b 100644
--- a/mcstas-comps/union/Union_logger_3D_space.comp
+++ b/mcstas-comps/union/Union_logger_3D_space.comp
@@ -396,8 +396,7 @@ SHARE
+= final_weight;
storage->Detector_3D.Array_p2[storage->temp_3DS_data.elements[index].index_1][storage->temp_3DS_data.elements[index].index_2]
- [storage->temp_3DS_data.elements[index].index_3]
- += final_weight * final_weight;
+ [storage->temp_3DS_data.elements[index].index_3] += final_weight * final_weight;
}
clear_temp_3DS (data_union);
}
From 2de3d90ae3a6bd0f0c34218dc67f95a63678c457 Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 10:34:22 +0200
Subject: [PATCH 03/13] Correct typo in tar filename, remove double 'comp'
entry in suffix
---
.github/workflows/mcstas-basictest.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 299598b57e..04151dc745 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -431,7 +431,7 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES_${comp}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
else
echo No matching tests found
fi
@@ -473,7 +473,7 @@ jobs:
set -x
# Clear out binaries from sim dir and tar up artifact
ls | grep run_ | xargs -n1 ./src/devel/bin/mccode-simdir-cleanfiles -d
- tar cvfz mmcstas-${{ matrix.cogen }}.${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}_output.tgz run_*
+ tar cvfz mcstas-${{ matrix.cogen }}.${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}_output.tgz run_*
- name: 'Upload Artifact'
id: tar-upload
From d8b2fabb95e890c4f2810aa62c7de5fb950470d7 Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 12:57:05 +0200
Subject: [PATCH 04/13] Correct artefact label...
---
.github/workflows/mcstas-basictest.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 04151dc745..fc86511601 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -481,7 +481,7 @@ jobs:
if: always()
with:
name: mcstas-artefacts-${{ matrix.cogen }}.${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}
- path: "mmcstas-${{ matrix.cogen }}.${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}_output.tgz"
+ path: "mcstas-${{ matrix.cogen }}.${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }}_output.tgz"
- name: Setup tmate session for manual debugging
uses: mxschmitt/action-tmate@v3
From b0e402f1c299e1cc751fe8dad59700b356cd9f2c Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 12:58:18 +0200
Subject: [PATCH 05/13] Different lables om COMP and INSTR changes
---
.github/workflows/mcstas-basictest.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index fc86511601..1b64ed2937 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -431,7 +431,7 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_compCHANGES_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
else
echo No matching tests found
fi
@@ -460,7 +460,7 @@ jobs:
export SCOPE=" "
fi
mkdir -p run_mctest && cd run_mctest
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
${MCVIEWTEST_EXECUTABLE} --nobrowse $PWD
fi
From 5dbb6868ce474faa469c5062e594c41e0f88b33f Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 14:38:00 +0200
Subject: [PATCH 06/13] Add an 'index' in test label pr. changed comp
---
.github/workflows/mcstas-basictest.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 1b64ed2937..668b16a136 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -423,6 +423,7 @@ jobs:
export CHANGEDCOMPS=`git diff --name-only $DIFFBASE HEAD | grep \.comp\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.comp//g | sort | uniq | xargs echo`
export NUMCHANGEDCOMPS=`git diff --name-only $DIFFBASE HEAD | grep \.comp\$ | grep mcstas-comps | wc -l | xargs echo`
cd -
+ compindex=0
if [ "$NUMCHANGEDCOMPS" != "0" ];
then
for comp in $CHANGEDCOMPS;
@@ -431,7 +432,8 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_compCHANGES_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_comp_CHANGES_${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ compindex=$(( compindex+1 ))
else
echo No matching tests found
fi
From 42a3240e9abd7bac9aee0114cf0762ecdb6e499e Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 15:00:22 +0200
Subject: [PATCH 07/13] Spare a few more chars...
---
.github/workflows/mcstas-basictest.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 668b16a136..0c0158dc01 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -25,7 +25,7 @@ jobs:
- { method: conda, os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.13', mpi: 'openmpi', nmpi: 'auto', cogen: 'classic'}
- { method: conda, os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.13', mpi: 'openmpi', nmpi: 'auto', cogen: 'antlr'}
- { method: conda, os: macos-latest, CC: clang, CXX: clang++, python: '3.13', mpi: 'openmpi', nmpi: '2', cogen: 'classic'}
- - { method: conda, os: windows-latest, CC: cl.exe, CXX: cl.exe, python: "3.13", mpi: 'msmpi', nmpi: 'auto', cogen: 'classic'}
+ - { method: conda, os: windows-latest, CC: CL, CXX: CL, python: "3.13", mpi: 'msmpi', nmpi: 'auto', cogen: 'classic'}
name: ${{ matrix.os }}.${{ matrix.method }}.${{ matrix.cogen }}.${{ matrix.CC || 'default' }}.${{ matrix.mpi }}
runs-on: ${{ matrix.os }}
@@ -133,7 +133,7 @@ jobs:
- name: Configure build and install mcstas (source)
id: mcstas-install
- if: ${{ matrix.method == 'source' && matrix.CC != 'cl.exe' }}
+ if: ${{ matrix.method == 'source' && matrix.CC != 'CL' }}
run: |
if [ "$RUNNER_OS" == "macOS" ]; then mkdir ${HOME}/tmp; fi
if [ "$RUNNER_OS" == "macOS" ]; then export SDKROOT=$(xcrun --sdk macosx --show-sdk-path); fi
@@ -231,7 +231,7 @@ jobs:
type .\install_mcstas\share\mcstas\tools\Python\mccodelib\mccode_config.json
.\install_mcstas\bin\mcrun -h
.\install_mcstas\bin\mcstas -v
- if [ "${{ matrix.CC }}" != "cl.exe" ];
+ if [ "${{ matrix.CC }}" != "CL" ];
then
mcpl-config -s
ncrystal-config -s
@@ -432,7 +432,7 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_comp_CHANGES_${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_compCHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
compindex=$(( compindex+1 ))
else
echo No matching tests found
From dbe8134ff79daa5405acc7f3a7f815d5513ec31c Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 15:31:03 +0200
Subject: [PATCH 08/13] Shorten path even further...
---
.github/workflows/mcstas-basictest.yml | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 0c0158dc01..de8c0e1063 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -346,7 +346,7 @@ jobs:
fi
test -n "$(command -v mcstas${EXESUFFIX})"
mcstas${EXESUFFIX} --version
- mctest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${RUNNER_TRACKING_ID}
+ mctest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
export SUM=`find run_rngtest -name rngout.dat | xargs -n1 grep -v \# | ${MD5SUM} | cut -f1 -d\ `
export EXPECTED="f192ce4609e2225bf9d42ce9c5fa5a86"
if [ "${EXPECTED}" == "${SUM}" ];
@@ -374,8 +374,8 @@ jobs:
fi
test -n "$(command -v mcstas${EXESUFFIX})"
mcstas${EXESUFFIX} --version
- mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${RUNNER_TRACKING_ID}
- mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${RUNNER_TRACKING_ID}
+ mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
+ mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
- name: Check for modified instruments
id: instr-test
@@ -432,7 +432,7 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_compCHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
compindex=$(( compindex+1 ))
else
echo No matching tests found
@@ -462,7 +462,7 @@ jobs:
export SCOPE=" "
fi
mkdir -p run_mctest && cd run_mctest
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
${MCVIEWTEST_EXECUTABLE} --nobrowse $PWD
fi
From 753cf021b4743d7a7b84569e4285c97912931e0c Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 15:33:49 +0200
Subject: [PATCH 09/13] Sync changes to mcxtrace-basictest
---
.github/workflows/mcxtrace-basictest.yml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml
index 28716ad0a9..a6cd8b0017 100644
--- a/.github/workflows/mcxtrace-basictest.yml
+++ b/.github/workflows/mcxtrace-basictest.yml
@@ -353,7 +353,7 @@ jobs:
fi
test -n "$(command -v mcxtrace${EXESUFFIX})"
mcxtrace${EXESUFFIX} --version
- mxtest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.method }} --uid=${RUNNER_TRACKING_ID}
+ mxtest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
export SUM=`find run_rngtest -name rngout.dat | xargs -n1 grep -v \# | ${MD5SUM} | cut -f1 -d\ `
export EXPECTED="f192ce4609e2225bf9d42ce9c5fa5a86"
if [ "${EXPECTED}" == "${SUM}" ];
@@ -381,8 +381,8 @@ jobs:
fi
test -n "$(command -v mcxtrace${EXESUFFIX})"
mcxtrace${EXESUFFIX} --version
- mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.method }} --uid=${RUNNER_TRACKING_ID}
- mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${RUNNER_TRACKING_ID}
+ mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.method }} --uid=${GITHUB_RUN_ID}
+ mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
- name: Check for modified instruments
id: instr-test
@@ -438,7 +438,8 @@ jobs:
NUMMATCH=`find src/mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mxtest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES_${comp}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mxtest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ compindex=$(( compindex+1 ))
else
echo No matching tests found
fi
@@ -467,7 +468,7 @@ jobs:
export SCOPE=" "
fi
mkdir -p run_mxtest && cd run_mxtest
- ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${RUNNER_TRACKING_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
${MXVIEWTEST_EXECUTABLE} --nobrowse $PWD
fi
From fec40a4788a364be1840c851d88edfd9de1962f9 Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 15:35:41 +0200
Subject: [PATCH 10/13] Shorter unique identifier in testsuite workflows
---
.github/workflows/mcstas-conda-testsuite.yml | 2 +-
.github/workflows/mcxtrace-conda-testsuite.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/mcstas-conda-testsuite.yml b/.github/workflows/mcstas-conda-testsuite.yml
index 033428b6c0..2f740ca2d5 100644
--- a/.github/workflows/mcstas-conda-testsuite.yml
+++ b/.github/workflows/mcstas-conda-testsuite.yml
@@ -126,7 +126,7 @@ jobs:
export TMPDIR=${HOME}/tmp
fi
# Run the test with 2 core mpi
- ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.cogen }}_${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${RUNNER_TRACKING_ID}
+ ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.cogen }}_${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${GITHUB_RUN_ID}
- name: 'Tar output files'
id: tar-package
if: always()
diff --git a/.github/workflows/mcxtrace-conda-testsuite.yml b/.github/workflows/mcxtrace-conda-testsuite.yml
index 9470e7e571..b6a418335f 100644
--- a/.github/workflows/mcxtrace-conda-testsuite.yml
+++ b/.github/workflows/mcxtrace-conda-testsuite.yml
@@ -107,7 +107,7 @@ jobs:
export TMPDIR=${HOME}/tmp
fi
# Run the test with 2 core mpi
- ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${RUNNER_TRACKING_ID}
+ ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${GITHUB_RUN_ID}
- name: 'Tar output files'
id: tar-package
From 4269190a43bd987bb2397941c71cf47776df70da Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 16:49:48 +0200
Subject: [PATCH 11/13] Add $CC in basictest label
---
.github/workflows/mcstas-basictest.yml | 4 ++--
.github/workflows/mcxtrace-basictest.yml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index de8c0e1063..2366e62db4 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -374,8 +374,8 @@ jobs:
fi
test -n "$(command -v mcstas${EXESUFFIX})"
mcstas${EXESUFFIX} --version
- mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
- mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
+ mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${GITHUB_RUN_ID}
+ mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
- name: Check for modified instruments
id: instr-test
diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml
index a6cd8b0017..bddf4e21ed 100644
--- a/.github/workflows/mcxtrace-basictest.yml
+++ b/.github/workflows/mcxtrace-basictest.yml
@@ -381,8 +381,8 @@ jobs:
fi
test -n "$(command -v mcxtrace${EXESUFFIX})"
mcxtrace${EXESUFFIX} --version
- mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.method }} --uid=${GITHUB_RUN_ID}
- mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
+ mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${GITHUB_RUN_ID}
+ mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
- name: Check for modified instruments
id: instr-test
From 45bb95f21ee380ba552806a38e86bf3a376d1877 Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 17:03:37 +0200
Subject: [PATCH 12/13] Go for 12-char uid identifier created from
RUNNER_TRACKING_ID sync to McXtrace
---
.github/workflows/mcstas-basictest.yml | 14 ++++++++------
.github/workflows/mcxtrace-basictest.yml | 14 ++++++++------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml
index 2366e62db4..84aa68cbbb 100644
--- a/.github/workflows/mcstas-basictest.yml
+++ b/.github/workflows/mcstas-basictest.yml
@@ -110,13 +110,15 @@ jobs:
echo MPIINCVAR=%MPIINCVAR% >> %GITHUB_ENV%
echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV%
- - name: Check versions
+ - name: Check versions and set worker label
id: version-checks
run: |
which python3
python3 --version
which cmake
cmake --version
+ MYWORKERID=`echo ${RUNNER_TRACKING_ID} | md5sum | cut -c1-12`
+ echo MYWORKERID=${MYWORKERID} >> "$GITHUB_ENV"
- name: Get conda dependency list
id: conda-deps
@@ -346,7 +348,7 @@ jobs:
fi
test -n "$(command -v mcstas${EXESUFFIX})"
mcstas${EXESUFFIX} --version
- mctest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
+ mctest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${MYWORKERID}
export SUM=`find run_rngtest -name rngout.dat | xargs -n1 grep -v \# | ${MD5SUM} | cut -f1 -d\ `
export EXPECTED="f192ce4609e2225bf9d42ce9c5fa5a86"
if [ "${EXPECTED}" == "${SUM}" ];
@@ -374,8 +376,8 @@ jobs:
fi
test -n "$(command -v mcstas${EXESUFFIX})"
mcstas${EXESUFFIX} --version
- mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${GITHUB_RUN_ID}
- mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
+ mctest${SUFFIX} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${MYWORKERID}
+ mctest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Test_KDSource --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${MYWORKERID}
- name: Check for modified instruments
id: instr-test
@@ -432,7 +434,7 @@ jobs:
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mctest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${MYWORKERID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
compindex=$(( compindex+1 ))
else
echo No matching tests found
@@ -462,7 +464,7 @@ jobs:
export SCOPE=" "
fi
mkdir -p run_mctest && cd run_mctest
- ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MCTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${MYWORKERID} || { echo "${MCTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
${MCVIEWTEST_EXECUTABLE} --nobrowse $PWD
fi
diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml
index bddf4e21ed..99b6380d76 100644
--- a/.github/workflows/mcxtrace-basictest.yml
+++ b/.github/workflows/mcxtrace-basictest.yml
@@ -118,13 +118,15 @@ jobs:
echo MPIINCVAR=%MPIINCVAR% >> %GITHUB_ENV%
echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV%
- - name: Check versions
+ - name: Check versions and set worker label
id: version-checks
run: |
which python3
python3 --version
which cmake
cmake --version
+ MYWORKERID=`echo ${RUNNER_TRACKING_ID} | md5sum | cut -c1-12`
+ echo MYWORKERID=${MYWORKERID} >> "$GITHUB_ENV"
- name: Get conda dependency list
id: conda-deps
@@ -353,7 +355,7 @@ jobs:
fi
test -n "$(command -v mcxtrace${EXESUFFIX})"
mcxtrace${EXESUFFIX} --version
- mxtest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${GITHUB_RUN_ID}
+ mxtest${SUFFIX} --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=${{ matrix.cogen }}_${{ matrix.method }} --uid=${MYWORKERID}
export SUM=`find run_rngtest -name rngout.dat | xargs -n1 grep -v \# | ${MD5SUM} | cut -f1 -d\ `
export EXPECTED="f192ce4609e2225bf9d42ce9c5fa5a86"
if [ "${EXPECTED}" == "${SUM}" ];
@@ -381,8 +383,8 @@ jobs:
fi
test -n "$(command -v mcxtrace${EXESUFFIX})"
mcxtrace${EXESUFFIX} --version
- mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${GITHUB_RUN_ID}
- mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${GITHUB_RUN_ID}
+ mxtest${SUFFIX} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }} --uid=${MYWORKERID}
+ mxtest${SUFFIX} --mpi=${{ matrix.nmpi }} --instr=JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output,Test_Absorption --testdir=run_basictests --suffix=${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} --uid=${MYWORKERID}
- name: Check for modified instruments
id: instr-test
@@ -438,7 +440,7 @@ jobs:
NUMMATCH=`find src/mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
- ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mxtest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir run_mxtest --comp=${comp} --suffix=${{ matrix.cogen }}_CHANGES${compindex}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${MYWORKERID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
compindex=$(( compindex+1 ))
else
echo No matching tests found
@@ -468,7 +470,7 @@ jobs:
export SCOPE=" "
fi
mkdir -p run_mxtest && cd run_mxtest
- ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${GITHUB_RUN_ID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
+ ${MXTEST_EXECUTABLE} --mpi=${{ matrix.nmpi }} --testdir $PWD $SCOPE --suffix=instrCHANGES_${{ matrix.cogen }}_${{ matrix.method }}_${{ matrix.CC || 'default' }}_${{ matrix.mpi }} $PERMISSIVE --verbose --uid=${MYWORKERID} || { echo "${MXTEST_EXECUTABLE} failed with exit code $?"; exit 1; }
${MXVIEWTEST_EXECUTABLE} --nobrowse $PWD
fi
From 0c0c4d09234a758029d8a79a09897cb017361e24 Mon Sep 17 00:00:00 2001
From: Peter Willendrup
Date: Sat, 29 Aug 2026 17:06:50 +0200
Subject: [PATCH 13/13] Update testsuite workflows
---
.github/workflows/mcstas-conda-testsuite.yml | 6 ++++--
.github/workflows/mcxtrace-conda-testsuite.yml | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/mcstas-conda-testsuite.yml b/.github/workflows/mcstas-conda-testsuite.yml
index 2f740ca2d5..b176173f10 100644
--- a/.github/workflows/mcstas-conda-testsuite.yml
+++ b/.github/workflows/mcstas-conda-testsuite.yml
@@ -48,13 +48,15 @@ jobs:
environment-name: mcstas
environment-file: dependencies.yml
- - name: Check versions
+ - name: Check versions and set worker label
id: version-checks
run: |
which python3
python3 --version
which cmake
cmake --version
+ MYWORKERID=`echo ${RUNNER_TRACKING_ID} | md5sum | cut -c1-12`
+ echo MYWORKERID=${MYWORKERID} >> "$GITHUB_ENV"
- name: Configure build and install mcstas
id: mcstas-install
@@ -126,7 +128,7 @@ jobs:
export TMPDIR=${HOME}/tmp
fi
# Run the test with 2 core mpi
- ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.cogen }}_${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${GITHUB_RUN_ID}
+ ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.cogen }}_${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${MYWORKERID}
- name: 'Tar output files'
id: tar-package
if: always()
diff --git a/.github/workflows/mcxtrace-conda-testsuite.yml b/.github/workflows/mcxtrace-conda-testsuite.yml
index b6a418335f..c00702d501 100644
--- a/.github/workflows/mcxtrace-conda-testsuite.yml
+++ b/.github/workflows/mcxtrace-conda-testsuite.yml
@@ -47,13 +47,15 @@ jobs:
environment-file: dependencies.yml
environment-name: mcxtrace
- - name: Check versions
+ - name: Check versions and set worker label
id: version-checks
run: |
which python3
python3 --version
which cmake
cmake --version
+ MYWORKERID=`echo ${RUNNER_TRACKING_ID} | md5sum | cut -c1-12`
+ echo MYWORKERID=${MYWORKERID} >> "$GITHUB_ENV"
- name: Configure build and install mcxtrace
id: mcxtrace-install
@@ -107,7 +109,7 @@ jobs:
export TMPDIR=${HOME}/tmp
fi
# Run the test with 2 core mpi
- ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${GITHUB_RUN_ID}
+ ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=${{ matrix.nmpi }} --uid=${MYWORKERID}
- name: 'Tar output files'
id: tar-package