MPI-SCATCI
2.0
An MPI version of SCATCI
|
Go to the documentation of this file.
34 use precisn,
only: longint, wp
35 use const_gbl,
only: stdout
36 use mpi_gbl,
only: nprocs, mpi_xermsg
86 #if defined(usempi) && defined(slepc)
89 #if defined(usempi) && defined(scalapack) && defined(elpa)
113 class(
basematrix),
pointer,
intent(out) :: matrix
117 integer,
intent(in) :: diag_choice, force_serial
118 integer,
intent(in) :: matrix_size, number_of_eigenpairs
119 integer,
intent(in) :: matrix_io
120 integer :: final_choice
124 final_choice = diag_choice
126 if (number_of_eigenpairs > real(matrix_size) * 0.2)
then
128 else if (number_of_eigenpairs <= 3)
then
137 if (nprocs > 1 .and. force_serial == 0)
then
138 select case (final_choice)
142 write (stdout,
"('ELPA chosen as diagonalizer of choice. Hohoho!')")
146 write (stdout,
"('ScaLAPACK chosen as diagonalizer of choice. Nice!')")
151 call mpi_xermsg(
'Dispatcher_module',
'DispatchMatrixAndDiagonalizer', &
152 'ScaLAPACK needed for dense diagonalization!', 1, 1)
155 write (stdout,
"('Davidson chosen as diagonalizer of choice. Sweet!')")
157 write (stdout,
"('SLEPc chosen as diagonalizer of choice. Amazing!')")
160 #elif defined(scalapack)
162 write (stdout,
"('Compiled without SLEPc, defaulting to ELPA')")
166 write (stdout,
"('Compiled without SLEPc, defaulting to ScaLAPACK')")
171 call mpi_xermsg(
'Dispatcher_module',
'DispatchMatrixAndDiagonalizer', &
172 'SLEPc or ScaLAPACK needed for distributed diagonalization!', 1, 1)
176 write (stdout,
"('SLEPc chosen as diagonalizer of choice. Amazing!')")
179 #elif defined(scalapack)
181 write (stdout,
"('Compiled without SLEPc, defaulting to ELPA')")
185 write (stdout,
"('Compiled without SLEPc, defaulting to ScaLAPACK')")
190 call mpi_xermsg(
'Dispatcher_module',
'DispatchMatrixAndDiagonalizer', &
191 'SLEPc or ScaLAPACK needed for distributed diagonalization!', 1, 1)
194 write (stdout,
"('That is not a diagonalizer I would have chosen tbh, lets not do it')")
195 call mpi_xermsg(
'Dispatcher_module',
'DispatchMatrixAndDiagonalizer', &
196 'Invalid diagonalizer flag chosen', 1, 1)
202 select case (final_choice)
204 write (stdout,
"('LAPACK chosen as diagonalizer of choice. Nice!')")
206 call integral % write_matrix_header(matrix_io, matrix_size)
210 write (stdout,
"('Davidson chosen as diagonalizer of choice. Sweet!')")
211 call integral % write_matrix_header(matrix_io, matrix_size)
216 write (stdout,
"('ARPACK chosen as diagonalizer of choice. Amazing!')")
217 call integral % write_matrix_header(matrix_io, matrix_size)
221 write (stdout,
"('ARPACK not available - using LAPACK. Sorry!')")
222 call integral % write_matrix_header(matrix_io, matrix_size)
227 write (stdout,
"('That is not a diagonalizer I would have chosen tbh, lets not do it')")
228 stop
"Invalid diagonalizer flag chosen"
244 integer,
intent(in) :: sym_group_flag
245 logical,
intent(in) :: ukrmolplus_integrals
250 if (ukrmolplus_integrals)
then
Diagonalizer type using Davidson backend.
integer, parameter symtype_d2h
This describes D_2_h symmetries.
Calculation setup for a single Hamiltonian diagonalization.
integer, parameter dense_diag
Force a dense diagonalizer (all eigenvalues)
subroutine, public initialize_slepc
Initialize SLEPc.
Diagonalizer type using SLEPc backend.
Matrix associated with a disk drive.
Diagonalizer type using Arpack backend.
This handles the matrix elements and also expands the vector size if we have reached max capacity.
integer, parameter scatci_decide
SCATCI chooses the diagonalizer.
subroutine, public dispatchintegral(sym_group_flag, ukrmolplus_integrals, integral)
This subroutine dispatches the correct integral class based on simple parameters.
MPI SCATCI Constants module.
subroutine, public dispatchmatrixanddiagonalizer(diag_choice, force_serial, matrix_size, number_of_eigenpairs, matrix, diagonalizer, integral, matrix_io)
This subroutine determines which matrix format/diagonalizer pair to be used by SCATCI in build diagon...
Diagonalizer type using ELPA backend.
Base type for all diagonalizers.
type(timer), public master_timer
integer, parameter iterative_diag
Force an iterative (like ARPACK) diagonalizer.
Diagonalizer type using ScaLAPACK backend.
integer, parameter davidson_diag
Force a Davidson diagonalizer.
Diagonalizer type using LAPACK backend.
subroutine initialize_elpa
Initialize the ELPA library.
subroutine, public initialize_libraries
Initialize libraries used by MPI-SCATCI.