Skip to content

Commit b78c605

Browse files
committed
Merge branch 'publicGithubDevelop' of https://bitbucket.org/dftfedevelopers/dftfe into publicGithubDevelop
2 parents 4f4e3f2 + e23443e commit b78c605

4 files changed

Lines changed: 53 additions & 27 deletions

File tree

include/excManager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ namespace dftfe
4545
void
4646
init(std::string XCType,
4747
bool isSpinPolarized,
48-
std::string modelXCInputFile);
48+
std::string modelXCInputFile,
49+
const bool printXCInfo = true);
4950

5051
ExcSSDFunctionalBaseClass<memorySpace> *
5152
getExcSSDFunctionalObj();

src/dft/initUnmovedTriangulation.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ namespace dftfe
361361

362362
d_excManagerPtr->init(d_dftParamsPtr->XCType,
363363
true,
364-
d_dftParamsPtr->modelXCInputFile);
364+
d_dftParamsPtr->modelXCInputFile,
365+
dealii::Utilities::MPI::this_mpi_process(
366+
d_mpiCommParent) == 0 &&
367+
d_dftParamsPtr->verbosity >= 1);
365368

366369
if (d_dftParamsPtr->auxBasisTypeXC == "FE")
367370
{

src/excManager/excManager.cpp

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ namespace dftfe
4242
initializeSSDPtr(std::string XCType,
4343
std::shared_ptr<xc_func_type> funcXPtr,
4444
std::shared_ptr<xc_func_type> funcCPtr,
45-
std::string modelXCInputFile)
45+
std::string modelXCInputFile,
46+
bool printXCInfo)
4647
{
4748
dftfe::Int exceptParamX = -1, exceptParamC = -1;
4849

50+
int vmajor, vminor, vmicro;
51+
xc_version(&vmajor, &vminor, &vmicro);
52+
if (printXCInfo)
53+
printf("Libxc version: %d.%d.%d\n", vmajor, vminor, vmicro);
54+
4955
std::shared_ptr<ExcSSDFunctionalBaseClass<memorySpace>> excObj;
5056
if (XCType == "LDA-PZ")
5157
{
@@ -77,6 +83,7 @@ namespace dftfe
7783
xc_func_init(funcXPtr.get(), XC_GGA_X_PBE, XC_POLARIZED);
7884
exceptParamC =
7985
xc_func_init(funcCPtr.get(), XC_GGA_C_PBE, XC_POLARIZED);
86+
8087
excObj = std::make_shared<excDensityGGAClass<memorySpace>>(funcXPtr,
8188
funcCPtr);
8289
}
@@ -159,6 +166,22 @@ namespace dftfe
159166
exit(-1);
160167
}
161168
}
169+
170+
if (printXCInfo)
171+
{
172+
for (int i = 0; i < 1; i++)
173+
if (funcXPtr->info->refs[i] != NULL)
174+
printf("X Functional: %s (DOI %s)\n",
175+
funcXPtr->info->refs[i]->ref,
176+
funcXPtr->info->refs[i]->doi);
177+
178+
for (int i = 0; i < 1; i++)
179+
if (funcCPtr->info->refs[i] != NULL)
180+
printf("C Functional: %s (DOI %s)\n",
181+
funcCPtr->info->refs[i]->ref,
182+
funcCPtr->info->refs[i]->doi);
183+
}
184+
162185
return excObj;
163186
}
164187
} // namespace
@@ -196,7 +219,8 @@ namespace dftfe
196219
void
197220
excManager<memorySpace>::init(std::string XCType,
198221
bool isSpinPolarized,
199-
std::string modelXCInputFile)
222+
std::string modelXCInputFile,
223+
const bool printXCInfo)
200224
{
201225
clear();
202226

@@ -223,15 +247,13 @@ namespace dftfe
223247
d_excObj =
224248
std::make_shared<ExcDFTPlusU<dataTypes::number, memorySpace>>(
225249
initializeSSDPtr<memorySpace>(
226-
XCInput, d_funcXPtr, d_funcCPtr, modelXCInputFile),
250+
XCInput, d_funcXPtr, d_funcCPtr, modelXCInputFile, printXCInfo),
227251
numSpin);
228252
}
229253
else
230254
{
231-
d_excObj = initializeSSDPtr<memorySpace>(XCType,
232-
d_funcXPtr,
233-
d_funcCPtr,
234-
modelXCInputFile);
255+
d_excObj = initializeSSDPtr<memorySpace>(
256+
XCType, d_funcXPtr, d_funcCPtr, modelXCInputFile, printXCInfo);
235257
}
236258
}
237259

src/linAlg/linearAlgebraOperationsInternal.cc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -254,24 +254,24 @@ namespace dftfe
254254
std::min((dftfe::uInt)std::floor(std::sqrt(numberProcs)),
255255
(dftfe::uInt)std::floor(rowProcs * 3.0)) :
256256
rowProcs;
257-
if(!dftParams.useDevice)
258-
{
259-
if (!dftParams.reproducible_output)
260-
rowProcs =
261-
std::min(rowProcs,
262-
(dftfe::uInt)std::ceil((double)size / (double)(100)));
263-
264-
else
265-
rowProcs =
266-
std::min(rowProcs,
267-
(dftfe::uInt)std::ceil((double)size / (double)(10)));
268-
}
269-
else
270-
{
271-
rowProcs =
272-
std::min(rowProcs,
273-
(dftfe::uInt)std::ceil((double)size / (double)(100)));
274-
}
257+
if (!dftParams.useDevice)
258+
{
259+
if (!dftParams.reproducible_output)
260+
rowProcs =
261+
std::min(rowProcs,
262+
(dftfe::uInt)std::ceil((double)size / (double)(100)));
263+
264+
else
265+
rowProcs =
266+
std::min(rowProcs,
267+
(dftfe::uInt)std::ceil((double)size / (double)(10)));
268+
}
269+
else
270+
{
271+
rowProcs =
272+
std::min(rowProcs,
273+
(dftfe::uInt)std::ceil((double)size / (double)(100)));
274+
}
275275

276276

277277
if (dftParams.verbosity >= 4)

0 commit comments

Comments
 (0)