Skip to content

Commit 6b53441

Browse files
Merge pull request #236 from ltimmerman3/master
2 parents 99e4b7e + d821e18 commit 6b53441

File tree

7 files changed

+27
-5
lines changed

7 files changed

+27
-5
lines changed

ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
-Date
33
-Name
44
-changes
5+
--------------
6+
Dec 4, 2024
7+
Name: Lucas Timmerman
8+
Changes: (md.c, ofdft.c, relax.c, driver.c)
9+
1. Add catch for Calculate_local_kpoints
10+
2. Update printing in ofdft
11+
512
--------------
613
Nov 28, 2024
714
Name: Tian Tian

src/electronicGroundState.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ void scf(SPARC_OBJ *pSPARC)
572572
pSPARC->RelaxCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
573573
#ifdef USE_SOCKET
574574
else if(pSPARC->SocketFlag == 1)
575-
fprintf(output_fp," Self Consistent Field (SCF#%d) \n", pSPARC->SocketSCFCount);
575+
fprintf(output_fp," Self Consistent Field (SCF#%d) \n", pSPARC->SocketSCFCount);
576576
#endif
577577
else
578578
fprintf(output_fp," Self Consistent Field (SCF#%d) \n",1);

src/initialization.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3649,7 +3649,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
36493649
}
36503650

36513651
fprintf(output_fp,"***************************************************************************\n");
3652-
fprintf(output_fp,"* SPARC (version Nov 28, 2024) *\n");
3652+
fprintf(output_fp,"* SPARC (version Dec 4, 2024) *\n");
36533653
fprintf(output_fp,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n");
36543654
fprintf(output_fp,"* Distributed under GNU General Public License 3 (GPL) *\n");
36553655
fprintf(output_fp,"* Start time: %s *\n",c_time_str);

src/md.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,9 @@ void reinitialize_mesh_NPT(SPARC_OBJ *pSPARC)
12491249

12501250
// re-calculate local k-points array
12511251
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
1252-
Calculate_local_kpoints(pSPARC);
1252+
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
1253+
Calculate_local_kpoints(pSPARC);
1254+
}
12531255
}
12541256

12551257
#ifdef DEBUG

src/ofdft/ofdft.c

+8
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ void OFDFT_NLCG_TETER(SPARC_OBJ *pSPARC) {
8282
if(pSPARC->RelaxFlag >= 1)
8383
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
8484
pSPARC->RelaxCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
85+
else if (pSPARC->MDFlag == 1)
86+
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
87+
pSPARC->MDCount + pSPARC->restartCount + (pSPARC->RestartFlag == 0));
88+
#ifdef USE_SOCKET
89+
else if(pSPARC->SocketFlag == 1)
90+
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",
91+
pSPARC->SocketSCFCount);
92+
#endif
8593
else
8694
fprintf(output_fp," Orbital Free DFT NLCG (OFDFT-NLCG#%d) \n",1);
8795

src/relax.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,9 @@ void reinitialize_cell_mesh(SPARC_OBJ *pSPARC, double vol)
12691269

12701270
// re-calculate local k-points array
12711271
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
1272-
Calculate_local_kpoints(pSPARC);
1272+
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
1273+
Calculate_local_kpoints(pSPARC);
1274+
}
12731275
}
12741276

12751277
#ifdef DEBUG

src/socket/driver.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,10 @@ void reinit_mesh(SPARC_OBJ *pSPARC){
468468

469469
Calculate_kpoints(pSPARC);
470470
if (pSPARC->Nkpts >= 1 && pSPARC->kptcomm_index != -1) {
471-
Calculate_local_kpoints(pSPARC);
471+
// set up sub-communicators
472+
if (pSPARC->sqAmbientFlag == 0 && pSPARC->sqHighTFlag == 0 && pSPARC->OFDFTFlag == 0) {
473+
Calculate_local_kpoints(pSPARC);
474+
}
472475
}
473476
Calculate_PseudochargeCutoff(pSPARC);
474477

0 commit comments

Comments
 (0)