Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
f1f90a8
Temporarily disable test as it (often) hangs the GPU box with 1e6 on …
willend Nov 11, 2025
309bdce
Beef up statistics 20 fold on these quick instrs to help stability/ a…
willend Nov 11, 2025
ac15e0b
Merge pull request #2188 from mccode-dev/main
willend Nov 11, 2025
4be438b
Add Commodus_I3 from ISIS (very closely related to ViewModISIS)
willend Nov 11, 2025
3fd1d25
Sync ViewModISIS vs Commodus_I3
willend Nov 11, 2025
8cbc45b
Add nrepeats from _v2 variant of component from Rob D
willend Nov 11, 2025
ecfe8a9
Import of comp from Rob D, adaptation to McStas 3.x
willend Nov 11, 2025
5a05fdc
Wavelength->TOF in docs
willend Nov 11, 2025
e457d74
Remove def params
willend Nov 11, 2025
edb3842
Import TOF_PSDmonitor_toQ.comp from Rob D, adapt to McStas 3.x
willend Nov 11, 2025
4a72f76
Add geometry default params
willend Nov 11, 2025
df30309
mcdoc header improvements for comps
willend Nov 11, 2025
a6445ed
Shuffle input pars
willend Nov 11, 2025
1a693a0
Repair headers
willend Nov 11, 2025
5b330a0
Drop macOS 13 which will soon be deprecated
willend Nov 11, 2025
2da7b78
Use INHERIT and let Commodus_I be alternative interface to ViewModISIS
willend Nov 12, 2025
40b3f97
Merge branch 'main' into comp-updates-etc-from-ISIS
willend Nov 17, 2025
45f4d02
Merge pull request #2198 from mccode-dev/main
willend Nov 18, 2025
a950261
Merge pull request #2214 from mccode-dev/main
willend Nov 24, 2025
0d22cda
Remove empty DECLARE INHERIT EXTEND %{%} block
willend Nov 25, 2025
e867314
Change xw,yh -> xwidth, yheight in ViewModISIS to comply with standar…
willend Dec 1, 2025
40d760e
Fix Commodus_I3 inheritance from ViewModISIS
willend Dec 1, 2025
03af99d
Correction, better have duplicated INITIALIZE with internal renaming
willend Dec 1, 2025
077e3c0
Add ISIS_LET and updated tables from ISIS
willend Dec 1, 2025
32fcaa1
Merge pull request #2222 from mccode-dev/main
willend Dec 1, 2025
952bde4
mcxtrace:Fluorescence: flag enhance low concentrations
farhi Dec 1, 2025
840f61a
Merge pull request #2224 from mccode-dev/main
willend Dec 2, 2025
0d67c75
Merge pull request #2232 from mccode-dev/main
willend Dec 6, 2025
fc2098a
GPU box update
willend Dec 6, 2025
b9f0ad4
Merge pull request #2233 from willend/main
willend Dec 6, 2025
6954e53
Merge pull request #2234 from mccode-dev/main
willend Dec 6, 2025
170b855
Recent linter patches require corrections for GPU/OpenACC...
willend Dec 6, 2025
6b10572
Merge pull request #2235 from willend/main
willend Dec 6, 2025
9db3ea9
Add mctest feature to filter instruments by use of given COMP
willend Dec 6, 2025
f602d54
Filter by 1 comp name only
willend Dec 6, 2025
b15acb6
Fix to ensure correct suffixing
willend Dec 6, 2025
b2bbc54
Defer use of [0]
willend Dec 6, 2025
a31b505
Merge pull request #2236 from willend/main
willend Dec 6, 2025
2e27f0a
Enable mctest --comp=COMP in case of changed components
willend Dec 7, 2025
7577136
Add --comp=COMP test for McXtrace conda
willend Dec 7, 2025
5f35823
Use --comp=COMP in non-conda basictests
willend Dec 7, 2025
7f9ccdc
Trigger changed instr and changed comp tests
willend Dec 7, 2025
41e22b4
Add missing PERMISSIVE var definition
willend Dec 7, 2025
8f0e066
Put 'changed instrument' batch in ..
willend Dec 7, 2025
a470554
Try read_text with utf8
willend Dec 7, 2025
3cdddaa
Re-trigger change
willend Dec 7, 2025
c6f4cfd
Merge pull request #2237 from farhi/main
willend Dec 7, 2025
03da736
Fix syntax
willend Dec 7, 2025
46defa0
Re-trigger changed instr/comps
willend Dec 7, 2025
86a5d78
Windows path change in 'changed instruments' batch
willend Dec 7, 2025
a27cd0e
Re-trigger
willend Dec 7, 2025
b5676dd
Fix missing McStas -> McXtrace / mcviewtest -> mxviewtest
willend Dec 7, 2025
48c716a
Merge pull request #2238 from willend/main
willend Dec 7, 2025
b06b66e
Deprecate unused mctest 'test modes'
willend Dec 7, 2025
2705adc
More deprecation work
willend Dec 7, 2025
4a5399e
More deprecation of multi-configuration features
willend Dec 7, 2025
73ac5a4
Merge pull request #2239 from willend/main
willend Dec 7, 2025
1f38436
Merge pull request #2240 from mccode-dev/main
willend Dec 7, 2025
8b791cb
Header / mcdoc fixes
willend Dec 7, 2025
14da477
Suppress warnings spotted using clang on macOS
willend Dec 7, 2025
51c57ae
Add an extra test in CRISP / two (three) sample configs
willend Dec 7, 2025
285f99b
Header fixes
willend Dec 7, 2025
11520c0
Take into account linter warnings
willend Dec 7, 2025
fad3636
Fixes on documentation and free's in FINALLY
willend Dec 7, 2025
f0cb036
Add timestamp to 'testroot' folder to avoid double-layer file structure
willend Dec 8, 2025
8118a99
Fixed issue causing verbal mode of Union master to not compile as a v…
mads-bertelsen Dec 8, 2025
a89dcd0
Merge pull request #2241 from willend/main
willend Dec 8, 2025
2e66b7e
Fixed wrong debug print formating in Union_master to avoid linter war…
mads-bertelsen Dec 8, 2025
5e1216d
Merge pull request #2242 from mccode-dev/main
willend Dec 8, 2025
f25d470
Merge pull request #2243 from mccode-dev/union_fixes
willend Dec 8, 2025
2831b2f
Restore ability to "run version via config file" (required for DTU gp…
willend Dec 8, 2025
24809bb
Merge branch 'mccode-dev:main' into main
willend Dec 8, 2025
8110020
Merge pull request #2244 from willend/main
willend Dec 8, 2025
9480dcd
Add rudimentary test-instrument for one of Rob's new comps
willend Dec 8, 2025
a6a39b0
Merge branch 'comp-updates-etc-from-ISIS' of https://github.com/mccod…
willend Dec 8, 2025
a21e4f6
Update install-docs via https://github.com/mccode-dev/McCode/issues/2…
willend Dec 8, 2025
3ce16dd
Merge pull request #2246 from mccode-dev/patch-install-docs-issue-2245
willend Dec 8, 2025
f0abc4b
Silence linter warnings in SNS_source_analytic
willend Dec 9, 2025
2ee65e0
Merge pull request #2190 from mccode-dev/comp-updates-etc-from-ISIS
willend Dec 9, 2025
79c65da
Merge pull request #2247 from mccode-dev/main
willend Dec 9, 2025
83ef3ba
Silence linter malloc-warning in SANSPDB(Fast)
willend Dec 9, 2025
abb884d
Quiet linter warnings from ISIS moderator comps
willend Dec 9, 2025
c90270a
Silence linter warnings for SNS_source
willend Dec 9, 2025
d18f4fe
Silence linter warnings in Lens.comp
willend Dec 9, 2025
8dea668
Always include _particle in the footprint, irrespective of OPENACC or…
willend Dec 9, 2025
806bf46
Silence another linter warning in Lens.comp
willend Dec 9, 2025
d5c508d
Caught one further linter warning in Lens
willend Dec 9, 2025
c4986df
Silenced linter warnings in StatisticalChopper_Monitor
willend Dec 9, 2025
bc14261
Fix array overruns found by linter...
willend Dec 9, 2025
8bfdc7a
Use NAME_CURRENT_COMP and terminate by ;...
willend Dec 9, 2025
4b44868
Silence linter warnings from Vertial_Bender
willend Dec 9, 2025
414efd8
Sync interoff <-> r_interoff and get rid of linter warnings
willend Dec 9, 2025
32a6945
Silence linter warnings from Pol_bender
willend Dec 9, 2025
b6610b4
Silence linder warnings from Single_magnetic_crystal
willend Dec 9, 2025
046985f
Silence some linter warnings in Single_crystal_inelastic
willend Dec 9, 2025
776f9dd
Handle case of unsucessful write perms
willend Dec 9, 2025
5c0e713
Exit in error if malloc fails
willend Dec 9, 2025
a2acc07
Lift a couple of linter warnings from conic.h
willend Dec 9, 2025
5094fd0
Add return value on unused, empty function...
willend Dec 9, 2025
aa0e825
More linter hints for conic.h
willend Dec 9, 2025
b740e33
More uninitialized vars lifted
willend Dec 9, 2025
ff3c218
Lift linter warnings in NMO component
willend Dec 9, 2025
5c6cde4
Make NMO.comp as INHERIT alias of FlatEllipse_finite_mirror
willend Dec 9, 2025
741a30b
Exit in case of malloc failures in Texture_process / initLegendre
willend Dec 9, 2025
edb2c14
Exit in case of failed fopen
willend Dec 9, 2025
edf4010
Attempt to take care of potential failed fopen's and mallocs...
willend Dec 9, 2025
2af94f5
Remove these superfluous / wrongly placed var init's
willend Dec 9, 2025
999a971
Correct typo and missing NAME_CURRENT_COMP
willend Dec 9, 2025
a9ded60
Header edit / trigger CI rerun
willend Dec 9, 2025
9f9dfe8
Revert on Texture_process - unreproduciple error on Ubuntu in CI
willend Dec 9, 2025
99783ce
CI fixup / debug
willend Dec 9, 2025
2f93bee
Restore changes to Texture_process
willend Dec 9, 2025
2fd52ba
Fix: Was missing stderr in fprintf() call
willend Dec 9, 2025
18f6ac4
Merge pull request #2248 from mccode-dev/linter-fixes
willend Dec 9, 2025
c83a54a
Provide input-parameter handles to switch monitors on/off
willend Dec 10, 2025
f7d9f62
Fix typo in input parameter
willend Dec 10, 2025
f4af281
Merge pull request #2249 from mccode-dev/off_file_mesh_component
willend Dec 10, 2025
56e8a8c
Updated mesh intersection algorithm to return all times, not just pos…
mads-bertelsen Dec 10, 2025
ae8f05f
Changed mesh intersection algorithm to return all times instead of ju…
mads-bertelsen Dec 10, 2025
f0b39e8
Merge pull request #2251 from mccode-dev/mesh_surface_compatability
willend Dec 10, 2025
714c1b4
Ensure hits[iter].surface_index has correct valye (=0)
willend Dec 10, 2025
38d994d
Trigger test run of Geometry_test
willend Dec 10, 2025
13a81bc
Merge pull request #2253 from mccode-dev/fix-union-lib-surface-stack
willend Dec 10, 2025
3ad95c2
Removing debug prints from Sphere and 3D logger in Union.
mads-bertelsen Dec 10, 2025
73750cd
Temporary removal of sphere in Geometry test to check if CI error ori…
mads-bertelsen Dec 10, 2025
061d3ce
Added sphere back to Geometry test
mads-bertelsen Dec 10, 2025
e9d540e
Merge pull request #2252 from mccode-dev/remove_union_debug_print
willend Dec 10, 2025
55e7827
Provide input-parameter handles to switch monitors on/off
willend Dec 10, 2025
96ea332
Fix typo in input parameter
willend Dec 10, 2025
a2e1f0b
Merge branch 'tests-output-preparation-3.6' of https://github.com/mcc…
willend Dec 10, 2025
469b0a0
Replacement strcasestr (from linter hint in FZJ_BenchmarkSfin2)
willend Dec 10, 2025
164d281
Revert strcasestr commit
willend Dec 10, 2025
cc48e65
Exit in case of failed malloc(s)
willend Dec 10, 2025
d976354
Ensure return value in all branches (linter hint)
willend Dec 10, 2025
8c6487f
Act on various linter hints (malloc's printfs with missing content etc)
willend Dec 10, 2025
d518dea
Trigger unit test (whitespace)
willend Dec 10, 2025
f61149b
Revert changes to Hal's lib snippets...
willend Dec 10, 2025
bc65737
Disable binary STL on Windows MSVC
willend Dec 10, 2025
60a88a1
Re-implement edits from linter hints in Hal's supermirror snippets.
willend Dec 10, 2025
22cc2c8
Rectify fprintf message in Union_mesh
willend Dec 10, 2025
696b29c
Merge pull request #2254 from mccode-dev/tests-output-preparation-3.6
willend Dec 10, 2025
eea8759
Bring back hooks for matlab/octave tools (dependencies rely un user a…
willend Dec 11, 2025
2da8f62
Bring back hooks for matlab/octave tools (dependencies rely un user a…
willend Dec 11, 2025
bffecc9
Merge pull request #2256 from mccode-dev/tests-output-preparation-3.6
willend Dec 11, 2025
e56ccaf
Patch with NaN between multilines (remove artifact visualisation)
willend Dec 11, 2025
b6afb20
Merge branch 'tests-output-preparation-3.6' of https://github.com/mcc…
willend Dec 11, 2025
10927e4
Merge pull request #2257 from mccode-dev/tests-output-preparation-3.6
willend Dec 11, 2025
fd5fe06
Put in place batch wrapper for Matlab-based mcdisplay
willend Dec 11, 2025
74b245d
Correct filename
willend Dec 11, 2025
d5ea4f7
Use @MCCODE_PREFIX@ for mc/mx and allow the Matlab desktop
willend Dec 11, 2025
313186f
Ensure windows-style paths in the batch wrappers...
willend Dec 11, 2025
03b9af8
mcdisplay-cad: Warn if cadquery is missing / open created file via OS…
willend Dec 11, 2025
bed22d2
Merge pull request #2258 from mccode-dev/tests-output-preparation-3.6
willend Dec 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 17 additions & 23 deletions .github/workflows/mcstas-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,35 +464,35 @@ jobs:
export MCSTAS_EXECUTABLE="mcstas"
export MCRUN_EXECUTABLE="mcrun"
export MCTEST_EXECUTABLE="mctest"
export PERMISSIVE=" "
export PATH=${PATH}:${PWD}/install_mcstas/bin/:${PWD}/install_mcstas/mcstas/3.99.99/bin/
# Check if any instr files were modified during last commit
cd src
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
export NUMCHANGEDCOMPS=`git diff --name-only HEAD HEAD~1|grep \.comp\$ | grep mcstas-comps | wc -l | xargs echo`
export COMPILIST=""
export RUNALL="NO"
cd -
if [ "$NUMCHANGEDCOMPS" != "0" ];
then
if [ "$NUMCHANGEDCOMPS" -lt "20" ];
then
for comp in $CHANGEDCOMPS;
do
echo Finding instruments matching component $comp
NUMMATCH=`find mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
echo Finding tests including component $comp
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
MATCH=`find mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export COMPILIST=`echo $COMPILIST $MATCH`
if [ "$RUNNER_OS" != "Windows" ]; then
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE --verbose
else
export COMPILIST=`echo $COMPILIST template_simple`
echo .\\install\\bin\\mctest --verbose --testdir run_${comp} --comp=${comp} --suffix=${{ matrix.CC }}_CHANGES --permissive --verbose >> changedinstr.bat
fi
done
else
export RUNALL="YES"
echo No matching tests found
fi
done
fi
cd src
export RUNALL="NO"
export CHANGEDINSTR=`git diff --name-only HEAD HEAD~1| grep \.instr\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export CHANGEDINSTR=`echo $CHANGEDINSTR $COMPILIST | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export CHANGEDINSTR=`echo $CHANGEDINSTR | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export NUMCHANGEDINSTR=`git diff --name-only HEAD HEAD~1|grep \.instr\$ | grep mcstas-comps | wc -l | xargs echo`
echo ----
echo $NUMCHANGEDCOMPS components and $NUMCHANGEDINSTR instruments were changed, resulting in this list:
Expand All @@ -503,24 +503,20 @@ jobs:
then
export RUNALL="YES"
fi
export PERMISSIVE=" "
if [ "$NUMCHANGEDINSTR" != "0" ] || [ "$NUMCHANGEDCOMPS" != "0" ];
if [ "$NUMCHANGEDINSTR" != "0" ];
then
if [ "$RUNALL" == "NO" ];
then
export SCOPE="--instr=$CHANGEDINSTR"
else
export SCOPE=" "
fi
mkdir run_mctest && cd run_mctest
if [ "$RUNNER_OS" != "Windows" ]; then
mkdir run_mctest && cd run_mctest
if [ "$RUNNER_OS" == macOS ]; then
export PERMISSIVE="--permissive"
fi
../install_mcstas/bin/${MCTEST_EXECUTABLE} --testdir $PWD $SCOPE --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE
mctest --mpi=2 --testdir $PWD $SCOPE --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE
mcviewtest --nobrowse $PWD
else
echo ..\\install\\bin\\mctest --verbose --testdir=. $SCOPE --suffix=${{ matrix.CC }}_CHANGES --permissive > changedinstr.bat
echo .\\install\\bin\\mctest --verbose --testdir=run_mctest $SCOPE --suffix=${{ matrix.CC }}_CHANGES --permissive >> ..\\changedinstr.bat
fi
fi

Expand All @@ -532,9 +528,7 @@ jobs:
shell: cmd
run: |
if exist changedinstr.bat (
mkdir run_mctest
cd run_mctest
call ..\changedinstr.bat
call .\changedinstr.bat
)

# Start of Windows tests
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/mcstas-conda-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,35 +218,35 @@ jobs:
export MCSTAS_EXECUTABLE="mcstas"
export MCRUN_EXECUTABLE="mcrun"
export MCTEST_EXECUTABLE="mctest"
export PERMISSIVE=" "
export PATH=${PATH}:${PWD}/install_mcstas/bin/:${PWD}/install_mcstas/mcstas/3.99.99/bin/
# Check if any instr files were modified during last commit
cd src
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
export NUMCHANGEDCOMPS=`git diff --name-only HEAD HEAD~1|grep \.comp\$ | grep mcstas-comps | wc -l | xargs echo`
export COMPILIST=""
export RUNALL="NO"
cd -
if [ "$NUMCHANGEDCOMPS" != "0" ];
then
if [ "$NUMCHANGEDCOMPS" -lt "20" ];
then
for comp in $CHANGEDCOMPS;
do
echo Finding instruments matching component $comp
NUMMATCH=`find mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
echo Finding tests including component $comp
NUMMATCH=`find src/mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
MATCH=`find mcstas-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export COMPILIST=`echo $COMPILIST $MATCH`
if [ "$RUNNER_OS" != "Windows" ]; then
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES $PERMISSIVE --verbose
else
mctest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES $PERMISSIVE --verbose
fi
else
export COMPILIST=`echo $COMPILIST template_simple`
echo No matching tests found
fi
done
else
export RUNALL="YES"
fi
fi
cd src
export RUNALL="NO"
export CHANGEDINSTR=`git diff --name-only HEAD HEAD~1| grep \.instr\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export CHANGEDINSTR=`echo $CHANGEDINSTR $COMPILIST | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export CHANGEDINSTR=`echo $CHANGEDINSTR | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export NUMCHANGEDINSTR=`git diff --name-only HEAD HEAD~1|grep \.instr\$ | grep mcstas-comps | wc -l | xargs echo`
echo ----
echo $NUMCHANGEDCOMPS components and $NUMCHANGEDINSTR instruments were changed, resulting in this list:
Expand All @@ -257,8 +257,7 @@ jobs:
then
export RUNALL="YES"
fi
export PERMISSIVE=" "
if [ "$NUMCHANGEDINSTR" != "0" ] || [ "$NUMCHANGEDCOMPS" != "0" ];
if [ "$NUMCHANGEDINSTR" != "0" ];
then
if [ "$RUNALL" == "NO" ];
then
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/mcxtrace-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,35 +397,35 @@ jobs:
export MCXTRACE_EXECUTABLE="mcxtrace"
export MXRUN_EXECUTABLE="mxrun"
export MXTEST_EXECUTABLE="mxtest"
export PERMISSIVE=" "
export PATH=${PATH}:${PWD}/install_mcxtrace/bin/:${PWD}/install_mcxtrace/mcxtrace/3.99.99/bin/
# Check if any instr files were modified during last commit
cd src
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcxtrace-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
export NUMCHANGEDCOMPS=`git diff --name-only HEAD HEAD~1|grep \.comp\$ | grep mcxtrace-comps | wc -l | xargs echo`
export COMPILIST=""
export RUNALL="NO"
cd -
if [ "$NUMCHANGEDCOMPS" != "0" ];
then
if [ "$NUMCHANGEDCOMPS" -lt "20" ];
then
for comp in $CHANGEDCOMPS;
do
echo Finding instruments matching component $comp
NUMMATCH=`find mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
echo Finding tests including component $comp
NUMMATCH=`find src/mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
MATCH=`find mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export COMPILIST=`echo $COMPILIST $MATCH`
if [ "$RUNNER_OS" != "Windows" ]; then
mxtest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE --verbose
else
export COMPILIST=`echo $COMPILIST template_simple`
echo .\\install\\bin\\mxtest --verbose --testdir run_${comp} --comp=${comp} --suffix=${{ matrix.CC }}_CHANGES --permissive --verbose >> changedinstr.bat
fi
done
else
export RUNALL="YES"
echo No matching tests found
fi
done
fi
cd src
export RUNALL="NO"
export CHANGEDINSTR=`git diff --name-only HEAD HEAD~1| grep \.instr\$ | grep mcxtrace-comps | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export CHANGEDINSTR=`echo $CHANGEDINSTR $COMPILIST | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export CHANGEDINSTR=`echo $CHANGEDINSTR | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export NUMCHANGEDINSTR=`git diff --name-only HEAD HEAD~1|grep \.instr\$ | grep mcxtrace-comps | wc -l | xargs echo`
echo ----
echo $NUMCHANGEDCOMPS components and $NUMCHANGEDINSTR instruments were changed, resulting in this list:
Expand All @@ -436,24 +436,20 @@ jobs:
then
export RUNALL="YES"
fi
export PERMISSIVE=" "
if [ "$NUMCHANGEDINSTR" != "0" ] || [ "$NUMCHANGEDCOMPS" != "0" ];
if [ "$NUMCHANGEDINSTR" != "0" ];
then
if [ "$RUNALL" == "NO" ];
then
export SCOPE="--instr=$CHANGEDINSTR"
else
export SCOPE=" "
fi
mkdir run_mxtest && cd run_mxtest
if [ "$RUNNER_OS" != "Windows" ]; then
mkdir run_mxtest && cd run_mxtest
if [ "$RUNNER_OS" == macOS ]; then
export PERMISSIVE="--permissive"
fi
../install_mcxtrace/bin/${MXTEST_EXECUTABLE} --testdir $PWD $SCOPE --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE
mxtest --mpi=2 --testdir $PWD $SCOPE --suffix=${{ matrix.CC }}_CHANGES $PERMISSIVE
mxviewtest --nobrowse $PWD
else
echo ..\\install\\bin\\mxtest --verbose --testdir=. $SCOPE --suffix=${{ matrix.CC }}_CHANGES --permissive > changedinstr.bat
echo .\\install\\bin\\mxtest --verbose --testdir=run_mxtest $SCOPE --suffix=${{ matrix.CC }}_CHANGES --permissive >> ..\\changedinstr.bat
fi
fi

Expand All @@ -465,9 +461,7 @@ jobs:
shell: cmd
run: |
if exist changedinstr.bat (
mkdir run_mxtest
cd run_mxtest
call ..\changedinstr.bat
call .\changedinstr.bat
)

# Start of Windows tests
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/mcxtrace-conda-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,35 +199,35 @@ jobs:
export MCXTRACE_EXECUTABLE="mcxtrace"
export MXRUN_EXECUTABLE="mxrun"
export MXTEST_EXECUTABLE="mxtest"
export PERMISSIVE=" "
export PATH=${PATH}:${PWD}/install_mcxtrace/bin/:${PWD}/install_mcxtrace/mcxtrace/3.99.99/bin/
# Check if any instr files were modified during last commit
cd src
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcxtrace-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
export NUMCHANGEDCOMPS=`git diff --name-only HEAD HEAD~1|grep \.comp\$ | grep mcxtrace-comps | wc -l | xargs echo`
export COMPILIST=""
export RUNALL="NO"
cd -
if [ "$NUMCHANGEDCOMPS" != "0" ];
then
if [ "$NUMCHANGEDCOMPS" -lt "20" ];
then
for comp in $CHANGEDCOMPS;
do
echo Finding instruments matching component $comp
NUMMATCH=`find mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
echo Finding tests including component $comp
NUMMATCH=`find src/mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | wc -l`
if [ "$NUMMATCH" -gt "0" ];
then
MATCH=`find mcxtrace-comps -name \*.instr -exec grep -H ${comp} \{\} \; | cut -f1 -d: | sort | uniq | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export COMPILIST=`echo $COMPILIST $MATCH`
if [ "$RUNNER_OS" != "Windows" ]; then
mxtest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES $PERMISSIVE --verbose
else
export COMPILIST=`echo $COMPILIST template_simple`
mxtest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES $PERMISSIVE --verbose
fi
done
else
export RUNALL="YES"
echo No matching tests found
fi
done
fi
cd src
export RUNALL="NO"
export CHANGEDINSTR=`git diff --name-only HEAD HEAD~1| grep \.instr\$ | grep mcxtrace-comps | xargs -n1 basename | sed s/\.instr//g | xargs echo`
export CHANGEDINSTR=`echo $CHANGEDINSTR $COMPILIST | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export CHANGEDINSTR=`echo $CHANGEDINSTR | xargs -n1 echo | sort | uniq | xargs echo | sed s/\ /,/g`
export NUMCHANGEDINSTR=`git diff --name-only HEAD HEAD~1|grep \.instr\$ | grep mcxtrace-comps | wc -l | xargs echo`
echo ----
echo $NUMCHANGEDCOMPS components and $NUMCHANGEDINSTR instruments were changed, resulting in this list:
Expand All @@ -238,8 +238,7 @@ jobs:
then
export RUNALL="YES"
fi
export PERMISSIVE=" "
if [ "$NUMCHANGEDINSTR" != "0" ] || [ "$NUMCHANGEDCOMPS" != "0" ];
if [ "$NUMCHANGEDINSTR" != "0" ];
then
if [ "$RUNALL" == "NO" ];
then
Expand Down
2 changes: 1 addition & 1 deletion INSTALL-McStas/Windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. **Recommended:**
* Install [Visual Studio including c/c++ support](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#download-and-install-the-tools). Any
recent version of Visual Studio itself should work. Use the
"Visual Studio Installer" and [modify settings](install-screenshot1.png) to selecect at minumum "Desktop development with c++" specifying to [include VS2019 build tools and CLI support](install-screenshot2.png). (It is OK to include build tools such as VS2022 or VS2026, but VS2019 **must** be present also.
"Visual Studio Installer" and [modify settings (click for screenshot)](install-screenshot1.png) to selecect at minumum "Desktop development with c++" specifying to [include all of: MSVC v142 (2019), MSVC v143 (2022) plus CLI support (click for screenshot)](install-screenshot2.png). (It should be OK to include later build tools such as VS2026, but VS2019 and VS2022 **must** be present also.
* Use the [mcstas-conda](mcstas-conda.bat) batch script to install the latest mcstas from `conda-forge`
* Once install has completed, please use the `mcstas-shell` shortcut on the desktop - issue terminal command `mcgui` to start the McStas GUI.
* Option 1 *may* function `arm64` Windows, but will require installation of Visual Studio including both arm64 and x64_64 build tools for c++.
Expand Down
Binary file modified INSTALL-McStas/Windows/install-screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion INSTALL-McXtrace/Windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. **Recommended:**
* Install [Visual Studio including c/c++ support](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#download-and-install-the-tools). Any
recent version of Visual Studio itself should work. Use the
"Visual Studio Installer" and [modify settings](install-screenshot1.png) to selecect at minumum "Desktop development with c++" specifying to [include VS2019 build tools and CLI support](install-screenshot2.png). (It is OK to include build tools such as VS2022 or VS2026, but VS2019 **must** be present also.
"Visual Studio Installer" and [modify settings (click for screenshot)](install-screenshot1.png) to selecect at minumum "Desktop development with c++" specifying to [include all of: MSVC v142 (2019), MSVC v143 (2022) plus CLI support (click for screenshot)](install-screenshot2.png). (It should be OK to include later build tools such as VS2026, but VS2019 and VS2022 **must** be present also.
* Use the [mcxtrace-conda](mcxtrace-conda.bat) batch script to install the latest mcxtrace from `conda-forge`
* Once install has completed, please use the `mcxtrace-shell` shortcut on the desktop - issue terminal command `mxgui` to start the McXtrace GUI.
* Option 1 *may* function `arm64` Windows, but will require installation of Visual Studio including both arm64 and x64_64 build tools for c++.
Expand Down
Binary file modified INSTALL-McXtrace/Windows/install-screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion cmake/Modules/InstallMCCODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ macro(installMCCODE)
endif()

if(WINDOWS)
cmake_path( CONVERT "${MCCODE_RELPATH_BINDIR2TOOLDIR}" TO_NATIVE_PATH_LIST MCCODE_RELPATH_BINDIR2TOOLDIR)

# Generate and install Windows setup scripts
foreach (name env.bat env.m go.bat test.bat)
configure_file(
Expand All @@ -413,7 +415,7 @@ macro(installMCCODE)
install(PROGRAMS ${WORK}/support/${FLAVOR}-labenv.bat DESTINATION "${DEST_BINDIR}")

# Python/Perl related batches special handling
foreach (name run.bat doc.bat test.bat viewtest.bat resplot.bat plot.bat display.bat gui.bat guistart.bat plot-pyqtgraph.bat plot-matplotlib.bat plot-matlab.bat display-webgl.bat display-webgl-classic.bat display-pyqtgraph.bat display-cad.bat display-matplotlib.bat display-mantid.bat)
foreach (name run.bat doc.bat test.bat viewtest.bat resplot.bat plot.bat display.bat gui.bat guistart.bat plot-pyqtgraph.bat plot-matplotlib.bat plot-matlab.bat display-webgl.bat display-webgl-classic.bat display-pyqtgraph.bat display-cad.bat display-matplotlib.bat display-mantid.bat display-matlab.bat)
configure_file(
cmake/support/run-scripts/${name}.in
work/support/${MCCODE_PREFIX}${name}
Expand Down
3 changes: 3 additions & 0 deletions cmake/support/run-scripts/display-matlab.bat.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@REM Isn't windows a lovely place???
@set BINDIR=%~dp0
@matlab -nosplash -r "addpath('%BINDIR%@MCCODE_RELPATH_BINDIR2TOOLDIR@\matlab\@MCCODE_PREFIX@display');mcdisplay @MCCODE_PREFIX@run %*"
Loading
Loading