Spack error with cgal and arbox

69 views
Skip to first unread message

yy.wayne

unread,
Feb 22, 2023, 1:42:31 AM2/22/23
to deal.II User Group
I try to install dealii with candi on a cluster for few days but failed. Now I'm dealing with
spack to avoid the conflict compilers. The cluster OS is centos with cascadelake.

The command I use is:
spack install --test=root dealii ^bo...@1.72.0 ^mu...@5.2.0 ^trilinos+superlu-dist~exodus ^mpich %g...@9.3.1

First spack gives error on CGAL: "Could not find the cgal library". The CGAL was installed
through the above command. I believe it's because I didn't enable DEAL_II_HAVE_CXX17, 
but install through candi simply pass CGAL install, not interrupt with and error.

Then I install dealii adding "~cgal" to disable CGAL, while there's arbox error like: 
Snipaste_2023-02-22_14-27-48.png
Snipaste_2023-02-22_14-29-26.png

"is_same_v" is a CXX17 feature I think? I set environment var DEAL_II_HAVE_CXX17 on then in spack. The CGAL error shows again. Have I enable cxx17 wrong? I don't think I have to enable cxx17 since cxx14 works with candi on my own vm machine. 
Snipaste_2023-02-22_14-38-48.png

yy.wayne

unread,
Feb 22, 2023, 2:12:25 AM2/22/23
to deal.II User Group
I set variant "~arborx". There's only ninja warning but installation exit with ERROR. However in spack-build-out.txt every libraries seem connected successfully. Why ninja return an ERROR?
Snipaste_2023-02-22_15-09-51.png
Snipaste_2023-02-22_15-07-33.png

yy.wayne

unread,
Feb 22, 2023, 2:16:40 AM2/22/23
to deal.II User Group
The spacl-build-out.txt with middle content deleted. The original file was too big.
spack-build-out.txt

yy.wayne

unread,
Feb 22, 2023, 7:36:12 AM2/22/23
to deal.II User Group
Since spack is calling error, I install directly with the depending libraries installed by spack.
Deal.II cmake and 'make install' successfully. But shows error when 'make test':

...
An error occurred in line <170> of file </tmp/wyy/spack-stage/spack-stage-dealii-9.4.0-nu4ocb323sfl4apazi7ckpwirpheveen/spack-src/source/lac/sparsity_tools.cc> in function
void dealii::SparsityTools::{anonymous}::partition_metis(const dealii::SparsityPattern&, const std::vector<unsigned int>&, unsigned int, std::vector<unsigned int>&)
The violated condition was:
ierr == 1
Additional information:
An error with error number -3 occurred while calling a METIS function
...

The METIS_DIR was set to metis-5.1.0. I changed METIS_DIR to parmetis, but the error remains.

Besides, I fail to build step1 after this fault installation. cmake passed but make gives following error:
Snipaste_2023-02-22_20-36-58.png

Marco Feder

unread,
Feb 22, 2023, 7:53:24 AM2/22/23
to deal.II User Group
Hi Wayne,

CGAL requires C++17, hence you should add a proper compiler flag (https://github.com/dealii/dealii/wiki/deal.II-in-Spack#compiler-flags) if you want to have it.

Adding cppflags="-std=c++17" should fix that. 

For what concerns your last message, here's a related discussion: https://groups.google.com/g/dealii/c/nodblNqEjd4

Best,
Marco

Bruno Turcksin

unread,
Feb 22, 2023, 8:55:50 AM2/22/23
to deal.II User Group
Hi,

Don't set any variable when using spack. Please post the exact spack command you are using to install deal.II with spack. In general, you want to let spack picks the dependencies for you. I would also advise that you restart from a clean state and remove the configuration files created by spack.

Best,

Bruno

yy.wayne

unread,
Feb 22, 2023, 10:32:11 AM2/22/23
to deal.II User Group
Hi,

Thank for your response. I set -DKOKKOS_DIR for cmake and now "make tests" is good.
I'll see the discussion in  dealii and hdf5 compile problem (google.com).

yy.wayne

unread,
Feb 23, 2023, 12:32:49 AM2/23/23
to deal.II User Group
I followed the first solution in dealii and hdf5 compile problem (google.com) and deal.II codes compiled successfully. I've run several tests in parallel and seems no error.

For someone may have similar problem, these are what I've done:
  1. Install all deal.II dependencies with spack
  2. Build dealii from source rather in spack. The second line in spack-build-out(you generate this file if building deal.II with spack onece) is what spack's cmake configuration for deal.II. I disabled '-G Ninja' cmake and set 'KOKKOS_DIR=/path/to/spack/kokkos' explicitly in cmake configuration.
  3. Follow  dealii and hdf5 compile problem (google.com) to comment some lines in  configure_50_hdf5.cmake

Reply all
Reply to author
Forward
0 new messages