Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spack configuration #271

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Spack configuration #271

wants to merge 22 commits into from

Conversation

jwallwork23
Copy link
Collaborator

@jwallwork23 jwallwork23 commented Jan 30, 2025

Closes #122.

This PR provides a development spack.yaml configuration file to install FTorch's dependencies.

It also sets up a workflow for building a Docker image with this Spack setup inside it and hooks it up in the CI. The workflow is triggered either when a relevant file is changed or at the start of every third month.

@jwallwork23 jwallwork23 added the documentation Improvements or additions to documentation label Jan 30, 2025
@jwallwork23 jwallwork23 force-pushed the 122_spack branch 2 times, most recently from 151aa2f to 776435a Compare January 30, 2025 18:35
@jwallwork23 jwallwork23 self-assigned this Jan 30, 2025
@jwallwork23 jwallwork23 force-pushed the 122_spack branch 2 times, most recently from b84dde6 to 9a8c5a2 Compare January 31, 2025 08:12
@jwallwork23 jwallwork23 added the testing Related to FTorch testing label Jan 31, 2025
@jwallwork23
Copy link
Collaborator Author

Seems to all be set up although the CI hits a linking error for pFUnit

-- Building with Fortran PyTorch coupling
-- Configuring done (1.8s)
-- Generating done (0.1s)
-- Build files have been written to: /__w/FTorch/FTorch/src/build
[  3%] Building Fortran object CMakeFiles/ftorch.dir/ftorch.F90.o
[  6%] Building Fortran object CMakeFiles/ftorch.dir/ftorch_test_utils.f90.o
[ 10%] Building CXX object CMakeFiles/ftorch.dir/ctorch.cpp.o
[ 13%] Linking CXX shared library libftorch.so
[ 13%] Built target ftorch
[ 16%] Generating test_tensor_constructors.F90
Processing file ../../../test/unit/test_tensor_constructors.pf
 ... Done.  Results in test_tensor_constructors.F90
[ 20%] Building Fortran object test/unit/CMakeFiles/test_tensor_constructors.dir/test_tensor_constructors.F90.o
[ 23%] Building Fortran object test/unit/CMakeFiles/test_tensor_constructors.dir/test_tensor_constructors_driver.F90.o
[ 26%] Linking Fortran executable test_tensor_constructors
/usr/bin/ld: /opt/view/PFUNIT-4.7/lib/libfunit.a: error adding symbols: archive has no index; run ranlib to add one
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/unit/CMakeFiles/test_tensor_constructors.dir/build.make:120: test/unit/test_tensor_constructors] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:265: test/unit/CMakeFiles/test_tensor_constructors.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

@jwallwork23
Copy link
Collaborator Author

Also note that the Docker image is fairly chunky. This is mainly due to intel-openapi-mkl getting pulled in as a dependency for Spack's py-torch package. I haven't figured out if it's possible to avoid this yet.

REPOSITORY                              TAG       IMAGE ID       CREATED        SIZE
ghcr.io/cambridge-iccs/ftorch-dev-env   latest    8cbb021b754b   14 hours ago   6.61GB

@jwallwork23 jwallwork23 force-pushed the 122_spack branch 2 times, most recently from 9d810b9 to 59b54e4 Compare February 3, 2025 12:43
@jwallwork23
Copy link
Collaborator Author

Also note that the Docker image is fairly chunky. This is mainly due to intel-openapi-mkl getting pulled in as a dependency for Spack's py-torch package. I haven't figured out if it's possible to avoid this yet.

REPOSITORY                              TAG       IMAGE ID       CREATED        SIZE
ghcr.io/cambridge-iccs/ftorch-dev-env   latest    8cbb021b754b   14 hours ago   6.61GB

This has now been reduced significantly, thanks @TomMelt!

REPOSITORY                              TAG       IMAGE ID       CREATED             SIZE
ghcr.io/cambridge-iccs/ftorch-dev-env   latest    c485b6483a61   About an hour ago   1.85GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation testing Related to FTorch testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spack recipe
1 participant