seacas: -qfixed must be applied when building with XL Fortran
Created by: djfitzgerald
@trilinos/seacas
Expectations
Default cmake configuration should produce a version of seacas that builds under IBM XL Fortran
Current Behavior
The version of seacas produced by the default cmake configuration contains a number of errors of the form 1515-019 (S) Syntax is incorrect
and 1515-002 (S) END card is missing
.
Motivation and Context
My team was working with LLNL to assist in their testing the installation of Trilinos under Spack. We developed a patch that Spack automatically applies to all versions of the Trilinos source code beginning with 12.10.1 when building with the XL compiler suite (or at least using XL Fortran). This patch adds the -qfixed
option to the XL compiler line in pacakges/seacas/cmake/FortranSettings.cmake
. As this is patching what appears to be a Trilinos problem, I feel that this fix should be made into the Trilinos source code.
Definition of Done
When attempting to compile Trilinos with the XL compiler suite, seacas should compile successfully.
Possible Solution
See attached patch file under "Additional Information" section
Steps to Reproduce
- On a test system, install version the IBM XL compiler suite, IBM ESSL, LAPACK 3.4.2, and Spectrum MPI
- Download a *.zip archive of the Trilinos
develop
branch through GitHub withwget https://github.com/trilinos/Trilinos/archive/develop.zip
- Unzip the archive:
unzip develop.zip
- FTP a copy of the patch xlf_seacas.patch to my home directory.
- Create an installation directory for Trilinos:
cd ~/ ; mkdir Trilinos
- Download and installed the following Trilinos dependencies into your home directory:
a. cmake-3.11.3
b. hdf5-1.10.2, installed into
$HOME/hdf5
and symlinked into$HOME/hdf5-1.10.2/hdf5
) c. netcdf-4.6.1, configured with the commandCPPFLAGS=-I$HOME/hdf5/include LDFLAGS=-L$HOME/hdf5/lib ./configure --prefix=$HOME/netcdf
-
cd
into$HOME/Trilinos
- Issue the following
cmake
command:
/$HOME/cmake-3.11.3/bin/cmake \
-DCMAKE_C_COMPILER=/usr/bin/xlc_r \
-DCMAKE_CXX_COMPILER=/usr/bin/xlc++_r \
-DCMAKE_Fortran_COMPILER=/usr/bin/xlf2008_r \
-DTPL_ENABLE_MPI=ON \
-DTPL_BLAS_LIBRARIES='/opt/ibmmath/essl/6.1/lib64/libessl.so;/opt/ibmmath/essl/6.1/lib64/libessl6464.so;/opt/ibmmath/essl/6.1/lib64/libesslsmp6464.so;/opt/ibmmath/essl/6.1/lib64/libesslsmpcuda.so;/opt/ibmmath/essl/6.1/lib64/libesslsmp.so' \
-DTPL_LAPACK_LIBRARIES='/usr/lib64/liblapacke.so.3.4.2;/usr/lib64/liblapack.so.3.4.2' \
-DNetcdf_LIBRARY_DIRS='$HOME/netcdf/lib' \
-DTPL_Netcdf_INCLUDE_DIRS='$HOME/netcdf/include' \
-DMPI_BASE_DIR=/opt/ibm/spectrum_mpi \
-DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DTPL_ENABLE_Matio=OFF \
-DTPL_ENABLE_X11=OFF \
-DTrilinos_ENABLE_TESTS:BOOL=ON \
-DTrilinos_ENABLE_EXAMPLES:BOOL=ON \
-DTrilinos_ENABLE_CXX11:BOOL=ON \
-DTrilinos_CXX11_FLAGS:STRING=-std=gnu++11 \
-DCMAKE_INSTALL_PREFIX=$HOME/Trilinos \
$HOME/Trilinos-fix-2781
- Execute
export INCLUDE_PATH=$INCLUDE_PATH:/opt/ibm/spectrum_mpi/include/:$HOME/netcdf/include/
- Execute
make -j install
- Verify that seacas was unable to compile because of the reasons described above.
Your Environment
- Have confirmed it with Trilinos 12.12.1 from git (SHA ecd4606fa332212433c98bf950a69cc7), also with newer Trilinos versions (including recent
develop
branch) - Operating system was RHEL 7.4 on an IBM Power9 system.
- IBM XL 16.1 compiler suite
-
cmake
3.11.3 -
hdf5
1.10.2 -
netcdf
4.6.1 - LAPACK 3.4.2
- IBM Spectrum MPI
Related Issues
- Related to #2781 (closed)
Additional Information
- Build log file: build.log
- Patch to fix: xlf_seacas.patch.txt