83 isInertiaCount, maxPEXSIIter, muMin0, muMax0, mu0, &
84 muInertiaTolerance, muInertiaExpansion, &
85 muPEXSISafeGuard, numElectronPEXSITolerance, &
86 matrixType, isSymbolicFactorize, ordering, rowOrdering, &
87 npSymbFact, verbosity)
90 REAL(kind=
real_8),
INTENT(IN),
OPTIONAL :: temperature, gap, deltae
91 INTEGER,
INTENT(IN),
OPTIONAL :: numpole, isinertiacount, &
93 REAL(kind=
real_8),
INTENT(IN),
OPTIONAL :: mumin0, mumax0, mu0, &
94 muinertiatolerance, muinertiaexpansion, mupexsisafeguard, &
95 numelectronpexsitolerance
96 INTEGER,
INTENT(IN),
OPTIONAL :: matrixtype, &
97 issymbolicfactorize, &
98 ordering, rowordering, npsymbfact, &
102 IF (
PRESENT(temperature)) pexsi_options%options%temperature = temperature
103 IF (
PRESENT(gap)) pexsi_options%options%gap = gap
104 IF (
PRESENT(deltae)) pexsi_options%options%deltaE = deltae
105 IF (
PRESENT(numpole)) pexsi_options%options%numPole = numpole
106 IF (
PRESENT(isinertiacount)) pexsi_options%options%isInertiaCount = isinertiacount
107 IF (
PRESENT(maxpexsiiter)) pexsi_options%options%maxPEXSIIter = maxpexsiiter
108 IF (
PRESENT(mumin0)) pexsi_options%options%muMin0 = mumin0
109 IF (
PRESENT(mumax0)) pexsi_options%options%muMax0 = mumax0
110 IF (
PRESENT(mu0)) pexsi_options%options%mu0 = mu0
111 IF (
PRESENT(muinertiatolerance))
THEN
112 pexsi_options%options%muInertiaTolerance = muinertiatolerance
114 IF (
PRESENT(muinertiaexpansion))
THEN
115 pexsi_options%options%muInertiaExpansion = muinertiaexpansion
117 IF (
PRESENT(mupexsisafeguard))
THEN
118 pexsi_options%options%muPEXSISafeGuard = mupexsisafeguard
120 IF (
PRESENT(numelectronpexsitolerance))
THEN
121 pexsi_options%options%numElectronPEXSITolerance = numelectronpexsitolerance
123 IF (
PRESENT(matrixtype)) pexsi_options%options%matrixType = matrixtype
124 IF (
PRESENT(issymbolicfactorize))
THEN
125 pexsi_options%options%isSymbolicFactorize = issymbolicfactorize
127 IF (
PRESENT(ordering)) pexsi_options%options%ordering = ordering
128 IF (
PRESENT(rowordering)) pexsi_options%options%rowOrdering = rowordering
129 IF (
PRESENT(npsymbfact)) pexsi_options%options%npSymbFact = npsymbfact
130 IF (
PRESENT(verbosity)) pexsi_options%options%verbosity = verbosity
132 mark_used(pexsi_options)
133 mark_used(temperature)
137 mark_used(isinertiacount)
138 mark_used(maxpexsiiter)
142 mark_used(muinertiatolerance)
143 mark_used(muinertiaexpansion)
144 mark_used(mupexsisafeguard)
145 mark_used(numelectronpexsitolerance)
146 mark_used(matrixtype)
147 mark_used(issymbolicfactorize)
149 mark_used(rowordering)
150 mark_used(npsymbfact)
152 cpabort(
"Requires linking to the PEXSI library.")
186 isInertiaCount, maxPEXSIIter, muMin0, muMax0, mu0, &
187 muInertiaTolerance, muInertiaExpansion, &
188 muPEXSISafeGuard, numElectronPEXSITolerance, &
189 matrixType, isSymbolicFactorize, ordering, rowOrdering, &
190 npSymbFact, verbosity)
192 REAL(kind=
real_8),
INTENT(OUT),
OPTIONAL :: temperature, gap, deltae
193 INTEGER,
INTENT(OUT),
OPTIONAL :: numpole, isinertiacount, &
195 REAL(kind=
real_8),
INTENT(OUT),
OPTIONAL :: mumin0, mumax0, mu0, &
196 muinertiatolerance, muinertiaexpansion, mupexsisafeguard, &
197 numelectronpexsitolerance
198 INTEGER,
INTENT(OUT),
OPTIONAL :: matrixtype, &
199 issymbolicfactorize, &
200 ordering, rowordering, npsymbfact, &
204 IF (
PRESENT(temperature)) temperature = pexsi_options%options%temperature
205 IF (
PRESENT(gap)) gap = pexsi_options%options%gap
206 IF (
PRESENT(deltae)) deltae = pexsi_options%options%deltaE
207 IF (
PRESENT(numpole)) numpole = pexsi_options%options%numPole
208 IF (
PRESENT(isinertiacount)) isinertiacount = pexsi_options%options%isInertiaCount
209 IF (
PRESENT(maxpexsiiter)) maxpexsiiter = pexsi_options%options%maxPEXSIIter
210 IF (
PRESENT(mumin0)) mumin0 = pexsi_options%options%muMin0
211 IF (
PRESENT(mumax0)) mumax0 = pexsi_options%options%muMax0
212 IF (
PRESENT(mu0)) mu0 = pexsi_options%options%mu0
213 IF (
PRESENT(muinertiatolerance))
THEN
214 muinertiatolerance = pexsi_options%options%muInertiaTolerance
216 IF (
PRESENT(muinertiaexpansion))
THEN
217 muinertiaexpansion = pexsi_options%options%muInertiaExpansion
219 IF (
PRESENT(mupexsisafeguard))
THEN
220 mupexsisafeguard = pexsi_options%options%muPEXSISafeGuard
222 IF (
PRESENT(numelectronpexsitolerance))
THEN
223 numelectronpexsitolerance = pexsi_options%options%numElectronPEXSITolerance
225 IF (
PRESENT(matrixtype)) matrixtype = pexsi_options%options%matrixType
226 IF (
PRESENT(issymbolicfactorize))
THEN
227 issymbolicfactorize = pexsi_options%options%isSymbolicFactorize
229 IF (
PRESENT(ordering)) ordering = pexsi_options%options%ordering
230 IF (
PRESENT(rowordering)) rowordering = pexsi_options%options%rowOrdering
231 IF (
PRESENT(npsymbfact)) npsymbfact = pexsi_options%options%npSymbFact
232 IF (
PRESENT(verbosity)) verbosity = pexsi_options%options%verbosity
234 mark_used(pexsi_options)
236 IF (
PRESENT(temperature)) temperature = 0.0_real_8
237 IF (
PRESENT(gap)) gap = 0.0_real_8
238 IF (
PRESENT(deltae)) deltae = 0.0_real_8
239 IF (
PRESENT(numpole)) numpole = -1
240 IF (
PRESENT(isinertiacount)) isinertiacount = -1
241 IF (
PRESENT(maxpexsiiter)) maxpexsiiter = -1
242 IF (
PRESENT(mumin0)) mumin0 = 0.0_real_8
243 IF (
PRESENT(mumax0)) mumax0 = 0.0_real_8
244 IF (
PRESENT(mu0)) mu0 = 0.0_real_8
245 IF (
PRESENT(muinertiatolerance)) muinertiatolerance = 0.0_real_8
246 IF (
PRESENT(muinertiaexpansion)) muinertiaexpansion = 0.0_real_8
247 IF (
PRESENT(mupexsisafeguard)) mupexsisafeguard = 0.0_real_8
248 IF (
PRESENT(numelectronpexsitolerance)) numelectronpexsitolerance = 0.0_real_8
249 IF (
PRESENT(matrixtype)) matrixtype = -1
250 IF (
PRESENT(issymbolicfactorize)) issymbolicfactorize = -1
251 IF (
PRESENT(ordering)) ordering = -1
252 IF (
PRESENT(rowordering)) rowordering = -1
253 IF (
PRESENT(npsymbfact)) npsymbfact = -1
254 IF (
PRESENT(verbosity)) verbosity = -1
255 cpabort(
"Requires linking to the PEXSI library.")
323 nnzLocal, numColLocal, colptrLocal, &
324 rowindLocal, HnzvalLocal, isSIdentity, &
326 INTEGER(KIND=C_INTPTR_T),
INTENT(IN) :: plan
328 INTEGER,
INTENT(IN) :: nrows, nnz, nnzlocal, &
329 numcollocal, colptrlocal(*), &
331 REAL(kind=
real_8),
INTENT(IN) :: hnzvallocal(*)
332 INTEGER,
INTENT(IN) :: issidentity
333 REAL(kind=
real_8),
INTENT(IN) :: snzvallocal(*)
336 CHARACTER(LEN=*),
PARAMETER :: routinen =
'cp_pexsi_load_real_symmetric_hs_matrix'
337 INTEGER :: handle, info
339 CALL timeset(routinen, handle)
340 CALL f_ppexsi_load_real_hs_matrix(plan, pexsi_options%options, nrows, nnz, nnzlocal, &
341 numcollocal, colptrlocal, rowindlocal, &
342 hnzvallocal, issidentity, snzvallocal, info)
344 cpabort(
"Pexsi returned an error. Consider logPEXSI0 for details.")
346 CALL timestop(handle)
349 mark_used(pexsi_options)
353 mark_used(numcollocal)
354 mark_used(issidentity)
355 cpabort(
"Requires linking to the PEXSI library.")
360 IF (colptrlocal(1) > rowindlocal(1) .OR. hnzvallocal(1) > snzvallocal(1))
EXIT
379 numElectronPEXSI, muMinInertia, muMaxInertia, &
380 numTotalInertiaIter, numTotalPEXSIIter)
381 INTEGER(KIND=C_INTPTR_T),
INTENT(IN) :: plan
383 REAL(kind=
real_8),
INTENT(IN) :: numelectronexact
384 REAL(kind=
real_8),
INTENT(out) :: mupexsi, numelectronpexsi, &
385 mumininertia, mumaxinertia
386 INTEGER,
INTENT(out) :: numtotalinertiaiter, &
390 CHARACTER(LEN=*),
PARAMETER :: routinen =
'cp_pexsi_dft_driver'
391 INTEGER :: handle, info
392#if defined(__HAS_IEEE_EXCEPTIONS)
393 LOGICAL,
DIMENSION(5) :: halt
396 CALL timeset(routinen, handle)
400#if defined(__HAS_IEEE_EXCEPTIONS)
401 CALL ieee_get_halting_mode(ieee_all, halt)
402 CALL ieee_set_halting_mode(ieee_all, .false.)
405 CALL f_ppexsi_dft_driver(plan, pexsi_options%options, numelectronexact, mupexsi, &
406 numelectronpexsi, mumininertia, mumaxinertia, &
407 numtotalinertiaiter, numtotalpexsiiter, info)
409#if defined(__HAS_IEEE_EXCEPTIONS)
410 CALL ieee_set_halting_mode(ieee_all, halt)
414 cpabort(
"Pexsi returned an error. Consider logPEXSI0 for details.")
416 CALL timestop(handle)
419 mark_used(numelectronexact)
420 mark_used(pexsi_options)
423 numelectronpexsi = 0.0_real_8
424 mumininertia = 0.0_real_8
425 mumaxinertia = 0.0_real_8
426 numtotalinertiaiter = -1
427 numtotalpexsiiter = -1
428 cpabort(
"Requires linking to the PEXSI library.")
443 FDMnzvalLocal, totalEnergyH, &
444 totalEnergyS, totalFreeEnergy)
445 INTEGER(KIND=C_INTPTR_T),
INTENT(IN) :: plan
446 REAL(kind=
real_8),
INTENT(out) :: dmnzvallocal(*), edmnzvallocal(*), &
447 fdmnzvallocal(*), totalenergyh, totalenergys, &
451 CHARACTER(LEN=*),
PARAMETER :: routinen =
'cp_pexsi_retrieve_real_symmetric_dft_matrix'
452 INTEGER :: handle, info
454 CALL timeset(routinen, handle)
455 CALL f_ppexsi_retrieve_real_dft_matrix(plan, dmnzvallocal, edmnzvallocal, &
456 fdmnzvallocal, totalenergyh, &
457 totalenergys, totalfreeenergy, info)
459 cpabort(
"Pexsi returned an error. Consider logPEXSI0 for details.")
461 CALL timestop(handle)
465 dmnzvallocal(1) = 0.0_real_8
466 edmnzvallocal(1) = 0.0_real_8
467 fdmnzvallocal(1) = 0.0_real_8
468 totalenergyh = 0.0_real_8
469 totalenergys = 0.0_real_8
470 totalfreeenergy = 0.0_real_8
472 cpabort(
"Requires linking to the PEXSI library.")
subroutine, public cp_pexsi_set_options(pexsi_options, temperature, gap, deltae, numpole, isinertiacount, maxpexsiiter, mumin0, mumax0, mu0, muinertiatolerance, muinertiaexpansion, mupexsisafeguard, numelectronpexsitolerance, matrixtype, issymbolicfactorize, ordering, rowordering, npsymbfact, verbosity)
Set PEXSI internal options.
subroutine, public cp_pexsi_get_options(pexsi_options, temperature, gap, deltae, numpole, isinertiacount, maxpexsiiter, mumin0, mumax0, mu0, muinertiatolerance, muinertiaexpansion, mupexsisafeguard, numelectronpexsitolerance, matrixtype, issymbolicfactorize, ordering, rowordering, npsymbfact, verbosity)
Access PEXSI internal options.