IffGit has a new shared runner for building Docker images in GitLab CI. Visit https://iffgit.fz-juelich.de/examples/ci-docker-in-docker for more details.

Commit aeb73dc0 authored by Daniel Wortmann's avatar Daniel Wortmann
Browse files

Merge branch 'develop' of iffgit.fz-juelich.de:fleur/fleur into develop

parents cbb6c6c5 6f4d28dc
......@@ -4,20 +4,9 @@ if (EXISTS "${CMAKE_BINARY_DIR}/config.cmake")
include("${CMAKE_BINARY_DIR}/config.cmake")
endif()
set(tmp ${CMAKE_Fortran_FLAGS})
project(FLEUR LANGUAGES C Fortran)
#some variables might be set in the environment
set(FLEUR_LIBRARIES ${FLEUR_LIBRARIES} $ENV{FLEUR_LIBRARIES})
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FLEUR_Fortran_FLAGS} $ENV{CMAKE_Fortran_FLAGS}")
if (DEFINED ENV{FLEUR_USE_SERIAL})
set(FLEUR_USE_SERIAL ENV{FLEUR_USE_SERIAL})
else()
set(FLEUR_USE_SERIAL TRUE)
endif()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${tmp}")
include("cmake/CompilerConfig.txt")
......
......@@ -2,7 +2,6 @@ set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_DOUBLE")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_DOUBLE")
include("cmake/tests/test_doxygen.cmake")
include("cmake/compilerflags.cmake")
include("cmake/tests/test_XML.cmake")
include("cmake/tests/test_LAPACK.cmake")
......
......@@ -56,3 +56,7 @@ endif()
if (NOT (FLEUR_USE_SERIAL OR FLEUR_USE_MPI))
message(FATAL_ERROR "You should either compile a parallel or serial version (or both)")
endif()
if (FLEUR_WARN_MESSAGE)
message("${BRed}${FLEUR_WARN_MESSAGE}${CReset}")
endif()
#cmake file to set compiler flags for some of the known compilers
if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
message("Intel Fortran detected")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "14.1.0.0")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "13.0.0.0")
set(FLEUR_WARN_MESSAGE "You are using an old version of the Intel Fortran Compiler. Most likely FLEUR will not be build sucessfully. Consider to upgrade your compiler.")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -openmp -assume byterecl")
elseif (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS "14.1.0.0")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -openmp -assume byterecl")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mkl -r8 -qopenmp -assume byterecl")
......
......@@ -4,109 +4,29 @@
read -r -d '' known_machines << EOM
IFF -- cluster @ PGI of FZJ
JURECA -- @JSC
JUQUEEN -- @JSC
CLAIX -- @RWTH
MARCONI -- @CINECA
EOM
function configure_machine(){
if [ "$machine" = "JURECA" ]
then
echo "JURECA configuration used"
if module list 2>&1 |grep -q -i intel
then
echo "Intel toolchain used"
if module list 2>&1| grep -q Python &&
module list 2>&1| grep -q ELPA
#module list 2>&1| grep -q HDF5
then
echo "All required modules load loaded"
else
echo "You have to load the required modules"
echo "See and/or source $DIR/cmake/machines/JURECA/intelsource.sh"
exit
fi
cp $DIR/cmake/machines/JURECA/JURECA.cmake config.cmake
elif module list 2>&1 |grep -q PGI
then
echo "PGI toolchain used"
if module list 2>&1| grep -q MVAPICH2 &&
[ -n "${MAGMA_ROOT}" ] &&
[ -n "${XML2_ROOT}" ]
then
echo "All required modules loaded, all variables set"
else
echo "Not all modules are loaded"
echo "See and/or source $DIR/cmake/machines/JURECA/pgisource.sh"
echo "And set the variables XML2_ROOT and MAGMA_ROOT"
exit
fi
cp $DIR/cmake/machines/JURECA/JURECAGPU.cmake config.cmake
else
echo "You have to load the correct modules for compiling"
echo " Look for files to source in $DIR/cmake/machines/JURECA"
exit
fi
# JUQUEEN
elif [ "$machine" = "JUQUEEN" ]
then
echo "JUQUEEN configuration used"
if module list 2>&1| grep -q hdf5 &&
module list 2>&1| grep -q scalapack
then
echo "All required modules load loaded"
else
echo "You have to load the required modules"
echo "'source $DIR/cmake/machines/JUQUEEN/xlfsource.sh' should help"
exit
fi
cp $DIR/cmake/machines/JUQUEEN/JUQUEEN.cmake config.cmake
#IFF linux cluster
elif [ "$machine" = "IFF" ]
then
echo "IFF cluster configuration used"
cp $DIR/cmake/machines/IFF.cmake config.cmake
#RWTH cluster
elif [ "$machine" = "CLAIX" ]
if [ "$machine" = "AUTO" ]
then
echo "CLAIX@RWTH configuration used"
if ! module list 2>&1| grep -q intelmpi
then
echo "Please use intelmpi, e.g. do a module switch openmpi intelmpi"
exit
fi
cp $DIR/cmake/machines/CLAIX.cmake config.cmake
module load LIBRARIES
elif [ "$machine" = "MARCONI" ]
then
if ! module list 2>&1| grep -q " intel\/" || ! module list 2>&1| grep -q " intelmpi" ||! module list 2>&1| grep -q cmake
then
echo "Load the modules needed to compile: intel,intelmpi,cmake"
exit
fi
cp $DIR/cmake/machines/MARCONI.cmake config.cmake
elif [ "$machine" = "AUTO" ]
then
if [ -r ../config.cmake ]
then
echo "Using AUTO-mode with user provided config.cmake"
cp ../config.cmake .
else
echo "No machine specific settings used"
echo "GOOD LUCK!"
fi
echo "No machine specific settings used"
echo "GOOD LUCK!"
else
if [ -r $DIR/cmake/machines/${machine}.cmake ]
if [ -r $DIR/cmake/machines/$machine.sh ]
then
cp $DIR/cmake/machines/${machine}.cmake config.cmake
echo "Using config for: $machine"
. $DIR/cmake/machines/$machine.sh
else
echo "No valid machine configuration specified"
exit
fi
fi
fi
}
FC=mpif90
FLEUR_INCLUDEDIR="/opt/include"
FLEUR_LIBRARIES="-L/opt/lib;-lxcf03;-lxc;-lhdf5_fortran;-lhdf5;-ldl;-L/usr/lib;-L/usr/lib/x86_64-linux-gnu;-lxml2;-lscalapack-openmpi;-lblacsF77init-openmpi;-lblacs-openmpi;-llapack;-lblas"
export FC=${FC:=mpiifort}
FLEUR_LIBRARIES="-lxml2;-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64;-mt_mpi;${FLEUR_LIBRARIES}"
if module list 2>&1 |grep -q -i intel
then
echo "Intel toolchain used"
#check if all modules are loaded
module_list=`module list 2>&1`
error=0
if ! echo "$module_list" |grep CMake
then
error=1
fi
if ! echo "$module_list" |grep ELPA | grep hybrid
then
error=1
fi
if ! echo "$module_list" |grep HDF5
then
error=1
fi
if ! echo "$module_list" |grep xml2
then
error=1
fi
if [[ "$error" -gt 0 ]]
then
echo "Not all required modules are loaded"
echo "You should do:"
#determine XML2 module
xml2=`module --show_hidden spider libxml2 2>&1 |grep libxml2/|grep -v module |tail -1`
#determine ELPA module
elpa=`module spider ELPA 2>&1 |grep hybrid`
echo
echo "ml intel-para CMake HDF5 $xml2 $elpa"
echo
echo "It might be a good idea to include that in your profile"
exit
fi
export FC=${FC:=mpif90}
export CC=${CC:=mpicc}
#ELPA
CLI_ELPA_OPENMP=1
FLEUR_LIBDIR="$FLEUR_LIB $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES_OPENMP"
#hdf5
FLEUR_LIBDIR="$FLEUR_LIBDIR $HDF5_DIR/lib"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $HDF5_DIR/include"
FLEUR_LIBRARIES="-lelpa_openmp;-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64"
elif module list 2>&1 |grep -q PGI
then
echo "PGI toolchain used"
FC=mpif90
CC=mpicc
FLEUR_INCLUDEDIR="$XML2_ROOT/include"
FLEUR_LIBRARIES="-lstdc++;-L$MKLROOT/lib/intel64;-lmkl_scalapack_lp64;-lmkl_intel_lp64;-lmkl_pgi_thread;-lmkl_core;-lmkl_blacs_intelmpi_lp64"
else
echo "You need to load the modules for the compiler"
echo "e.g. module load intel-para"
exit
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment