FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
731 stars 177 forks source link

An issue about using spack to install fenicsx #2497

Closed jiangzhangze closed 1 year ago

jiangzhangze commented 1 year ago

Here are the commands I use: git clone https://github.com/spack/spack.git . ./spack/share/spack/setup-env.sh spack env create fenicsx-env spack env activate fenicsx-env spack add py-fenics-dolfinx cflags="-O3" fflags="-O3" spack compiler find spack install

And here are the error: `==> Installing intel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz ==> intel-tbb exists in binary cache but with different hash ==> No binary for intel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz found: installing from source ==> Using cached archive: /home/jzz/spack/var/spack/cache/_source-cache/archive/2c/2cae2a80cda7d45dc7c072e4295c675fff5ad8316691f26f40539f7e7e54c0cc.tar.gz ==> No patches needed for intel-tbb ==> intel-tbb: Executing phase: 'cmake' ==> intel-tbb: Executing phase: 'build' ==> Error: ProcessError: Command exited with status 2: 'make' '-j1'

4 errors found in build log: 257 from /tmp/root/spack-stage/jzz/spack-stage-intel-t bb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-src/src/tbb/../. ./include/tbb/../oneapi/tbb/concurrent_unordered_map.h:21, 258 from /tmp/root/spack-stage/jzz/spack-stage-intel-t bb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-src/src/tbb/../. ./include/tbb/concurrent_unordered_map.h:17, 259 from /tmp/root/spack-stage/jzz/spack-stage-intel-t bb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-src/test/tbb/tes t_concurrent_unordered_map.cpp:22: 260 /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/basic_string.h: In instantiation of 'class std::basic_string<char, std::char_traits

, tbb::detail::d1::tbb_allocator >': 261 /tmp/root/spack-stage/jzz/spack-stage-intel-tbb-2021.7.0-na7fhxqgmy djud6qn3uxpm2mzk6pp4kz/spack-src/test/common/concurrent_associative _common.h:964:29: required from 'void test_map_specific_types() [ with Checker = UnorderedMapTypesTester]' 262 /tmp/root/spack-stage/jzz/spack-stage-intel-tbb-2021.7.0-na7fhxqgmy djud6qn3uxpm2mzk6pp4kz/spack-src/test/tbb/test_concurrent_unordered _map.cpp:97:54: required from here >> 263 /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/basic_string.h:3 150:57: error: no type named 'size_type' in 'std::basic_string, tbb::detail::d1::tbb_allocator >::_ CharT_alloc_type' {aka 'std::allocator_traits >::rebind_alloc'} 264 3150 | typedef typename _CharT_alloc_type::size_type siz e_type; 265 | ^~~ ~~~~~~ 266 compilation terminated due to -Wfatal-errors. >> 267 make[2]: *** [test/CMakeFiles/test_concurrent_unordered_map.dir/tbb /test_concurrent_unordered_map.cpp.o] Error 1 268 make[2]: Leaving directory `/tmp/root/spack-stage/jzz/spack-stage-i ntel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-build-na7f hxq' >> 269 make[1]: *** [test/CMakeFiles/test_concurrent_unordered_map.dir/all ] Error 2 270 make[1]: Leaving directory `/tmp/root/spack-stage/jzz/spack-stage-i ntel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-build-na7f hxq' >> 271 make: *** [all] Error 2 See build log for details: /tmp/root/spack-stage/jzz/spack-stage-intel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz/spack-build-out.txt ==> Warning: Skipping build of xtensor-0.24.1-4kyqnb5psxilxmgxaxch3sbbte2x2dqw since intel-tbb-2021.7.0-na7fhxqgmydjud6qn3uxpm2mzk6pp4kz failed ==> Warning: Skipping build of fenics-dolfinx-0.5.1-mcvoeggdrotril2r5xierzh2324gy6hu since xtensor-0.24.1-4kyqnb5psxilxmgxaxch3sbbte2x2dqw failed ==> Warning: Skipping build of py-fenics-dolfinx-0.5.1-a3h3ikqpizu6fafkg7qaxhe4rxjckthe since fenics-dolfinx-0.5.1-mcvoeggdrotril2r5xierzh2324gy6hu failed [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/fenics-basix-0.5.1-wewd5p55fmtcrry3onj7soqrvvb55ezp [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/xsimd-8.1.0-5wyzqt7wek3d3btxx347o6l2d4dgwrks [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/pmix-4.1.2-7evfnj7bupkwpv2n5nwqe4jpqvqfdakg [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/openssh-9.1p1-et7vcymi45czd5vyizlul6h6ajnip6c3 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-wheel-0.37.1-2rzwy7vmhvk3urokvqqzw3gdkrh4hpg4 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-setuptools-63.0.0-ngyw2yvvp42kp5aasu5niqxjmbj3y4pb [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/openmpi-4.1.4-beeap2njsxu4ljokqauismz3jtnj2lkg [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-pycparser-2.21-xj5d6jgkxtzi2npn55k5gzhelpstyrdw [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-pybind11-2.10.1-b7ovu6n25bfq7qivoaj4ho3fife3gxe6 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-cython-0.29.32-yl76rjizk23wh6wt4ntj4q42raeus4an [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/hdf5-1.12.2-pvegraf7za7v5eim2ojtzy66a34vzo5s [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/hypre-2.27.0-xe2si7ljbny5mynk6cnn4vodko3h46en [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/parmetis-4.0.3-7jkb3njroebv37lcig7x74zuc6ovtjxz [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-mpi4py-3.1.4-wp4jupxzqlao7ihifecrtgqgwp4xiqbe [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-cffi-1.15.1-h7nim5nyzfdknggbcd46vvp6hffkaf2h [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-numpy-1.24.0-upor5yuoif63lm3xqqevwcsotqjx5rny [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/superlu-dist-8.1.2-32xbqn2qdwdg47lwy5qrnvnnjiu54rch [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-fenics-basix-0.5.1-77ii2xpm7u66lpzfrm4xqwkxytrwouz4 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-fenics-ufl-2022.2.0-t6hvihpmxrhv73cmdkjqwumpnpprfw76 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/petsc-3.18.2-3q62uhdszxk5nmbukxndktgbusgctvn7 [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-fenics-ffcx-0.5.0.post0-k2ei5erjkpb5wr3hbkkl2hhuc3uqaz6e [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-10.2.1/py-petsc4py-3.18.2-mq3mkwgd2kl6u6nw32q7kyiqgmojekbj ==> Error: py-fenics-dolfinx-0.5.1-a3h3ikqpizu6fafkg7qaxhe4rxjckthe: Package was not installed ==> Error: py-fenics-dolfinx-0.5.1-a3h3ikqpizu6fafkg7qaxhe4rxjckthe: Package was not installed ==> Error: Installation request failed. Refer to reported errors for failing package(s). ` In addtion,I install fenicsx for Centos7.
adeebkor commented 1 year ago

@jiangzhangze

Can you try using spack add py-fenics-dolfinx@main instead. I find that this works for me.

jiangzhangze commented 1 year ago

Hi @adeebkor, unlucky this doesn't work for me :( , these are the error info: `==> Installing py-fenics-ufl-main-3is6lyv6z3wtr3o6l3jn7z7ronico22g ==> py-fenics-ufl exists in binary cache but with different hash ==> No binary for py-fenics-ufl-main-3is6lyv6z3wtr3o6l3jn7z7ronico22g found: installing from source fatal: unable to access 'https://github.com/FEniCS/ufl.git/': TCP connection reset by peer ==> Error: FetchError: All fetchers failed for spack-stage-py-fenics-ufl-main-3is6lyv6z3wtr3o6l3jn7z7ronico22g

/home/jzz/spack/lib/spack/spack/package_base.py:1448, in do_fetch: 1445 1446 self.stage.create() 1447 err_msg = None if not self.manual_download else self.download_instr

1448 start_time = time.time() 1449 self.stage.fetch(mirror_only, err_msg=err_msg) 1450 self._fetch_time = time.time() - start_time 1451

==> Installing petsc-3.18.2-ryc7k7xacap4nmaezxtnjbcjrve3na4z ==> petsc exists in binary cache but with different hash ==> No binary for petsc-3.18.2-ryc7k7xacap4nmaezxtnjbcjrve3na4z found: installing from source ==> Using cached archive: /home/jzz/spack/var/spack/cache/_source-cache/archive/4e/4e055f92f3d5123d415f6f3ccf5ede9989f16d9e1f71cc7998ad244a3d3562f4.tar.gz ==> No patches needed for petsc ==> petsc: Executing phase: 'configure' ==> petsc: Executing phase: 'build' ==> petsc: Executing phase: 'install' ==> petsc: Successfully installed petsc-3.18.2-ryc7k7xacap4nmaezxtnjbcjrve3na4z Stage: 1.76s. Configure: 53.26s. Build: 7m 1.30s. Install: 4.43s. Total: 8m 1.69s [+] /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-11.2.1/petsc-3.18.2-ryc7k7xacap4nmaezxtnjbcjrve3na4z ==> Installing py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht ==> py-petsc4py exists in binary cache but with different hash ==> No binary for py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht found: installing from source ==> Using cached archive: /home/jzz/spack/var/spack/cache/_source-cache/archive/1b/1b6761b02ec6ef9099e2a048e234065c1c4096ace01e52e353624b80417cceec.tar.gz ==> Applied patch /home/jzz/spack/var/spack/repos/builtin/packages/py-petsc4py/ldshared.patch ==> py-petsc4py: Executing phase: 'install' ==> Error: ProcessError: Command exited with status 1: '/home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-11.2.1/python-3.10.8-i3zcfokwe3yo4p5w4vd6clrfnozbktfv/bin/python3.10' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-11.2.1/py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht' '.'

2 errors found in build log: 134 Failed to build petsc4py 135 Installing collected packages: petsc4py 136 Created temporary directory: /tmp/pip-record-2t7s8pi8 137 Running setup.py install for petsc4py: started 138 Running command Running setup.py install for petsc4py 139 running install

140 /home/jzz/spack/opt/spack/linux-centos7-skylake/gcc-11.2.1/py-setup tools-63.0.0-j4dkdjxmnchzwwl4gwi4x2vlhaezdnqb/lib/python3.10/site-p ackages/setuptools/command/install.py:34: SetuptoolsDeprecationWarn ing: setup.py install is deprecated. Use build and pip and other st andards-based tools. 141 warnings.warn( 142 running build 143 running build_src 144 running build_py 145 creating build 146 creating build/lib.linux-x86_64-cpython-310

 ...

 221          setup_py_code = "from setuptools import setup; setup()"
 222    
 223      exec(compile(setup_py_code, filename, "exec"))
 224      '"'"''"'"''"'"' % ('"'"'/tmp/root/spack-stage/jzz/spack-stage-py-
        petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht/spack-src/setup.py
        '"'"',), "<pip-setuptools-caller>", "exec"))' install --record /tmp
        /pip-record-2t7s8pi8/install-record.txt --single-version-externally
        -managed --prefix /home/jzz/spack/opt/spack/linux-centos7-skylake/g
        cc-11.2.1/py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht --com
        pile --install-headers /home/jzz/spack/opt/spack/linux-centos7-skyl
        ake/gcc-11.2.1/py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht/
        include/python3.10/petsc4py
 225      cwd: /tmp/root/spack-stage/jzz/spack-stage-py-petsc4py-3.18.2-ted
        ivvfwzgteyaxvs73umz7mnh5ouzht/spack-src/
 226      Running setup.py install for petsc4py: finished with status 'erro
        r'

227 error: legacy-install-failure 228
229 × Encountered error while trying to install package. 230 ╰─> petsc4py 231
232 note: This is an issue with the package mentioned above, not pip. 233 hint: See above for output from the failure.

See build log for details: /tmp/root/spack-stage/jzz/spack-stage-py-petsc4py-3.18.2-tedivvfwzgteyaxvs73umz7mnh5ouzht/spack-build-out.txt

==> Error: gcc-12.2.0-5m7iynoyhwg2fi7ljsl2vmfy3ajqchr7: ProcessError: Command exited with status 2: 'make' '-j1' 'V=1' ==> Error: py-fenics-dolfinx-main-7bllxlssakx6nckwu3imz7eqi3au6ryu: Package was not installed ==> Error: gcc-12.2.0-5m7iynoyhwg2fi7ljsl2vmfy3ajqchr7: Package was not installed ==> Updating view at /home/jzz/spack/var/spack/environments/fenics-install/.spack-env/view ==> Error: Installation request failed. Refer to reported errors for failing package(s). `

jhale commented 1 year ago

These errors from Spack don't appear to be in the FEniCSx packages.

This error might be caused by a poor internet connection:

fatal: unable to access 'https://github.com/FEniCS/ufl.git/': TCP connection reset by peer