Skip to content

Commit

Permalink
Merge branch 'publicGithubDevelop' of https://bitbucket.org/dftfedeve…
Browse files Browse the repository at this point in the history
…lopers/dftfe into DOSbugFix
  • Loading branch information
Phani Motamarri committed Apr 23, 2024
2 parents 8bdb826 + 9ce5c91 commit bb88f79
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 102 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ ENDIF()
#
# ELPA. Pass path to -DCMAKE_PREFIX_PATH
#
find_package(ELPA 2022 REQUIRED)
find_package(ELPA 2024 REQUIRED)
MESSAGE(STATUS "Will Link With ELPA")
target_link_libraries(${TARGETLIB} PUBLIC ELPA::ELPA)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DFT-FE code builds on top of the deal.II library for everything that has to do w
The steps to install the necessary dependencies and DFT-FE itself are described in the *Installation* section of the DFT-FE manual (compile doc/manual/manual.tex or download the development version manual [here](https://github.com/dftfeDevelopers/dftfe/blob/manual/manual-develop.pdf)).

We have created several shell based installation scripts for the development version of DFT-FE (`publicGithubDevelop` branch) on various machines:
- [OLCF Frontier](https://github.com/dftfeDevelopers/install_DFTFE/tree/frontierScript)
- [OLCF Frontier](https://github.com/dftfeDevelopers/install_DFTFE/tree/frontierScriptROCM6)
- [NERSC Perlmutter](https://github.com/dftfeDevelopers/install_DFTFE/tree/perlmutterScript)
- [ALCF Polaris](https://github.com/dftfeDevelopers/install_DFTFE/tree/polarisScript)
- [UMICH Greatlakes](https://github.com/dftfeDevelopers/install_DFTFE/tree/greatlakesScript)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindELPA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find_package(PkgConfig)
# elpa-2020.05.001.pc
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
foreach(pkg elpa_openmp elpa) # prioritize elpa_openmp
foreach(ver 2022.11.001)
foreach(ver 2024.03.001)
pkg_search_module(PC_ELPA ${pkg})
if(PC_ELPA_FOUND)
break()
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/installation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ \subsubsection{Instructions for dependencies: ALGLIB, Libxc, spglib, Libxml2, Sc
\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:
\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-2024.03.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:
\begin{verbatim}
$ cd elpaDir
$ mkdir build
Expand Down
30 changes: 22 additions & 8 deletions include/dft.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ namespace dftfe
double
getFreeEnergy() const;

distributedCPUVec<double>
const distributedCPUVec<double> &
getRhoNodalOut() const;

distributedCPUVec<double>
const distributedCPUVec<double> &
getRhoNodalSplitOut() const;

double
Expand Down Expand Up @@ -389,14 +389,28 @@ namespace dftfe
* @brief Gets the current atom Locations in cartesian form
* (origin at center of domain) from dftClass
*/
std::vector<std::vector<double>>
const std::vector<std::vector<double>> &
getAtomLocationsCart() const;


/**
* @brief Gets the current image atom Locations in cartesian form
* (origin at center of domain) from dftClass
*/
const std::vector<std::vector<double>> &
getImageAtomLocationsCart() const;

/**
* @brief Gets the current image atom ids from dftClass
*/
const std::vector<int> &
getImageAtomIDs() const;

/**
* @brief Gets the current atom Locations in fractional form
* from dftClass (only applicable for periodic and semi-periodic BCs)
*/
std::vector<std::vector<double>>
const std::vector<std::vector<double>> &
getAtomLocationsFrac() const;


Expand All @@ -407,7 +421,7 @@ namespace dftfe
* @return std::vector<std::vector<double>> 3 \times 3 matrix,lattice[i][j]
* corresponds to jth component of ith lattice vector
*/
std::vector<std::vector<double>>
const std::vector<std::vector<double>> &
getCell() const;

/**
Expand All @@ -420,19 +434,19 @@ namespace dftfe
/**
* @brief Gets the current atom types from dftClass
*/
std::set<unsigned int>
const std::set<unsigned int> &
getAtomTypes() const;

/**
* @brief Gets the current atomic forces from dftClass
*/
std::vector<double>
const std::vector<double> &
getForceonAtoms() const;

/**
* @brief Gets the current cell stress from dftClass
*/
dealii::Tensor<2, 3, double>
const dealii::Tensor<2, 3, double> &
getCellStress() const;

/**
Expand Down
30 changes: 22 additions & 8 deletions include/dftBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ namespace dftfe
virtual double
getFreeEnergy() const = 0;

virtual distributedCPUVec<double>
virtual const distributedCPUVec<double> &
getRhoNodalOut() const = 0;

virtual distributedCPUVec<double>
virtual const distributedCPUVec<double> &
getRhoNodalSplitOut() const = 0;

virtual double
Expand All @@ -107,14 +107,28 @@ namespace dftfe
* @brief Gets the current atom Locations in cartesian form
* (origin at center of domain) from dftClass
*/
virtual std::vector<std::vector<double>>
virtual const std::vector<std::vector<double>> &
getAtomLocationsCart() const = 0;

/**
* @brief Gets the current image atom Locations in cartesian form
* (origin at center of domain) from dftClass
*/
virtual const std::vector<std::vector<double>> &
getImageAtomLocationsCart() const = 0;

/**
* @brief Gets the current image atom ids from dftClass
*/
virtual const std::vector<int> &
getImageAtomIDs() const = 0;


/**
* @brief Gets the current atom Locations in fractional form
* from dftClass (only applicable for periodic and semi-periodic BCs)
*/
virtual std::vector<std::vector<double>>
virtual const std::vector<std::vector<double>> &
getAtomLocationsFrac() const = 0;


Expand All @@ -125,7 +139,7 @@ namespace dftfe
* @return std::vector<std::vector<double>> 3 \times 3 matrix,lattice[i][j]
* corresponds to jth component of ith lattice vector
*/
virtual std::vector<std::vector<double>>
virtual const std::vector<std::vector<double>> &
getCell() const = 0;

/**
Expand All @@ -138,20 +152,20 @@ namespace dftfe
/**
* @brief Gets the current atom types from dftClass
*/
virtual std::set<unsigned int>
virtual const std::set<unsigned int> &
getAtomTypes() const = 0;

/**
* @brief Gets the current atomic forces (configurational forces) from dftClass
*/
virtual std::vector<double>
virtual const std::vector<double> &
getForceonAtoms() const = 0;


/**
* @brief Gets the current cell stress from dftClass
*/
virtual dealii::Tensor<2, 3, double>
virtual const dealii::Tensor<2, 3, double> &
getCellStress() const = 0;

/**
Expand Down
4 changes: 2 additions & 2 deletions include/force.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace dftfe
* the three force components on each atom being the leading dimension.
* Units- Hartree/Bohr
*/
std::vector<double>
std::vector<double> &
getAtomsForces();

/** @brief prints the currently stored configurational forces on atoms and the Gaussian generator constant
Expand Down Expand Up @@ -244,7 +244,7 @@ namespace dftfe
*
* @return dealii::Tensor<2,3,double> second order stress Tensor in Hartree/Bohr^3
*/
dealii::Tensor<2, 3, double>
dealii::Tensor<2, 3, double> &
getStress();

/** @brief get the value of Gaussian generator parameter (d_gaussianConstant).
Expand Down
29 changes: 23 additions & 6 deletions pseudoConverters/pseudoPotentialToDftfeConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,12 @@ namespace dftfe
}
void
xmltoOrbitalFile(std::string file_path_in, std::string file_path_out)
{
// Extracting radial coordinates
{ // Extracting radial coordinates
std::vector<double> radial_coord;
std::vector<std::string> radial_tag;
radial_tag.push_back("PP_MESH");
radial_tag.push_back("PP_R");
radial_coord = XmlTagReaderMain(radial_tag, file_path_in);

std::vector<std::string> pswfc_tag;
pswfc_tag.push_back("PP_PSWFC");
for (int i = 1; i <= xmlNodeChildCount(pswfc_tag, file_path_in); i++)
Expand All @@ -640,13 +638,32 @@ namespace dftfe
{
index = std::distance(attr_type.begin(), it);
}
std::string orbital_string = attr_value[index];
for (auto &w : orbital_string)
std::string orbital_string_nl = attr_value[index];
for (auto &w : orbital_string_nl)
{
w = tolower(w);
}
char n = orbital_string_nl[0];
char l;
if (orbital_string_nl[1] == 's')
{
l = '0';
}
if (orbital_string_nl[1] == 'p')
{
l = '1';
}
if (orbital_string_nl[1] == 'd')
{
l = '2';
}
if (orbital_string_nl[1] == 'f')
{
l = '3';
}
std::string orbital_string = "psi";
std::fstream file;
file.open(file_path_out + "/" + orbital_string + ".dat",
file.open(file_path_out + "/" + orbital_string + n + l + ".inp",
std::ios::out);
file << std::setprecision(12);
if (file.is_open())
Expand Down
2 changes: 1 addition & 1 deletion setupDevelopPetsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ libxcDir="/home/vikramg/DFT-softwares-gcc/libxc/libxc-5.2.3/install_libxc5.2.3"
spglibDir="/home/vikramg/DFT-softwares-gcc/spglib/install"
xmlIncludeDir="/usr/include/libxml2"
xmlLibDir="/usr/lib64"
ELPA_PATH="/home/vikramg/DFT-softwares-gcc/elpa/install202211"
ELPA_PATH="/home/vikramg/DFT-softwares-gcc/elpa/install2024"


#Paths for optional external libraries
Expand Down
Loading

0 comments on commit bb88f79

Please sign in to comment.