diff --git a/.build-tools/containers/buildenv/Dockerfile b/.build-tools/containers/buildenv/Dockerfile index 0c80359..f44bdb1 100644 --- a/.build-tools/containers/buildenv/Dockerfile +++ b/.build-tools/containers/buildenv/Dockerfile @@ -18,5 +18,10 @@ RUN git clone -b v0.3.28 --single-branch --depth 1 https://github.com/OpenMathLi sudo make PREFIX=/usr/local install && \ sudo rm -rf ${HOME}/OpenBLAS - +RUN sudo apt-get install -y python3.10-dev +COPY requirements.txt $HOME +RUN source $HOME/.venv/bin/activate && pip install --upgrade pip && pip install -r $HOME/requirements.txt && rm $HOME/requirements.txt + +RUN sudo sed -i '/^\[instrumentation\]/,/^\[/{s/version *= *"ovni"/version = "none"/}' /usr/local/share/nosv.toml + WORKDIR $HOME \ No newline at end of file diff --git a/.build-tools/containers/buildenv/requirements.txt b/.build-tools/containers/buildenv/requirements.txt new file mode 100644 index 0000000..1e71d88 --- /dev/null +++ b/.build-tools/containers/buildenv/requirements.txt @@ -0,0 +1 @@ +pybind11==3.0.1 \ No newline at end of file diff --git a/.github/workflows/master-test-workflow.yml b/.github/workflows/master-test-workflow.yml index 75468ca..0709573 100644 --- a/.github/workflows/master-test-workflow.yml +++ b/.github/workflows/master-test-workflow.yml @@ -40,36 +40,10 @@ jobs: with: submodules: 'true' - - name: Build Pybind11 - run: | - sudo apt-get update - sudo apt-get install -y python3-pytest - - cd extern/pybind11 - mkdir -p build - cd build - cmake .. -DPython_EXECUTABLE=/usr/bin/python3 - make check -j"$(nproc)" - - mkdir -p mock_install/share/pkgconfig - cat < mock_install/share/pkgconfig/pybind11.pc - prefix=$(pwd)/.. - includedir=\${prefix}/include - - Name: pybind11 - Description: Seamless operability between C++11 and Python - Version: 2.13.6 - Cflags: -I\${includedir} - EOF - - echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$(pwd)/mock_install/share/pkgconfig" >> $GITHUB_ENV - - - name: Setup - run: source /home/hicr/.bashrc && meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngine=mpi -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true - - - name: Compile - run: source /home/hicr/.bashrc && meson compile -C build - + - name: Dry-run compilation + shell: bash + run: source /home/hicr/.bashrc && meson setup --wipe build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,lpf,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false && meson compile -C build + - name: Running tests and creating coverage report shell: bash env: @@ -77,6 +51,8 @@ jobs: run: | echo "Running Tests..." source /home/hicr/.bashrc + meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false + meson compile -C build meson test -C build echo "Creating coverage report..." ninja -C build coverage @@ -85,3 +61,4 @@ jobs: with: name: meson-logs-${{ inputs.arch }} path: build/meson-logs/ + \ No newline at end of file diff --git a/.github/workflows/pr-development-coverage.yml b/.github/workflows/pr-development-coverage.yml deleted file mode 100644 index 84bfb02..0000000 --- a/.github/workflows/pr-development-coverage.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: PR development - Build and Run Tests Workflow - -# if statements modified to avoid: https://stackoverflow.com/questions/69354003/github-action-job-fire-when-previous-job-skipped - -on: - workflow_run: - workflows: [ci-amd64, ci-arm64] - types: - - completed - -permissions: - contents: read - -env: - REGISTRY: ghcr.io - DOCKERIMAGE: ghcr.io/algebraic-programming/taskr/buildenv - -defaults: - run: - shell: bash - -jobs: - update-coverage-PR-amd64: - runs-on: ubuntu-latest - if: | - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - steps: - - name: Download standard coverage file - uses: actions/download-artifact@v4 - with: - name: meson-logs-amd64 - path: ${{ runner.temp }}/build - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 - if: github.event_name == 'pull_request' || github.event_name == 'pull_request' - with: - header: amd64 - message: | - Coverage for amd64 - recreate: true - path: code-coverage-results.md - - update-coverage-PR-arm64: - runs-on: ubuntu-latest - if: | - github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' - steps: - - name: Download standard coverage file - uses: actions/download-artifact@v4 - with: - name: meson-logs-arm64 - path: ${{ runner.temp }}/build - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 - if: github.event_name == 'pull_request' || github.event_name == 'pull_request' - with: - header: arm64 - message: | - Coverage for arm64 - recreate: true - path: code-coverage-results.md diff --git a/.github/workflows/pr-development-workflow.yml b/.github/workflows/pr-development-workflow.yml index 38bf6ac..34d176b 100644 --- a/.github/workflows/pr-development-workflow.yml +++ b/.github/workflows/pr-development-workflow.yml @@ -230,8 +230,8 @@ jobs: run: | docker run --name taskr --shm-size=1024M --privileged -v $PWD:/home/hicr/taskr -w /home/hicr/taskr -td ${{ env.DOCKERIMAGE }}:${{ inputs.arch }}-latest bash - - name: Setup - run: docker exec -u hicr taskr bash -c "meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngine=mpi -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true" + - name: Dry-run compilation + run: docker exec -u hicr taskr bash -c "meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,lpf,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false && meson compile -C build" - name: Compile run: docker exec -u hicr taskr bash -c "meson compile -C build" @@ -239,7 +239,7 @@ jobs: - name: Running tests and creating coverage report run: | echo "Running Tests..." - docker exec -u hicr taskr bash -c "source /home/hicr/.bashrc && meson test -C build" + docker exec -u hicr taskr bash -c "meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false && meson compile -C build && meson test -C build" echo "Creating coverage report..." docker exec -u hicr taskr bash -c "ninja -C build coverage" docker stop taskr @@ -270,43 +270,17 @@ jobs: with: submodules: 'true' - - name: Build Pybind11 - run: | - sudo apt-get update - sudo apt-get install -y python3-pytest - - cd extern/pybind11 - mkdir -p build - cd build - cmake .. -DPython_EXECUTABLE=/usr/bin/python3 - make check -j"$(nproc)" - - mkdir -p mock_install/share/pkgconfig - cat < mock_install/share/pkgconfig/pybind11.pc - prefix=$(pwd)/.. - includedir=\${prefix}/include - - Name: pybind11 - Description: Seamless operability between C++11 and Python - Version: 2.13.6 - Cflags: -I\${includedir} - EOF - - echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$(pwd)/mock_install/share/pkgconfig" >> $GITHUB_ENV - - - name: Setup - run: source /home/hicr/.bashrc && meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngine=mpi -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true - - - name: Compile - run: source /home/hicr/.bashrc && meson compile -C build - + - name: Dry-run compilation + run: source /home/hicr/.bashrc && meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,lpf,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false && meson compile -C build + - name: Running tests and creating coverage report shell: bash env: LD_PRELOAD: /usr/local/lib/libnosv.so run: | - echo "Running Tests..." source /home/hicr/.bashrc + meson setup build -Dbuildtype=debug -Db_coverage=true -DdistributedEngines=mpi,none -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true -DexecutionStateType=nosv,boost -DprocessingUnitType=nosv,pthreads -DbuildPyTaskR=true -DbuildInstrumentation=false + meson compile -C build meson test -C build echo "Creating coverage report..." ninja -C build coverage diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1f7e11..40ec949 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ build: - source /home/hicr/.hicr-env.sh - echo "Building TaskR..." - mkdir build - - meson setup build -Dbuildtype=debug -Db_coverage=true -DbuildTests=true -DbuildExamples=true -DdistributedEngine=mpi -DexecutionStateType=boost,nosv -DprocessingUnitType=pthreads,nosv -DbuildInstrumentation=true -DbuildPyTaskR=true -DcompileWarningsAsErrors=true + - meson setup build -Dbuildtype=debug -Db_coverage=true -DbuildTests=true -DbuildExamples=true -DdistributedEngines=mpi -DexecutionStateType=boost,nosv -DprocessingUnitType=pthreads,nosv -DbuildInstrumentation=true -DbuildPyTaskR=true -DcompileWarningsAsErrors=true - meson compile -C build - echo "Running tests..." - meson test -C build diff --git a/.gitmodules b/.gitmodules index 15a5f18..17c670d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,11 +2,7 @@ path = extern/tracr url = https://github.com/Algebraic-Programming/TraCR.git branch = main -[submodule "extern/hicr"] - path = extern/hicr +[submodule "extern/HiCR"] + path = extern/HiCR url = https://github.com/Algebraic-Programming/HiCR.git branch = master -[submodule "extern/pybind11"] - path = extern/pybind11 - url = https://github.com/pybind/pybind11.git - branch = stable diff --git a/examples/abcTasks/meson.build b/examples/abcTasks/meson.build index 3d8336a..1bc6e0d 100644 --- a/examples/abcTasks/meson.build +++ b/examples/abcTasks/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p') + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p') endif endif diff --git a/examples/cholesky/meson.build b/examples/cholesky/meson.build index a30be1b..1f2d187 100644 --- a/examples/cholesky/meson.build +++ b/examples/cholesky/meson.build @@ -10,7 +10,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'source/pthreads.cpp'], include_directories: include_directories(['source']), dependencies: [ choleskyDep] ) if get_option('buildTests') - test('threading', threading, args: [ '384', '24', '0', '0' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args: [ '384', '24', '0', '0' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -18,6 +18,6 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'source/nosv.cpp'], include_directories: include_directories(['source']), dependencies: [ choleskyDep] ) if get_option('buildTests') - test('nosv', nosv, args: [ '384', '24', '0', '0' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args: [ '384', '24', '0', '0' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif \ No newline at end of file diff --git a/examples/conditionVariable/meson.build b/examples/conditionVariable/meson.build index 4d7f344..2bc789d 100644 --- a/examples/conditionVariable/meson.build +++ b/examples/conditionVariable/meson.build @@ -7,10 +7,10 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading_conditionVariableWaitForCondition = executable('threading_conditionVariableWaitForCondition', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ], cpp_args: [ '-D__TEST_FUNCTION_=conditionVariableWaitForCondition'] ) if get_option('buildTests') - test('threading_conditionVariableWait', threading_conditionVariableWait, args : [ ], suite: testSuite, workdir: threading_conditionVariableWait.path() + '.p' ) - test('threading_conditionVariableWaitFor', threading_conditionVariableWaitFor, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitFor.path() + '.p' ) - test('threading_conditionVariableWaitCondition', threading_conditionVariableWaitCondition, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitCondition.path() + '.p' ) - test('threading_conditionVariableWaitForCondition', threading_conditionVariableWaitForCondition, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitForCondition.path() + '.p' ) + test('threading_conditionVariableWait', threading_conditionVariableWait, args : [ ], suite: testSuite, workdir: threading_conditionVariableWait.full_path() + '.p' ) + test('threading_conditionVariableWaitFor', threading_conditionVariableWaitFor, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitFor.full_path() + '.p' ) + test('threading_conditionVariableWaitCondition', threading_conditionVariableWaitCondition, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitCondition.full_path() + '.p' ) + test('threading_conditionVariableWaitForCondition', threading_conditionVariableWaitForCondition, args : [ ], suite: testSuite, workdir: threading_conditionVariableWaitForCondition.full_path() + '.p' ) endif endif @@ -21,10 +21,10 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv_conditionVariableWaitForCondition = executable('nosv_conditionVariableWaitForCondition', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ], cpp_args: [ '-D__TEST_FUNCTION_=conditionVariableWaitForCondition'] ) if get_option('buildTests') - test('nosv_conditionVariableWait', nosv_conditionVariableWait, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWait.path() + '.p' ) - test('nosv_conditionVariableWaitFor', nosv_conditionVariableWaitFor, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitFor.path() + '.p' ) - test('nosv_conditionVariableWaitCondition', nosv_conditionVariableWaitCondition, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitCondition.path() + '.p' ) - test('nosv_conditionVariableWaitForCondition', nosv_conditionVariableWaitForCondition, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitForCondition.path() + '.p' ) + test('nosv_conditionVariableWait', nosv_conditionVariableWait, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWait.full_path() + '.p' ) + test('nosv_conditionVariableWaitFor', nosv_conditionVariableWaitFor, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitFor.full_path() + '.p' ) + test('nosv_conditionVariableWaitCondition', nosv_conditionVariableWaitCondition, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitCondition.full_path() + '.p' ) + test('nosv_conditionVariableWaitForCondition', nosv_conditionVariableWaitForCondition, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv_conditionVariableWaitForCondition.full_path() + '.p' ) endif endif diff --git a/examples/energySaver/meson.build b/examples/energySaver/meson.build index 2397f89..0116975 100644 --- a/examples/energySaver/meson.build +++ b/examples/energySaver/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('threading', threading, args : [ '3', '1', '100' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ '3', '1', '100' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('nosv', nosv, args : [ '3', '1', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ '3', '1', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/fibonacci/meson.build b/examples/fibonacci/meson.build index 8cde6be..5c40d13 100644 --- a/examples/fibonacci/meson.build +++ b/examples/fibonacci/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('threading', threading, args : [ '15' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ '15' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('nosv', nosv, args : [ '15' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ '15' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/jacobi3d/meson.build b/examples/jacobi3d/meson.build index 673e46f..da4ea1a 100644 --- a/examples/jacobi3d/meson.build +++ b/examples/jacobi3d/meson.build @@ -1,46 +1,47 @@ testSuite = [ 'examples', 'jacobi3d' ] -if distributedEngine == 'mpi' +if 'mpi' in distributedEngines TaskRDistributedCppFlag = '-D_TASKR_DISTRIBUTED_ENGINE_MPI' mpirunExecutable = HiCRProject.get_variable('mpirunExecutable') if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('processingUnitType') - threading = executable('threading', [ 'source/pthreads.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) + threading = executable('mpi-threading', [ 'source/pthreads.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) if get_option('buildTests') - test('threading', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', threading.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], suite: testSuite, workdir: threading.path() + '.p' ) + test('mpi-threading', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', threading.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], suite: testSuite + ['mpi'], workdir: threading.full_path() + '.p' ) endif endif # TODO: deadlocking (even for mpirun -n 1) if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType') - nosv = executable('nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) + nosv = executable('mpi-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) if get_option('buildTests') - test('nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('mpi-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['mpi'], workdir: nosv.full_path() + '.p' ) endif endif +endif -elif distributedEngine == 'lpf' +if 'lpf' in distributedEngines TaskRDistributedCppFlag = '-D_TASKR_DISTRIBUTED_ENGINE_LPF' mpirunExecutable = find_program('mpirun', '/usr/bin/mpirun', '/usr/local/bin/mpirun', required : true) if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('processingUnitType') - threading = executable('threading', [ 'source/pthreads.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) + threading = executable('lpf-threading', [ 'source/pthreads.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) if get_option('buildTests') - test('threading', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', threading.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], suite: testSuite, workdir: threading.path() + '.p' ) + test('lpf-threading', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', threading.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], suite: testSuite + ['lpf'], workdir: threading.full_path() + '.p' ) endif endif if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processingUnitType') - nosv = executable('nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) + nosv = executable('lpf-nosv', [ 'source/nosv.cpp', 'source/grid.cpp' ], dependencies: [ TaskRBuildDep ], cpp_args: [ TaskRDistributedCppFlag ] ) if get_option('buildTests') - test('nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('lpf-nosv', mpirunExecutable, args : [ '-n', '2', '--oversubscribe', 'env', 'LPF_ENGINE=zero', nosv.full_path(), '-px', '1', '-py', '1', '-pz', '2', '-lx', '1', '-ly', '2', '-lz', '2', '-n', '64', '-i', '10'], is_parallel : false, suite: testSuite + ['lpf'], workdir: nosv.full_path() + '.p' ) endif endif endif \ No newline at end of file diff --git a/examples/manyParallel/meson.build b/examples/manyParallel/meson.build index 6ed7857..0055b98 100644 --- a/examples/manyParallel/meson.build +++ b/examples/manyParallel/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ '2', '100' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ '2', '100' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ '2', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ '2', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/multiJob/meson.build b/examples/multiJob/meson.build index 99f0a8d..874f6d6 100644 --- a/examples/multiJob/meson.build +++ b/examples/multiJob/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp', 'cpp/job1.cpp', 'cpp/job2.cpp' ], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp', 'cpp/job1.cpp', 'cpp/job2.cpp' ], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/mutex/meson.build b/examples/mutex/meson.build index 8ca8c9f..e2f582b 100644 --- a/examples/mutex/meson.build +++ b/examples/mutex/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/pendingOperation/meson.build b/examples/pendingOperation/meson.build index f270c81..c14bc8b 100644 --- a/examples/pendingOperation/meson.build +++ b/examples/pendingOperation/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/resourceList/meson.build b/examples/resourceList/meson.build index 6d43937..e976224 100644 --- a/examples/resourceList/meson.build +++ b/examples/resourceList/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('threading', threading, args : [ '4', '100', '0', '1', '2', '3' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ '4', '100', '0', '1', '2', '3' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('nosv', nosv, args : [ '4', '100', '0', '1', '2', '3' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ '4', '100', '0', '1', '2', '3' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/simple/meson.build b/examples/simple/meson.build index 609ffc5..3ed755f 100644 --- a/examples/simple/meson.build +++ b/examples/simple/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ]) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/suspend/meson.build b/examples/suspend/meson.build index 02baefa..2285f5b 100644 --- a/examples/suspend/meson.build +++ b/examples/suspend/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ '2', '100' ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ '2', '100' ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ '2', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ '2', '100' ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/examples/workerSpecific/meson.build b/examples/workerSpecific/meson.build index f890e61..8b06e5f 100644 --- a/examples/workerSpecific/meson.build +++ b/examples/workerSpecific/meson.build @@ -4,7 +4,7 @@ if 'boost' in get_option('executionStateType') and 'pthreads' in get_option('pro threading = executable('threading', [ 'cpp/pthreads.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('threading', threading, args : [ ], suite: testSuite, workdir: threading.path() + '.p' ) + test('threading', threading, args : [ ], suite: testSuite, workdir: threading.full_path() + '.p' ) endif endif @@ -12,7 +12,7 @@ if 'nosv' in get_option('executionStateType') and 'nosv' in get_option('processi nosv = executable('nosv', [ 'cpp/nosv.cpp'], dependencies: [ TaskRBuildDep ] ) if get_option('buildTests') - test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.path() + '.p' ) + test('nosv', nosv, args : [ ], is_parallel : false, suite: testSuite, workdir: nosv.full_path() + '.p' ) endif endif diff --git a/extern/HiCR b/extern/HiCR new file mode 160000 index 0000000..6f49ccb --- /dev/null +++ b/extern/HiCR @@ -0,0 +1 @@ +Subproject commit 6f49ccb094d1d359ac85ffbd970e2b85bb1eff40 diff --git a/extern/hicr b/extern/hicr deleted file mode 160000 index 6d4807d..0000000 --- a/extern/hicr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6d4807de165947b2664c95d2e53c6ef408770680 diff --git a/extern/pybind11 b/extern/pybind11 deleted file mode 160000 index d6ae0e1..0000000 --- a/extern/pybind11 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d6ae0e163a6fb414c81c7f4a98291460e5a18bfe diff --git a/include/pytaskr/meson.build b/include/pytaskr/meson.build index ae3a3b9..ad318cb 100644 --- a/include/pytaskr/meson.build +++ b/include/pytaskr/meson.build @@ -4,15 +4,15 @@ python_mod = import('python') -py = python_mod.find_installation(pure: false) +py = python_mod.find_installation(pure: true) if not py.found() - py = python_mod.find_installation('/usr/bin/python3', pure: false) + py = python_mod.find_installation('/usr/bin/python3', pure: false, required: true) endif pybind11_dep = dependency('pybind11', required: true) -message('Python binary: ' + py.path()) +message('Python binary: ' + py.full_path()) message('Python install dir: ' + py.get_install_dir()) py.extension_module('taskr', diff --git a/meson.build b/meson.build index ede90f3..7f72229 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,8 @@ project('TaskR', [ 'cpp', 'c'], default_options : [ 'cpp_std=c++20', 'buildtype=release' - ] + ], + version: '1.0.0' ) ####### Storage for TaskR dependencies @@ -40,14 +41,16 @@ if meson.is_subproject() == false endif # Getting selected distributed engine - distributedEngine = get_option('distributedEngine') + distributedEngines = get_option('distributedEngines') # If, selected, adding the dependency for the distributed engine - if distributedEngine != 'none' - HiCRBackends += distributedEngine - endif + foreach engine : distributedEngines + if engine != 'none' and engine not in HiCRBackends + HiCRBackends += engine + endif + endforeach - HiCRProject = subproject('hicr', required: true, default_options: [ 'backends=' + ','.join(HiCRBackends), 'frontends=tasking' ]) + HiCRProject = subproject('HiCR', required: true, default_options: [ 'backends=' + ','.join(HiCRBackends), 'frontends=tasking' ]) HiCRBuildDep = HiCRProject.get_variable('hicrBuildDep') taskrDependencies += HiCRBuildDep endif diff --git a/meson_options.txt b/meson_options.txt index 34aaf2b..18f81e9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ -option('distributedEngine', type : 'combo', +option('distributedEngines', type : 'array', choices : [ 'mpi', 'lpf', 'none' ], - description : 'Specifies which engine (if any) to use for distributed computing examples', - value: 'none' + description : 'Specifies which engines (if any) to use for distributed computing examples', + value: ['none'] ) option('executionStateType', type : 'array', diff --git a/tests/meson.build b/tests/meson.build index 0447553..d46b9e6 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -31,5 +31,5 @@ if get_option('buildPyTaskR') testSuite = ['tests', 'pyruntime'] pyruntime = executable('pyruntime_test', [ 'pyruntime_test.cpp'], dependencies: [ TaskRBuildDep ]) - test('pyruntime_test', pyruntime, args : [ ], suite: testSuite, workdir: pyruntime.path() + '.p' ) + test('pyruntime_test', pyruntime, args : [ ], suite: testSuite, workdir: pyruntime.full_path() + '.p' ) endif \ No newline at end of file