From 22356be07cbb8d667c3939a31500d665df4329ee Mon Sep 17 00:00:00 2001 From: Matthias Krack Date: Fri, 25 Feb 2022 19:35:46 +0100 Subject: [PATCH] Rename arch file and make it sourceable --- ...imal.psmp => CRAY-XC40-intel-minimal.psmp} | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) rename arch/{CRAY-XC40_intel-minimal.psmp => CRAY-XC40-intel-minimal.psmp} (50%) diff --git a/arch/CRAY-XC40_intel-minimal.psmp b/arch/CRAY-XC40-intel-minimal.psmp similarity index 50% rename from arch/CRAY-XC40_intel-minimal.psmp rename to arch/CRAY-XC40-intel-minimal.psmp index 33a682ddc4..7e822f0497 100644 --- a/arch/CRAY-XC40_intel-minimal.psmp +++ b/arch/CRAY-XC40-intel-minimal.psmp @@ -1,19 +1,34 @@ -# Tested with: Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.217 Build 20200306 -# Author: Matthias Krack (matthias.krack@psi.ch, PSI, January 2021) +#!/bin/bash +# +# CP2K (Intel/MKL x86_64) minimal arch file for CRAY XC40 +# +# Tested with: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.3.0 +# on Cray XC40 (Piz Daint, CSCS, multi-core partition) -# Cray XC40 (Piz Daint, CSCS, multi-core partition) - -# Program environments: -# module add daint-mc -# module rm PrgEnv-cray -# module add PrgEnv-intel +# Author: Matthias Krack (25.02.2022) +# \ + if [[ "${0}" == "${BASH_SOURCE}" ]]; then \ + echo "ERROR: Script ${0##*/} must be sourced"; \ + echo "Usage: source ${0##*/}"; \ + exit 1; \ + fi; \ + this_file=${BASH_SOURCE##*/}; \ + module add daint-mc; \ + module rm PrgEnv-cray; \ + module add PrgEnv-intel; \ + module rm intel; \ + module add intel-classic; \ + module list; \ + make -j ARCH=${this_file%%.*} VERSION=${this_file##*.} realclean; \ + make -j ARCH=${this_file%%.*} VERSION=${this_file##*.}; \ + return CC = cc FC = ftn LD = ftn AR = ar -r -CFLAGS = -O3 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback +CFLAGS = -O2 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback DFLAGS = -D__FFTW3 DFLAGS += -D__MAX_CONTR=4 @@ -30,8 +45,8 @@ FCFLAGS += -free FCFLAGS += -I$(MKLROOT)/include FCFLAGS += -I$(MKLROOT)/include/fftw -LDFLAGS = $(FCFLAGS) -static-intel -LDFLAGS_C = -nofor_main +LDFLAGS = $(FCFLAGS) +LDFLAGS_C = -nofor-main MKL_LIB = $(MKLROOT)/lib/intel64