From 37923c3fd0f42b777a3dd50d63ff2b280d703e43 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 17 Jan 2025 14:34:40 +0000 Subject: [PATCH 01/22] Add Spack configuration file --- spack.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spack.yaml diff --git a/spack.yaml b/spack.yaml new file mode 100644 index 00000000..1a436d6d --- /dev/null +++ b/spack.yaml @@ -0,0 +1,12 @@ +spack: + packages: + all: + compiler: [gcc@11.4.0] + specs: + - cmake + - py-torch + - pfunit + concretizer: + unify: true + config: + install_missing_compilers: true From eb0917c605cd765c8a1576b5c60689e7c5274246 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 17 Jan 2025 15:54:01 +0000 Subject: [PATCH 02/22] Install pip, too --- spack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spack.yaml b/spack.yaml index 1a436d6d..24bf4e39 100644 --- a/spack.yaml +++ b/spack.yaml @@ -4,8 +4,9 @@ spack: compiler: [gcc@11.4.0] specs: - cmake - - py-torch - pfunit + - py-torch + - py-pip concretizer: unify: true config: From 3b96600cc53dacc312978fe57b4fd5a217d1ed32 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 17 Jan 2025 16:31:05 +0000 Subject: [PATCH 03/22] Don't install MPI or OpenMP variants --- spack.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spack.yaml b/spack.yaml index 24bf4e39..7bb8377d 100644 --- a/spack.yaml +++ b/spack.yaml @@ -4,8 +4,8 @@ spack: compiler: [gcc@11.4.0] specs: - cmake - - pfunit - - py-torch + - pfunit~mpi~openmp + - py-torch~cuda~mpi~openmp - py-pip concretizer: unify: true From 87403f75a41ef05faa34e5aa3bc63353bbc2dfb8 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Mon, 20 Jan 2025 09:18:02 +0000 Subject: [PATCH 04/22] Drop mkldnn; add py-torchvision --- spack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spack.yaml b/spack.yaml index 7bb8377d..14a04c0d 100644 --- a/spack.yaml +++ b/spack.yaml @@ -5,7 +5,8 @@ spack: specs: - cmake - pfunit~mpi~openmp - - py-torch~cuda~mpi~openmp + - py-torch~cuda~mpi~openmp~mkldnn + - py-torchvision - py-pip concretizer: unify: true From 10877fb122246acf4fdf2d9eaa4d647aca967657 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 17:23:57 +0000 Subject: [PATCH 05/22] Add dev Dockerfile --- docker/Dockerfile.devenv | 52 ++++++++++++++++++++++++++++++++++++++++ spack.yaml | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile.devenv diff --git a/docker/Dockerfile.devenv b/docker/Dockerfile.devenv new file mode 100644 index 00000000..6fb89f34 --- /dev/null +++ b/docker/Dockerfile.devenv @@ -0,0 +1,52 @@ +# Build stage with Spack pre-installed and ready to be used +FROM spack/ubuntu-jammy:0.21 AS builder + +# Install software from spack.yaml +RUN mkdir /opt/spack-environment +COPY spack.yaml /opt/spack-environment/spack.yaml +RUN cd /opt/spack-environment \ + && spack env activate . \ + && spack install --fail-fast \ + && spack gc -y + +# Install perl URI lib +RUN apt update \ + && apt install -y --no-install-recommends libany-uri-escape-perl \ + && rm -rf /var/lib/apt/lists/* + +# Strip all the binaries +RUN find -L /opt/views/view/* -type f -exec readlink -f '{}' \; | \ + xargs file -i | \ + grep 'charset=binary' | \ + grep 'x-executable\|x-archive\|x-sharedlib' | \ + awk -F: '{print $1}' | xargs strip + +# Modifications to the environment that are necessary to run +RUN cd /opt/spack-environment \ + && spack env activate --sh -d . > activate.sh + +# Bare OS image to run the installed executables +FROM ubuntu:22.04 + +# Copy necessary files from the builder stage +COPY --from=builder /opt/spack-environment /opt/spack-environment +COPY --from=builder /opt/software /opt/software +COPY --from=builder /usr /usr +# paths.view is a symlink, so copy the parent to avoid dereferencing and duplicating it +COPY --from=builder /opt/views /opt/views + +# Create entrypoint script +RUN { \ + echo '#!/bin/sh'; \ + echo '. /opt/spack-environment/activate.sh'; \ + echo 'exec "$@"'; \ + } > /entrypoint.sh \ + && chmod a+x /entrypoint.sh \ + && ln -s /opt/views/view /opt/view \ + && apt update \ + && apt install -y --no-install-recommends ca-certificates cpp m4 \ + && rm -rf /var/lib/apt/lists/* + +# Set entrypoint and default command +ENTRYPOINT [ "/entrypoint.sh" ] +CMD [ "/bin/bash" ] diff --git a/spack.yaml b/spack.yaml index 14a04c0d..59cb2e97 100644 --- a/spack.yaml +++ b/spack.yaml @@ -5,7 +5,7 @@ spack: specs: - cmake - pfunit~mpi~openmp - - py-torch~cuda~mpi~openmp~mkldnn + - py-torch~cuda~mpi~openmp - py-torchvision - py-pip concretizer: From 7f3c3447d0d5d461405e0d4ea903e3c2a08d38b8 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 17:31:31 +0000 Subject: [PATCH 06/22] Add periodic Docker dev build --- .github/workflows/docker.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..d58cd025 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,57 @@ +# Workflow to build the development Docker image +name: Periodic Docker build + +# Controls when the workflow will run +on: + # Triggers the workflow on pushes to open pull requests with changes to the Spack or Docker configuration + pull_request: + paths: + - .github/workflows/docker.yml + - docker/Dockerfile.devenv + - spack.yaml + + # Triggers the workflow at 00:00 on the first day of every 3 months + schedule: + - cron: '0 0 1 */3 *' + +# Cancel jobs running if new commits are pushed +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +# Workflow run - one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "docker" + docker: + name: Build Docker container + # The type of runner that the job will run on + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout the repo + with: + persist-credentials: false + uses: actions/checkout@v4 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Log into GitHub Container Repository + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + logout: true + + - name: Build container and push to ghcr + uses: docker/build-push-action@v5 + with: + push: true + file: docker/Dockerfile.devenv + tags: ghcr.io/cambridge-iccs/ftorch-dev-env:latest From 237514b1f3325745f52ba1fece6a76622c555851 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 18:33:57 +0000 Subject: [PATCH 07/22] Specify install tree and view --- spack.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spack.yaml b/spack.yaml index 59cb2e97..14d2ef71 100644 --- a/spack.yaml +++ b/spack.yaml @@ -12,3 +12,5 @@ spack: unify: true config: install_missing_compilers: true + install_tree: /opt/software + view: /opt/views/view From d7512baa0267a31a95c35e517fbf3eabedbf5902 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 18:37:59 +0000 Subject: [PATCH 08/22] No name for consistency --- .github/workflows/docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d58cd025..e2e65be6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -23,7 +23,6 @@ concurrency: jobs: # This workflow contains a single job called "docker" docker: - name: Build Docker container # The type of runner that the job will run on runs-on: ubuntu-latest permissions: From 94ba32415273b9ff24e01ab3b1ae2d71f76fcc2d Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 19:10:00 +0000 Subject: [PATCH 09/22] Use Docker container in CI Ubuntu test workflow --- .github/workflows/test_suite_ubuntu.yml | 44 +++++++------------------ 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index aab34ede..2f6d07f2 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -37,10 +37,18 @@ jobs: test-suite-ubuntu: # The type of runner that the job will run on runs-on: ubuntu-latest - strategy: - fail-fast: false + fail-fast: false + matrix: + std: ["f2008", "f2018"] matrix: - std: ["f2008", "f2018"] + container: ["ghcr.io/cambridge-iccs/ftorch-dev-env:latest"] + + # The Docker container that the job will use + container: + image: ${{ matrix.container }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -50,35 +58,6 @@ jobs: persist-credentials: false uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install PyTorch - run: | - python -m pip install --upgrade pip - python -m venv ftorch - . ftorch/bin/activate - pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu - - # MPI is required by pFUnit - - name: Install an MPI distribution - run: | - sudo apt update - sudo apt install mpich - - - name: Install pFUnit - run: | - export FC=/usr/bin/gfortran - export MPIF90=/usr/bin/mpif90 - # TODO: Avoid version pinning (needed because version appears in install path) - git clone -b v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git - mkdir pFUnit/build - cd pFUnit/build - cmake .. - make -j 4 install - - name: Build FTorch run: | . ftorch/bin/activate @@ -86,6 +65,7 @@ jobs: export Torch_DIR=${VIRTUAL_ENV}/lib/python${VN}/site-packages export BUILD_DIR=$(pwd)/build # NOTE: The pFUnit version (pinned during installation above) is used in the install path. + # FIXME: Path to pFUnit export PFUNIT_DIR=$(pwd)/pFUnit/build/installed/PFUNIT-4.10 mkdir ${BUILD_DIR} cd ${BUILD_DIR} From fec351e2c2d4ba60b262ada6ee17115b281a6dad Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 19:18:41 +0000 Subject: [PATCH 10/22] Path to pFUnit --- .github/workflows/test_suite_ubuntu.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 2f6d07f2..d5647d2f 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -64,9 +64,7 @@ jobs: VN=$(python -c "import sys; print('.'.join(sys.version.split('.')[:2]))") export Torch_DIR=${VIRTUAL_ENV}/lib/python${VN}/site-packages export BUILD_DIR=$(pwd)/build - # NOTE: The pFUnit version (pinned during installation above) is used in the install path. - # FIXME: Path to pFUnit - export PFUNIT_DIR=$(pwd)/pFUnit/build/installed/PFUNIT-4.10 + export PFUNIT_DIR="/opt/view/$(ls /opt/view | grep PFUNIT)" mkdir ${BUILD_DIR} cd ${BUILD_DIR} cmake .. \ From 1ed2c523ea0dfa508bfe17642ce2018818ddee45 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Thu, 30 Jan 2025 19:19:40 +0000 Subject: [PATCH 11/22] Add venv creation back in --- .github/workflows/test_suite_ubuntu.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index d5647d2f..8173ccf4 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -58,6 +58,12 @@ jobs: persist-credentials: false uses: actions/checkout@v4 + - name: Create virtual environment + run: | + python -m pip install --upgrade pip + python -m venv ftorch + . ftorch/bin/activate + - name: Build FTorch run: | . ftorch/bin/activate From 6eb5bec2b59100c1cb88206b8fed9178a6a97214 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 09:16:15 +0000 Subject: [PATCH 12/22] Rework strategy/matrix syntax --- .github/workflows/test_suite_ubuntu.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 8173ccf4..5f2e7314 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -37,11 +37,11 @@ jobs: test-suite-ubuntu: # The type of runner that the job will run on runs-on: ubuntu-latest - fail-fast: false - matrix: - std: ["f2008", "f2018"] + strategy: + fail-fast: false matrix: container: ["ghcr.io/cambridge-iccs/ftorch-dev-env:latest"] + std: ["f2008", "f2018"] # The Docker container that the job will use container: From 25838392b15db4f4c216082cc32999a6159db7b3 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 09:29:43 +0000 Subject: [PATCH 13/22] Activate Spack environment in CI tests --- .github/workflows/test_suite_ubuntu.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 5f2e7314..9283851c 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -60,12 +60,14 @@ jobs: - name: Create virtual environment run: | + . /opt/spack-environment/activate.sh python -m pip install --upgrade pip python -m venv ftorch . ftorch/bin/activate - name: Build FTorch run: | + . /opt/spack-environment/activate.sh . ftorch/bin/activate VN=$(python -c "import sys; print('.'.join(sys.version.split('.')[:2]))") export Torch_DIR=${VIRTUAL_ENV}/lib/python${VN}/site-packages @@ -85,10 +87,12 @@ jobs: - name: Run unit tests run: | + . /opt/spack-environment/activate.sh . ftorch/bin/activate ./run_test_suite.sh --verbose --unit-only - name: Run integration tests run: | + . /opt/spack-environment/activate.sh . ftorch/bin/activate ./run_test_suite.sh --verbose --integration-only From ca2e4f46676440815356bb1a914b407316f22e8e Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 11:23:40 +0000 Subject: [PATCH 14/22] Commented out tmate --- .github/workflows/test_suite_ubuntu.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 9283851c..e6e1b4ba 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -65,6 +65,13 @@ jobs: python -m venv ftorch . ftorch/bin/activate + # tmate can be used to get an interactive ssh session to the github runner + # for debugging actions. See + # [here](https://github.com/mxschmitt/action-tmate) for more information. + # Uncomment these lines to debug the FTorch build. + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + - name: Build FTorch run: | . /opt/spack-environment/activate.sh From 9442a400c794996fc2bdad8f4d882d3bffebec32 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 11:35:42 +0000 Subject: [PATCH 15/22] Fix Torch_DIR --- .github/workflows/test_suite_ubuntu.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index e6e1b4ba..fc7e1004 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -76,16 +76,19 @@ jobs: run: | . /opt/spack-environment/activate.sh . ftorch/bin/activate - VN=$(python -c "import sys; print('.'.join(sys.version.split('.')[:2]))") - export Torch_DIR=${VIRTUAL_ENV}/lib/python${VN}/site-packages - export BUILD_DIR=$(pwd)/build + VN="$(python -c 'import sys; print(".".join(sys.version.split(".")[:2]))')" + PLATFORM="$(ls /opt/software | grep linux)" + COMPILER="$(ls /opt/software/${PLATFORM} | grep gcc)" + PYTORCH="$(ls /opt/software/${PLATFORM}/${COMPILER} | grep py-torch-)" + export Torch_DIR="/opt/software/${PLATFORM}/${COMPILER}/${PYTORCH}/lib/python${VN}/site-packages" export PFUNIT_DIR="/opt/view/$(ls /opt/view | grep PFUNIT)" - mkdir ${BUILD_DIR} - cd ${BUILD_DIR} + export BUILD_DIR="$(pwd)/src/build" + mkdir "${BUILD_DIR}" + cd "${BUILD_DIR}" cmake .. \ -DPython_EXECUTABLE="$(which python)" \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=${BUILD_DIR} \ + -DCMAKE_INSTALL_PREFIX="${BUILD_DIR}" \ -DCMAKE_BUILD_TESTS=TRUE \ -DCMAKE_PREFIX_PATH="${PFUNIT_DIR};${Torch_DIR}" \ -DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}" From ff6430b15c401be330e40b6aea6cb16f82d0e0c0 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 12:00:32 +0000 Subject: [PATCH 16/22] Don't upgrade pip --- .github/workflows/test_suite_ubuntu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index fc7e1004..6f4620c7 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -61,7 +61,6 @@ jobs: - name: Create virtual environment run: | . /opt/spack-environment/activate.sh - python -m pip install --upgrade pip python -m venv ftorch . ftorch/bin/activate From d403b3d15c3c78454da5ea4319966f5f9c8233ea Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Fri, 31 Jan 2025 14:38:44 +0000 Subject: [PATCH 17/22] Take Docker image out of matrix --- .github/workflows/test_suite_ubuntu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 6f4620c7..6f3a8da0 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -40,12 +40,11 @@ jobs: strategy: fail-fast: false matrix: - container: ["ghcr.io/cambridge-iccs/ftorch-dev-env:latest"] std: ["f2008", "f2018"] # The Docker container that the job will use container: - image: ${{ matrix.container }} + image: ghcr.io/cambridge-iccs/ftorch-dev-env:latest credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} From 6bc1f3d0a6b6b2de1f54529b02a124dea2e8e6b5 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Mon, 3 Feb 2025 10:24:13 +0000 Subject: [PATCH 18/22] Drop mkldnn; only specify gcc11; drop unused arg --- spack.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spack.yaml b/spack.yaml index 14d2ef71..0c530f10 100644 --- a/spack.yaml +++ b/spack.yaml @@ -1,16 +1,15 @@ spack: packages: all: - compiler: [gcc@11.4.0] + compiler: [gcc@11:] specs: - cmake - pfunit~mpi~openmp - - py-torch~cuda~mpi~openmp + - py-torch~cuda~mpi~openmp~mkldnn - py-torchvision - py-pip concretizer: unify: true config: - install_missing_compilers: true install_tree: /opt/software view: /opt/views/view From 61565cad6ecc39e7072268cb568a0be6453f8373 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Mon, 3 Feb 2025 11:58:04 +0000 Subject: [PATCH 19/22] Simplify Torch_DIR --- .github/workflows/test_suite_ubuntu.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 6f3a8da0..05ef9a28 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -75,10 +75,7 @@ jobs: . /opt/spack-environment/activate.sh . ftorch/bin/activate VN="$(python -c 'import sys; print(".".join(sys.version.split(".")[:2]))')" - PLATFORM="$(ls /opt/software | grep linux)" - COMPILER="$(ls /opt/software/${PLATFORM} | grep gcc)" - PYTORCH="$(ls /opt/software/${PLATFORM}/${COMPILER} | grep py-torch-)" - export Torch_DIR="/opt/software/${PLATFORM}/${COMPILER}/${PYTORCH}/lib/python${VN}/site-packages" + export Torch_DIR="/opt/views/view/lib/python${VN}/site-packages" export PFUNIT_DIR="/opt/view/$(ls /opt/view | grep PFUNIT)" export BUILD_DIR="$(pwd)/src/build" mkdir "${BUILD_DIR}" From 21013224e07425adbf3da45fae8aaa58313e4ada Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Mon, 3 Feb 2025 12:42:58 +0000 Subject: [PATCH 20/22] No need for secrets in tests --- .github/workflows/test_suite_ubuntu.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index 05ef9a28..c215af1b 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -45,9 +45,6 @@ jobs: # The Docker container that the job will use container: image: ghcr.io/cambridge-iccs/ftorch-dev-env:latest - credentials: - username: ${{ github.actor }} - password: ${{ secrets.github_token }} # Steps represent a sequence of tasks that will be executed as part of the job steps: From 84f0b489e6d20cedd6f8d914d615ddf481671142 Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Mon, 3 Feb 2025 17:26:51 +0000 Subject: [PATCH 21/22] Put /opt/view in path --- .github/workflows/test_suite_ubuntu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index c215af1b..dbe55ee5 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -72,7 +72,7 @@ jobs: . /opt/spack-environment/activate.sh . ftorch/bin/activate VN="$(python -c 'import sys; print(".".join(sys.version.split(".")[:2]))')" - export Torch_DIR="/opt/views/view/lib/python${VN}/site-packages" + export Torch_DIR="/opt/view/lib/python${VN}/site-packages" export PFUNIT_DIR="/opt/view/$(ls /opt/view | grep PFUNIT)" export BUILD_DIR="$(pwd)/src/build" mkdir "${BUILD_DIR}" @@ -82,7 +82,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="${BUILD_DIR}" \ -DCMAKE_BUILD_TESTS=TRUE \ - -DCMAKE_PREFIX_PATH="${PFUNIT_DIR};${Torch_DIR}" \ + -DCMAKE_PREFIX_PATH="/opt/view;${PFUNIT_DIR};${Torch_DIR}" \ -DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}" cmake --build . cmake --install . From 49043b84662dd436cc58f26d5fbdd35b3453c08c Mon Sep 17 00:00:00 2001 From: Joe Wallwork Date: Tue, 4 Mar 2025 10:22:34 +0000 Subject: [PATCH 22/22] Fix path to build dir --- .github/workflows/test_suite_ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_suite_ubuntu.yml b/.github/workflows/test_suite_ubuntu.yml index dbe55ee5..3b03c11b 100644 --- a/.github/workflows/test_suite_ubuntu.yml +++ b/.github/workflows/test_suite_ubuntu.yml @@ -74,7 +74,7 @@ jobs: VN="$(python -c 'import sys; print(".".join(sys.version.split(".")[:2]))')" export Torch_DIR="/opt/view/lib/python${VN}/site-packages" export PFUNIT_DIR="/opt/view/$(ls /opt/view | grep PFUNIT)" - export BUILD_DIR="$(pwd)/src/build" + export BUILD_DIR="$(pwd)/build" mkdir "${BUILD_DIR}" cd "${BUILD_DIR}" cmake .. \