Installing candi in CentOS8

Hi all,

I am about to install the ASPECT on a server (CentOS8) in our institute without root.

However, while installing the candi, I did not see the CentOS8 platform is supported by the candi. May I kindly ask, what I should do? Shall I use the platform document CentOS7 in the ‘/platforms/supported/’, or something?

Many thanks for your help, and have a nice day!
Regards,
Yueyang

Hi Yueyang,

The best of course of action would be to try the CentOS7 platform file. With some luck this will just work. You can increase the chances of success by only installing the minimally necessary packages via candi, i.e. disable every PACKAGE variable inside candi.cfg except for p4est, trilinos, and hdf5.

Please report back how this goes, then we can add CentOS8 as supported platform or make adjustments as necessary.

Best,
Rene

Hi Rene,

thanks a lot for your answer! I just tried your suggestion and use the minimum necessary to install the candi. Unfortunately, it failed. Below are the error messages that I copied from my terminal.

[yxia@landinian candi]$ ./candi.sh -p /home/yxia/ASPECT_PROJ/cust_bin --platform=deal.II-toolchain/platforms/supported/centos7.platform 

*******************************************************************************
candi tries now to download, configure, build and install:

Project:  deal.II-toolchain
Platform: deal.II-toolchain/platforms/supported/centos7.platform

-------------------------------------------------------------------------------
Downloading files to:     ~/ASPECT_PROJ/cust_bin/tmp/src
Unpacking files to:       ~/ASPECT_PROJ/cust_bin/tmp/unpack
Building packages in:     ~/ASPECT_PROJ/cust_bin/tmp/build
Installing packages in:   ~/ASPECT_PROJ/cust_bin
Package configuration in: ~/ASPECT_PROJ/cust_bin/configuration

-------------------------------------------------------------------------------
Number of (at most) build processes to use: JOBS=1

-------------------------------------------------------------------------------
Packages:
once:cmake
load:dealii-prepare
once:hdf5
once:p4est
once:trilinos

-------------------------------------------------------------------------------
Currently loaded modulefiles:
No modules loaded


--------------------------------------------------------------------------------
Compiler Variables:

CC  variable not set. Please set it with $export CC  = <(MPI) C compiler>
CXX variable not set. Please set it with $export CXX = <(MPI) C++ compiler>
FC  variable not set. Please set it with $export FC  = <(MPI) F90 compiler>
FF  variable not set. Please set it with $export FF  = <(MPI) F77 compiler>

One or multiple compiler variables (CC,CXX,FC,FF) are not set.
Please read your platform information above carefully, how you get those
compilers installed and set up! Usually the values should be:
CC=mpicc, CXX=mpicxx, FC=mpif90, FF=mpif77
It is strongly recommended to set them to guarantee the same compilers for all
dependencies.

--------------------------------------------------------------------------------
Once ready, hit enter to continue!



*******************************************************************************
candi tries now to download, configure, build and install:

Project:  deal.II-toolchain
Platform: deal.II-toolchain/platforms/supported/centos7.platform

Fetching cmake 3.20.5
Trying to download https://tjhei.info/candi-mirror/cmake-3.20.5-linux-x86_64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   356  100   356    0     0    944      0 --:--:-- --:--:-- --:--:--   944
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Trying to download https://cecas.clemson.edu/dealii/mirror/cmake-3.20.5-linux-x86_64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Trying to download https://cmake.org/files/v3.20/cmake-3.20.5-linux-x86_64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41.5M  100 41.5M    0     0  16.2M      0  0:00:02  0:00:02 --:--:-- 16.2M
Verifying cmake-3.20.5-linux-x86_64.tar.gz
cmake-3.20.5-linux-x86_64.tar.gz: OK(md5)
Unpacking cmake-3.20.5-linux-x86_64.tar.gz
Building cmake 3.20.5
Info: cmake has forced BUILDCHAIN=ignore.
Loading dealii-prepare
Fetching hdf5 1.10.7
Trying to download https://tjhei.info/candi-mirror/hdf5-1.10.7.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   342  100   342    0     0    897      0 --:--:-- --:--:-- --:--:--   895
100 11.8M  100 11.8M    0     0  5350k      0  0:00:02  0:00:02 --:--:-- 11.8M
Verifying hdf5-1.10.7.tar.gz
hdf5-1.10.7.tar.gz: OK(md5)
Unpacking hdf5-1.10.7.tar.gz
Building hdf5 1.10.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking shell variables initial values... done
checking if basename works... yes
checking if xargs works... yes
checking for cached host... none
checking for config x86_64-unknown-linux-gnu... no
checking for config x86_64-unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config unknown-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-linux-gnu... no
checking for config x86_64-unknown... no
checking for config linux-gnu... found
compiler 'g++' is GNU g++-8.5.0
checking for config /home/yxia/ASPECT_PROJ/cust_bin/tmp/unpack/hdf5-1.10.7/config/site-specific/host-landinian... no
checking for clang sanitizer checks... checking build mode... production
checking for gcc... mpicc
checking whether the C compiler works... no
configure: error: in `/home/yxia/ASPECT_PROJ/cust_bin/tmp/build/hdf5-1.10.7':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failure with exit status: 77
Exit message: There was a problem configuring hdf5 1.10.7.
[yxia@landinian candi]$ 

So, do you think the OS version is the main problem? I follow the install instruction from the latest version of the online manual.

Many thanks for your help, and please have a nice day!

Best,
Yueyang

Hi Yueyang,
I also tried to install the ASPECT on a server, but had the same problem as you. Have you solved the problem now?

Best,
Yingjie

Hi Yingjie,

I did not solve that problem and gave up installing that in our CentOS server… I am sorry…

But it would be nice of you if you let me know when you make it. :slight_smile:

Good luck~

Best,
Yueyang

All:
at the end of the day, the following message shows what the problem is:

We can’t know why the compiler isn’t usable, but you can probably go into the directory where configure is being executed and there should be a log file in which configure records what command it was trying to execute, and what error it encountered. What you see on the screen is only that an error occurred, but not what the error was. We would need to know what that error was to tell why HDF5 could not be configured.

Best
W.

Sorry for not getting back to your first message, I must have missed your reply. In addition to Wolfgang’s suggestion I also want to point out the following candi output that you posted:

--------------------------------------------------------------------------------
Compiler Variables:

CC  variable not set. Please set it with $export CC  = <(MPI) C compiler>
CXX variable not set. Please set it with $export CXX = <(MPI) C++ compiler>
FC  variable not set. Please set it with $export FC  = <(MPI) F90 compiler>
FF  variable not set. Please set it with $export FF  = <(MPI) F77 compiler>

One or multiple compiler variables (CC,CXX,FC,FF) are not set.
Please read your platform information above carefully, how you get those
compilers installed and set up! Usually the values should be:
CC=mpicc, CXX=mpicxx, FC=mpif90, FF=mpif77
It is strongly recommended to set them to guarantee the same compilers for all
dependencies.

also, you should have gotten the following output (at least I get it when I use the centos platform file):

 CentOS 7

 This build script assumes that you have several packages already
 installed via CentOS's yum using the following command:

 > sudo yum install patch svn git wget \
 @development-tools gcc-c++ cmake \
 centos-release-scl devtoolset-9 \
 openmpi openmpi-devel \
 patch \
 libtool libtool-ltdl libtool-ltdl-devel \
 lua lua-devel \
 blas blas-devel lapack lapack-devel \
 doxygen graphviz graphviz-devel qt-devel \
 gmp-devel

 Be sure to switch to the recent compilers with

 > scl enable devtoolset-9 bash

 Please load the 'openmpi' compiler with

 > module load mpi/openmpi-x86_64

 and then set the compiler enviroment variables to

 > export CC=mpicc; export CXX=mpicxx; export FC=mpif90; export FF=mpif77

 before you continue!

So the important part would be to first figure out if you have all the necessary compilers and packages installed that candi needs and then follow the instructions above.

Alternatively, if your system has docker installed, I would recommend taking a look at the docker container for ASPECT (instructions in the ASPECT manual). That would save you the trouble of compiling the code yourself.

Best,
Rene

Hi Wolfgang,

Here are the configure records for the above HDF5 installation problem.
I would be very grateful if you could help me out with this!

Best,
Yingjie

candi_configure.log (1.5 KB)
config.log (37.7 KB)

Yingjie,
the error message says this:

/home/wyj/ASPECT/candi/tmp/unpack/hdf5-1.10.8/configure: line 4755: mpicc: command not found

It seems like you do not have MPI installed on that system, or if it is, you have not loaded a module that provides an MPI compiler.

Best
W.

Wolfgang,
Thank you for your suggestion.I have changed the PATH of mpicc and fixed this problem, but I encountered a new problem when compiling p4est.
The error messages and configure records are shown as follows:

*******************************************************************************
This is candi (compile and install)

Project: deal.II-toolchain: Found configuration.
using ./deal.II-toolchain/platforms/supported/centos7.platform.

WARNING: could not determine your Operating System Type (assuming linux)
Operating System Type detected as: linux
Dynamic shared library file extension detected as: *.so

-------------------------------------------------------------------------------
Please read carefully your operating system notes below!

 CentOS 7

 This build script assumes that you have several packages already
 installed via CentOS's yum using the following command:

 > sudo yum install patch svn git wget \
 @development-tools gcc-c++ cmake \
 centos-release-scl devtoolset-9 \
 openmpi openmpi-devel \
 patch \
 libtool libtool-ltdl libtool-ltdl-devel \
 lua lua-devel \
 blas blas-devel lapack lapack-devel \
 doxygen graphviz graphviz-devel qt-devel \
 gmp-devel

 Be sure to switch to the recent compilers with

 > scl enable devtoolset-9 bash

 Please load the 'openmpi' compiler with

 > module load mpi/openmpi-x86_64

 and then set the compiler enviroment variables to

 > export CC=mpicc; export CXX=mpicxx; export FC=mpif90; export FF=mpif77

 before you continue!

--------------------------------------------------------------------------------
Please make sure you've read the instructions above and your system
is ready for installing deal.II-toolchain.
If not, please abort the installer by pressing <CTRL> + <C> !
Then copy and paste these instructions into this terminal.

Once ready, hit enter to continue!



*******************************************************************************
candi tries now to download, configure, build and install:

Project:  deal.II-toolchain
Platform: deal.II-toolchain/platforms/supported/centos7.platform

-------------------------------------------------------------------------------
Downloading files to:     ~/software/INSTALL/candi/tmp/src
Unpacking files to:       ~/software/INSTALL/candi/tmp/unpack
Building packages in:     ~/software/INSTALL/candi/tmp/build
Installing packages in:   ~/software/INSTALL/candi
Package configuration in: ~/software/INSTALL/candi/configuration

-------------------------------------------------------------------------------
Number of (at most) build processes to use: JOBS=10

-------------------------------------------------------------------------------
Packages:
once:cmake
load:dealii-prepare
once:hdf5
once:p4est
once:trilinos
dealii

-------------------------------------------------------------------------------
Currently loaded modulefiles:
Currently Loaded Modulefiles:
  1) GMT/6.4.0           2) miniconda3/4.12.0


--------------------------------------------------------------------------------
Compiler Variables:

CC  = /home/software/openmpi/3.1.4/bin/mpicc
CXX variable not set, but default mpicxx found.
CXX = //home/software/openmpi/3.1.4/bin/mpicxx
FC  variable not set, but default mpif90 found.
FC  = //home/software/openmpi/3.1.4/bin/mpif90
FF  variable not set, but default mpif77 found.
FF  = //home/software/openmpi/3.1.4/bin/mpif77

--------------------------------------------------------------------------------
Once ready, hit enter to continue!



*******************************************************************************
candi tries now to download, configure, build and install:

Project:  deal.II-toolchain
Platform: deal.II-toolchain/platforms/supported/centos7.platform

Skipping cmake
Loading dealii-prepare
Skipping hdf5
Fetching p4est 2.3.2
Verifying p4est-2.3.2.tar.gz
p4est-2.3.2.tar.gz: OK(sha256)
p4est-2.3.2.tar.gz already downloaded and verified.
Unpacking p4est-2.3.2.tar.gz
Building p4est 2.3.2
CFLAGS_FAST: -O2
CFLAGS_DEBUG: -O0 -g

This script tries configure and build the p4est library.
Build FAST: /home/wangyj/software/INSTALL/candi/tmp/build/p4est-2.3.2/FAST
Build DEBUG: /home/wangyj/software/INSTALL/candi/tmp/build/p4est-2.3.2/DEBUG
Install FAST: /home/wangyj/software/INSTALL/candi/p4est-2.3.2/FAST
Install DEBUG: /home/wangyj/software/INSTALL/candi/p4est-2.3.2/DEBUG
Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG
See output in files .../config.output and .../make.output

Build FAST version in /home/wangyj/software/INSTALL/candi/tmp/build/p4est-2.3.2/FAST
which: no  in (/home/wangyj/software/INSTALL/candi/cmake-3.20.5-linux-x86_64/bin://home/software/openmpi/3.1.4/bin:/home/software/GMT/6.4.0/bin:/home/wangyj/.conda/envs/wangpy/bin:/home/software/miniconda3/4.12.0/condabin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/wangyj/software/ParaView-5.11.0-MPI-Linux-Python3.9-x86_64/bin:/home/wangyj/.local/bin:/home/wangyj/bin)
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/configure: line 4056: test: argument expected
configure: WARNING: Static source code checker splint not found
which: no  in (/home/wangyj/software/INSTALL/candi/cmake-3.20.5-linux-x86_64/bin://home/software/openmpi/3.1.4/bin:/home/software/GMT/6.4.0/bin:/home/wangyj/.conda/envs/wangpy/bin:/home/software/miniconda3/4.12.0/condabin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/wangyj/software/ParaView-5.11.0-MPI-Linux-Python3.9-x86_64/bin:/home/wangyj/.local/bin:/home/wangyj/bin)
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/sc/configure: line 4015: test: argument expected
configure: WARNING: Static source code checker splint not found
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/sc/libb64/cencode.c: In function ‘base64_encode_block’:
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/sc/libb64/cencode.c:51:9: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
         ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/sc/libb64/cdecode.c: In function ‘base64_decode_block’:
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/sc/libb64/cdecode.c:53:9: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
 #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
         ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c: In function ‘p8est_connectivity_new_torus’:
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:930:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int i=0; i<num_vertices*3; ++i)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:930:5: note: use option -std=c99 or -std=gnu99 to compile your code
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:947:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:949:7: error: ‘for’ loop initial declarations are only allowed in C99 mode
       for (int j=0; j<nbItems; ++j)
       ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:979:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1049:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1106:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1194:14: error: redefinition of ‘iSegment’
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
              ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1106:14: note: previous definition of ‘iSegment’ was here
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
              ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1194:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1248:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int i = 0; i<=nEdgesPS*nSegments; ++i)
     ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1255:14: error: redefinition of ‘iSegment’
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
              ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1194:14: note: previous definition of ‘iSegment’ was here
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
              ^
/home/wangyj/software/INSTALL/candi/tmp/unpack/p4est-2.3.2/src/p8est_connectivity.c:1255:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int iSegment=0; iSegment<nSegments; ++iSegment)
     ^
make[2]: *** [src/libp4est_la-p8est_connectivity.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Error in make p4est

config.log (99.9 KB)

Best,
Yingjie

I solved the above problem by changing the version of p4est to 1.1 in /candi/deal.II-toolchain/packages/p4est.package. However, A new error occurred while compiling dealii:

-- Include /home/wangyj/software/INSTALL/candi/tmp/unpack/deal.II-v9.4.1/cmake/setup_compiler_flags_gnu.cmake
CMake Error at cmake/setup_compiler_flags_gnu.cmake:25 (MESSAGE):
  

  deal.II requires support for features of C++14 that are not present in

  versions of GCC prior to 5.0.
Call Stack (most recent call first):
  cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
  cmake/setup_compiler_flags.cmake:113 (VERBOSE_INCLUDE)
  cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
  CMakeLists.txt:106 (VERBOSE_INCLUDE)


-- Configuring incomplete, errors occurred!
See also "/home/wangyj/software/INSTALL/candi/tmp/build/deal.II-v9.4.1/CMakeFiles/CMakeOutput.log".
Failure with exit status: 1
Exit message: There was a problem configuring dealii v9.4.1.

I have updated gcc version but the error still exists. Do you know how to fix it ?
CMakeOutput.log (89.5 KB)

Best,
Yingjie

Yingjie:
The cmake output you attach shows that you are using GCC 4.8.5. That compiler was released in 2015, quite a long time ago. You will need something newer than that.

The fact that your compiler is so old is also the cause for the earlier p4est compilation problem you had.
Best
W.

Hi all,
My colleague and I managed to install ASPECT on a Centos 8 cluster recently. I attach a document which specifies the steps we took to do so. We are not experts but we hope it helps.
Best,
Pedro
Instructions to install ASPECT on a Centos8 cluster.pdf (98.8 KB)
Vagrantfile.txt (593 Bytes)