Skip to content

Commit 8965599

Browse files
authored
Merge pull request #2371 from tkittel/ncrystal_powdern
First attempt at making PowderN load NCMAT data directly via NCrystal
2 parents 365a525 + f07b455 commit 8965599

5 files changed

Lines changed: 63625 additions & 18 deletions

File tree

.github/workflows/mcstas-conda-basictest.yml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,27 @@ jobs:
8585
run: |
8686
./src/devel/bin/mccode-build-conda -m mcstas -s $PWD/src -b $PWD/build_mcstas
8787
88+
- name: Validate build output
89+
id: build-validation
90+
if: always()
91+
run: |
92+
set -e
93+
set -u
94+
set -x
95+
if [ "$RUNNER_OS" == "Windows" ];
96+
then
97+
echo "Validating Windows build output..."
98+
echo "CONDA_PREFIX: $CONDA_PREFIX"
99+
echo "Checking for mcstas executable..."
100+
test -f ${CONDA_PREFIX}/bin/mcstas || test -f ${CONDA_PREFIX}/bin/mcstas.bat || { echo "ERROR: mcstas not found"; exit 1; }
101+
echo "Checking for mctest executable..."
102+
test -f ${CONDA_PREFIX}/bin/mctest.bat || { echo "ERROR: mctest.bat not found"; ls -la ${CONDA_PREFIX}/bin/ | grep -i mctest || echo "No mctest found"; exit 1; }
103+
else
104+
echo "Validating Unix build output..."
105+
test -f ${CONDA_PREFIX}/bin/mcstas || { echo "ERROR: mcstas not found"; exit 1; }
106+
test -f ${CONDA_PREFIX}/bin/mctest || { echo "ERROR: mctest not found"; exit 1; }
107+
fi
108+
88109
- name: Post install openmpi hacks macOS
89110
id: post-install-openmpi-hacks-macOS
90111
if: runner.os == 'macOS'
@@ -225,6 +246,17 @@ jobs:
225246
export MCTEST_EXECUTABLE="mctest"
226247
export PERMISSIVE=" "
227248
export PATH=${PATH}:${PWD}/install_mcstas/bin/:${PWD}/install_mcstas/mcstas/3.99.99/bin/
249+
250+
if [ "$RUNNER_OS" == "Windows" ];
251+
then
252+
echo "Windows build - debugging environment:"
253+
echo "PATH: $PATH"
254+
echo "CONDA_PREFIX: $CONDA_PREFIX"
255+
echo "Available mctest files:"
256+
find ${CONDA_PREFIX}/bin/ -name "*mctest*" -type f || echo "No mctest found"
257+
ls -la ${CONDA_PREFIX}/bin/ | grep -i mctest || echo "No mctest in bin directory"
258+
fi
259+
228260
# Check if any instr files were modified during last commit
229261
cd src
230262
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
@@ -239,9 +271,9 @@ jobs:
239271
if [ "$NUMMATCH" -gt "0" ];
240272
then
241273
if [ "$RUNNER_OS" != "Windows" ]; then
242-
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose
274+
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose || { echo "mctest failed with exit code $?"; exit 1; }
243275
else
244-
mctest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose
276+
mctest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose || { echo "mctest.bat failed with exit code $?"; exit 1; }
245277
fi
246278
else
247279
echo No matching tests found
@@ -272,10 +304,10 @@ jobs:
272304
fi
273305
mkdir run_mctest && cd run_mctest
274306
if [ "$RUNNER_OS" != "Windows" ]; then
275-
mctest --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE
307+
mctest --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE || { echo "mctest failed with exit code $?"; exit 1; }
276308
mcviewtest --nobrowse $PWD
277309
else
278-
mctest.bat --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE
310+
mctest.bat --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE || { echo "mctest.bat failed with exit code $?"; exit 1; }
279311
mcviewtest.bat --nobrowse $PWD
280312
fi
281313
fi
@@ -303,4 +335,4 @@ jobs:
303335
uses: mxschmitt/action-tmate@v3
304336
if: always() && (inputs.manual-debugging == true)
305337
with:
306-
limit-access-to-actor: true
338+
limit-access-to-actor: true

mcstas-comps/examples/Tests_samples/Test_PowderN/Test_PowderN.instr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* %Example: lambda=1 directbeam=1 SPLITS=5 Detector: Sph_mon_I=4.77847e+09
2121
* %Example: lambda=1 directbeam=1 SPLITS=10 Detector: Sph_mon_I=4.77847e+09
2222
* %Example: lambda=1 directbeam=1 SPLITS=20 Detector: Sph_mon_I=4.77847e+09
23+
* %Example: lambda=5 reflections="stdlib::ZnO_sg186_ZincOxide.ncmat;temp=300K" directbeam=1 SPLITS=20 Detector: Sph_mon_I=2.03816e+8
2324
*
2425
* %Parameters
2526
* lambda: [Angs] Wavelength emitted from source, 1% wl-interval around.

0 commit comments

Comments
 (0)