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

Update spack recipe for v2.4.0.0 #148

Merged
merged 24 commits into from
Aug 25, 2022
Merged

Update spack recipe for v2.4.0.0 #148

merged 24 commits into from
Aug 25, 2022

Conversation

IshaanDesai
Copy link
Member

This PR updates the spack recipe for v2.4.0.0. Only to be merged after spack/spack#31697 has been merged

@IshaanDesai IshaanDesai self-assigned this Jul 22, 2022
@IshaanDesai IshaanDesai requested a review from ajaust July 25, 2022 06:44
Copy link
Collaborator

@ajaust ajaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks overall good. Thanks for updating the recipe. I just added on remark and one thing is unclear to me where this recipe differs from the recipe that was merged in the Spack reposiory.

spack/repo/packages/py-pyprecice/package.py Show resolved Hide resolved
spack/repo/packages/py-pyprecice/package.py Outdated Show resolved Hide resolved
@ajaust
Copy link
Collaborator

ajaust commented Jul 25, 2022

I will use your branch to install the new bindings via Spack. I want to figure out whether I can reproduce the failing test.

@ajaust
Copy link
Collaborator

ajaust commented Jul 25, 2022

Note I had to change line 6 to

from spack.package import *

Otherwise the package did not work with the current Spack develop branch.

@ajaust
Copy link
Collaborator

ajaust commented Jul 25, 2022

Note that the copyright header is also out of date. It differs from the header in the Spack repository.

@ajaust
Copy link
Collaborator

ajaust commented Jul 25, 2022

I could reproduce the failing Action on a different machine.

Maybe changing line 29 to

          . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"

fixes it (= remove colon/dot .) from grep command. In my build directory I do not get any lib. directory. The directory is simply called lib.

@ajaust
Copy link
Collaborator

ajaust commented Jul 25, 2022

I could reproduce the failing Action on a different machine.

Maybe changing line 29 to

          . /opt/spack/share/spack/setup-env.sh && spack env activate ci && spack arch && spack find && spack dev-build pyprecice.test.py-pyprecice@develop target=x86_64 && spack load precice py-numpy py-mpi4py py-cython openssh openmpi && export PYTHONPATH=${PWD}/build/$(ls build | grep lib):${PYTHONPATH} && mkdir runner && cd runner && BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}"

fixes it (= remove colon/dot .) from grep command. In my build directory I do not get any lib. directory. The directory is simply called lib.

Just as addition: We have to check whether we can remove this dot safely or whether we should check for lib/ and lib.SOMETHING/.

We could also format this action to make it a bit more readable.

@IshaanDesai IshaanDesai requested a review from fsimonis August 24, 2022 15:15
@IshaanDesai
Copy link
Member Author

At this moment the build_spack action has been disabled as several attempts to get it to work have failed. The unresolved issue is that when the py-pyprecice package is installed from source using spack dev-build, rather than going into the list of installed packages, it goes into another list which does not have the distro name in the architecture heading. The output of spack find is:

| -- linux-None-x86_64 / no compiler ------------------------------
| py-pyprecice@develop
| 
| ==> 60 installed packages
| -- linux-ubuntu20.04-x86_64 / [email protected] -------------------------
| [email protected]
| [email protected]
| [email protected]

This leads to the package py-pyprecice to be not found when spack load py-pyprecice is attempted.

The overall amount of effort into maintaining the Spack recipe has brought into question its relevance and use. This pull request is being temporarily suspended, pending further discussions.

@fsimonis
Copy link
Member

fsimonis commented Aug 25, 2022

The issue seems to be that commands behave differently in environments.

The following seems to work apart from the strange version:

root@f386f56476c8:~# . /opt/spack/share/spack/setup-env.sh
root@f386f56476c8:~# spack env activate ci
root@f386f56476c8:~# spack devel pyprecice.test.py-pyprecice@develop target=x86_64
==> Error: devel is not a recognized Spack command or extension command; check with `spack commands`.
root@f386f56476c8:~# spack develop pyprecice.test.py-pyprecice@develop target=x86_64
==> Configuring spec py-pyprecice@develop arch=linux-None-x86_64 for development at path py-pyprecice
root@f386f56476c8:~# spack install
==> Installing environment ci
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/boost-1.79.0-ivx6ayrznaqqhqiyzjnbhrdmnv4d7mm4
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/pkgconf-1.8.0-wsqf3pdlaknj3vt7bq7skjmztdd5flps
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/ca-certificates-mozilla-2022-07-19-veqmzw4fkatz3wjpn5y2wodi2dzhyaub
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/berkeley-db-18.1.40-emdzfk4edy5a5kkudnchca5xvz6n6hs6
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libiconv-1.16-qgiqsj3me7n7a33idnkjhfrje6gtkzfc
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/zlib-1.2.12-edugrkv3cwwfvj7um4p4pcb77joh6bun
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/xz-5.2.5-ncixtuswg77wafbdw5wgwqcfaug7nxcd
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libsigsegv-2.13-dvx6jjg4rhvuwr6mzpbecfjt6hwiju2p
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/util-macros-1.19.3-hhrzxu57vf5i6hrmx3i7sjgqaq3l42ic
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/zstd-1.5.2-6s4fui5wflp23i4ats3dqrgccmexyjro
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libmd-1.0.4-s4jxh5c7u552tyyabmulx26zbpbsvcme
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libffi-3.4.2-xbjli5qlpq6iesqtbz3izlimj54th4yp
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/util-linux-uuid-2.37.4-biegun4vnqnkmvanpn3o25pasfmp3w6v
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/ncurses-6.3-hbmtrd4qgjwpmulbo3oq3gijcx6l6dbt
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/diffutils-3.8-4zbnujfiapq5yeuc7xdv4bejn57w4d5z
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/pigz-2.7-dimjvwcys5bpxbducbipwlp7tdlbonlr
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libxml2-2.9.13-6xkiyrufjhek6mwoztmpyfw2de2wwly2
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libbsd-0.11.5-z4wmj5q2x6qmyhsu2adra2g4klzs2w5t
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libedit-3.1-20210216-xxllkb3biwntsavewmg2gygejjyjfczi
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/readline-8.1.2-3enmvtsrpdwpj3xh2sqdwmik627kobdh
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/m4-1.4.19-yjiyxa4zldljbaxcchcv2a4aluldiock
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/bzip2-1.0.8-ufk3ruarnyb7d5vkutpwgozseljwzmlw
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/expat-2.4.8-4nhsan54zuhn5xyrhvfcswwyspzmk4fz
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/gdbm-1.19-k4ogngwujburvntb7fqzjye2kkf6mycm
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/sqlite-3.39.2-bcmqq23gd46iehhaqxgw6cfeb2fbtst2
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libtool-2.4.7-7sibceaecnhms2nkgwuym7i24vaugx32
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/tar-1.34-zuikl7dxectdgfwpm4s6xwr6o2iwsewl
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/perl-5.34.1-qxt6o6muxfnjafqnjf2x3kpcts27z4mr
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libpciaccess-0.16-qdz4q24wgopy4sj4w4ohihrxprrpu5ti
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/gettext-0.21-qsdzl4sk475bhco657gw7cckj243vkng
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/openblas-0.3.20-bwqclrb3x73bjlfpynuszvmfg6q5xo4i
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/bison-3.8.2-4zqlk4r44a25lmpciegxrohmrpnrwok5
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/openssl-1.1.1q-pozs2xtnqopa3t2vj5alepgc23bnd36o
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/autoconf-2.69-qpdsd2rojvovfiogujxhnasvtwijaaa4
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/hwloc-2.8.0-ksqpioarjprdxt4iu3fpfe2kkf2gpf7g
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/python-3.9.13-xhlca6jd6sthnktbyephrzabzvilwm47
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/krb5-1.19.3-zuvkygwtqc4dncsx3xnvmugtrxmt465a
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/cmake-3.23.3-zvlnrfxdfcyfbadjke2vpsqjwdcvmshn
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/libevent-2.1.12-nctbfymbundyfeurg5lnzivbwi2hriga
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/automake-1.16.5-3bzqs6vhfrpvbgwoaeqz4n7qedpnxu4u
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-pip-22.1.2-p37eklpulllpabwu57mk6wgjfjcrce5u
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/openssh-9.0p1-cmr5wmidjmxkpccq4yb3bnj5w6m4a37p
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/eigen-3.4.0-enriz6gizxpeuhzygd4bbjibbxuc6g4i
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/metis-5.1.0-5lqb7fnzrlb4duoankpyeazkmq4qe7co
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/pmix-4.1.2-ofhqyazyblgrjhia6dzlral4ks6ucvz3
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/numactl-2.0.14-rykeckz6wf6edsmp6offpic56t5yiln3
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-wheel-0.37.1-426ndprvjh6lfmwmmenysl6ubwc6vn3a
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-setuptools-59.4.0-7tur7wyqt54vronfya2wyxp6isjemcn2
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/openmpi-4.1.4-pxzznkuncjrot5p2qx3mgaj5lo43dc5l
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-pyparsing-3.0.6-662komcsoh63xthfwdfn5ieerwsrs4fa
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-cython-0.29.30-cyoa2zl7hg57nhz5xrrji3k5xo6qmdtc
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/parmetis-4.0.3-y3oytduon4hbpfqx6ghthyqlpzehr5j2
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/hdf5-1.12.2-nu754lhjx7nxgvjsw3d5z5s66th3vknr
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-mpi4py-3.1.2-caxt4bgdlmhszywynbyivkzc4zzyi2pn
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/hypre-2.25.0-bzg45j7covgz6vijyj5gqz7rlw2lm7xn
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-packaging-21.3-lsx3czavzofvebuimdvg5adqh4iqvypb
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-numpy-1.23.2-ntfcwind6lri2av3wxo4ugbqmjbrfdvn
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/superlu-dist-7.2.0-to4hjprloxdb6gsxr54ps2fb33p5u4ig
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/petsc-3.17.4-vdgqtgbg5qr7rqtlrltxibw5i3hprcxl
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/precice-develop-lrr24ctdacxdkvhovynp6hmnfzdr4kfn
==> Installing py-pyprecice-develop-ldru4gpp52oldkclcu2hy7c6zrtmerk2
==> No binary for py-pyprecice-develop-ldru4gpp52oldkclcu2hy7c6zrtmerk2 found: installing from source
==> No patches needed for py-pyprecice
==> py-pyprecice: Executing phase: 'install'
==> py-pyprecice: Successfully installed py-pyprecice-develop-ldru4gpp52oldkclcu2hy7c6zrtmerk2
  Fetch: 2.14s.  Build: 4.21s.  Total: 6.35s.
[+] /opt/spack/opt/spack/linux-ubuntu22.04-x86_64/gcc-11.2.0/py-pyprecice-develop-ldru4gpp52oldkclcu2hy7c6zrtmerk2
root@f386f56476c8:~# spack load py-pyprecice@develop
root@f386f56476c8:~# python -c "import precice"
root@f386f56476c8:~# python -c "import precice; print(precice.__version__)"
0+untagged.1.g87c1084
root@f386f56476c8:~# binprecice  version
2.5.0;no-info [git failed to run];PRECICE_MPICommunication=Y;PRECICE_PETScMapping=Y;PRECICE_PythonActions=N;PRECICE_ENABLE_C=Y;PRECICE_ENABLE_FORTRAN=Y;CXX=GNU;CXXFLAGS= -O2 -g -DNDEBUG;LDFAGS=

https://spack.readthedocs.io/en/latest/command_index.html?highlight=develop#spack-develop

@IshaanDesai
Copy link
Member Author

The failing test will be repaired via #149

Copy link
Member

@BenjaminRodenberg BenjaminRodenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Thanks a lot for dealing with all the trouble @IshaanDesai and @fsimonis!

@IshaanDesai IshaanDesai merged commit 47505e1 into develop Aug 25, 2022
@BenjaminRodenberg BenjaminRodenberg deleted the spack/add-v2.4.0.0 branch March 21, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants