@@ -429,6 +429,13 @@ void Initialize(SPARC_OBJ *pSPARC, int argc, char *argv[]) {
429
429
if (rank == 0 ) printf ("The dimension of subgrid for eigen sovler is (%d x %d).\n" ,
430
430
pSPARC -> eig_paral_subdims [0 ], pSPARC -> eig_paral_subdims [1 ]);
431
431
#endif
432
+
433
+ #ifdef USE_ELPA
434
+ // No processor can have zero data in ELPA
435
+ int maxdim = max (pSPARC -> eig_paral_subdims [0 ], pSPARC -> eig_paral_subdims [1 ]);
436
+ pSPARC -> eig_paral_blksz = max (1 ,min (pSPARC -> Nstates /maxdim , pSPARC -> eig_paral_blksz ));
437
+ // if (rank == 0) printf("eig_paral_blksz %d\n", pSPARC->eig_paral_blksz);
438
+ #endif
432
439
}
433
440
}
434
441
@@ -2601,6 +2608,14 @@ void SPARC_copy_input(SPARC_OBJ *pSPARC, SPARC_INPUT_OBJ *pSPARC_Input) {
2601
2608
}
2602
2609
}
2603
2610
2611
+ #if defined(USE_ELPA )
2612
+ #if !defined(USE_MKL ) && !defined(USE_SCALAPACK )
2613
+ if (rank == 0 )
2614
+ printf (RED "ERROR: To use ELPA, please turn on MKL or SCALAPACK in makefile!\n" RESET );
2615
+ exit (EXIT_FAILURE );
2616
+ #endif
2617
+ #endif
2618
+
2604
2619
#if !defined(USE_MKL ) && !defined(USE_FFTW )
2605
2620
if (pSPARC -> ixc [3 ] != 0 ){
2606
2621
if (rank == 0 )
@@ -3649,7 +3664,7 @@ void write_output_init(SPARC_OBJ *pSPARC) {
3649
3664
}
3650
3665
3651
3666
fprintf (output_fp ,"***************************************************************************\n" );
3652
- fprintf (output_fp ,"* SPARC (version Dec 4 , 2024) *\n" );
3667
+ fprintf (output_fp ,"* SPARC (version Dec 10 , 2024) *\n" );
3653
3668
fprintf (output_fp ,"* Copyright (c) 2020 Material Physics & Mechanics Group, Georgia Tech *\n" );
3654
3669
fprintf (output_fp ,"* Distributed under GNU General Public License 3 (GPL) *\n" );
3655
3670
fprintf (output_fp ,"* Start time: %s *\n" ,c_time_str );
@@ -4281,8 +4296,7 @@ void SPARC_Input_MPI_create(MPI_Datatype *pSPARC_INPUT_MPI) {
4281
4296
MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE ,
4282
4297
MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE , MPI_DOUBLE ,
4283
4298
MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR ,
4284
- MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR ,
4285
- MPI_CHAR };
4299
+ MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR , MPI_CHAR };
4286
4300
int blens [N_MEMBR ] = {3 , 3 , 7 , /* int array */
4287
4301
1 , 1 , 1 , 1 , 1 ,
4288
4302
1 , 1 , 1 , 1 , 1 ,
@@ -4325,8 +4339,7 @@ void SPARC_Input_MPI_create(MPI_Datatype *pSPARC_INPUT_MPI) {
4325
4339
1 , 1 , 1 , 1 , 1 ,
4326
4340
1 , /* double */
4327
4341
32 , 32 , 32 , L_STRING , L_STRING , /* char */
4328
- L_STRING , L_STRING , L_STRING , L_STRING ,
4329
- L_STRING };
4342
+ L_STRING , L_STRING , L_STRING , L_STRING , L_STRING };
4330
4343
4331
4344
// calculating offsets in an architecture independent manner
4332
4345
MPI_Aint addr [N_MEMBR ],disps [N_MEMBR ], base ;
0 commit comments