(git:3f0d10b)
Loading...
Searching...
No Matches
pexsi_interface.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Interface to the PEXSI library, providing wrappers for all PEXSI
10!> routines that are called inside CP2K. Requires PEXSI version 0.10.x.
11!> \par History
12!> 2014.12 created [Patrick Seewald]
13!> \author Patrick Seewald
14! **************************************************************************************************
16
17#if defined(__PEXSI)
18 USE f_ppexsi_interface, ONLY: f_ppexsi_dft_driver, &
19 f_ppexsi_load_real_hs_matrix, &
20 f_ppexsi_options, &
21 f_ppexsi_plan_finalize, &
22 f_ppexsi_plan_initialize, &
23 f_ppexsi_retrieve_real_dft_matrix, &
24 f_ppexsi_set_default_options
25#endif
26#if defined(__HAS_IEEE_EXCEPTIONS)
27 USE ieee_exceptions, ONLY: ieee_get_halting_mode, &
28 ieee_set_halting_mode, &
29 ieee_all
30#endif
31 USE kinds, ONLY: int_8, &
32 real_8
33 USE iso_c_binding, ONLY: c_intptr_t
35#include "./base/base_uses.f90"
36
37 IMPLICIT NONE
38
39 PRIVATE
40
41 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'pexsi_interface'
42
47
49 PRIVATE
50#if defined(__PEXSI)
51 TYPE(f_ppexsi_options), ALLOCATABLE :: options
52#else
53 INTEGER :: unused = -1
54#endif
55 END TYPE cp_pexsi_options
56
57CONTAINS
58
59! **************************************************************************************************
60!> \brief Set PEXSI internal options
61!> \param pexsi_options ...
62!> \param temperature ...
63!> \param gap ...
64!> \param deltaE ...
65!> \param numPole ...
66!> \param isInertiaCount ...
67!> \param maxPEXSIIter ...
68!> \param muMin0 ...
69!> \param muMax0 ...
70!> \param mu0 ...
71!> \param muInertiaTolerance ...
72!> \param muInertiaExpansion ...
73!> \param muPEXSISafeGuard ...
74!> \param numElectronPEXSITolerance ...
75!> \param matrixType ...
76!> \param isSymbolicFactorize ...
77!> \param ordering ...
78!> \param rowOrdering ...
79!> \param npSymbFact ...
80!> \param verbosity ...
81! **************************************************************************************************
82 SUBROUTINE cp_pexsi_set_options(pexsi_options, temperature, gap, deltaE, numPole, &
83 isInertiaCount, maxPEXSIIter, muMin0, muMax0, mu0, &
84 muInertiaTolerance, muInertiaExpansion, &
85 muPEXSISafeGuard, numElectronPEXSITolerance, &
86 matrixType, isSymbolicFactorize, ordering, rowOrdering, &
87 npSymbFact, verbosity)
88
89 TYPE(cp_pexsi_options), INTENT(INOUT) :: pexsi_options
90 REAL(kind=real_8), INTENT(IN), OPTIONAL :: temperature, gap, deltae
91 INTEGER, INTENT(IN), OPTIONAL :: numpole, isinertiacount, &
92 maxpexsiiter
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, &
99 verbosity
100
101#if defined(__PEXSI)
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
113 END IF
114 IF (PRESENT(muinertiaexpansion)) THEN
115 pexsi_options%options%muInertiaExpansion = muinertiaexpansion
116 END IF
117 IF (PRESENT(mupexsisafeguard)) THEN
118 pexsi_options%options%muPEXSISafeGuard = mupexsisafeguard
119 END IF
120 IF (PRESENT(numelectronpexsitolerance)) THEN
121 pexsi_options%options%numElectronPEXSITolerance = numelectronpexsitolerance
122 END IF
123 IF (PRESENT(matrixtype)) pexsi_options%options%matrixType = matrixtype
124 IF (PRESENT(issymbolicfactorize)) THEN
125 pexsi_options%options%isSymbolicFactorize = issymbolicfactorize
126 END IF
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
131#else
132 mark_used(pexsi_options)
133 mark_used(temperature)
134 mark_used(gap)
135 mark_used(deltae)
136 mark_used(numpole)
137 mark_used(isinertiacount)
138 mark_used(maxpexsiiter)
139 mark_used(mumin0)
140 mark_used(mumax0)
141 mark_used(mu0)
142 mark_used(muinertiatolerance)
143 mark_used(muinertiaexpansion)
144 mark_used(mupexsisafeguard)
145 mark_used(numelectronpexsitolerance)
146 mark_used(matrixtype)
147 mark_used(issymbolicfactorize)
148 mark_used(ordering)
149 mark_used(rowordering)
150 mark_used(npsymbfact)
151 mark_used(verbosity)
152 cpabort("Requires linking to the PEXSI library.")
153#endif
154
155 ! Additional PEXSI parameters and their defaults not made available here
156 ! because CP2K should always use PEXSI's defaults:
157 ! isConstructCommPattern (=?, pexsi does not even use it)
158 ! symmetric (=1)
159 ! transpose (=0)
160 END SUBROUTINE cp_pexsi_set_options
161
162! **************************************************************************************************
163!> \brief Access PEXSI internal options
164!> \param pexsi_options ...
165!> \param temperature ...
166!> \param gap ...
167!> \param deltaE ...
168!> \param numPole ...
169!> \param isInertiaCount ...
170!> \param maxPEXSIIter ...
171!> \param muMin0 ...
172!> \param muMax0 ...
173!> \param mu0 ...
174!> \param muInertiaTolerance ...
175!> \param muInertiaExpansion ...
176!> \param muPEXSISafeGuard ...
177!> \param numElectronPEXSITolerance ...
178!> \param matrixType ...
179!> \param isSymbolicFactorize ...
180!> \param ordering ...
181!> \param rowOrdering ...
182!> \param npSymbFact ...
183!> \param verbosity ...
184! **************************************************************************************************
185 SUBROUTINE cp_pexsi_get_options(pexsi_options, temperature, gap, deltaE, numPole, &
186 isInertiaCount, maxPEXSIIter, muMin0, muMax0, mu0, &
187 muInertiaTolerance, muInertiaExpansion, &
188 muPEXSISafeGuard, numElectronPEXSITolerance, &
189 matrixType, isSymbolicFactorize, ordering, rowOrdering, &
190 npSymbFact, verbosity)
191 TYPE(cp_pexsi_options), INTENT(IN) :: pexsi_options
192 REAL(kind=real_8), INTENT(OUT), OPTIONAL :: temperature, gap, deltae
193 INTEGER, INTENT(OUT), OPTIONAL :: numpole, isinertiacount, &
194 maxpexsiiter
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, &
201 verbosity
202
203#if defined(__PEXSI)
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
215 END IF
216 IF (PRESENT(muinertiaexpansion)) THEN
217 muinertiaexpansion = pexsi_options%options%muInertiaExpansion
218 END IF
219 IF (PRESENT(mupexsisafeguard)) THEN
220 mupexsisafeguard = pexsi_options%options%muPEXSISafeGuard
221 END IF
222 IF (PRESENT(numelectronpexsitolerance)) THEN
223 numelectronpexsitolerance = pexsi_options%options%numElectronPEXSITolerance
224 END IF
225 IF (PRESENT(matrixtype)) matrixtype = pexsi_options%options%matrixType
226 IF (PRESENT(issymbolicfactorize)) THEN
227 issymbolicfactorize = pexsi_options%options%isSymbolicFactorize
228 END IF
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
233#else
234 mark_used(pexsi_options)
235 ! assign intent-out arguments to silence compiler warnings
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.")
256#endif
257 END SUBROUTINE cp_pexsi_get_options
258
259! **************************************************************************************************
260!> \brief ...
261!> \param pexsi_options ...
262! **************************************************************************************************
263 SUBROUTINE cp_pexsi_set_default_options(pexsi_options)
264 TYPE(cp_pexsi_options), INTENT(OUT) :: pexsi_options
265
266#if defined(__PEXSI)
267 ALLOCATE (pexsi_options%options)
268 CALL f_ppexsi_set_default_options(pexsi_options%options)
269#else
270 cpabort("Requires linking to the PEXSI library.")
271#endif
272 END SUBROUTINE cp_pexsi_set_default_options
273
274! **************************************************************************************************
275!> \brief ...
276!> \param comm ...
277!> \param numProcRow ...
278!> \param numProcCol ...
279!> \param outputFileIndex ...
280!> \return ...
281! **************************************************************************************************
282 FUNCTION cp_pexsi_plan_initialize(comm, numProcRow, numProcCol, outputFileIndex)
283 TYPE(mp_comm_type), INTENT(IN) :: comm
284 INTEGER, INTENT(IN) :: numprocrow, numproccol, &
285 outputfileindex
286 INTEGER(KIND=C_INTPTR_T) :: cp_pexsi_plan_initialize
287
288#if defined(__PEXSI)
289 CHARACTER(LEN=*), PARAMETER :: routinen = 'cp_pexsi_plan_initialize'
290 INTEGER :: info, handle
291
292 CALL timeset(routinen, handle)
293 cp_pexsi_plan_initialize = f_ppexsi_plan_initialize(comm%get_handle(), numprocrow, &
294 numproccol, outputfileindex, info)
295 IF (info /= 0) THEN
296 cpabort("Pexsi returned an error. Consider logPEXSI0 for details.")
297 END IF
298 CALL timestop(handle)
299#else
300 mark_used(comm)
301 mark_used(numprocrow)
302 mark_used(numproccol)
303 mark_used(outputfileindex)
305 cpabort("Requires linking to the PEXSI library.")
306#endif
307 END FUNCTION cp_pexsi_plan_initialize
308
309! **************************************************************************************************
310!> \brief ...
311!> \param plan ...
312!> \param pexsi_options ...
313!> \param nrows ...
314!> \param nnz ...
315!> \param nnzLocal ...
316!> \param numColLocal ...
317!> \param colptrLocal ...
318!> \param rowindLocal ...
319!> \param HnzvalLocal ...
320!> \param isSIdentity ...
321!> \param SnzvalLocal ...
322! **************************************************************************************************
323 SUBROUTINE cp_pexsi_load_real_hs_matrix(plan, pexsi_options, nrows, nnz, &
324 nnzLocal, numColLocal, colptrLocal, &
325 rowindLocal, HnzvalLocal, isSIdentity, &
326 SnzvalLocal)
327 INTEGER(KIND=C_INTPTR_T), INTENT(IN) :: plan
328 TYPE(cp_pexsi_options), INTENT(IN) :: pexsi_options
329 INTEGER, INTENT(IN) :: nrows, nnz, nnzlocal, &
330 numcollocal, colptrlocal(*), &
331 rowindlocal(*)
332 REAL(kind=real_8), INTENT(IN) :: hnzvallocal(*)
333 INTEGER, INTENT(IN) :: issidentity
334 REAL(kind=real_8), INTENT(IN) :: snzvallocal(*)
335
336#if defined(__PEXSI)
337 CHARACTER(LEN=*), PARAMETER :: routinen = 'cp_pexsi_load_real_symmetric_hs_matrix'
338 INTEGER :: handle, info
339
340 CALL timeset(routinen, handle)
341 CALL f_ppexsi_load_real_hs_matrix(plan, pexsi_options%options, nrows, nnz, nnzlocal, &
342 numcollocal, colptrlocal, rowindlocal, &
343 hnzvallocal, issidentity, snzvallocal, info)
344 IF (info /= 0) THEN
345 cpabort("Pexsi returned an error. Consider logPEXSI0 for details.")
346 END IF
347 CALL timestop(handle)
348#else
349 mark_used(plan)
350 mark_used(pexsi_options)
351 mark_used(nrows)
352 mark_used(nnz)
353 mark_used(nnzlocal)
354 mark_used(numcollocal)
355 mark_used(issidentity)
356 cpabort("Requires linking to the PEXSI library.")
357
358 ! MARK_USED macro does not work on assumed shape variables
359 IF (.false.) THEN
360 DO
361 IF (colptrlocal(1) > rowindlocal(1) .OR. hnzvallocal(1) > snzvallocal(1)) EXIT
362 END DO
363 END IF
364#endif
365 END SUBROUTINE cp_pexsi_load_real_hs_matrix
366
367! **************************************************************************************************
368!> \brief ...
369!> \param plan ...
370!> \param pexsi_options ...
371!> \param numElectronExact ...
372!> \param muPEXSI ...
373!> \param numElectronPEXSI ...
374!> \param muMinInertia ...
375!> \param muMaxInertia ...
376!> \param numTotalInertiaIter ...
377!> \param numTotalPEXSIIter ...
378! **************************************************************************************************
379 SUBROUTINE cp_pexsi_dft_driver(plan, pexsi_options, numElectronExact, muPEXSI, &
380 numElectronPEXSI, muMinInertia, muMaxInertia, &
381 numTotalInertiaIter, numTotalPEXSIIter)
382 INTEGER(KIND=C_INTPTR_T), INTENT(IN) :: plan
383 TYPE(cp_pexsi_options), INTENT(IN) :: pexsi_options
384 REAL(kind=real_8), INTENT(IN) :: numelectronexact
385 REAL(kind=real_8), INTENT(out) :: mupexsi, numelectronpexsi, &
386 mumininertia, mumaxinertia
387 INTEGER, INTENT(out) :: numtotalinertiaiter, &
388 numtotalpexsiiter
389
390#if defined(__PEXSI)
391 CHARACTER(LEN=*), PARAMETER :: routinen = 'cp_pexsi_dft_driver'
392 INTEGER :: handle, info
393#if defined(__HAS_IEEE_EXCEPTIONS)
394 LOGICAL, DIMENSION(5) :: halt
395#endif
396
397 CALL timeset(routinen, handle)
398
399 ! Unfortuntatelly, some PEXSI kernels raise IEEE754 exceptions.
400 ! Therefore, we disable floating point traps temporarily.
401#if defined(__HAS_IEEE_EXCEPTIONS)
402 CALL ieee_get_halting_mode(ieee_all, halt)
403 CALL ieee_set_halting_mode(ieee_all, .false.)
404#endif
405
406 CALL f_ppexsi_dft_driver(plan, pexsi_options%options, numelectronexact, mupexsi, &
407 numelectronpexsi, mumininertia, mumaxinertia, &
408 numtotalinertiaiter, numtotalpexsiiter, info)
409
410#if defined(__HAS_IEEE_EXCEPTIONS)
411 CALL ieee_set_halting_mode(ieee_all, halt)
412#endif
413
414 IF (info /= 0) THEN
415 cpabort("Pexsi returned an error. Consider logPEXSI0 for details.")
416 END IF
417 CALL timestop(handle)
418#else
419 mark_used(plan)
420 mark_used(numelectronexact)
421 mark_used(pexsi_options)
422 ! assign intent-out arguments to silence compiler warnings
423 mupexsi = 0.0_real_8
424 numelectronpexsi = 0.0_real_8
425 mumininertia = 0.0_real_8
426 mumaxinertia = 0.0_real_8
427 numtotalinertiaiter = -1
428 numtotalpexsiiter = -1
429 cpabort("Requires linking to the PEXSI library.")
430#endif
431 END SUBROUTINE cp_pexsi_dft_driver
432
433! **************************************************************************************************
434!> \brief ...
435!> \param plan ...
436!> \param DMnzvalLocal ...
437!> \param EDMnzvalLocal ...
438!> \param FDMnzvalLocal ...
439!> \param totalEnergyH ...
440!> \param totalEnergyS ...
441!> \param totalFreeEnergy ...
442! **************************************************************************************************
443 SUBROUTINE cp_pexsi_retrieve_real_dft_matrix(plan, DMnzvalLocal, EDMnzvalLocal, &
444 FDMnzvalLocal, totalEnergyH, &
445 totalEnergyS, totalFreeEnergy)
446 INTEGER(KIND=C_INTPTR_T), INTENT(IN) :: plan
447 REAL(kind=real_8), INTENT(out) :: dmnzvallocal(*), edmnzvallocal(*), &
448 fdmnzvallocal(*), totalenergyh, totalenergys, &
449 totalfreeenergy
450
451#if defined(__PEXSI)
452 CHARACTER(LEN=*), PARAMETER :: routinen = 'cp_pexsi_retrieve_real_symmetric_dft_matrix'
453 INTEGER :: handle, info
454
455 CALL timeset(routinen, handle)
456 CALL f_ppexsi_retrieve_real_dft_matrix(plan, dmnzvallocal, edmnzvallocal, &
457 fdmnzvallocal, totalenergyh, &
458 totalenergys, totalfreeenergy, info)
459 IF (info /= 0) THEN
460 cpabort("Pexsi returned an error. Consider logPEXSI0 for details.")
461 END IF
462 CALL timestop(handle)
463#else
464 mark_used(plan)
465 ! assign intent-out arguments to silence compiler warnings
466 dmnzvallocal(1) = 0.0_real_8
467 edmnzvallocal(1) = 0.0_real_8
468 fdmnzvallocal(1) = 0.0_real_8
469 totalenergyh = 0.0_real_8
470 totalenergys = 0.0_real_8
471 totalfreeenergy = 0.0_real_8
472
473 cpabort("Requires linking to the PEXSI library.")
474#endif
476
477! **************************************************************************************************
478!> \brief ...
479!> \param plan ...
480! **************************************************************************************************
481 SUBROUTINE cp_pexsi_plan_finalize(plan)
482 INTEGER(KIND=C_INTPTR_T), INTENT(IN) :: plan
483
484#if defined(__PEXSI)
485 CHARACTER(LEN=*), PARAMETER :: routinen = 'cp_pexsi_plan_finalize'
486 INTEGER :: info, handle
487
488 CALL timeset(routinen, handle)
489 CALL f_ppexsi_plan_finalize(plan, info)
490 IF (info /= 0) THEN
491 cpabort("Pexsi returned an error. Consider logPEXSI0 for details.")
492 END IF
493 CALL timestop(handle)
494#else
495 mark_used(plan)
496 cpabort("Requires linking to the PEXSI library.")
497#endif
498 END SUBROUTINE cp_pexsi_plan_finalize
499
500END MODULE pexsi_interface
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public int_8
Definition kinds.F:54
integer, parameter, public real_8
Definition kinds.F:41
Interface to the message passing library MPI.
Interface to the PEXSI library, providing wrappers for all PEXSI routines that are called inside CP2K...
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_retrieve_real_dft_matrix(plan, dmnzvallocal, edmnzvallocal, fdmnzvallocal, totalenergyh, totalenergys, totalfreeenergy)
...
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.
subroutine, public cp_pexsi_plan_finalize(plan)
...
subroutine, public cp_pexsi_load_real_hs_matrix(plan, pexsi_options, nrows, nnz, nnzlocal, numcollocal, colptrlocal, rowindlocal, hnzvallocal, issidentity, snzvallocal)
...
subroutine, public cp_pexsi_set_default_options(pexsi_options)
...
integer(kind=c_intptr_t) function, public cp_pexsi_plan_initialize(comm, numprocrow, numproccol, outputfileindex)
...
subroutine, public cp_pexsi_dft_driver(plan, pexsi_options, numelectronexact, mupexsi, numelectronpexsi, mumininertia, mumaxinertia, numtotalinertiaiter, numtotalpexsiiter)
...