McCode
McCode copied to clipboard
Don't add SPLIT on GROUP members
Prompted by @g5t I just had a look at the NICOS virtual McStas models available at git clone https://forge.frm2.tum.de/review/mlz/mcstas/nicos-instruments
One of these (panda_bambus
) has 501 (!!) Monochromator_curved
in a GROUP
that each have a SPLIT 20
:
grep SPLIT BAMBUS.instr | grep PG | wc -l
In targeted v. 2.7.2 this is (inadvertently?) handled by a single SPLIT
on the GROUP
it seems:
INFO: No output directory specified (--dir)
INFO: Using directory: "BAMBUS_20240527_114358"
INFO: Regenerating c-file: BAMBUS.c
Info: 'Al_window' is a contributed component.
Info: Defining SPLIT from PG002_mono=Monochromator_curved() to END in instrument PANDA
Info: Defining SPLIT from PANDA_cryst_phonon=Phonon_simple() to END in instrument PANDA
Info: Defining SPLIT from PG002_ana_up1_1_1_1=Monochromator_curved() to END in instrument PANDA
CFLAGS=
... Whereas we in McStas-3.x get the start of building logic for 500 SPLIT
S - each with a Warning:
Warning: WARNING: Component PG002_ana_up1_1_1_1=Monochromator_curved() at line BAMBUS.instr:1051 is in GROUP analyzers and has a SPLIT.
Move the SPLIT keyword before (outside) the component instance PG002_ana_up1_1_1_1 (first in GROUP)
Warning: WARNING: Component PG002_ana_up1_1_1_2=Monochromator_curved() at line BAMBUS.instr:1056 is in GROUP analyzers and has a SPLIT.
Move the SPLIT keyword before (outside) the component instance PG002_ana_up1_1_1_1 (first in GROUP)
Warning: WARNING: Component PG002_ana_up1_1_1_3=Monochromator_curved() at line BAMBUS.instr:1061 is in GROUP analyzers and has a SPLIT.
Move the SPLIT keyword before (outside) the component instance PG002_ana_up1_1_1_1 (first in GROUP)
Warning: WARNING: Component PG002_ana_up1_1_1_4=Monochromator_curved() at line BAMBUS.instr:1066 is in GROUP analyzers and has a SPLIT.
Move the SPLIT keyword before (outside) the component instance PG002_ana_up1_1_1_1 (first in GROUP)
Warning: WARNING: Component PG002_ana_up1_1_1_5=Monochromator_curved() at line BAMBUS.instr:1071 is in GROUP analyzers and has a SPLIT.
Move the SPLIT keyword before (outside) the component instance PG002_ana_up1_1_1_1 (first in GROUP)
Perhaps we should make that Warning a proper error instead...