Commit c8f3f3c9 authored by Miriam Hinzen's avatar Miriam Hinzen

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

parents bf74a351 28f5b60b
stages:
- build
- test
- coverage
- deploy
- build-pgi
- test-pgi
- build-intel
- test-intel
build-gfortran:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: build
......@@ -27,9 +29,11 @@ test-gfortran:
paths:
- build
script:
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";cd /builds/fleur/fleur/build;ctest
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";export OMP_NUM_THREADS=4;cd /builds/fleur/fleur/build;ctest
artifacts:
when: on_failure
paths:
- build/Testing/failed
- build/Testing/test.oldlogs
# only:
# - schedules
......@@ -42,9 +46,14 @@ pages:
cache:
paths:
- build
- public
script:
- cd /builds/fleur/fleur/build ; make doc
- mv docs/html/ ../public/
- mv /builds/fleur/fleur/docs/Docu_main.html ../public/index.html
environment:
name: Doxygen
url: https://fleur.iffgit.fz-juelich.de/fleur
artifacts:
paths:
- public
......@@ -90,8 +99,8 @@ build-intel:
paths:
- build.intel
script:
- set +e && source compilervars.sh intel64 && set -e
- cd /builds/fleur/fleur; FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -l intel AUTO ; cd build.intel; make
- set +e && source compilervars.sh intel64 && set -e ; ulimit -s unlimited
- cd /builds/fleur/fleur; FC=mpiifort FLEUR_LIBRARIES="-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64" ./configure.sh -t -l intel AUTO ; cd build.intel; make
only:
- schedules
- triggers
......@@ -105,9 +114,38 @@ test-intel:
paths:
- build.intel
script:
- set +e && source compilervars.sh intel64 && set -e
- set +e && source compilervars.sh intel64 && set -e; ulimit -s unlimited
- cd /builds/fleur/fleur/build.intel;ctest
artifacts:
when: on_failure
paths:
- build/Testing/failed
- build/Testing/test.oldlogs
only:
- schedules
- web
- triggers
gfortran-coverage:
image: iffregistry.fz-juelich.de/fleur/fleur:latest
stage: coverage
cache:
paths:
- build
script:
- cd /builds/fleur/fleur; ./configure.sh -l coverage -flags --coverage GITLAB; cd build.coverage; make
- lcov --capture --initial -d CMakeFiles -o baseline.info
- ulimit -s unlimited ;export juDFT_MPI="mpirun -n 2 --allow-run-as-root ";ctest
- lcov --capture -d CMakeFiles -o after.info
- lcov --add-tracefile baseline.info --add-tracefile after.info -o combined.info
- genhtml combined.info --output-directory html_out
- mkdir ../public;mv html_out ../public/coverage_html
artifacts:
paths:
- public
environment:
name: Coverage
url: https://fleur.iffgit.fz-juelich.de/fleur/coverage_html
only:
- web
- schedules
\ No newline at end of file
......@@ -55,4 +55,57 @@ If you modify FLEUR please do so in the develop branch by running
after cloning the git repository. For larger changes you might want to
create your own branch.
## Compiling Fleur on Jureca
To compile Fleur on Jureca the following modules need to be loaded:
```bash
module load intel-para CMake HDF5 libxml2/.2.9.7 ELPA/2017.11.001-hybrid
```
which is then configured with
```bash
./configure.sh JURECA_INTEL
```
or
```bash
./configure.sh -external libxc JURECA_INTEL
```
if libXC should be supported aswell.
## Compilling Fleur on Jureca Booster
To compile on the booster you need to first switch to the KNL environment
```bash
module purge
ml Architecture/KNL
module load intel-para CMake HDF5 libxml2/.2.9.7 ELPA/2017.11.001-hybrid
```
Then you can compile as discrebed above.
## Running Fleur on Jureca Booster
To run on the Boosters you need to switch the architecture in each job script aswell
```bash
#!/bin/bash -x
#SBATCH --nodes=1
##SBATCH --ntasks=10
##SBATCH --ntasks-per-node=10
#SBATCH --cpus-per-task=68
#SBATCH --output=mpi-%j.out
#SBATCH --error=mpi-%j.err
#SBATCH --time=1:00:00
#SBATCH --partition=develbooster
#SBATCH --gres=mem96
##SBATCH --mail-user=your.name@fz-juelich.de
##SBATCH --mail-type=END
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}
module purge
ml Architecture/KNL
module load intel-para CMake HDF5 libxml2/.2.9.7 ELPA/2017.11.001-hybrid
/work/ias-1/s.rost/fleur_booster/fleur/build/fleur
```
## Developing Fleur
We agreed to use a unified indentation-width of 3.
Hint: [vim](http://vim.wikia.com/wiki/Converting_tabs_to_spaces) [emacs](https://www.gnu.org/software/emacs/manual/html_node/efaq/Changing-the-length-of-a-Tab.html)
\ No newline at end of file
MODULE m_cdntot
MODULE m_cdntot
! ********************************************************
! calculate the total charge density in the interstial.,
! vacuum, and mt regions c.l.fu
! ********************************************************
CONTAINS
SUBROUTINE cdntot(stars,atoms,sym,vacuum,input,cell,oneD,&
den,l_printData,qtot,qistot)
CONTAINS
SUBROUTINE cdntot(stars,atoms,sym,vacuum,input,cell,oneD,&
den,l_printData,qtot,qistot)
USE m_intgr, ONLY : intgr3
USE m_constants
......@@ -55,19 +55,19 @@
q = 0.e0
! -----mt charge
CALL timestart("MT")
DO 10 n = 1,atoms%ntype
DO n = 1,atoms%ntype
CALL intgr3(den%mt(:,0,n,jspin),atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),w)
qmt(n) = w*sfp_const
q = q + atoms%neq(n)*qmt(n)
10 CONTINUE
ENDDO
CALL timestop("MT")
! -----vacuum region
IF (input%film) THEN
DO 20 ivac = 1,vacuum%nvac
DO ivac = 1,vacuum%nvac
DO nz = 1,vacuum%nmz
IF (oneD%odi%d1) THEN
rht1(nz,ivac,jspin) = (cell%z1+(nz-1)*vacuum%delz)*&
& den%vacz(nz,ivac,jspin)
den%vacz(nz,ivac,jspin)
ELSE
rht1(nz,ivac,jspin) = den%vacz(nz,ivac,jspin)
END IF
......@@ -79,30 +79,19 @@
ELSE
q = q + cell%area*q2(1)
END IF
20 CONTINUE
ENDDO
END IF
! -----is region
IF (.not.judft_was_Argument("-oldfix")) THEN
IF (.FALSE.) THEN !Change this for old way of determination of int-charge
CALL convol(stars,x,den%pw(:,jspin),stars%ufft)
qis = x(1)*cell%omtil
ELSE
qis = 0.
! DO 30 j = 1,nq3
! CALL pwint(
! > k1d,k2d,k3d,n3d,ntypd,natd,nop,invtab,odi,
! > ntype,neq,volmts,taual,z1,vol,volint,
! > symor,tau,mrot,rmt,sk3,bmat,ig2,ig,
! > kv3(1,j),
! < x)
! qis = qis + den%pw(j,jspin)*x*nstr(j)
! 30 CONTINUE
CALL pwint_all(&
& stars,atoms,sym,oneD,&
& cell,&
& x)
DO j = 1,stars%ng3
qis = qis + den%pw(j,jspin)*x(j)*stars%nstr(j)
ENDDO
qis = 0.
CALL pwint_all(stars,atoms,sym,oneD,cell,x)
DO j = 1,stars%ng3
qis = qis + den%pw(j,jspin)*x(j)*stars%nstr(j)
ENDDO
endif
qistot = qistot + qis
q = q + qis
......@@ -137,12 +126,12 @@
IF(l_printData) THEN
CALL writeXMLElementFormPoly('totalCharge',(/'value'/),(/qtot/),reshape((/5,20/),(/1,2/)))
END IF
8000 FORMAT (/,10x,'total charge for spin',i3,'=',f12.6,/,10x,&
& 'interst. charge = ',f12.6,/,&
& (10x,'mt charge= ',4f12.6,/))
8010 FORMAT (10x,'vacuum ',i2,' charge= ',f12.6)
8020 FORMAT (/,10x,'total charge =',f12.6)
8000 FORMAT (/,10x,'total charge for spin',i3,'=',f12.6,/,10x,&
'interst. charge = ',f12.6,/,&
(10x,'mt charge= ',4f12.6,/))
8010 FORMAT (10x,'vacuum ',i2,' charge= ',f12.6)
8020 FORMAT (/,10x,'total charge =',f12.6)
CALL timestop("cdntot")
END SUBROUTINE cdntot
END MODULE m_cdntot
END SUBROUTINE cdntot
END MODULE m_cdntot
......@@ -221,7 +221,7 @@ SUBROUTINE cdnval(eig_id, mpi,kpts,jspin,noco,input,banddos,cell,atoms,enpara,st
! valence density in the vacuum region
IF (input%film) THEN
CALL vacden(vacuum,dimension,stars,oneD, kpts,input,sym,cell,atoms,noco,banddos,&
gVacMap,we,ikpt,jspin,vTot%vacz(:,:,jspin),noccbd,lapw,enpara%evac0,eig,den,zMat,dos)
gVacMap,we,ikpt,jspin,vTot%vacz(:,:,jspin),noccbd,lapw,enpara%evac,eig,den,zMat,dos)
END IF
END IF
IF (input%film) CALL regCharges%sumBandsVac(vacuum,dos,noccbd,ikpt,jsp_start,jsp_end,eig,we)
......
......@@ -9,7 +9,9 @@ CONTAINS
!***********************************************************************
!
SUBROUTINE q_mt_sl(jsp,atoms,nobd,ikpt,ne,skip_t,noccbd,eigVecCoeffs,usdus,slab)
USE m_types
USE m_types_setup
USE m_types_usdus
USE m_types_cdnval, ONLY: t_eigVecCoeffs, t_slab
IMPLICIT NONE
TYPE(t_usdus),INTENT(IN) :: usdus
TYPE(t_atoms),INTENT(IN) :: atoms
......
......@@ -7,8 +7,11 @@ MODULE m_qal21
CONTAINS
SUBROUTINE qal_21(dimension,atoms,input,noccbd,noco,eigVecCoeffs,denCoeffsOffdiag,ikpt,dos)
USE m_types_setup
USE m_types_dos
USE m_types_cdnval, ONLY: t_eigVecCoeffs
USE m_types_denCoeffsOffdiag
USE m_rotdenmat
USE m_types
IMPLICIT NONE
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_input), INTENT(IN) :: input
......
......@@ -53,7 +53,7 @@ CONTAINS
! .. Local Scalars ..
COMPLEX ctmp,term1
INTEGER i,j,l,ll1,lm,nbasf,m
INTEGER i,j,l,ll1,lm,nbasf,m,na2,lmp
! ..
! ..
term1 = 2 * tpi_const/SQRT(cell%omtil) * ((atoms%rmt(ntyp)**2)/2) * phase
......@@ -84,6 +84,14 @@ CONTAINS
acof(i,lm,na) = acof(i,lm,na) + ctmp*alo1(lo)
bcof(i,lm,na) = bcof(i,lm,na) + ctmp*blo1(lo)
ccof(m,i,lo,na) = ccof(m,i,lo,na) + ctmp*clo1(lo)
IF (atoms%invsat(na)==1.AND.noco%l_soc.AND.sym%invs) THEN
ctmp = zMat%data_c(nbasf,i)*CONJG(term1)*ylm(ll1+m+1)*(-1)**(l-m)
na2 = sym%invsatnr(na)
lmp = ll1 - m
acof(i,lmp,na2) = acof(i,lmp,na2) +ctmp*alo1(lo)
bcof(i,lmp,na2) = bcof(i,lmp,na2) +ctmp*blo1(lo)
ccof(-m,i,lo,na2) = ccof(-m,i,lo,na2) +ctmp*clo1(lo)
ENDIF
IF (l_force) THEN
force%acoflo(m,i,lo,na) = force%acoflo(m,i,lo,na) + ctmp*alo1(lo)
force%bcoflo(m,i,lo,na) = force%bcoflo(m,i,lo,na) + ctmp*blo1(lo)
......
......@@ -11,7 +11,8 @@ CONTAINS
SUBROUTINE calcDenCoeffs(atoms,sphhar,sym,we,noccbd,eigVecCoeffs,ispin,denCoeffs)
USE m_juDFT
USE m_types
USE m_types_setup
USE m_types_cdnval, ONLY: t_eigVecCoeffs,t_denCoeffs
USE m_rhomt
USE m_rhonmt
USE m_rhomtlo
......
......@@ -8,8 +8,8 @@ MODULE m_cdncore
CONTAINS
SUBROUTINE cdncore(results,mpi,dimension,oneD,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,vTot,outDen,moments)
SUBROUTINE cdncore(mpi,dimension,oneD,input,vacuum,noco,sym,&
stars,cell,sphhar,atoms,vTot,outDen,moments,results)
USE m_constants
USE m_cdn_io
......@@ -26,21 +26,22 @@ SUBROUTINE cdncore(results,mpi,dimension,oneD,input,vacuum,noco,sym,&
IMPLICIT NONE
TYPE(t_results),INTENT(INOUT) :: results
TYPE(t_mpi),INTENT(IN) :: mpi
TYPE(t_dimension),INTENT(IN) :: dimension
TYPE(t_oneD),INTENT(IN) :: oneD
TYPE(t_input),INTENT(IN) :: input
TYPE(t_vacuum),INTENT(IN) :: vacuum
TYPE(t_noco),INTENT(IN) :: noco
TYPE(t_sym),INTENT(IN) :: sym
TYPE(t_stars),INTENT(IN) :: stars
TYPE(t_cell),INTENT(IN) :: cell
TYPE(t_sphhar),INTENT(IN) :: sphhar
TYPE(t_atoms),INTENT(IN) :: atoms
TYPE(t_potden),INTENT(IN) :: vTot
TYPE(t_potden),INTENT(INOUT) :: outDen
TYPE(t_moments),INTENT(INOUT) :: moments
TYPE(t_mpi), INTENT(IN) :: mpi
TYPE(t_dimension), INTENT(IN) :: dimension
TYPE(t_oneD), INTENT(IN) :: oneD
TYPE(t_input), INTENT(IN) :: input
TYPE(t_vacuum), INTENT(IN) :: vacuum
TYPE(t_noco), INTENT(IN) :: noco
TYPE(t_sym), INTENT(IN) :: sym
TYPE(t_stars), INTENT(IN) :: stars
TYPE(t_cell), INTENT(IN) :: cell
TYPE(t_sphhar), INTENT(IN) :: sphhar
TYPE(t_atoms), INTENT(IN) :: atoms
TYPE(t_potden), INTENT(IN) :: vTot
TYPE(t_potden), INTENT(INOUT) :: outDen
TYPE(t_moments), INTENT(INOUT) :: moments
TYPE(t_results), INTENT(INOUT) :: results
INTEGER :: jspin, n, iType
REAL :: seig, rhoint, momint
......@@ -127,7 +128,7 @@ SUBROUTINE cdncore(results,mpi,dimension,oneD,input,vacuum,noco,sym,&
outDen%pw,outDen%vacxy,outDen%mt,outDen%vacz)
ELSE IF (mpi%irank.EQ.0) THEN
DO iType = 1,atoms%ntype
outDen%pw(1,jspin) = outDen%pw(1,jspin) + qint(iType,jspin)/input%jspins/cell%volint
outDen%pw(1,jspin) = outDen%pw(1,jspin) + qint(iType,jspin) / (input%jspins * cell%volint)
END DO
END IF
END IF
......
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_DOUBLE")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_DOUBLE")
include("cmake/tests/test_linker.cmake")
include("cmake/tests/test_doxygen.cmake")
message("${CMAKE_Fortran_FLAGS}")
include("cmake/compilerflags.cmake")
include("cmake/tests/test_XML.cmake")
include("cmake/tests/test_LAPACK.cmake")
......@@ -15,12 +15,10 @@ include("cmake/tests/test_Wannier5.cmake")
include("cmake/tests/test_MAGMA.cmake")
include("cmake/tests/test_GPU.cmake")
include("cmake/tests/test_LibXC.cmake")
message("${CMAKE_Fortran_FLAGS}")
if (FLEUR_USE_MPI)
include("cmake/tests/test_SCALAPACK.cmake")
include("cmake/tests/test_ELPA.cmake")
include("cmake/tests/test_ChASE.cmake")
endif()
message("${CMAKE_Fortran_FLAGS}")
include("cmake/compileenv.txt")
......@@ -29,7 +29,6 @@ include(mix/CMakeLists.txt)
include(vgen/CMakeLists.txt)
include(inpgen/CMakeLists.txt)
include(docs/CMakeLists.txt)
include(tests/CMakeLists.txt)
include(mpi/CMakeLists.txt)
include(hybrid/CMakeLists.txt)
include(eels/CMakeLists.txt)
......@@ -38,26 +37,32 @@ include(wannier/CMakeLists.txt)
include(wannier/uhu/CMakeLists.txt)
include(forcetheorem/CMakeLists.txt)
include(rdmft/CMakeLists.txt)
include(kpoints/CMakeLists.txt)
include(tests/tests_old.cmake)
#include(tests/tests_new.cmake)
set(inpgen_F77 ${inpgen_F77}
inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f
inpgen/atom_sym.f inpgen/generator.f inpgen/read_record.f inpgen/soc_or_ssdw.f inpgen/symproperties.f
inpgen/bravais_symm.f inpgen/set_atom_core.f inpgen/spg_gen.f global/triang.f
inpgen/closure.f inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f
inpgen/lapw_input.f inpgen/struct_input.f inpgen/write_struct.f
io/calculator.f global/ss_sym.f global/soc_sym.f math/inv3.f io/rw_symfile.f
global/sort.f init/kptgen_hybrid.f init/od_kptsgen.f init/bravais.f init/divi.f init/brzone.f
init/kptmop.f init/kpttet.f init/bandstr1.F init/ordstar.f init/fulstar.f init/kprep.f
init/tetcon.f init/kvecon.f init/boxdim.f math/ylm4.f global/radsra.f math/intgr.F global/differ.f math/inwint.f
global/sort.f kpoints/kptgen_hybrid.f kpoints/od_kptsgen.f kpoints/bravais.f kpoints/divi.f kpoints/brzone.f
kpoints/kptmop.f kpoints/kpttet.f init/bandstr1.F kpoints/ordstar.f kpoints/fulstar.f kpoints/kprep.f
kpoints/tetcon.f kpoints/kvecon.f init/boxdim.f global/radsra.f math/intgr.F global/differ.f math/inwint.f
math/outint.f xc-pot/gaunt.f math/grule.f
)
set(inpgen_F90 ${inpgen_F90} global/constants.f90 io/xsf_io.f90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90
eigen/vec_for_lo.f90 eigen/orthoglo.F90 juDFT/usage_data.F90 math/ylm4.f90
global/enpara.f90 global/chkmt.f90 inpgen/inpgen.f90 inpgen/set_inp.f90 inpgen/inpgen_help.f90 io/rw_inp.f90 juDFT/juDFT.F90 global/find_enpara.f90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 init/julia.f90 global/utility.F90
init/compile_descr.F90 init/kpoints.f90 io/xmlOutput.F90 init/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
inpgen/closure.f90 inpgen/inpgen_arguments.F90
juDFT/info.F90 juDFT/stop.F90 juDFT/args.F90 juDFT/time.F90 juDFT/init.F90 juDFT/sysinfo.F90 io/w_inpXML.f90 kpoints/julia.f90 global/utility.F90
init/compile_descr.F90 kpoints/kpoints.f90 io/xmlOutput.F90 kpoints/brzone2.f90 cdn/slab_dim.f90 cdn/slabgeom.f90 dos/nstm3.f90 cdn/int_21.f90
cdn/int_21lo.f90 cdn_mt/rhomt21.f90 cdn_mt/rhonmt21.f90 force/force_a21.F90 force/force_a21_lo.f90 force/force_a21_U.f90 force/force_a12.f90
eigen/tlmplm_store.F90)
eigen/tlmplm_store.F90 kpoints/unfoldBandKPTS.f90)
set(fleur_SRC ${fleur_F90} ${fleur_F77})
......
......@@ -4,19 +4,27 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel")
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")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_OLDINTEL")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_OLDINTEL")
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")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O2")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -xHost -O2 -g")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -ftrapuv -check uninit -check pointers -CB ")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "PGI")
message("PGI Fortran detected")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") #fix problem in cmake
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:kepler+ -ta:tesla:cuda7.5 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fast -O3")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -Mchkstk -Mchkptr")
#CPU
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics")
#GPU
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda=cuda9.0,cc60 -Mcudalib=cublas")
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:kepler+ -ta:tesla:cuda7.5 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp -Mr8 -Mr8intrinsics -Mcuda:cuda9.0,cc70 -DUSE_STREAMS -DNUM_STREAMS=${N_STREAMS} -Minfo=accel -acc")
#set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fast -O3")
set(CMAKE_Fortran_FLAGS_RELEASE "-O1 ") # to prevent cmake from putting -fast which auses problems with PGI18.4
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -C -traceback -O0 -g -Mchkstk -Mchkptr -Ktrap=fp")
elseif(${CMAKE_Fortran_COMPILER_ID} MATCHES "XL")
message("IBM/BG Fortran detected")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp=omp -qnosave -qarch=qp -qtune=qp -qrealsize=8 -qfixed -qsuppress=1520-022 -qessl")
......
#This file contains the defaults for compiling FLEUR on known machines
#please add further definitions here and also add code below!
read -r -d '' known_machines << EOM
IFF -- cluster @ PGI of FZJ
JURECA -- @JSC
EOM
cd $DIR/cmake/machines/
for f in *.sh
do
config=`basename $f .sh`
desc=`head -1 $f|cut -d# -f 2`
if [ ! "$desc" == "NOSHOW" ]
then
known_machines="$known_machines
$config
-- $desc "
fi
done
cd -
function configure_machine(){
if [ "$machine" = "AUTO" ]
......
#Configuration for CLAIX@RWTH; do a 'module load intelmpi' before
if module list 2>&1 | grep -q intel
then
if module list 2>&1| grep -q openmpi
then
echo "Please use intelmpi, e.g. do a module switch openmpi intelmpi"
exit
fi
if module list 2>&1| grep -q intelmpi
then
export FC=$MPIFC
export CC=$MPICC
fi
#ELPA
if [ $ELPA_MODULES ]
then
CLI_ELPA_OPENMP=1
FLEUR_LIBDIR="$FLEUR_LIBDIR $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES"
fi
elif module list 2>&1 | grep -q pgi
then
echo "found PGI compiler"
fi
FC=mpif90
#NOSHOW
export 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}"
echo "Using special config for IFF-cluster"
#Set the compilers to mpiifort, mpiicc, mpiicpc
export FC=mpiifort
export CC=mpiicc
export CXX=mpiicpc
FLEUR_LIBRARIES="-lxml2;-lmkl_scalapack_lp64;-lmkl_blacs_intelmpi_lp64;-mt_mpi"
echo "Wannier is switched off-manually"
CLI_USE_WANNIER=FALSE
echo "ChASE is switched off-manually"
CLI_USE_CHASE=FALSE
echo "Broken linker can be used"
CLI_WARN_ONLY=1
#Set environment variables usefull for external dependencies, e.g. ELPA
export CFLAGS=-mkl
export CMAKE_Fortran_FLAGS="$CMAKE_Fortran_FLAGS -mkl"
export FCFLAGS=-mkl
export LIBS="-mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
export SCALAPACK_LDFLAGS="-lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
# Set compilers to ifort,icc,icpc
export FC=${FC:=ifort}
export CC=${CC:=icc}
export CXX=${CXX:=icpc}
#Set the compilers to mpiifort, mpiicc, mpiicpc
export FC=${FC:=mpiifort}
export CC=${CC:=mpiicc}
export CXX=${CXX:=mpiicpc}
#Set environment variables usefull for external dependencies, e.g. ELPA
export CFLAGS=-mkl
export CMAKE_Fortran_FLAGS="$CMAKE_Fortran_FLAGS -mkl"
export FCFLAGS=-mkl
export LIBS="-mkl -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
export SCALAPACK_LDFLAGS="-lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
if module list 2>&1 |grep -q -i intel
then
echo "Intel toolchain used"
module load CMake
export FC=${FC:=mpif90}
export CC=${CC:=mpicc}
#determine XML2 module
xml2=`module --show_hidden spider libxml2 2>&1 |grep libxml2/|grep -v module |tail -1`
module load $xml2
#determine ELPA module
elpa=`module spider ELPA 2>&1 |grep hybrid`
module load $elpa
CLI_ELPA_OPENMP=1
FLEUR_LIBDIR="$FLEUR_LIB $ELPA_LIB"
FLEUR_INCLUDEDIR="$FLEUR_INCLUDEDIR $ELPA_MODULES_OPENMP"
#load hdf5 module
module load 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"