ASPECT installation (or deal.ii compilation) on RED HAT 9 with CRAY Programming Environment

Hi all,

I am having a frustrating issue when installing ASPECT on my institute’s cluster. The OS is Red Hat 9, but the development environment is CRAY Programming Environment, so the compiler commands are different (should use CC instead of mpiccx when compiling C++ codes).

I added these codes to the configuration file of candi (local.cfg) according to the suggestions from one of the technicians in our institute:

DEAL_II_CONFOPTS=“\
-DDEAL_II_WITH_COMPLEX_VALUES=OFF\
-DDEAL_II_WITH_MPI=ON \
-DMPI_CXX_COMPILER=CC\
-DMPI_C_COMPILER=cc\
-DMPI_Fortran_COMPILER=ftn”

And some settings on the global shell:

module switchPrgEnv-intel/8.6.0 PrgEnv-gnu/8.6.0
export CRAYPE_LINK_TYPE=dynamic
export CC=cc
export CXX=CC
export FC=ftn
export FF=ftn

But still the configuration of deal.ii failed…I got stuck here for quite a while and cannot figure out why. Could anyone tell me what to do with it?

Thanks in advance!

Hi Reverie,

Welcome to the community!

I understand how frustrating it can be to troubleshoot these types of issues. Based on your description and configuration files, I’d like to share some suggestions, referencing the discussion from the ASPECT installation within SUSE distribution:

  1. Adjust Candi Configuration:
    You could try modifying the candi.cfg file or the dealii.package file to ensure the correct MPI compilers are being used. For example:

    Option 1: Modify candi.cfg

    DEAL_II_CONFOPTS="-D DEAL_II_WITH_MPI:BOOL=ON \  
    -D CMAKE_C_COMPILER=mpicc \  
    -D CMAKE_CXX_COMPILER=mpicxx"  
    

    Option 2: Modify dealii.package

    CONFOPTS=" \  
    ... \  
    -D DEAL_II_WITH_MPI:BOOL=ON \  
    -D CMAKE_C_COMPILER=mpicc \  
    -D CMAKE_CXX_COMPILER=mpicxx \  
    ..."  
    
  2. Compile on Compute Nodes:
    If the login and compute nodes on your cluster support different compiler flags or environments, make sure to compile directly on the compute nodes instead of the login node.

  3. Check Logs for Errors:
    If neither of the above solutions works, it would be helpful to review the detailed logs and configuration options. Could you share the following files?

    • The build log file: /path/tmp/build/deal.II-v9.7.0/candi_build.log
    • The configuration file: candi_configure

    These logs will help to pinpoint the root cause of the configuration failure more effectively.

Let us know how it goes, and feel free to provide additional details if needed. Good luck!

Best,
Ninghui Tian

Hi all,

I wanted to follow up on this thread, as Reverie is currently unable to reply directly. We’re friends and have managed to resolve the issue privately, but I thought it would be helpful to share the solution here for anyone encountering a similar problem.

The main issue was caused by the following line in the configuration file under deal.II-toolchain/platforms/contributed/cray.platform:

-D MPI_CXX_LIBRARIES="${MPICH_DIR}/lib/libmpichcxx.so;${MPICH_DIR}/lib/libmpich.so"

In the newer versions of MPICH, libmpichcxx.so has been deprecated and removed. The solution was to simply update the line to exclude libmpichcxx.so:

-D MPI_CXX_LIBRARIES="${MPICH_DIR}/lib/libmpich.so"

However, to avoid relying on outdated library names altogether, a better approach is to use the Cray compiler wrappers (cc, CC, and ftn) to automatically detect MPI dependencies. This adjusted configuration worked perfectly in our case:

-D CMAKE_C_COMPILER=${CC:-cc} \
-D CMAKE_CXX_COMPILER=${CXX:-CC} \
-D CMAKE_Fortran_COMPILER=${FC:-ftn} \
-D MPI_C_COMPILER=${CC:-cc} \
-D MPI_CXX_COMPILER=${CXX:-CC} \
-D MPI_Fortran_COMPILER=${FC:-ftn}

By leveraging the Cray compiler wrappers, you ensure compatibility with the Cray Programming Environment while avoiding potential issues with hardcoded paths or deprecated libraries.

I hope this helps others facing similar challenges.

On a related note, Reverie wanted to ask if there’s a way to understand why they were muted and whether someone could kindly assist in lifting the restriction. We’d greatly appreciate any guidance on this.

Best,
Ninghui Tian

Hi

Thanks for both contributing to the forum and bringing the issue with Reverie’s account to my attention. This actions was taken by Discourse AI and has been corrected.

Reverie should be able to post now.

best,
-Lorraine

1 Like

@ljhwang Thank you so much for fixing this. And thanks again to @tiannh7 for your timely help!