Skip to content

Commit

Permalink
Merged in miscCleanups (pull request #560)
Browse files Browse the repository at this point in the history
Preparation for KohnShamDFT operator merging

Approved-by: Sambit Das
  • Loading branch information
knikhil1995 authored and dsambit committed Feb 13, 2024
2 parents 488b2bb + 46be03a commit 095631b
Show file tree
Hide file tree
Showing 65 changed files with 4,034 additions and 4,452 deletions.
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# CMakeList file for DFT-FE
##
CMAKE_MINIMUM_REQUIRED(VERSION 3.17)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Set the name of the project and target:
SET(TARGET "dftfe_exe")
SET(TARGETLIB "dftfe")
Expand Down Expand Up @@ -48,7 +50,7 @@ SET(TARGET_SRC
./src/dft/vselfBinsManager.cc
./src/dft/energyCalculator.cc
./src/dft/densityCalculator.cc
./src/dft/densityFirstOrderResponseCalculatorCPU.cc
./src/dft/densityFirstOrderResponseCalculator.cc
./src/excManager/excDensityBaseClass.cpp
./src/excManager/excDensityLDAClass.cpp
./src/excManager/excWavefunctionBaseClass.cpp
Expand Down Expand Up @@ -156,7 +158,10 @@ SET(TARGET_SRC
./src/force/configurationalStressCompute/computeStressEself.cc
./src/force/configurationalStressCompute/stress.cc
./src/force/createBinObjectsForce.cc
./src/force/locateAtomCoreNodesForce.cc)
./src/force/locateAtomCoreNodesForce.cc
./utils/FEBasisOperationsKernelsInternalHost.cc
./utils/FEBasisOperations.cc
./utils/FEBasisOperationsKernels.cc)

IF ("${GPU_LANG}" STREQUAL "cuda")

Expand All @@ -165,7 +170,7 @@ SET(DEVICE_SRC
./utils/DeviceKernelsGeneric.cc
./utils/DeviceDirectCCLWrapper.cc
./src/dft/densityCalculatorDeviceKernels.cc
./src/dft/densityFirstOrderResponseCalculatorDevice.cc
./src/dft/densityFirstOrderResponseCalculatorDeviceKernels.cc
./src/dftOperator/operatorDevice.cc
./src/dftOperator/kohnShamDFTOperatorDevice.cc
./src/dft/solveVselfInBinsDevice.cc
Expand All @@ -184,7 +189,7 @@ SET(DEVICE_SRC
./src/solvers/linearSolverProblemDevice.cc
./src/poisson/poissonSolverProblemDevice.cc
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsDevice.cc
./utils/FEBasisOperationsKernelsInternalDevice.cc
)

ELSEIF ("${GPU_LANG}" STREQUAL "hip")
Expand All @@ -194,7 +199,7 @@ SET(DEVICE_SRC
./utils/DeviceKernelsGeneric.cc
./utils/DeviceDirectCCLWrapper.cc
./src/dft/densityCalculatorDeviceKernels.cc
./src/dft/densityFirstOrderResponseCalculatorDevice.cc
./src/dft/densityFirstOrderResponseCalculatorDeviceKernels.cc
./src/dftOperator/operatorDevice.cc
./src/dftOperator/kohnShamDFTOperatorDevice.cc
./src/dft/solveVselfInBinsDevice.cc
Expand All @@ -213,7 +218,7 @@ SET(DEVICE_SRC
./src/solvers/linearSolverProblemDevice.cc
./src/poisson/poissonSolverProblemDevice.cc
./src/helmholtz/kerkerSolverProblemDevice.cc
./utils/FEBasisOperationsKernelsDevice.cc
./utils/FEBasisOperationsKernelsInternalDevice.cc
)

ENDIF()
Expand Down
14 changes: 8 additions & 6 deletions doc/manual/installation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ \subsubsection{Instructions for dependencies: ALGLIB, Libxc, spglib, Libxml2, Sc
\end{verbatim}
There might be errors complaining that it can not create regular file libxml2.py in /usr/lib/python2.7/site-packages, but that should not matter.

\item {\bf ScaLAPACK}: ScaLAPACK library is used by DFT-FE via ELPA for its parallel linear algebra routines involving dense matrices, as well being a dependency for ELPA. \textcolor{red}{\bf If Intel MKL math library is available, please skip this step, as the ScaLAPACK libraries therein can be used directly.} If Intel MKL math library is not available, Netlib ScaLAPACK \url{http://www.netlib.org/scalapack/} needs to be installed using the instructions below. Download the current release version (2.2.0) from \url{http://www.netlib.org/scalapack/#\_software}, and build a shared library (use \verb|BUILD_SHARED_LIBS=ON|, \verb|BUILD_STATIC_LIBS=OFF| and \verb|BUILD_TESTING=OFF|) installation of ScaLAPACK using cmake. We recommend using the ccmake gui interface for the installation. Further, use the appropriate compilers for \verb|CMAKE_C_COMPILER| and \verb|CMAKE_FORTRAN_COMPILER|, and also use \verb|-fPIC| flag for \verb|CMAKE_C_FLAGS| and \verb|CMAKE_Fortran_FLAGS|. For best performance, ScaLAPACK must be linked to optimized BLAS-LAPACK libraries by using\\ \verb|USE_OPTIMIZED_LAPACK_BLAS=ON|, and providing external paths to BLAS-LAPACK libraries (MKL, OpenBlas, ESSL etc.) during the cmake configuration.
\item {\bf ScaLAPACK}: ScaLAPACK library is used by DFT-FE via ELPA for its parallel linear algebra routines involving dense matrices, as well being a dependency for ELPA. \textcolor{red}{\bf If Intel MKL math library is available, please skip this step, as the ScaLAPACK libraries therein can be used directly.} If Intel MKL math library is not available, Netlib ScaLAPACK \url{http://www.netlib.org/scalapack/} needs to be installed using the instructions below. Download the current release version (2.2.0) from \url{http://www.netlib.org/scalapack/#\_software}, and build a shared library (use \verb|BUILD_SHARED_LIBS=ON|, \verb|BUILD_STATIC_LIBS=OFF| and \verb|BUILD_TESTING=OFF|) installation of ScaLAPACK using cmake. We recommend using the ccmake gui interface for the installation. Further, use the appropriate compilers for \verb|CMAKE_C_COMPILER| and \verb|CMAKE_FORTRAN_COMPILER|, and also use \verb|-fPIC| flag for \verb|CMAKE_C_FLAGS| and \verb|-fPIC -fallow-argument-mismatch| for \verb|CMAKE_Fortran_FLAGS|. For best performance, ScaLAPACK must be linked to optimized BLAS-LAPACK libraries by using\\ \verb|USE_OPTIMIZED_LAPACK_BLAS=ON|, and providing external paths to BLAS-LAPACK libraries (MKL, OpenBlas, ESSL etc.) during the cmake configuration.
%Alternatively one can also use the python based installer~\url{http://www.netlib.org/scalapack/scalapack_installer.tgz} for Linux.

\item {\bf ELPA}: ELPA library is used by DFT-FE for its parallel linear algebra routines involving dense matrices. ELPA requires the ScaLAPACK library (see above) as a dependency. Download the latest version elpa-2022.11.001 from \url{https://elpa.mpcdf.mpg.de/software/} and follow the installation instructions in there. Example of ELPA installation on UMICH Greatlakes supercomputer with GNU compiler, Open MPI library, and Intel MKL math library:
Expand Down Expand Up @@ -171,7 +171,7 @@ \subsubsection{Instructions for deal.II}
\end{verbatim}
{\bf ``otherCmakeOptions'' include} the following options for CPU installation:
\begin{verbatim}
-DCMAKE_CXX_STANDARD=14
-DCMAKE_CXX_STANDARD=17
-DCMAKE_C_COMPILER=c_compiler
-DCMAKE_CXX_COMPILER=cxx_compiler
-DCMAKE_Fortran_COMPILER=fortran_compiler
Expand All @@ -189,6 +189,7 @@ \subsubsection{Instructions for deal.II}
-DDEAL_II_WITH_TBB=OFF
-DDEAL_II_WITH_TASKFLOW=OFF
-DDEAL_II_COMPONENT_EXAMPLES=OFF
-DDEAL_II_FORCE_BUNDLED_BOOST=ON
\end{verbatim}


Expand All @@ -199,21 +200,22 @@ \subsubsection{Instructions for deal.II}
$ mkdir build
$ cd build
$ cmake
-DCMAKE_CXX_STANDARD=14
-DCMAKE_CXX_STANDARD=17
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_Fortran_COMPILER=gfortran
-DMPI_C_COMPILER=mpicc
-DMPI_CXX_COMPILER=mpicxx
-DMPI_Fortran_COMPILER=mpif90
-DCMAKE_CXX_FLAGS="-march=native -std=c++14"
-DCMAKE_C_FLAGS="-march=native -std=c++14"
-DCMAKE_CXX_FLAGS="-march=native -std=c++17"
-DCMAKE_C_FLAGS="-march=native -std=c++17"
-DDEAL_II_CXX_FLAGS_RELEASE="-O2"
-DDEAL_II_COMPONENT_EXAMPLES=OFF
-DDEAL_II_WITH_MPI=ON
-DDEAL_II_WITH_64BIT_INDICES=ON
-DDEAL_II_WITH_TBB=OFF
-DDEAL_II_WITH_TASKFLOW=OFF
-DDEAL_II_FORCE_BUNDLED_BOOST=ON
-DDEAL_II_WITH_P4EST=ON
-DP4EST_DIR=p4est_install_path
-DDEAL_II_WITH_LAPACK=ON -DLAPACK_DIR="${MKLROOT}/lib/intel64"
Expand Down Expand Up @@ -252,7 +254,7 @@ \subsubsection{Instructions for simple-dftd3 and dftd4}
$ cmake --build _build
$ cmake --install _build
\end{verbatim}
\item {\bf dftd4}: Used by \dftfe{} to provide dftd4 corrections to energy, force and stress. Download the current release (3.460 at the time of writing) of dftd4 from \url{https://github.com/dftd4/dftd4/releases}. After downloading and unpacking, use cmake to build the library. For example, using GNU compiler and Intel MKL for BLAS and LAPACK, do
\item {\bf dftd4}: Used by \dftfe{} to provide dftd4 corrections to energy, force and stress. Download the current release (3.6.0 at the time of writing) of dftd4 from \url{https://github.com/dftd4/dftd4/releases}. After downloading and unpacking, use cmake to build the library. For example, using GNU compiler and Intel MKL for BLAS and LAPACK, do
\begin{verbatim}
$ cd dftd4-3.6.0
$ mkdir build
Expand Down
Loading

0 comments on commit 095631b

Please sign in to comment.