diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index ce0a69807b..78f81fabe2 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -28,7 +28,7 @@ jobs: - { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' } - { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'openmpi' } - { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' } - - { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' } + #- { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' } name: ${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/mcstas-winbasictest-mingw.yml b/.github/workflows/mcstas-winbasictest-mingw.yml new file mode 100644 index 0000000000..5d541db2ce --- /dev/null +++ b/.github/workflows/mcstas-winbasictest-mingw.yml @@ -0,0 +1,185 @@ +name: mcstas-mingw-winbasictest + +on: + push: + pull_request: + +jobs: + build: + # More platform information available on: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + + runs-on: ${{ matrix.os }} + defaults: + run: + shell: cmd + + strategy: + matrix: + os: [windows-2022] + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: src + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: 'msmpi' + + - name: Setup MPI cygpath bash... + shell: bash + run: | + cygpath -sm "$MSMPI_INC" > includepath.txt + cygpath -sm "$MSMPI_LIB64" > libpath.txt + + - name: Setup MPI cygpath... + run: | + set /p MPIINCVAR=> %GITHUB_ENV% + echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV% + + - name: choco install wget + run: choco install wget + + - name: pip install deps + run: pip install PyYAML ply McStasscript ncrystal mslex + + - name: pip install mcpl-core preview + run: pip install -v "git+https://github.com/mctools/mcpl@path_to_mcpl2#subdirectory=mcpl_core" + + - name: choco install deps2 + run: choco install mingw make winflexbison3 + + - name: CMake cfg + run: > + cmake -B build -S src + -G "Unix Makefiles" + -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc.exe + "-DCMAKE_INSTALL_PREFIX=./install" + -DMCVERSION="3.99.99" + -DMCCODE_BUILD_CONDA_PKG=OFF + -DMCCODE_BUILD_WINDOWS_MINGW=ON + -DMCCODE_CONFIG_MCPL2=ON + -DCMAKE_INSTALL_LIBDIR=lib + -DBUILD_MCSTAS=ON + -DMCCODE_USE_LEGACY_DESTINATIONS=OFF + -DBUILD_TOOLS=ON + -DENABLE_COMPONENTS=ON + -DENABLE_CIF2HKL=OFF + -DENABLE_NEUTRONICS=OFF + -DMPIINCLUDEDIR=%MPIINCVAR% + -DMPILIBDIR=%MPILIBVAR% + + - name: CMake build + shell: cmd + run: cmake --build build --config Release -j 2 + + - name: CMake install + run: cmake --install build --config Release + + - name: set MCSTAS env var + run: echo MCSTAS=%CD%\install\share\mcstas\resources >> %GITHUB_ENV% + + - name: check MCSTAS env var + run: echo %MCSTAS% + + - run: type .\install\share\mcstas\tools\Python\mccodelib\mccode_config.json + - run: .\install\bin\mcrun -h + - run: .\install\bin\mcstas -v + - run: mcpl-config -s + - run: ncrystal-config -s + + - name: Prepare rundirs + run: mkdir run_std run_mcpl_output run_mcpl_input run_mcpl_input_once run_union run_ncrystal + + - name: Prepare std instrument + working-directory: run_std + run: copy ..\install\share\mcstas\resources\examples\BNL\BNL_H8\BNL_H8.instr test.instr + + - name: Prepare NCrystal instrument + working-directory: run_ncrystal + run: copy ..\install\share\mcstas\resources\examples\NCrystal\NCrystal_example\NCrystal_example.instr test.instr + + - name: Prepare MCPL_input instrument + working-directory: run_mcpl_input + run: | + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl . + + - name: Prepare MCPL_input_once instrument + working-directory: run_mcpl_input_once + run: | + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\Test_MCPL_input_once.instr test.instr + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl . + + - name: Prepare MCPL_output instrument + working-directory: run_mcpl_output + run: copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_output\Test_MCPL_output.instr test.instr + + - name: Run std instrument + working-directory: run_std + run: ..\install\bin\mcrun --verbose test.instr -d Single_core lambda=2.36 + + - name: Run MCPL_output instrument + working-directory: run_mcpl_output + run: ..\install\bin\mcrun --verbose test.instr -d Single_core Ncount=1e3 + + - name: Run MCPL_input instrument + working-directory: run_mcpl_input + run: ..\install\bin\mcrun --verbose test.instr -d Single_core repeat=1 + + - name: Run MCPL_input_once instrument + working-directory: run_mcpl_input_once + run: ..\install\bin\mcrun --verbose test.instr -d Single_core v_smear=0.1 + + - name: Run NCrystal instrument + working-directory: run_ncrystal + run: ..\install\bin\mcrun --verbose test.instr -d Single_core sample_cfg="Y2O3_sg206_Yttrium_Oxide.ncmat;density=0.6x" + + - name: Run std instrument MPI + working-directory: run_std + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto lambda=2.36 + + - name: Run MCPL_output instrument MPI + working-directory: run_mcpl_output + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto Ncount=1e3 + + - name: Run MCPL_input instrument MPI + working-directory: run_mcpl_input + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 + + - name: Run MCPL_input_once instrument MPI + working-directory: run_mcpl_input_once + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto v_smear=0.1 + + - name: Run NCrystal instrument MPI + working-directory: run_ncrystal + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto sample_cfg="Y2O3_sg206_Yttrium_Oxide.ncmat;density=0.6x" + + - name: 'Tar output files' + id: tar-package + if: always() + shell: bash + run: | + set -e + set -u + set -x + tar cvfz mcstas-mingw-${{ matrix.os }}_output.tgz run_* + + - name: 'Upload Artifact' + id: tar-upload + uses: actions/upload-artifact@v4 + if: always() + with: + name: mcstas-mingw-${{ matrix.os }}_output.tgz + path: "mcstas-mingw-${{ matrix.os }}_output.tgz" diff --git a/.github/workflows/mcstas-winbasictest-msvc.yml b/.github/workflows/mcstas-winbasictest-msvc.yml new file mode 100644 index 0000000000..b9e296f340 --- /dev/null +++ b/.github/workflows/mcstas-winbasictest-msvc.yml @@ -0,0 +1,193 @@ +name: mcstas-msvc-winbasictest + +on: + push: + pull_request: + +jobs: + build: + # More platform information available on: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + + runs-on: ${{ matrix.os }} + defaults: + run: + shell: cmd + + strategy: + matrix: + os: [windows-2019, windows-2022, windows-2025] + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: src + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + #Two ways of enabling cl.exe and other tools. One is via an external action...: + - name: Setup VS in shell + uses: ilammy/msvc-dev-cmd@v1 + #...but a simpler one might be to simply invoke the correct vcvars64.bat + #file first, like...: + # + # - name: whatever + # shell: cmd + # run: | + # call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + # cl /help + # + #...but since we also want to support VS 2019, we use the above action for now + + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: 'msmpi' + + - name: Setup MPI cygpath bash... + shell: bash + run: | + cygpath -sm "$MSMPI_INC" > includepath.txt + cygpath -sm "$MSMPI_LIB64" > libpath.txt + + - name: Setup MPI cygpath... + run: | + set /p MPIINCVAR=> %GITHUB_ENV% + echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV% + + - name: choco install deps + run: choco install winflexbison3 wget + + - name: CMake cfg + run: > + cmake -B build -S src + "-DCMAKE_INSTALL_PREFIX=./install" + -DMCVERSION="3.99.99" + -DMCCODE_BUILD_CONDA_PKG=OFF + -DMCCODE_CONFIG_MCPL2=ON + -DCMAKE_INSTALL_LIBDIR=lib + -DBUILD_MCSTAS=ON + -DMCCODE_USE_LEGACY_DESTINATIONS=OFF + -DBUILD_TOOLS=ON + -DENABLE_COMPONENTS=ON + -DENABLE_CIF2HKL=OFF + -DENABLE_NEUTRONICS=OFF + -DMPIINCLUDEDIR=%MPIINCVAR% + -DMPILIBDIR=%MPILIBVAR% + + - name: CMake build + shell: cmd + run: cmake --build build --config Release -j 2 + + - name: CMake install + run: cmake --install build --config Release + + - name: pip install deps + run: pip install PyYAML ply McStasscript ncrystal mslex + + - name: pip install mcpl-core preview + run: pip install -v "git+https://github.com/mctools/mcpl@path_to_mcpl2#subdirectory=mcpl_core" + + - name: set MCSTAS env var + run: echo MCSTAS=%CD%\install\share\mcstas\resources >> %GITHUB_ENV% + + - name: check MCSTAS env var + run: echo %MCSTAS% + + - run: type .\install\share\mcstas\tools\Python\mccodelib\mccode_config.json + - run: .\install\bin\mcrun -h + - run: .\install\bin\mcstas -v + - run: mcpl-config -s + - run: ncrystal-config -s + + - name: Prepare rundirs + run: mkdir run_std run_mcpl_output run_mcpl_input run_mcpl_input_once run_union run_ncrystal + + - name: Prepare std instrument + working-directory: run_std + run: copy ..\install\share\mcstas\resources\examples\BNL\BNL_H8\BNL_H8.instr test.instr + + - name: Prepare NCrystal instrument + working-directory: run_ncrystal + run: copy ..\install\share\mcstas\resources\examples\NCrystal\NCrystal_example\NCrystal_example.instr test.instr + + - name: Prepare MCPL_input instrument + working-directory: run_mcpl_input + run: | + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input\voutput.mcpl . + + - name: Prepare MCPL_input_once instrument + working-directory: run_mcpl_input_once + run: | + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\Test_MCPL_input_once.instr test.instr + copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_input_once\voutput.mcpl . + + - name: Prepare MCPL_output instrument + working-directory: run_mcpl_output + run: copy ..\install\share\mcstas\resources\examples\Tests_MCPL_etc\Test_MCPL_output\Test_MCPL_output.instr test.instr + + - name: Run std instrument + working-directory: run_std + run: ..\install\bin\mcrun --verbose test.instr -d Single_core lambda=2.36 + + - name: Run MCPL_output instrument + working-directory: run_mcpl_output + run: ..\install\bin\mcrun --verbose test.instr -d Single_core Ncount=1e3 + + - name: Run MCPL_input instrument + working-directory: run_mcpl_input + run: ..\install\bin\mcrun --verbose test.instr -d Single_core repeat=1 + + - name: Run MCPL_input_once instrument + working-directory: run_mcpl_input_once + run: ..\install\bin\mcrun --verbose test.instr -d Single_core v_smear=0.1 + + - name: Run NCrystal instrument + working-directory: run_ncrystal + run: ..\install\bin\mcrun --verbose test.instr -d Single_core sample_cfg="Y2O3_sg206_Yttrium_Oxide.ncmat;density=0.6x" + + - name: Run std instrument MPI + working-directory: run_std + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto lambda=2.36 + + - name: Run MCPL_output instrument MPI + working-directory: run_mcpl_output + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto Ncount=1e3 + + - name: Run MCPL_input instrument MPI + working-directory: run_mcpl_input + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 + + - name: Run MCPL_input_once instrument MPI + working-directory: run_mcpl_input_once + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto v_smear=0.1 + + - name: Run NCrystal instrument MPI + working-directory: run_ncrystal + run: ..\install\bin\mcrun --verbose test.instr -d MPI_multicore -c --mpi=auto sample_cfg="Y2O3_sg206_Yttrium_Oxide.ncmat;density=0.6x" + + - name: 'Tar output files' + id: tar-package + if: always() + shell: bash + run: | + set -e + set -u + set -x + tar cvfz mcstas-msvc-${{ matrix.os }}_output.tgz run_* + + - name: 'Upload Artifact' + id: tar-upload + uses: actions/upload-artifact@v4 + if: always() + with: + name: mcstas-msvc-${{ matrix.os }}_output.tgz + path: "mcstas-msvc-${{ matrix.os }}_output.tgz" diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml index a08ae49593..dfe21cb373 100644 --- a/.github/workflows/mcxtrace-basictest.yml +++ b/.github/workflows/mcxtrace-basictest.yml @@ -28,7 +28,7 @@ jobs: - { os: macos-13, CC: clang, CXX: clang++, python: "3.11", mpi: 'openmpi' } - { os: macos-14, CC: clang, CXX: clang++, python: "3.12", mpi: 'openmpi' } - { os: macos-15, CC: clang, CXX: clang++, python: "3.13", mpi: 'openmpi' } - - { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' } + #- { os: windows-latest, CC: gcc, CXX: g++, python: "3.12", mpi: 'msmpi' } name: ${{ matrix.os }}.${{ matrix.CC }}.${{ matrix.mpi }}.python-${{ matrix.python }} runs-on: ${{ matrix.os }} @@ -216,7 +216,7 @@ jobs: test -f ./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} ./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} --version mkdir run_Test_MCPL_input && cd run_Test_MCPL_input - cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests/Test_MCPL_input/Test_MCPL_input.instr . + cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/Test_MCPL_input.instr . ../install_mcxtrace/bin/${MXRUN_EXECUTABLE} Test_MCPL_input.instr repeat=10 - name: Launch MCPL test instrument (MPI) @@ -236,7 +236,7 @@ jobs: test -f ./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} ./install_mcxtrace/bin/${MCXTRACE_EXECUTABLE} --version mkdir run_Test_MCPL_input_mpi && cd run_Test_MCPL_input_mpi - cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests/Test_MCPL_input/Test_MCPL_input.instr . + cp ../install_mcxtrace/share/mcxtrace/resources/examples/Tests_MCPL_etc/Test_MCPL_input/Test_MCPL_input.instr . ../install_mcxtrace/bin/${MXRUN_EXECUTABLE} --verbose --mpi=2 Test_MCPL_input.instr repeat=20 - name: 'Tar output files' diff --git a/.github/workflows/mcxtrace-winbasictest-mingw.yml b/.github/workflows/mcxtrace-winbasictest-mingw.yml new file mode 100644 index 0000000000..13a6fce60c --- /dev/null +++ b/.github/workflows/mcxtrace-winbasictest-mingw.yml @@ -0,0 +1,157 @@ +name: mcxtrace-mingw-winbasictest + +on: + push: + pull_request: + +jobs: + build: + # More platform information available on: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + + runs-on: ${{ matrix.os }} + defaults: + run: + shell: cmd + + strategy: + matrix: + os: [windows-2022] + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: src + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: 'msmpi' + + - name: Setup MPI cygpath bash... + shell: bash + run: | + cygpath -sm "$MSMPI_INC" > includepath.txt + cygpath -sm "$MSMPI_LIB64" > libpath.txt + + - name: Setup MPI cygpath... + run: | + set /p MPIINCVAR=> %GITHUB_ENV% + echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV% + + - name: choco install wget + run: choco install wget + + - name: pip install deps + run: pip install PyYAML ply McStasscript mslex + + - name: pip install mcpl-core preview + run: pip install -v "git+https://github.com/mctools/mcpl@path_to_mcpl2#subdirectory=mcpl_core" + + - name: choco install deps2 + run: choco install mingw make winflexbison3 + + - name: CMake cfg + run: > + cmake -B build -S src + -G "Unix Makefiles" + -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc.exe + "-DCMAKE_INSTALL_PREFIX=./install" + -DMCVERSION="3.99.99" + -DMCCODE_BUILD_CONDA_PKG=OFF + -DMCCODE_BUILD_WINDOWS_MINGW=ON + -DMCCODE_CONFIG_MCPL2=ON + -DCMAKE_INSTALL_LIBDIR=lib + -DBUILD_MCXTRACE=ON + -DMCCODE_USE_LEGACY_DESTINATIONS=OFF + -DBUILD_TOOLS=ON + -DENABLE_COMPONENTS=ON + -DENABLE_CIF2HKL=OFF + -DENABLE_NEUTRONICS=OFF + -DMPIINCLUDEDIR=%MPIINCVAR% + -DMPILIBDIR=%MPILIBVAR% + + - name: CMake build + shell: cmd + run: cmake --build build --config Release -j 2 + + - name: CMake install + run: cmake --install build --config Release + + - name: set MCXTRACE env var + run: echo MCXTRACE=%CD%\install\share\mcxtrace\resources >> %GITHUB_ENV% + + - name: check MCXTRACE env var + run: echo %MCXTRACE% + + - run: type .\install\share\mcxtrace\tools\Python\mccodelib\mccode_config.json + - run: .\install\bin\mxrun -h + - run: .\install\bin\mcxtrace -v + - run: mcpl-config -s + + - name: Prepare rundirs + run: mkdir run_std run_mcpl_output run_mcpl_input run_union + + - name: Prepare std instrument + working-directory: run_std + run: copy ..\install\share\mcxtrace\resources\examples\Tests_optics\Test_CRL\Test_CRL.instr test.instr + + - name: Prepare MCPL_input instrument + working-directory: run_mcpl_input + run: | + copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr + + - name: Prepare MCPL_output instrument + working-directory: run_mcpl_output + run: copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_output\Test_MCPL_output.instr test.instr + + - name: Run std instrument + working-directory: run_std + run: ..\install\bin\mxrun --verbose test.instr -d Single_core LENS=0 + + - name: Run MCPL_output instrument + working-directory: run_mcpl_output + run: ..\install\bin\mxrun --verbose test.instr -d Single_core Ncount=1e3 + + - name: Run MCPL_input instrument + working-directory: run_mcpl_input + run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1 + + - name: Run std instrument MPI + working-directory: run_std + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto LENS=0 + + - name: Run MCPL_output instrument MPI + working-directory: run_mcpl_output + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto Ncount=1e3 + + - name: Run MCPL_input instrument MPI + working-directory: run_mcpl_input + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 + + - name: 'Tar output files' + id: tar-package + if: always() + shell: bash + run: | + set -e + set -u + set -x + tar cvfz mcxtrace-mingw-${{ matrix.os }}_output.tgz run_* + + - name: 'Upload Artifact' + id: tar-upload + uses: actions/upload-artifact@v4 + if: always() + with: + name: mcxtrace-mingw-${{ matrix.os }}_output.tgz + path: "mcxtrace-mingw-${{ matrix.os }}_output.tgz" diff --git a/.github/workflows/mcxtrace-winbasictest-msvc.yml b/.github/workflows/mcxtrace-winbasictest-msvc.yml new file mode 100644 index 0000000000..ba73d4951e --- /dev/null +++ b/.github/workflows/mcxtrace-winbasictest-msvc.yml @@ -0,0 +1,167 @@ +name: mcxtrace-msvc-winbasictest + +on: + push: + pull_request: + +jobs: + build: + # More platform information available on: + # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md + + runs-on: ${{ matrix.os }} + defaults: + run: + shell: cmd + + strategy: + matrix: + os: [windows-2019, windows-2022, windows-2025] + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + path: src + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + #Two ways of enabling cl.exe and other tools. One is via an external action...: + - name: Setup VS in shell + uses: ilammy/msvc-dev-cmd@v1 + #...but a simpler one might be to simply invoke the correct vcvars64.bat + #file first, like...: + # + # - name: whatever + # shell: cmd + # run: | + # call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + # cl /help + # + #...but since we also want to support VS 2019, we use the above action for now + + - name: Setup MPI + uses: mpi4py/setup-mpi@v1 + with: + mpi: 'msmpi' + + - name: Setup MPI cygpath bash... + shell: bash + run: | + cygpath -sm "$MSMPI_INC" > includepath.txt + cygpath -sm "$MSMPI_LIB64" > libpath.txt + + - name: Setup MPI cygpath... + run: | + set /p MPIINCVAR=> %GITHUB_ENV% + echo MPILIBVAR=%MPILIBVAR% >> %GITHUB_ENV% + + - name: choco install deps + run: choco install winflexbison3 wget + + - name: CMake cfg + run: > + cmake -B build -S src + "-DCMAKE_INSTALL_PREFIX=./install" + -DMCVERSION="3.99.99" + -DMCCODE_BUILD_CONDA_PKG=OFF + -DMCCODE_CONFIG_MCPL2=ON + -DCMAKE_INSTALL_LIBDIR=lib + -DBUILD_MCXTRACE=ON + -DMCCODE_USE_LEGACY_DESTINATIONS=OFF + -DBUILD_TOOLS=ON + -DENABLE_COMPONENTS=ON + -DENABLE_CIF2HKL=OFF + -DENABLE_NEUTRONICS=OFF + -DMPIINCLUDEDIR=%MPIINCVAR% + -DMPILIBDIR=%MPILIBVAR% + + - name: CMake build + shell: cmd + run: cmake --build build --config Release -j 2 + + - name: CMake install + run: cmake --install build --config Release + + - name: pip install deps + run: pip install PyYAML ply McStasscript mslex + + - name: pip install mcpl-core preview + run: pip install -v "git+https://github.com/mctools/mcpl@path_to_mcpl2#subdirectory=mcpl_core" + + - name: set MCXTRACE env var + run: echo MCXTRACE=%CD%\install\share\mcxtrace\resources >> %GITHUB_ENV% + + - name: check MCXTRACE env var + run: | + echo %MCXTRACE% + dir %MCXTRACE% + + - run: type .\install\share\mcxtrace\tools\Python\mccodelib\mccode_config.json + - run: .\install\bin\mxrun -h + - run: .\install\bin\mcxtrace -v + - run: mcpl-config -s + + - name: Prepare rundirs + run: mkdir run_std run_mcpl_output run_mcpl_input run_union + + - name: Prepare std instrument + working-directory: run_std + run: copy ..\install\share\mcxtrace\resources\examples\Tests_optics\Test_CRL\Test_CRL.instr test.instr + + - name: Prepare MCPL_input instrument + working-directory: run_mcpl_input + run: | + copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_input\Test_MCPL_input.instr test.instr + + - name: Prepare MCPL_output instrument + working-directory: run_mcpl_output + run: copy ..\install\share\mcxtrace\resources\examples\Tests_MCPL_etc\Test_MCPL_output\Test_MCPL_output.instr test.instr + + - name: Run std instrument + working-directory: run_std + run: ..\install\bin\mxrun --verbose test.instr -d Single_core LENS=0 + + - name: Run MCPL_output instrument + working-directory: run_mcpl_output + run: ..\install\bin\mxrun --verbose test.instr -d Single_core Ncount=1e3 + + - name: Run MCPL_input instrument + working-directory: run_mcpl_input + run: ..\install\bin\mxrun --verbose test.instr -d Single_core repeat=1 + + - name: Run std instrument MPI + working-directory: run_std + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto LENS=0 + + - name: Run MCPL_output instrument MPI + working-directory: run_mcpl_output + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto Ncount=1e3 + + - name: Run MCPL_input instrument MPI + working-directory: run_mcpl_input + run: ..\install\bin\mxrun --verbose test.instr -d MPI_multicore -c --mpi=auto repeat=1 + + - name: 'Tar output files' + id: tar-package + if: always() + shell: bash + run: | + set -e + set -u + set -x + tar cvfz mcxtrace-msvc-${{ matrix.os }}_output.tgz run_* + + - name: 'Upload Artifact' + id: tar-upload + uses: actions/upload-artifact@v4 + if: always() + with: + name: mcxtrace-msvc-${{ matrix.os }}_output.tgz + path: "mcxtrace-msvc-${{ matrix.os }}_output.tgz" diff --git a/CMakeLists.txt b/CMakeLists.txt index ee3d64bda1..56fbc0d8f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ endif() include(MCUtil) if ( BUILD_MCSTAS ) - option( ENSURE_NCRYSTAL "Build Third Party code NCrystal if not already available" ON ) + option( ENSURE_NCRYSTAL "Build Third Party code NCrystal if not already available" OFF ) if ( ENSURE_NCRYSTAL ) set ( NCRYSTAL_LEGACY_USE 1 ) else() @@ -74,7 +74,7 @@ endif() # Find/Fetch dependencies: -option( ENSURE_MCPL "Build Third Party code MCPL if not already available" ON ) +option( ENSURE_MCPL "Build Third Party code MCPL if not already available" OFF ) if( ENSURE_MCPL ) include( MCPL ) endif() diff --git a/cmake/Modules/InstallMCCODE.cmake b/cmake/Modules/InstallMCCODE.cmake index 3a87544457..498caf23f8 100644 --- a/cmake/Modules/InstallMCCODE.cmake +++ b/cmake/Modules/InstallMCCODE.cmake @@ -365,12 +365,12 @@ macro(installMCCODE) if(NOT WINDOWS) # Binaries install ( - PROGRAMS "${PROJECT_BINARY_DIR}/${FLAVOR}${DOT_EXE_SUFFIX}" + TARGETS ${FLAVOR} DESTINATION "${DEST_BINDIR}" ) install ( - PROGRAMS "${PROJECT_BINARY_DIR}/${FLAVOR}-pygen${DOT_EXE_SUFFIX}" + TARGETS ${FLAVOR}-pygen DESTINATION "${DEST_BINDIR}" ) @@ -423,14 +423,14 @@ macro(installMCCODE) # Binaries install ( - PROGRAMS "${PROJECT_BINARY_DIR}/${FLAVOR}${DOT_EXE_SUFFIX}" + TARGETS ${FLAVOR} DESTINATION "${DEST_BINDIR}" ) # Binaries install ( - PROGRAMS "${PROJECT_BINARY_DIR}/${FLAVOR}-pygen${DOT_EXE_SUFFIX}" - DESTINATION ${DEST_BINDIR} + TARGETS ${FLAVOR}-pygen + DESTINATION "${DEST_BINDIR}" ) if ( MCCODE_USE_LEGACY_DESTINATIONS ) install(PROGRAMS diff --git a/cmake/Modules/MCUtil.cmake b/cmake/Modules/MCUtil.cmake index e3cdaa21ca..5e650cd8b9 100644 --- a/cmake/Modules/MCUtil.cmake +++ b/cmake/Modules/MCUtil.cmake @@ -227,7 +227,6 @@ macro(setupMCCODE FLAVOR) endif() # Define suffix-macros that include a leading dot "." - addDot(DOT_EXE_SUFFIX "${MCCODE_EXE_SUFFIX}") addDot(DOT_OUT_SUFFIX "${OUT_SUFFIX}") addDot(DOT_PYTHON_SUFFIX "${PYTHON_SUFFIX}") diff --git a/cmake/Modules/PlatformDefaults.cmake b/cmake/Modules/PlatformDefaults.cmake index b01a6e4991..b6f8a400e2 100644 --- a/cmake/Modules/PlatformDefaults.cmake +++ b/cmake/Modules/PlatformDefaults.cmake @@ -78,17 +78,34 @@ function( detect_platform_variables resultvarname ) if ( BUILD_MCSTAS ) set( IDFGEN mcdisplay-mantid ) set( NCRYSTALFLAGS "CMD(ncrystal-config --show buildflags)" ) - + # FIXME: Needs correction post release of MCPL v2 + if ( MCCODE_CONFIG_MCPL2 ) + set( MCPLFLAGS "CMD(mcpl-config --show buildflags)" ) + else() + set( MCPLFLAGS "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)" ) + endif() # Temporary solution for NCrystal on Windows 'MingW cross-compiled' systems - if ( WINDOWS AND NOT MCCODE_BUILD_CONDA_PKG ) + if ( WINDOWS AND MCCODE_BUILD_WINDOWS_MINGW ) set( NCRYSTALFLAGS "-Wl,-rpath,CMD(ncrystal-config --show libdir) -Wl,CMD(ncrystal-config --show libpath) -ICMD(ncrystal-config --show includedir)" ) + set( MCPLFLAGS "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)" ) endif() else() set( IDFGEN "" ) set( NCRYSTALFLAGS "") + # FIXME: Needs correction post release of MCPL v2 + if ( MCCODE_CONFIG_MCPL2 ) + set( MCPLFLAGS "CMD(mcpl-config --show buildflags)" ) + else() + set( MCPLFLAGS "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)" ) + endif() + # Temporary solution for NCrystal on Windows 'MingW cross-compiled' systems + if ( WINDOWS AND MCCODE_BUILD_WINDOWS_MINGW ) + set( MCPLFLAGS "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)" ) + endif() endif() provide_var( IDFGEN ) provide_var( NCRYSTALFLAGS ) + provide_var( MCPLFLAGS ) #HDF viewer if ( NOT HDFVIEW ) @@ -106,12 +123,12 @@ function( detect_platform_variables resultvarname ) set( GSLFLAGS "-lgsl -lgslcblas" ) if ( MCCODE_BUILD_CONDA_PKG ) set( GSLFLAGS "-I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lgsl -lgslcblas" ) - if ( WINDOWS ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set( GSLFLAGS "/I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib gsl.lib gslcblas.lib" ) - else() - set( GSLFLAGS "-I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lgsl -lgslcblas" ) - endif() + endif() + if ( WINDOWS ) + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set( GSLFLAGS "/I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib gsl.lib gslcblas.lib" ) + else() + set( GSLFLAGS "-I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lgsl -lgslcblas" ) endif() endif() endif() @@ -125,12 +142,12 @@ function( detect_platform_variables resultvarname ) set( XRLFLAGS "-lxrl" ) if ( MCCODE_BUILD_CONDA_PKG ) set( XRLFLAGS "-I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lxrl" ) - if ( WINDOWS ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set( XRLFLAGS "/I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib xrl.lib" ) - else() - set( XRLFLAGS "-I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lxrl" ) - endif() + endif() + if ( WINDOWS ) + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set( XRLFLAGS "/I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib xrl.lib" ) + else() + set( XRLFLAGS "-I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lxrl" ) endif() endif() endif() @@ -149,13 +166,12 @@ function( detect_platform_variables resultvarname ) provide_var( OACC ) if ( MPILIB ) if ( NOT WINDOWS ) - set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") + set(MPILIB "-DUSE_MPI -l${MPILIB}") else() - set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") - if ( MCCODE_BUILD_CONDA_PKG ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set(MPIFLAGS "/DUSE_MPI /link /DYNAMICBASE ${MPILIB}") - endif() + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set(MPIFLAGS "/DUSE_MPI /link /DYNAMICBASE ${MPILIB}") + else() + set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") endif() endif() else() @@ -163,26 +179,24 @@ function( detect_platform_variables resultvarname ) set(MPILIB "mpi") set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") else() - set(MPILIB "msmpi") - set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") - if ( MCCODE_BUILD_CONDA_PKG ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set(MPILIB "msmpi.lib") - set(MPIFLAGS "/DUSE_MPI /link /DYNAMICBASE ${MPILIB}") - endif() + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set(MPILIB "msmpi.lib") + set(MPIFLAGS "/DUSE_MPI /link /DYNAMICBASE ${MPILIB}") + else() + set(MPILIB "msmpi") + set(MPIFLAGS "-DUSE_MPI -l${MPILIB}") endif() endif() endif() - provide_var( MPILIB ) + provide_var( MPIFLAGS ) if ( MPILIBDIR ) if ( NOT WINDOWS ) set(MPIFLAGS "-Wl,-rpath,${MPILIBDIR} -L${MPILIBDIR} ${MPIFLAGS}") else() - set(MPIFLAGS "-L${MPILIBDIR} ${MPIFLAGS}") - if ( MCCODE_BUILD_CONDA_PKG ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set(MPIFLAGS "${MPIFLAGS} /LIBPATH:${MPILIBDIR}") - endif() + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set(MPIFLAGS "${MPIFLAGS} /LIBPATH:${MPILIBDIR}") + else() + set(MPIFLAGS "-L${MPILIBDIR} ${MPIFLAGS}") endif() endif() endif() @@ -190,11 +204,10 @@ function( detect_platform_variables resultvarname ) if ( NOT WINDOWS ) set(MPIFLAGS "-I${MPIINCLUDEDIR} ${MPIFLAGS}") else() - set(MPIFLAGS "-I${MPIINCLUDEDIR} ${MPIFLAGS}") - if ( MCCODE_BUILD_CONDA_PKG ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set(MPIFLAGS "/I${MPIINCLUDEDIR} ${MPIFLAGS}") - endif() + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set(MPIFLAGS "/I${MPIINCLUDEDIR} ${MPIFLAGS}") + else() + set(MPIFLAGS "-I${MPIINCLUDEDIR} ${MPIFLAGS}") endif() endif() endif() @@ -212,10 +225,8 @@ function( detect_platform_variables resultvarname ) set(NEXUSFLAGS "-DUSE_NEXUS -lNeXus")#?? should probably have another value else() set(NEXUSFLAGS "-DUSE_NEXUS -lNeXus") - if ( MCCODE_BUILD_CONDA_PKG ) - if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) - set(NEXUSFLAGS "/DUSE_NEXUS NeXus.lib") - endif() + if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" ) + set(NEXUSFLAGS "/DUSE_NEXUS NeXus.lib") endif() endif() if ( NEXUSLIB ) @@ -236,17 +247,18 @@ function( detect_platform_variables resultvarname ) if ( DARWIN ) set(MCCODE_CFLAGS "${MCCODE_CFLAGS} -D_DARWIN_C_SOURCE") endif() - if ( MCCODE_BUILD_CONDA_PKG ) - if ( WINDOWS ) - if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") - set( MCCODE_CFLAGS "${MCCODE_CFLAGS} /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib" ) - else() - set( MCCODE_CFLAGS "${MCCODE_CFLAGS} -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib" ) + if ( WINDOWS ) + if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + if ( MCCODE_BUILD_CONDA_PKG ) + set( MCCODE_CFLAGS "${MCCODE_CFLAGS} /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib" ) endif() else() - set( MCCODE_CFLAGS "${MCCODE_CFLAGS} -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,\$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib" ) + set( MCCODE_CFLAGS "${MCCODE_CFLAGS} -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib" ) endif() + else() + set( MCCODE_CFLAGS "${MCCODE_CFLAGS} -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,\$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib" ) endif() + foreach( flag "-fno-PIC" "-fPIE" "-flto" "-O3" "-mtune=native" "-march=native" "-fno-math-errno" "-ftree-vectorize" "-g" "-DNDEBUG" "-D_POSIX_SOURCE" "-std=c99" "-lm") #NB: plethora of "unset(tmp_test_c_flag_result ...)" statements below is #added for safety, to prevent CMake's CACHE system to give unpredictable diff --git a/cmake/toolchains/mingw64.cmake b/cmake/toolchains/mingw64.cmake index 5b3d63a6dd..1e82ea2522 100644 --- a/cmake/toolchains/mingw64.cmake +++ b/cmake/toolchains/mingw64.cmake @@ -51,3 +51,4 @@ set(HDFVIEW "nexpy") # gsl and xraylib locations set(GSLFLAGS "-IGETPATH(../miniconda3/Library/include/) -Wl,-rpath,GETPATH(../miniconda3/Library/lib) -LGETPATH(../miniconda3/Library/lib) -lgsl -lgslcblas") set(XRLFLAGS "-IGETPATH(../miniconda3/Library/include/) -Wl,-rpath,GETPATH(../miniconda3/Library/lib) -LGETPATH(../miniconda3/Library/lib) -lxrl") +set(MCCODE_BUILD_WINDOWS_MINGW "yes") diff --git a/mcstas-comps/CMakeLists.txt b/mcstas-comps/CMakeLists.txt index b63b6d912b..4738871cce 100644 --- a/mcstas-comps/CMakeLists.txt +++ b/mcstas-comps/CMakeLists.txt @@ -48,7 +48,7 @@ if ( ENABLE_CIF2HKL ) ) target_compile_options(cif2hkl PUBLIC "-ffree-line-length-512") install ( - PROGRAMS "${PROJECT_BINARY_DIR}/cif2hkl${DOT_EXE_SUFFIX}" + TARGETS cif2hkl DESTINATION "${DEST_BINDIR}" ) endif() diff --git a/mcstas-comps/misc/MCPL_input.comp b/mcstas-comps/misc/MCPL_input.comp index c73313c659..d98951a146 100644 --- a/mcstas-comps/misc/MCPL_input.comp +++ b/mcstas-comps/misc/MCPL_input.comp @@ -44,11 +44,16 @@ DEFINE COMPONENT MCPL_input SETTING PARAMETERS (string filename=0, polarisationuse=1,verbose=1, Emin=0, Emax=FLT_MAX, int repeat_count=1, v_smear=0, pos_smear=0, dir_smear=0, int preload=0) -DEPENDENCY "-Wl,-rpath,CMD(mcpl-config --show libdir) -LCMD(mcpl-config --show libdir) -lmcpl -ICMD(mcpl-config --show includedir)" +DEPENDENCY "@MCPLFLAGS@" SHARE %{ #include +#ifdef _MSC_EXTENSIONS +#include +#define sleep Sleep +#endif + %} DECLARE @@ -116,32 +121,32 @@ INITIALIZE repeat_cnt = ceil(1.0*repeat_cnt/mpi_node_count); mpi_cnt=mpi_node_count; ismpislave = mpi_node_rank; - MPI_MASTER( #endif - fprintf(stdout, "\n\n Warning: You are using MCPL_input with a repeat_count of %lu:\n - Minimum neutron count requested is %lu x %lu <= %lu", - (long unsigned)repeat_count,(long unsigned)nparticles, - (long unsigned)repeat_count,(long unsigned)repeat_cnt*nparticles); + MPI_MASTER( + fprintf(stdout, "\n\n Warning: You are using MCPL_input with a repeat_count of %lu:\n - Minimum neutron count requested is %lu x %lu <= %lu", + (long unsigned)repeat_count,(long unsigned)nparticles, + (long unsigned)repeat_count,(long unsigned)repeat_cnt*nparticles); + ); + + char tmpstr[CHAR_BUF_LENGTH]; #if defined (USE_MPI) - fprintf(stdout, " x %i MPI nodes = %lu neutrons total\n", - mpi_node_count,(long unsigned)mpi_node_count*repeat_cnt*nparticles); - ); + sprintf(tmpstr, " x %i MPI nodes = %lu neutrons total\n", + mpi_node_count,(long unsigned)mpi_node_count*repeat_cnt*nparticles); #else - fprintf(stdout, " neutrons total\n\n"); + sprintf(tmpstr, " neutrons total\n\n"); #endif - read_neutrons=0; - used_neutrons=0; -#if defined (USE_MPI) MPI_MASTER( -#endif + printf(stdout, "%s",tmpstr); + ); + read_neutrons=0; + used_neutrons=0; + MPI_MASTER( if (verbose==1) { - printf("MCPL_input verbose mode - outputting data on the 10 first read neutrons in MCPL units:\n"); + printf("MCPL_input verbose mode - outputting data on the 10 first read neutrons in MCPL units:\n"); } - -#if defined (USE_MPI) ); -#endif repeating = 0; #ifdef OPENACC preload=1; @@ -243,13 +248,10 @@ TRACE repeating++; mcpl_rewind(inputfile); particle = mcpl_read(inputfile); -#if defined (USE_MPI) + MPI_MASTER( -#endif - printf("MCPL inputfile %s rewound %i time(s)\n",filename,repeating); -#if defined (USE_MPI) - ); -#endif + printf("MCPL inputfile %s rewound %i time(s)\n",filename,repeating); + ); } else ABSORB; } @@ -266,20 +268,14 @@ TRACE } used_neutrons++; -#if defined (USE_MPI) - MPI_MASTER( -#endif - - if (verbose && used_neutrons<11) { - printf("id=%ld pdg=2112\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", + MPI_MASTER( + if (verbose && used_neutrons<11) { + printf("id=%ld pdg=2112\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", (long unsigned)read_neutrons, particle->ekin, particle->position[0], particle->position[1], particle->position[2], particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); - } - -#if defined (USE_MPI) - ); -#endif + } + ); } #endif ncount = mcget_ncount(); diff --git a/mcstas-comps/misc/MCPL_input_once.comp b/mcstas-comps/misc/MCPL_input_once.comp index 805eb56939..218ec27b37 100644 --- a/mcstas-comps/misc/MCPL_input_once.comp +++ b/mcstas-comps/misc/MCPL_input_once.comp @@ -39,7 +39,7 @@ DEFINE COMPONENT MCPL_input_once SETTING PARAMETERS (string filename=0, polarisationuse=1, Emin=0, Emax=FLT_MAX, v_smear=0, pos_smear=0, dir_smear=0, int always_smear=0, int preload=0, int verbose=0) -DEPENDENCY "-Wl,-rpath,CMD(mcpl-config --show libdir) -LCMD(mcpl-config --show libdir) -lmcpl -ICMD(mcpl-config --show includedir)" +DEPENDENCY "@MCPLFLAGS@" SHARE %{ @@ -104,14 +104,10 @@ INITIALIZE fprintf(stderr, "Error(%s): MCPL-file reports no present particles. Aborting.\n", NAME_CURRENT_COMP); exit(-1); } else { -#if defined (USE_MPI) MPI_MASTER( -#endif - printf("Message(%s): MCPL file (%s) produced with %s.\n", NAME_CURRENT_COMP, filename, mcpl_hdr_srcname(inputfile)); - printf("Message(%s): MCPL file (%s) contains %lu particles.\n", NAME_CURRENT_COMP, filename, (long unsigned)nparticles); -#if defined (USE_MPI) + printf("Message(%s): MCPL file (%s) produced with %s.\n", NAME_CURRENT_COMP, filename, mcpl_hdr_srcname(inputfile)); + printf("Message(%s): MCPL file (%s) contains %lu particles.\n", NAME_CURRENT_COMP, filename, (long unsigned)nparticles); ); -#endif } first_particle = 0; last_particle = nparticles; @@ -213,7 +209,7 @@ TRACE #ifdef OPENACC #pragma acc atomic current_index++; // track how many particles have been accessed, to ensure we don't exceed our slice of the file -#else OPENACC +#else } #endif // copy from the component particle struct to the particle ray struct: diff --git a/mcstas-comps/misc/MCPL_output.comp b/mcstas-comps/misc/MCPL_output.comp index 133aac7bc2..65cb33848d 100644 --- a/mcstas-comps/misc/MCPL_output.comp +++ b/mcstas-comps/misc/MCPL_output.comp @@ -54,7 +54,7 @@ DEFINE COMPONENT MCPL_output SETTING PARAMETERS (int polarisationuse=0, int doubleprec=0, verbose=0, string userflag="", string filename=0, string userflagcomment="", merge_mpi=1, keep_mpi_unmerged=0, buffermax=0) -DEPENDENCY "-Wl,-rpath,CMD(mcpl-config --show libdir) -LCMD(mcpl-config --show libdir) -lmcpl -ICMD(mcpl-config --show includedir)" +DEPENDENCY "@MCPLFLAGS@" SHARE %{ @@ -93,17 +93,24 @@ INITIALIZE %{ char extension[128]=""; char *myfilename; - + char tmpstr[CHAR_BUF_LENGTH]; + // Use instance name for base output if no input was given if (!strcmp(filename,"\0")) sprintf(filename, "%s", NAME_CURRENT_COMP); #if defined (USE_MPI) - /* In case of MPI, simply redefine the filename used by each node */ - MPI_MASTER(fprintf(stdout, "Message(%s): You are using MCPL_output with MPI, hence your will get %i filenames %s.node_#i.mcpl{.gz} as output.\n",NAME_CURRENT_COMP,mpi_node_count,filename); ); + /* In case of MPI, simply redefine the filename used by each node */ + sprintf(tmpstr, "Message(%s): You are using MCPL_output with MPI, hence you will get %i filenames %s.node_#i.mcpl{.gz} as output.\n",NAME_CURRENT_COMP,mpi_node_count,filename); sprintf(extension,"node_%i.mcpl",mpi_node_rank); #else sprintf(extension,"mcpl"); #endif +sprintf(tmpstr, ""); + MPI_MASTER( + fprintf(stdout, "%s",tmpstr ); + ); + + /*add output dir (if applicable) to the output filename and add extension if */ // Append the extension to the filename // -- do not use mcfull_file for this since it can not handle absolute filenames with a '.' in them @@ -170,17 +177,11 @@ INITIALIZE mcpl_enable_doubleprec(outputfile); } -#if defined (USE_MPI) - MPI_MASTER( -#endif - - if (verbose==1) { - printf("MCPL_output verbose mode: after generating the mcpl-file a summary will be printed.\n"); - } - -#if defined (USE_MPI) - ); -#endif + MPI_MASTER( + if (verbose==1) { + printf("MCPL_output verbose mode: after generating the mcpl-file a summary will be printed.\n"); + } + ); /*Add comments on what the orientation and position of this component is.*/ /*Include the instrument file itself as a binary blob in the mcpl file*/ @@ -288,18 +289,14 @@ TRACE particle->userflags = (uint32_t) uvar; } -#if defined (USE_MPI) - MPI_MASTER( -#endif - if (verbose==3 && mcrun_num<10) { - printf("id=%ld\tpdg=2112\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", - mcrun_num, particle->ekin, particle->position[0], particle->position[1], particle->position[2], - particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, - particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); - } -#if defined (USE_MPI) - ); -#endif + MPI_MASTER( + if (verbose==3 && mcrun_num<10) { + printf("id=%ld\tpdg=2112\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", + mcrun_num, particle->ekin, particle->position[0], particle->position[1], particle->position[2], + particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, + particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); + } + ); mcpl_add_particle(outputfile,particle); @@ -369,56 +366,54 @@ FINALLY mcpl_closeandgzip_outfile(outputfile); #endif #ifdef USE_MPI - MPI_Barrier(MPI_COMM_WORLD); - MPI_MASTER( - /* Only attempt merge if requested and meaningful */ - if (merge_mpi && mpi_node_count > 1) { - char **mpi_node_files; - char *merge_outfilename; - char extension[128]="mcpl"; - int j; - mcpl_outfile_t merge_outfile; - - char * real_filename = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); - strcpy(real_filename, filename); - strcat(real_filename, "."); - strcat(real_filename, extension); - - merge_outfilename = mcfull_file(real_filename, NULL); - - mpi_node_files=(char **) calloc(mpi_node_count,sizeof(char *)); - sprintf(extension,"node_%i.mcpl", mpi_node_count); - char * temp_name = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); - for (j=0;j 1) { + char **mpi_node_files; + char *merge_outfilename; + char extension[128]="mcpl"; + int j; + mcpl_outfile_t merge_outfile; + + char * real_filename = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); + strcpy(real_filename, filename); + strcat(real_filename, "."); + strcat(real_filename, extension); + + merge_outfilename = mcfull_file(real_filename, NULL); + + mpi_node_files=(char **) calloc(mpi_node_count,sizeof(char *)); + sprintf(extension,"node_%i.mcpl", mpi_node_count); + char * temp_name = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); + for (j=0;jposition[0]=x*100; particle->position[1]=y*100; particle->position[2]=z*100; - + if(polarisationuse){ particle->polarisation[0]=sx; particle->polarisation[1]=sy; particle->polarisation[2]=sz; } - + nrm =sqrt(vx*vx + vy*vy + vz*vz); /*ekin is in MeV*/ particle->ekin = VS2E*nrm*nrm/1e9; @@ -213,28 +229,29 @@ TRACE uvar = particle_getvar(_particle,userflag,&fail); if(fail) uvar=0; particle->userflags = (uint32_t) uvar; } - -#if defined (USE_MPI) + MPI_MASTER( -#endif if (verbose==3 && mcrun_num<10) { printf("id=%ld\tpdg=2112\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", mcrun_num, particle->ekin, particle->position[0], particle->position[1], particle->position[2], particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); } -#if defined (USE_MPI) ); -#endif mcpl_add_particle(outputfile,particle); - + SCATTER; %} SAVE %{ + +%} + +FINALLY +%{ #ifdef USE_MPI if (merge_mpi && mpi_node_count > 1) { mcpl_close_outfile(outputfile); @@ -244,28 +261,32 @@ SAVE #else mcpl_closeandgzip_outfile(outputfile); #endif -%} - -FINALLY -%{ #ifdef USE_MPI MPI_Barrier(MPI_COMM_WORLD); - MPI_MASTER( /* Only attempt merge if requested and meaningful */ - if (merge_mpi && mpi_node_count > 1) { + if (mpi_node_rank==0 && merge_mpi && mpi_node_count > 1) { char **mpi_node_files; char *merge_outfilename; char extension[128]="mcpl"; int j; mcpl_outfile_t merge_outfile; - merge_outfilename=mcfull_file(filename,extension); + char * real_filename = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); + strcpy(real_filename, filename); + strcat(real_filename, "."); + strcat(real_filename, extension); + + merge_outfilename = mcfull_file(real_filename, NULL); mpi_node_files=(char **) calloc(mpi_node_count,sizeof(char *)); + sprintf(extension,"node_%i.mcpl", mpi_node_count); + char * temp_name = (char *) calloc(strlen(filename) + strlen(extension) + 2, sizeof(char)); for (j=0;j +#ifdef _MSC_EXTENSIONS +#include +#define sleep Sleep +#endif + %} DECLARE @@ -59,9 +64,10 @@ long long nparticles; long long read_photons; long long used_photons; int repeat_cnt; +int repeat_tot; int repeating; int ismpislave; -#ifdef OPENACC +int mpi_cnt; DArray1d X; DArray1d Y; DArray1d Z; @@ -73,7 +79,6 @@ DArray1d EY; DArray1d EZ; DArray1d T; DArray1d P; -#endif %} INITIALIZE @@ -110,41 +115,38 @@ INITIALIZE if(repeat_count==0) repeat_count=1; repeat_cnt = repeat_count; + mpi_cnt=1; ismpislave=0; #if defined (USE_MPI) repeat_cnt = ceil(1.0*repeat_cnt/mpi_node_count); + mpi_cnt=mpi_node_count; ismpislave = mpi_node_rank; - MPI_MASTER( #endif - fprintf(stdout, "\n\n Warning: You are using MCPL_input with a repeat_count of %lu:\n - Minimum photon count requested is %lu x %lu <= %lu", + MPI_MASTER( + fprintf(stdout, "\n\n Warning: You are using MCPL_input with a repeat_count of %lu:\n - Minimum photon count requested is %lu x %lu <= %lu", (long unsigned)repeat_count,(long unsigned)nparticles, (long unsigned)repeat_count,(long unsigned)repeat_cnt*nparticles); + ); + + char tmpstr[CHAR_BUF_LENGTH]; #if defined (USE_MPI) - fprintf(stdout, " x %i MPI nodes = %lu photons total\n", + sprintf(tmpstr, " x %i MPI nodes = %lu photons total\n", mpi_node_count,(long unsigned)mpi_node_count*repeat_cnt*nparticles); - ); - mcset_ncount(mpi_node_count*repeat_cnt*nparticles); #else - fprintf(stdout, " photons total\n\n"); - mcset_ncount(repeat_cnt*nparticles); + sprintf(tmpstr, " photons total\n\n"); #endif - ncount=mcget_ncount(); - fprintf(stdout,"Initialize ncount is %lu\n",(long unsigned)ncount); + MPI_MASTER( + printf(stdout, "%s",tmpstr); + ); read_photons=0; used_photons=0; -#if defined (USE_MPI) MPI_MASTER( -#endif - if (verbose==1) { printf("MCPL_input verbose mode - outputting data on the 10 first read photons in MCPL units:\n"); } - -#if defined (USE_MPI) ); -#endif repeating = 0; #ifdef OPENACC X = create_darr1d(nparticles); @@ -224,10 +226,10 @@ INITIALIZE TRACE %{ -#ifndef OPENACC - long long ncount; double nrm; + long long ncount; +#ifndef OPENACC const mcpl_particle_t *particle;// = (mcpl_particle_t *) calloc(sizeof(mcpl_particle_t),1); particle = mcpl_read(inputfile); @@ -239,13 +241,10 @@ TRACE repeating++; mcpl_rewind(inputfile); particle = mcpl_read(inputfile); -#if defined (USE_MPI) + MPI_MASTER( -#endif printf("MCPL inputfile %s rewound %i time(s)\n",filename,repeating); -#if defined (USE_MPI) ); -#endif } else ABSORB; } @@ -262,9 +261,7 @@ TRACE } used_photons++; -#if defined (USE_MPI) MPI_MASTER( -#endif if (verbose && used_photons<11) { printf("id=%ld\tpdg=22\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", @@ -272,10 +269,7 @@ TRACE particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); } - -#if defined (USE_MPI) - ); -#endif + ); /*positions are in cm*/ x=particle->position[0]/100; diff --git a/mcxtrace-comps/misc/MCPL_output.comp b/mcxtrace-comps/misc/MCPL_output.comp index a8d416c044..8264faee83 100644 --- a/mcxtrace-comps/misc/MCPL_output.comp +++ b/mcxtrace-comps/misc/MCPL_output.comp @@ -55,7 +55,7 @@ DEFINE COMPONENT MCPL_output SETTING PARAMETERS (int polarisationuse=0, int doubleprec=0, int verbose=0, string userflag="", string filename=0, string userflagcomment="", merge_mpi=1, keep_mpi_unmerged=0, buffermax=0) -DEPENDENCY "-Wl,-rpath,CMD(mcpl-config --show libdir) -LCMD(mcpl-config --show libdir) -lmcpl -ICMD(mcpl-config --show includedir)" +DEPENDENCY "@MCPLFLAGS@" SHARE %{ @@ -95,17 +95,24 @@ INITIALIZE %{ char extension[128]=""; char *myfilename; - + char tmpstr[CHAR_BUF_LENGTH]; + // Use instance name for base output if no input was given if (!strcmp(filename,"\0")) sprintf(filename,"%s",NAME_CURRENT_COMP); #if defined (USE_MPI) /* In case of MPI, simply redefine the filename used by each node */ - MPI_MASTER(fprintf(stdout, "INFO (%s): You are using MCPL_output with MPI, hence you will get %i filenames %s_node_#i as output.\n",NAME_CURRENT_COMP,mpi_node_count,filename); ); + sprintf(tmpstr, "Message(%s): You are using MCPL_output with MPI, hence you will get %i filenames %s.node_#i.mcpl{.gz} as output.\n",NAME_CURRENT_COMP,mpi_node_count,filename); sprintf(extension,"node_%i.mcpl",mpi_node_rank); #else sprintf(extension,"mcpl"); #endif +sprintf(tmpstr, ""); + MPI_MASTER( + fprintf(stdout, "%s",tmpstr ); + ); + + /*add output dir (if applicable) to the output filename and add extension if */ // Append the extension to the filename // -- do not use mcfull_file for this since it can not handle absolute filenames with a '.' in them @@ -172,17 +179,11 @@ INITIALIZE mcpl_enable_doubleprec(outputfile); } -#if defined (USE_MPI) MPI_MASTER( -#endif - if (verbose==1) { printf("MCPL_output verbose mode: after generating the mcpl-file a summary will be printed.\n"); } - -#if defined (USE_MPI) ); -#endif /*Add comments on what the orientation and position of this component is.*/ /*Include the instrument file itself as a binary blob in the mcpl file*/ @@ -292,18 +293,14 @@ TRACE particle->userflags = (uint32_t) uvar; } -#if defined (USE_MPI) MPI_MASTER( -#endif if (verbose==3 && mcrun_num<10) { printf("id=%ld\tpdg=22\tekin=%g MeV\tx=%g cm\ty=%g cm\tz=%g cm\tux=%g\tuy=%g\tuz=%g\tt=%g ms\tweight=%g\tpolx=%g\tpoly=%g\tpolz=%g\n", mcrun_num, particle->ekin, particle->position[0], particle->position[1], particle->position[2], particle->direction[0], particle->direction[1], particle->direction[2], particle->time, particle->weight, particle->polarisation[0], particle->polarisation[1], particle->polarisation[2]); } -#if defined (USE_MPI) ); -#endif mcpl_add_particle(outputfile,particle); @@ -374,9 +371,8 @@ FINALLY #endif #ifdef USE_MPI MPI_Barrier(MPI_COMM_WORLD); - MPI_MASTER( /* Only attempt merge if requested and meaningful */ - if (merge_mpi && mpi_node_count > 1) { + if (mpi_node_rank==0 && merge_mpi && mpi_node_count > 1) { char **mpi_node_files; char *merge_outfilename; char extension[128]="mcpl"; @@ -422,7 +418,6 @@ FINALLY } free(mpi_node_files); } - ); #endif if(verbose) { MPI_MASTER( diff --git a/tools/Python/mccodelib/CMakeLists.txt b/tools/Python/mccodelib/CMakeLists.txt index a6f93e9b61..9eb4912801 100644 --- a/tools/Python/mccodelib/CMakeLists.txt +++ b/tools/Python/mccodelib/CMakeLists.txt @@ -92,7 +92,7 @@ include(CPack) set(WORK "${PROJECT_BINARY_DIR}/work") -set(entries_with_conda_prefix "CFLAGS;NEXUSFLAGS;MPIFLAGS;NCRYSTALFLAGS;GSLFLAGS;XRLFLAGS;OACCFLAGS;TOOLS_CC;MPIRUN;MPICC") +set(entries_with_conda_prefix "CFLAGS;NEXUSFLAGS;MPIFLAGS;MCPLFLAGS;NCRYSTALFLAGS;GSLFLAGS;XRLFLAGS;OACCFLAGS;TOOLS_CC;MPIRUN;MPICC") foreach( var ${entries_with_conda_prefix} ) set( MCCODE_FINAL_${var} "${${var}}" ) endforeach() diff --git a/tools/Python/mccodelib/mccode_config.json.in b/tools/Python/mccodelib/mccode_config.json.in index c18ba66591..d40fa99262 100644 --- a/tools/Python/mccodelib/mccode_config.json.in +++ b/tools/Python/mccodelib/mccode_config.json.in @@ -26,6 +26,7 @@ "MPIFLAGS": "@MCCODE_FINAL_MPIFLAGS@", "GSLFLAGS": "@MCCODE_FINAL_GSLFLAGS@", "NCRYSTALFLAGS": "@MCCODE_FINAL_NCRYSTALFLAGS@", + "MCPLFLAGS": "@MCCODE_FINAL_MCPLFLAGS@", "XRLFLAGS": "@MCCODE_FINAL_XRLFLAGS@", "OACCFLAGS": "@MCCODE_FINAL_OACCFLAGS@", "CC": "@MCCODE_FINAL_TOOLS_CC@", diff --git a/tools/Python/mcrun/mccode.py b/tools/Python/mcrun/mccode.py index 206a716957..7147d28055 100755 --- a/tools/Python/mcrun/mccode.py +++ b/tools/Python/mcrun/mccode.py @@ -249,6 +249,9 @@ def x_path(file): # Insert NEXUSFLAGS if instrument/comps request this flags = re.sub(r'\@NEXUSFLAGS\@', mccode_config.compilation['NEXUSFLAGS'], flags) + # Insert NCRYSTALFLAGS if instrument/comps request this + flags = re.sub(r'\@MCPLFLAGS\@', mccode_config.compilation['MCPLFLAGS'], flags) + # Insert NCRYSTALFLAGS if instrument/comps request this flags = re.sub(r'\@NCRYSTALFLAGS\@', mccode_config.compilation['NCRYSTALFLAGS'], flags) @@ -274,8 +277,8 @@ def x_path(file): if any("NeXus" in cf for cf in cflags): cflags += '-D__GNUC__'+ " " - # cl.exe under conda needs the linking flags at the end... - if os.environ.get('CONDA_PREFIX') and "cl.exe" in mccode_config.compilation['CC'].lower(): + # cl.exe on Windows needs the linking flags at the end... + if os.name == 'nt' and "cl.exe" in mccode_config.compilation['CC'].lower(): libflags = [] otherflags = [] for flag in lexer.split(cflags): diff --git a/tools/Python/mctest/mcstas-test/McStas_8GPU/mccode_config.json b/tools/Python/mctest/mcstas-test/McStas_8GPU/mccode_config.json index d91da1ad5e..6cca02f5e7 100644 --- a/tools/Python/mctest/mcstas-test/McStas_8GPU/mccode_config.json +++ b/tools/Python/mctest/mcstas-test/McStas_8GPU/mccode_config.json @@ -24,6 +24,7 @@ "OACCFLAGS": "-fast -Minfo=accel -acc=gpu -gpu=mem:managed -DOPENACC", "GSLFLAGS": "-Wl,-rpath,GETPATH(miniconda3/lib) -LGETPATH(miniconda3/lib) -lgsl -lgslcblas -IGETPATH(miniconda3/include)", "NCRYSTALFLAGS": "CMD(ncrystal-config --show buildflags)", + "MCPLFLAGS": "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)", "XRLFLAGS": "", "CC": "gcc", "OACC": "nvc", diff --git a/tools/Python/mctest/mcxtrace-test/McXtrace_8GPU/mccode_config.json b/tools/Python/mctest/mcxtrace-test/McXtrace_8GPU/mccode_config.json index a6e958f3d8..f36cf97271 100644 --- a/tools/Python/mctest/mcxtrace-test/McXtrace_8GPU/mccode_config.json +++ b/tools/Python/mctest/mcxtrace-test/McXtrace_8GPU/mccode_config.json @@ -24,6 +24,7 @@ "OACCFLAGS": "-fast -Minfo=accel -acc=gpu -gpu=mem:managed -DOPENACC", "GSLFLAGS": "-Wl,-rpath,GETPATH(miniconda3/lib) -LGETPATH(miniconda3/lib) -lgsl -lgslcblas -IGETPATH(miniconda3/include)", "NCRYSTALFLAGS": "", + "MCPLFLAGS": "-Wl,-rpath,CMD(mcpl-config --show libdir) -Wl,CMD(mcpl-config --show libpath) -ICMD(mcpl-config --show includedir)", "XRLFLAGS": "-Wl,-rpath,GETPATH(miniconda3/lib) -LGETPATH(miniconda3/lib) -lxrl -IGETPATH(miniconda3/include)", "CC": "gcc", "OACC": "nvc",