Skip to content

Commit f1eccf1

Browse files
knikhil1995phanimotamarri
authored andcommitted
Merged in 64BitIntRefactoring (pull request #669)
64BitIntRefactoring Approved-by: Sambit Das Approved-by: Phani Motamarri
2 parents 49781a0 + 47b28a6 commit f1eccf1

File tree

370 files changed

+27833
-22038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+27833
-22038
lines changed

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# CMakeList file for DFT-FE
33
##
44
CMAKE_MINIMUM_REQUIRED(VERSION 3.17)
5-
set(CMAKE_CXX_STANDARD 17)
5+
set(CMAKE_CXX_STANDARD 17
6+
CACHE STRING "Minimum required C++ standard (default is 17)")
67
set(CMAKE_CXX_STANDARD_REQUIRED ON)
78
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
89
# Set the name of the project and target:
@@ -88,6 +89,7 @@ SET(TARGET_SRC
8889
./src/excManager/excDensityLDAClass.cpp
8990
./src/excManager/excDensityGGAClass.cpp
9091
./src/excManager/excDensityLLMGGAClass.cpp
92+
./src/excManager/excTauMGGAClass.cpp
9193
./src/excManager/excManager.cpp
9294
./src/excManager/AuxDensityMatrixFE.cpp
9395
./src/excManager/ExcDFTPlusU.cpp
@@ -245,7 +247,7 @@ SET(DEVICE_SRC
245247
./src/force/forceWfcContractionsDeviceKernels.cc
246248
./utils/constraintMatrixInfoDeviceKernels.cc
247249
./utils/DeviceAPICalls.cu.cc
248-
./utils/BLASWrapperDevice.cu.cc
250+
./utils/BLASWrapperDevice.cc
249251
./utils/MPICommunicatorP2PKernelsDevice.cc
250252
./src/solvers/linearSolverCGDeviceKernels.cc
251253
./utils/matrixFreeDeviceKernels.cc
@@ -265,7 +267,7 @@ SET(DEVICE_SRC
265267
./src/force/forceWfcContractionsDeviceKernels.cc
266268
./utils/constraintMatrixInfoDeviceKernels.cc
267269
./utils/DeviceAPICalls.hip.cc
268-
./utils/BLASWrapperDevice.hip.cc
270+
./utils/BLASWrapperDevice.cc
269271
./utils/MPICommunicatorP2PKernelsDevice.cc
270272
./src/solvers/linearSolverCGDeviceKernels.cc
271273
./utils/matrixFreeDeviceKernels.cc
@@ -353,6 +355,10 @@ IF (HIGHERQUAD_PSP)
353355
ADD_DEFINITIONS(-DDFTFE_WITH_HIGHERQUAD_PSP)
354356
ENDIF()
355357

358+
IF (USE_64BIT_INT)
359+
ADD_DEFINITIONS(-DDFTFE_WITH_64BIT_INT)
360+
ENDIF()
361+
356362
#
357363
#Set use complex/use real flag
358364
#

doc/manual/parameters.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,13 +3067,13 @@ \subsection{Parameters in section \tt SCF parameters/Eigen-solver parameters}
30673067

30683068
\index[prmindex]{SUBSPACE PROJ SHEP GPU}
30693069
\index[prmindexfull]{SCF parameters!Eigen-solver parameters!SUBSPACE PROJ SHEP GPU}
3070-
{\it Value:} true
3070+
{\it Value:} false
30713071

30723072

3073-
{\it Default:} true
3073+
{\it Default:} false
30743074

30753075

3076-
{\it Description:} [Advanced] Solve a standard hermitian eigenvalue problem in the Rayleigh Ritz step instead of a generalized hermitian eigenvalue problem on GPUs. Default setting is true.
3076+
{\it Description:} [Advanced] Solve a standard hermitian eigenvalue problem in the Rayleigh Ritz step instead of a generalized hermitian eigenvalue problem on GPUs. Default setting is false.
30773077

30783078

30793079
{\it Possible values:} A boolean value (true or false)

helpers/MATRIXcluster/setupDevelopPetsc_MATRIX.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ build_type=Release
6969

7070
testing=ON
7171
minimal_compile=ON
72+
useInt64=$withGPU
7273
###########################################################################
7374
#Usually, no changes are needed below this line
7475
#
@@ -94,7 +95,7 @@ function cmake_configure() {
9495
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH;$dftdpath;$numdiffdir"\
9596
-DWITH_COMPLEX=$withComplex -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_CUDA_FLAGS="$device_flags" -DCMAKE_CUDA_ARCHITECTURES="$device_architectures"\
9697
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
97-
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON $1
98+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON -DUSE_64BIT_INT=$useInt64 $1
9899
elif [ "$gpuLang" = "hip" ]; then
99100
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_COMPILER=$cxx_compiler\
100101
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -108,7 +109,7 @@ function cmake_configure() {
108109
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH;$dftdpath;$numdiffdir"\
109110
-DWITH_COMPLEX=$withComplex -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_HIP_FLAGS="$device_flags" -DCMAKE_HIP_ARCHITECTURES="$device_architectures"\
110111
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
111-
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON $1
112+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON -DUSE_64BIT_INT=$useInt64 $1
112113
else
113114
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_COMPILER=$cxx_compiler\
114115
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -122,7 +123,7 @@ function cmake_configure() {
122123
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH;$dftdpath;$numdiffdir"\
123124
-DWITH_COMPLEX=$withComplex \
124125
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
125-
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON $1
126+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DBUILD_SHARED_LIBS=ON -DUSE_64BIT_INT=$useInt64 $1
126127
fi
127128
}
128129

helpers/NERSCPerlmutter/setupUserPerlmutter.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ build_type=Release
6363

6464
testing=OFF
6565
minimal_compile=ON
66+
useInt64=$withGPU
6667
###########################################################################
6768
#Usually, no changes are needed below this line
6869
#
@@ -89,7 +90,7 @@ function cmake_real() {
8990
-DWITH_COMPLEX=OFF -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_CUDA_FLAGS="$device_flags" -DCMAKE_CUDA_ARCHITECTURES="$device_architectures"\
9091
-DCMAKE_SHARED_LINKER_FLAGS="-L$MPICH_DIR/lib -lmpich"\
9192
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
92-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
93+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
9394
elif [ "$gpuLang" = "hip" ]; then
9495
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
9596
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -102,7 +103,7 @@ function cmake_real() {
102103
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
103104
-DWITH_COMPLEX=OFF -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_HIP_FLAGS="$device_flags" -DCMAKE_HIP_ARCHITECTURES="$device_architectures"\
104105
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
105-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
106+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
106107
else
107108
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
108109
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -115,7 +116,7 @@ function cmake_real() {
115116
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
116117
-DWITH_COMPLEX=OFF\
117118
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
118-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
119+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
119120
fi
120121
}
121122

helpers/NERSCPerlmutter/setupUserPerlmutterNoPetsc.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ build_type=Release
6262

6363
testing=OFF
6464
minimal_compile=OFF
65+
useInt64=$withGPU
6566
###########################################################################
6667
#Usually, no changes are needed below this line
6768
#
@@ -88,7 +89,7 @@ function cmake_real() {
8889
-DWITH_COMPLEX=OFF -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_CUDA_FLAGS="$device_flags" -DCMAKE_CUDA_ARCHITECTURES="$device_architectures"\
8990
-DCMAKE_SHARED_LINKER_FLAGS="-L$MPICH_DIR/lib -lmpich"\
9091
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
91-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
92+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
9293
elif [ "$gpuLang" = "hip" ]; then
9394
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
9495
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -101,7 +102,7 @@ function cmake_real() {
101102
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
102103
-DWITH_COMPLEX=OFF -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_HIP_FLAGS="$device_flags" -DCMAKE_HIP_ARCHITECTURES="$device_architectures"\
103104
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
104-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
105+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
105106
else
106107
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
107108
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -114,7 +115,7 @@ function cmake_real() {
114115
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
115116
-DWITH_COMPLEX=OFF\
116117
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
117-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
118+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
118119
fi
119120
}
120121

@@ -133,7 +134,7 @@ function cmake_cplx() {
133134
-DWITH_COMPLEX=ON -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_CUDA_FLAGS="$device_flags" -DCMAKE_CUDA_ARCHITECTURES="$device_architectures"\
134135
-DCMAKE_SHARED_LINKER_FLAGS="-L$MPICH_DIR/lib -lmpich"\
135136
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
136-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
137+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
137138
elif [ "$gpuLang" = "hip" ]; then
138139
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
139140
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -146,7 +147,7 @@ function cmake_cplx() {
146147
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
147148
-DWITH_COMPLEX=ON -DWITH_GPU=$withGPU -DGPU_LANG=$gpuLang -DGPU_VENDOR=$gpuVendor -DWITH_GPU_AWARE_MPI=$withGPUAwareMPI -DCMAKE_HIP_FLAGS="$device_flags" -DCMAKE_HIP_ARCHITECTURES="$device_architectures"\
148149
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
149-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
150+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
150151
else
151152
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=$cxx_compiler\
152153
-DCMAKE_CXX_FLAGS="$cxx_flags"\
@@ -159,7 +160,7 @@ function cmake_cplx() {
159160
-DWITH_DCCL=$withDCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$DCCL_PATH"\
160161
-DWITH_COMPLEX=ON \
161162
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile\
162-
-DHIGHERQUAD_PSP=$withHigherQuadPSP $1
163+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 $1
163164
fi
164165
}
165166

helpers/UMGreatLakes/setupDevelopPetscMDIInstall.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ build_type=Release
5151

5252
testing=ON
5353
minimal_compile=ON
54+
useInt64=$withGPU
55+
5456
###########################################################################
5557
#Usually, no changes are needed below this line
5658
#
@@ -74,7 +76,7 @@ function cmake_real() {
7476
-DWITH_NCCL=$withNCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$NCCL_PATH"\
7577
-DWITH_COMPLEX=OFF -DWITH_GPU=$withGPU -DCMAKE_CUDA_FLAGS="$cuda_flags"\
7678
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile \
77-
-DHIGHERQUAD_PSP=$withHigherQuadPSP\
79+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 \
7880
$1
7981
}
8082

@@ -90,7 +92,7 @@ function cmake_cplx() {
9092
-DWITH_NCCL=$withNCCL -DCMAKE_PREFIX_PATH="$ELPA_PATH;$NCCL_PATH" \
9193
-DWITH_COMPLEX=ON \
9294
-DWITH_TESTING=$testing -DMINIMAL_COMPILE=$minimal_compile \
93-
-DHIGHERQUAD_PSP=$withHigherQuadPSP\
95+
-DHIGHERQUAD_PSP=$withHigherQuadPSP -DUSE_64BIT_INT=$useInt64 \
9496
$1
9597
}
9698

include/AtomCenteredPseudoWavefunctionSpline.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ namespace dftfe
5050
* @param[in] truncationTol the minimum function value after which the
5151
* function is truncated.
5252
*/
53-
AtomCenteredPseudoWavefunctionSpline(std::string filename,
54-
unsigned int l,
55-
double cutoff,
56-
double truncationTol = 1E-10);
53+
AtomCenteredPseudoWavefunctionSpline(std::string filename,
54+
dftfe::uInt l,
55+
double cutoff,
56+
double truncationTol = 1E-10);
5757
};
5858

5959
} // end of namespace dftfe

include/AtomCenteredSphericalFunctionBase.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include <vector>
2424
#include <boost/math/quadrature/gauss_kronrod.hpp>
25+
#include <TypeConfig.h>
26+
2527
namespace dftfe
2628
{
2729
class AtomCenteredSphericalFunctionBase
@@ -41,7 +43,7 @@ namespace dftfe
4143
* @brief returns the l-quantum number associated with the spherical function
4244
* @return Quantum number l
4345
*/
44-
unsigned int
46+
dftfe::uInt
4547
getQuantumNumberl() const;
4648

4749
/**
@@ -72,9 +74,9 @@ namespace dftfe
7274
getDerivativeValue(double r) const = 0;
7375

7476
protected:
75-
double d_cutOff;
76-
unsigned int d_lQuantumNumber;
77-
bool d_DataPresent;
77+
double d_cutOff;
78+
dftfe::uInt d_lQuantumNumber;
79+
bool d_DataPresent;
7880

7981

8082
}; // end of class AtomCenteredSphericalFunctionBase

include/AtomCenteredSphericalFunctionBessel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ namespace dftfe
3838
* @param[in] RcParameter coefficent for the bessel function
3939
* @param[in] RmaxParameter the maximum R afterwhich the function returns 0.
4040
*/
41-
AtomCenteredSphericalFunctionBessel(double RcParameter,
42-
double RmaxParameter,
43-
unsigned int lParameter);
41+
AtomCenteredSphericalFunctionBessel(double RcParameter,
42+
double RmaxParameter,
43+
dftfe::uInt lParameter);
4444

4545
double
4646
getRadialValue(double r) const override;
4747

48-
unsigned int
48+
dftfe::uInt
4949
getQuantumNumbern() const;
5050

5151
double

0 commit comments

Comments
 (0)