Skip to content

Commit e17e1c8

Browse files
authored
Merge pull request #2046 from tkittel/mcpl_statsum
Update MCPL components for MCPL 2.2.0 features (including stat:sum).
2 parents c397abb + 6df1b13 commit e17e1c8

25 files changed

Lines changed: 1024 additions & 1099 deletions

.github/workflows/mcstas-winbasictest-mingw.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ jobs:
117117
working-directory: run_mcpl_input
118118
run: |
119119
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr
120-
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl .
120+
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl.gz .
121121
122122
- name: Prepare MCPL_input_once instrument
123123
working-directory: run_mcpl_input_once
124124
run: |
125125
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\Test_MCPL_input_once.instr test.instr
126-
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl .
126+
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl.gz .
127127
128128
- name: Prepare MCPL_output instrument
129129
working-directory: run_mcpl_output

.github/workflows/mcstas-winbasictest-msvc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ jobs:
137137
working-directory: run_mcpl_input
138138
run: |
139139
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr
140-
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl .
140+
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl.gz .
141141
142142
- name: Prepare MCPL_input_once instrument
143143
working-directory: run_mcpl_input_once
144144
run: |
145145
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\Test_MCPL_input_once.instr test.instr
146-
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl .
146+
copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl.gz .
147147
148148
- name: Prepare MCPL_output instrument
149149
working-directory: run_mcpl_output

.github/workflows/mcxtrace-basictest.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ jobs:
252252
./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} --version
253253
mkdir run_Test_MCPL_input && cd run_Test_MCPL_input
254254
cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/Test_MCPL_input.instr .
255-
../install_mcxtrace/bin/${MXRUN_EXECUTABLE} Test_MCPL_input.instr repeat=10
255+
cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/voutput.mcpl.gz .
256+
../install_mcxtrace/bin/${MXRUN_EXECUTABLE} Test_MCPL_input.instr repeat=10 MCPLFILE=voutput.mcpl.gz
256257
257258
- name: Launch MCPL test instrument (MPI)
258259
id: mcpl-test-mpi
@@ -273,7 +274,8 @@ jobs:
273274
./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} --version
274275
mkdir run_Test_MCPL_input_mpi && cd run_Test_MCPL_input_mpi
275276
cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/Test_MCPL_input.instr .
276-
../install_mcxtrace/bin/${MXRUN_EXECUTABLE} --verbose --mpi=2 Test_MCPL_input.instr repeat=20
277+
cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/voutput.mcpl.gz .
278+
../install_mcxtrace/bin/${MXRUN_EXECUTABLE} --verbose --mpi=2 Test_MCPL_input.instr repeat=20 MCPLFILE=voutput.mcpl.gz
277279
278280
- name: 'Tar output files'
279281
id: tar-package

.github/workflows/mcxtrace-winbasictest-mingw.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
working-directory: run_mcpl_input
113113
run: |
114114
copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr
115+
copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl.gz .
115116
116117
- name: Prepare MCPL_output instrument
117118
working-directory: run_mcpl_output
@@ -146,7 +147,7 @@ jobs:
146147

147148
- name: Run MCPL_input instrument
148149
working-directory: run_mcpl_input
149-
run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1
150+
run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1 MCPLFILE=voutput.mcpl.gz
150151

151152
- name: Run std instrument MPI
152153
working-directory: run_std
@@ -158,7 +159,7 @@ jobs:
158159

159160
- name: Run MCPL_input instrument MPI
160161
working-directory: run_mcpl_input
161-
run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1
162+
run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 MCPLFILE=voutput.mcpl.gz
162163

163164
- name: 'Tar output files'
164165
id: tar-package

.github/workflows/mcxtrace-winbasictest-msvc.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
working-directory: run_mcpl_input
135135
run: |
136136
copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr
137+
copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl.gz .
137138
138139
- name: Prepare MCPL_output instrument
139140
working-directory: run_mcpl_output
@@ -168,7 +169,7 @@ jobs:
168169

169170
- name: Run MCPL_input instrument
170171
working-directory: run_mcpl_input
171-
run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1
172+
run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1 MCPLFILE=voutput.mcpl.gz
172173

173174
- name: Run std instrument MPI
174175
if: matrix.os != 'windows-11-arm'
@@ -183,7 +184,7 @@ jobs:
183184
- name: Run MCPL_input instrument MPI
184185
if: matrix.os != 'windows-11-arm'
185186
working-directory: run_mcpl_input
186-
run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1
187+
run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 MCPLFILE=voutput.mcpl.gz
187188

188189
- name: 'Tar output files'
189190
id: tar-package

mcstas-comps/examples/Tests_MCPL_etc/Test_MCPL_input/Test_MCPL_input.instr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@
1515
*
1616
* This is a unit test for the MCPL_input component.
1717
*
18-
* %Example: -n1e3 repeat=1 Detector: m1_I=2.42284e+11
18+
* %Example: -n1e3 repeat=1 MCPLFILE=voutput.mcpl.gz Detector: m1_I=2.42284e+11
19+
* %Example: -n1e3 repeat=1 MCPLFILE=voutput_legacy.mcpl Detector: m1_I=2.42284e+11
1920
*
2021
* %Parameters
2122
*
2223
* repeat: [1] Repeat the contents of the inputfile this many times. NB: When using MPI you implicitly repeat by #mpi processes
2324
* v_smear: [1] When repeating, make Gaussian MC choice on particle velocity with spread v_smear * particle velocity
2425
* pos_smear: [m] When repeating, make uniform MC choice on sphere of radius pos_spear around particle position
2526
* dir_smear: [deg] When repeating, make Gaussian MC choice in cone of opening dir_smear around particle direction
27+
* MCPLFILE: [str] Input MCPL file.
2628
*
2729
* %End
2830
*******************************************************************************/
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcstas-comps/examples/Tests_MCPL_etc/Test_MCPL_input_once/Test_MCPL_input_once.instr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@
1414
* %Description
1515
*
1616
* This is a unit test for the MCPL_input_once component, which differs from the original MCPL_input by:
17-
* 1) Beeing MPI-parallelized (no implicit "repeat" of the particles in the file, file content is shared among processes
17+
* 1) Being MPI-parallelized (no implicit "repeat" of the particles in the file, file content is shared among processes
1818
* 2) No implementation of "repetition", if further stats is needed downstream, SPLIT should be applied
1919
*
20-
* %Example: -n1e3 v_smear=0.1 Detector: m1_I=2.42284e+11
20+
* %Example: -n1e3 v_smear=0.1 MCPLFILE=voutput.mcpl.gz Detector: m1_I=2.42284e+11
21+
* %Example: -n1e3 v_smear=0.1 MCPLFILE=voutput_legacy Detector: m1_I=2.42284e+11
2122
*
2223
* %Parameters
2324
*
2425
* v_smear: [1] Mmake Gaussian MC choice on particle velocity with spread v_smear * particle velocity
2526
* pos_smear: [m] Make uniform MC choice on sphere of radius pos_spear around particle position
2627
* dir_smear: [deg] Make Gaussian MC choice in cone of opening dir_smear around particle direction
28+
* MCPLFILE: [str] Input MCPL file.
2729
*
2830
* %End
2931
*******************************************************************************/

0 commit comments

Comments
 (0)