PCMSolver Parallelisation

Dear Psi4 developers

I have recently started using Psi4, and am impressed with the feature set, and ease of use. I have however, noticed that solvation calculations (through the external PCMSolver) don’t seem to be OPENMP parallelized, only running on a single core. Are there any plans to parallelize this in the future?

Kind regards
Chris

Hmm, calling PCM shouldn’t cause Psi4 to run on only one core. Is this just that PCMSolver does not appear to be parallelized?

There should be a timer.dat built when an infield is run. Would you mind posting that here.

@robertodr

I agree with the assessment of @dgasmith What PCMSolver does, once per SCF iteration, is to update the apparent surface charge and that is one matrix-vector multiplication per iteration. That is not parallelized, but it should only be a fraction of the cost of the SCF calculation itself. I am curious to see the timer.dat file.

I have performed two SCF energy calculations on the same molecule; one with PCM, and the other with no PCM. Oddly, the former does not generate a timer.dat file (the latter does). Never-the-less, I have included the output for the PCM calculation. The PCM calculation took 1271 seconds total time vs 43 seconds for the gas-phase calculation.

Kind regards
Chris

PCM Calculation:

-----------------------------------------------------------------------
      Psi4: An Open-Source Ab Initio Electronic Structure Package
                           Psi4 1.1 release

                     Git: Rev {} add49b9 


R. M. Parrish, L. A. Burns, D. G. A. Smith, A. C. Simmonett,
A. E. DePrince III, E. G. Hohenstein, U. Bozkaya, A. Yu. Sokolov,
R. Di Remigio, R. M. Richard, J. F. Gonthier, A. M. James,
H. R. McAlexander, A. Kumar, M. Saitow, X. Wang, B. P. Pritchard,
P. Verma, H. F. Schaefer III, K. Patkowski, R. A. King, E. F. Valeev,
F. A. Evangelista, J. M. Turney, T. D. Crawford, and C. D. Sherrill,
J. Chem. Theory Comput. 13(7) pp 3185--3197 (2017).
(doi: 10.1021/acs.jctc.7b00174)

-----------------------------------------------------------------------


Psi4 started on: Monday, 29 January 2018 08:19AM

Process ID:  19919
PSIDATADIR: /share/apps/bin/psi4/share/psi4
Memory:     500.0 MiB
Threads:    16

  ==> Input File <==

--------------------------------------------------------------------------

memory 20480 mb

molecule Rhcomplex {
-1 1  
Rh       0.006889057     -0.012070350     -0.027437431

O       -0.021667629      1.588200281      1.176423257

O        0.988455214     -1.073984850      1.350183427

C       -0.066088812      1.422843234      2.578468904

C        0.707675562     -1.005035450      2.628624214

C       -0.388437545     -0.012066213      3.016927906

O        1.291306990     -1.664104499      3.471345349

H       -1.348867844     -0.321140585      2.575539875

H       -0.487777557     -0.050229232      4.110210695

O       -1.061481812      0.983468856     -1.407085364

O        0.001598449     -1.651338515     -1.220080046

C       -0.896230180      0.802181568     -2.695011301

C        0.139857385     -1.527929476     -2.620489679

C        0.295257815     -0.073606752     -3.090055697

O       -1.641574041      1.269646565     -3.537794502

H        1.219693537      0.350229825     -2.670316593

H        0.376335275     -0.049058429     -4.185591274

O       -1.838185033     -0.841366791      0.318619314

O        1.863006355      0.743407069     -0.476102785

H       -1.619623230     -1.554841659     -0.336608880

H       -2.388762071     -0.190994351     -0.164249189

H        1.969885034      1.334339120      0.294380307

H        2.463155006     -0.032936058     -0.387827587

H       -0.764241538     -1.943629046     -3.110354055

H        0.922486530      1.683022901      3.014940882

H        1.037798977     -2.063898807     -2.890374420

H       -0.855819050      2.071556609      2.927606569




}


pcm = {
   Units = Angstrom
   Medium {
   SolverType = IEFPCM
   Solvent = Water
   }

   Cavity {
   RadiiSet = UFF
   Type = GePol
   Scaling = True
   Area = 0.3
   Mode = Implicit
   }
}

set globals { 
 
guess 	        SAD
OPT_COORDINATES     both	 
basis               x2c-svpall
basis_relativistic  x2c-svpall
df_basis_scf        x2c-coulomb-fit
relativistic        x2c
MAXITER             256
dft_basis_tolerance 1.0E-11
pcm                 true
}




energy('B3LYP-D3MBJ')
#optimize('B3LYP-D3MBJ')

--------------------------------------------------------------------------

  Memory set to  19.073 GiB by Python driver.

*** tstart() called on compute-0-27.local
*** at Mon Jan 29 08:19:38 2018

   => Loading Basis Set <=

Name: X2C-SVPALL
Role: ORBITAL
Keyword: BASIS
atoms 1                        entry RH         line  1583 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 2-3, 7, 10-11, 15, 18-19 entry O          line   121 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 4-6, 12-14               entry C          line    81 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 8-9, 16-17, 20-27        entry H          line    16 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 


     ---------------------------------------------------------
                               SCF
        by Justin Turney, Rob Parrish, Andy Simmonett
                         and Daniel Smith
                          RKS Reference
                   16 Threads,  19531 MiB Core
     ---------------------------------------------------------

  ==> Geometry <==

Molecular point group: c1
Full point group: C1

Geometry (in Angstrom), charge = -1, multiplicity = 1:

   Center              X                  Y                   Z               Mass       
------------   -----------------  -----------------  -----------------  -----------------
      RH          0.032139469495     0.042136477815     0.007555036500   102.905504292000
       O          0.003582783495     1.642407108815     1.211415724500    15.994914619560
       O          1.013705626495    -1.019778022185     1.385175894500    15.994914619560
       C         -0.040838399505     1.477050061815     2.613461371500    12.000000000000
       C          0.732925974495    -0.950828622185     2.663616681500    12.000000000000
       C         -0.363187132505     0.042140614815     3.051920373500    12.000000000000
       O          1.316557402495    -1.609897671185     3.506337816500    15.994914619560
       H         -1.323617431505    -0.266933757185     2.610532342500     1.007825032070
       H         -0.462527144505     0.003977595815     4.145203162500     1.007825032070
       O         -1.036231399505     1.037675683815    -1.372092896500    15.994914619560
       O          0.026848861495    -1.597131687185    -1.185087578500    15.994914619560
       C         -0.870979767505     0.856388395815    -2.660018833500    12.000000000000
       C          0.165107797495    -1.473722648185    -2.585497211500    12.000000000000
       C          0.320508227495    -0.019399924185    -3.055063229500    12.000000000000
       O         -1.616323628505     1.323853392815    -3.502802034500    15.994914619560
       H          1.244943949495     0.404436652815    -2.635324125500     1.007825032070
       H          0.401585687495     0.005148398815    -4.150598806500     1.007825032070
       O         -1.812934620505    -0.787159963185     0.353611781500    15.994914619560
       O          1.888256767495     0.797613896815    -0.441110317500    15.994914619560
       H         -1.594372817505    -1.500634831185    -0.301616412500     1.007825032070
       H         -2.363511658505    -0.136787523185    -0.129256721500     1.007825032070
       H          1.995135446495     1.388545947815     0.329372774500     1.007825032070
       H          2.488405418495     0.021270769815    -0.352835119500     1.007825032070
       H         -0.738991125505    -1.889422218185    -3.075361587500     1.007825032070
       H          0.947736942495     1.737229728815     3.049933349500     1.007825032070
       H          1.063049389495    -2.009691979185    -2.855381952500     1.007825032070
       H         -0.830568637505     2.125763436815     2.962599036500     1.007825032070

  Running in c1 symmetry.

  Rotational constants: A =      0.03362  B =      0.01212  C =      0.01116 [cm^-1]
  Rotational constants: A =   1007.84238  B =    363.28486  C =    334.45463 [MHz]
  Nuclear repulsion = 2018.598285505243894

  Charge       = -1
  Multiplicity = 1
  Electrons    = 158
  Nalpha       = 79
  Nbeta        = 79

  ==> Algorithm <==

  SCF Algorithm Type is DF.
  DIIS enabled.
  MOM disabled.
  Fractional occupation disabled.
  Guess Type is SAD.
  Energy threshold   = 1.00e-06
  Density threshold  = 1.00e-06
  Integral threshold = 0.00e+00

  ==> Primary Basis <==

  Basis Set: X2C-SVPALL
Blend: X2C-SVPALL
Number of shells: 137
Number of basis function: 309
Number of Cartesian functions: 331
Spherical Harmonics?: true
Max angular momentum: 3

  ==> DFT Potential <==

   => Composite Functional: B3LYP <= 

B3LYP Hyb-GGA Exchange-Correlation Functional

P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch, J. Phys. Chem. 98, 11623 (1994)

Deriv               =              1
GGA                 =           TRUE
Meta                =          FALSE

Exchange Hybrid     =           TRUE
MP2 Hybrid          =          FALSE

   => Exchange Functionals <=

0.0800   Slater exchange
0.7200         Becke 88

   => Exact (HF) Exchange <=

0.2000               HF 

   => Correlation Functionals <=

0.1900   Vosko, Wilk & Nusair (VWN5_RPA)
0.8100   Lee, Yang & Parr

   => Molecular Quadrature <=

Radial Scheme       =       TREUTLER
Pruning Scheme      =           FLAT
Nuclear Scheme      =       TREUTLER

BS radius alpha     =              1
Pruning alpha       =              1
Radial Points       =             75
Spherical Points    =            302
Total Points        =         611550
Total Blocks        =           4391
Max Points          =            256
Max Functions       =            271

  **PSI4:PCMSOLVER Interface Active**


 * PCMSolver, an API for the Polarizable Continuum Model electrostatic problem. Version 1.1.11
   Main authors: R. Di Remigio, L. Frediani, K. Mozgawa
With contributions from:
 R. Bast            (CMake framework)
 U. Ekstroem        (automatic differentiation library)
 J. Juselius        (input parsing library and CMake framework)
   Theory: - J. Tomasi, B. Mennucci and R. Cammi:
        "Quantum Mechanical Continuum Solvation Models", Chem. Rev., 105 (2005) 2999
   PCMSolver is distributed under the terms of the GNU Lesser General Public License.

 * Git last commit hash   : 
 * Git last commit date   : 
 * Git last commit author : 


~~~~~~~~~~ PCMSolver ~~~~~~~~~~
Using CODATA 2010 set of constants.
Input parsing done API-side
========== Cavity 
Atomic radii set: 
Cavity type: GePol
Average tesserae area = 0.3 Ang^2
Solvent probe radius = 1.385 Ang
Number of spheres = 27 [initial = 27; added = 0]
Number of finite elements = 1486
Number of irreducible finite elements = 1486
============ Spheres list (in Angstrom)
 Sphere   on   Radius   Alpha       X            Y            Z     
-------- ---- -------- ------- -----------  -----------  -----------
   1      Rh    1.4645   1.20     0.032139     0.042136     0.007555  
   2      O    1.7500   1.20     0.003583     1.642407     1.211416  
   3      O    1.7500   1.20     1.013706    -1.019778     1.385176  
   4      C    1.9255   1.20    -0.040838     1.477050     2.613461  
   5      C    1.9255   1.20     0.732926    -0.950829     2.663617  
   6      C    1.9255   1.20    -0.363187     0.042141     3.051920  
   7      O    1.7500   1.20     1.316557    -1.609898     3.506338  
   8      H    1.4430   1.20    -1.323617    -0.266934     2.610532  
   9      H    1.4430   1.20    -0.462527     0.003978     4.145203  
  10      O    1.7500   1.20    -1.036231     1.037676    -1.372093  
  11      O    1.7500   1.20     0.026849    -1.597132    -1.185088  
  12      C    1.9255   1.20    -0.870980     0.856388    -2.660019  
  13      C    1.9255   1.20     0.165108    -1.473723    -2.585497  
  14      C    1.9255   1.20     0.320508    -0.019400    -3.055063  
  15      O    1.7500   1.20    -1.616324     1.323853    -3.502802  
  16      H    1.4430   1.20     1.244944     0.404437    -2.635324  
  17      H    1.4430   1.20     0.401586     0.005148    -4.150599  
  18      O    1.7500   1.20    -1.812935    -0.787160     0.353612  
  19      O    1.7500   1.20     1.888257     0.797614    -0.441110  
  20      H    1.4430   1.20    -1.594373    -1.500635    -0.301616  
  21      H    1.4430   1.20    -2.363512    -0.136788    -0.129257  
  22      H    1.4430   1.20     1.995135     1.388546     0.329373  
  23      H    1.4430   1.20     2.488405     0.021271    -0.352835  
  24      H    1.4430   1.20    -0.738991    -1.889422    -3.075362  
  25      H    1.4430   1.20     0.947737     1.737230     3.049933  
  26      H    1.4430   1.20     1.063049    -2.009692    -2.855382  
  27      H    1.4430   1.20    -0.830569     2.125763     2.962599  
========== Static solver 
Solver Type: IEFPCM, isotropic
PCM matrix hermitivitized
============ Medium 
Medium initialized from solvent built-in data.
Solvent name:          Water
Static  permittivity = 78.39
Optical permittivity = 1.776
Solvent radius =       1.385 Ang
.... Inside 
Green's function type: vacuum
.... Outside 
Green's function type: uniform dielectric
Permittivity = 78.39

  There are 1486 tesserae, 1486 of which irreducible.

   => -D3MBJ: Empirical Dispersion <=

Grimme's -D3 (BJ-damping, short-range refitted) Dispersion Correction
Grimme S.; Ehrlich S.; Goerigk L. (2011), J. Comput. Chem., 32: 1456
Smith, D. G. A.; Burns, L. A.; Patkowski, K.; Sherrill, C. D. (2016), J. Phys. Chem. Lett.; 7: 2197

    S6 =   1.000000E+00
    S8 =   1.466677E+00
    A1 =   2.786720E-01
    A2 =   4.606311E+00

   => Loading Basis Set <=

Name: X2C-COULOMB-FIT
Role: JKFIT
Keyword: DF_BASIS_SCF
atoms 1                        entry RH         line  2675 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-coulomb-fit.gbs 
atoms 2-3, 7, 10-11, 15, 18-19 entry O          line   281 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-coulomb-fit.gbs 
atoms 4-6, 12-14               entry C          line   181 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-coulomb-fit.gbs 
atoms 8-9, 16-17, 20-27        entry H          line    16 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-coulomb-fit.gbs 

   => Loading Basis Set <=

Name: X2C-SVPALL
Role: DECON
Keyword: BASIS_RELATIVISTIC
atoms 1                        entry RH         line  1583 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 2-3, 7, 10-11, 15, 18-19 entry O          line   121 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 4-6, 12-14               entry C          line    81 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 
atoms 8-9, 16-17, 20-27        entry H          line    16 file /share/apps/cperry/bin/psi4/share/psi4/basis/x2c-svpall.gbs 

  ==> Pre-Iterations <==

   -------------------------------------------------------
Irrep   Nso     Nmo     Nalpha   Nbeta   Ndocc  Nsocc
   -------------------------------------------------------
 A        309     309       0       0       0       0
   -------------------------------------------------------
Total     309     309      79      79      79       0
   -------------------------------------------------------

 OEINTS: Using relativistic (X2C) overlap, kinetic, and potential integrals.
     ------------------------------------------------------------
     Spin-Free X2C Integrals at the One-Electron Level (SFX2C-1e)
             by Prakash Verma and Francesco A. Evangelista
     ------------------------------------------------------------

  ==> X2C Options <==

Computational Basis: X2C-SVPALL
X2C Basis: X2C-SVPALL
The X2C Hamiltonian will be computed in the X2C Basis

The 1-norm of |H_X2C - H_Dirac| is: 0.000000007945
  ==> Integral Setup <==

  ==> DFJK: Density-Fitted J/K Matrices <==

J tasked:                  Yes
K tasked:                  Yes
wK tasked:                  No
OpenMP threads:             16
Integrals threads:          16
Memory (MB):             14648
Algorithm:                Core
Integral Cache:           NONE
Schwarz Cutoff:          1E-12
Fitting Condition:       1E-12

   => Auxiliary Basis Set <=

  Basis Set: X2C-COULOMB-FIT
Blend: X2C-COULOMB-FIT
Number of shells: 439
Number of basis function: 1243
Number of Cartesian functions: 1523
Spherical Harmonics?: true
Max angular momentum: 4

  Minimum eigenvalue in the overlap matrix is 1.9741513485E-03.
  Using Symmetric Orthogonalization.

  SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF.

  ==> Iterations <==

                       Total Energy        Delta E     RMS |[F,P]|

   PCM polarization energy = -0.06509187746801
   @DF-RKS iter   0: -5659.32878012490346   -5.65933e+03   1.01659e-01 
   PCM polarization energy = -0.09496942811889
   @DF-RKS iter   1: -5634.69609498167756    2.46327e+01   1.11669e-02 
   PCM polarization energy = -0.07845832361153
   @DF-RKS iter   2: -5633.89454156212832    8.01553e-01   2.22638e-02 DIIS
   PCM polarization energy = -0.08371243108819
   @DF-RKS iter   3: -5634.92797572766904   -1.03343e+00   6.10459e-03 DIIS
   PCM polarization energy = -0.08487903161157
   @DF-RKS iter   4: -5634.99767691672969   -6.97012e-02   1.67237e-03 DIIS
   PCM polarization energy = -0.08359334309402
   @DF-RKS iter   5: -5635.00302466092671   -5.34774e-03   6.38242e-04 DIIS
   PCM polarization energy = -0.08396122918525
   @DF-RKS iter   6: -5635.00396787504815   -9.43214e-04   1.57051e-04 DIIS
   PCM polarization energy = -0.08394603735814
   @DF-RKS iter   7: -5635.00402692686112   -5.90518e-05   7.70708e-05 DIIS
   PCM polarization energy = -0.08394547347175
   @DF-RKS iter   8: -5635.00404105133566   -1.41245e-05   2.44952e-05 DIIS
   PCM polarization energy = -0.08394606775589
   @DF-RKS iter   9: -5635.00404336413794   -2.31280e-06   1.07547e-05 DIIS
   PCM polarization energy = -0.08394593511630
   @DF-RKS iter  10: -5635.00404391568281   -5.51545e-07   4.04003e-06 DIIS
   PCM polarization energy = -0.08394473548861
   @DF-RKS iter  11: -5635.00404401860214   -1.02919e-07   1.54812e-06 DIIS
   PCM polarization energy = -0.08394476013300
   @DF-RKS iter  12: -5635.00404402762615   -9.02401e-09   1.38905e-06 DIIS
   PCM polarization energy = -0.08394515380190
   @DF-RKS iter  13: -5635.00404403311404   -5.48789e-09   3.76794e-07 DIIS

  ==> Post-Iterations <==

Orbital Energies (a.u.)
-----------------------

Doubly Occupied:                                                      

   1A   -854.996946     2A   -123.788774     3A   -110.293835  
   4A   -110.293521     5A   -110.293374     6A    -22.493082  
   7A    -19.213813     8A    -19.200014     9A    -19.121253  
  10A    -19.119104    11A    -19.090617    12A    -19.088301  
  13A    -19.086001    14A    -19.079686    15A    -18.064032  
  16A    -18.062286    17A    -18.060014    18A    -11.230413  
  19A    -11.229155    20A    -11.228769    21A    -11.227635  
  22A    -11.227178    23A    -10.274770    24A    -10.272514  
  25A    -10.212705    26A    -10.209281    27A    -10.170654  
  28A    -10.168587    29A     -3.217744    30A     -1.979143  
  31A     -1.969707    32A     -1.964010    33A     -1.049975  
  34A     -1.039272    35A     -1.024633    36A     -1.022734  
  37A     -0.938772    38A     -0.933434    39A     -0.920897  
  40A     -0.913469    41A     -0.726283    42A     -0.722727  
  43A     -0.599882    44A     -0.594512    45A     -0.580403  
  46A     -0.562421    47A     -0.520665    48A     -0.499222  
  49A     -0.486172    50A     -0.466215    51A     -0.465468  
  52A     -0.448890    53A     -0.439533    54A     -0.437648  
  55A     -0.428316    56A     -0.424916    57A     -0.413166  
  58A     -0.404606    59A     -0.398737    60A     -0.391018  
  61A     -0.386520    62A     -0.381419    63A     -0.379907  
  64A     -0.357466    65A     -0.347652    66A     -0.335781  
  67A     -0.318981    68A     -0.302573    69A     -0.274370  
  70A     -0.272228    71A     -0.269177    72A     -0.268026  
  73A     -0.238776    74A     -0.235590    75A     -0.228142  
  76A     -0.222410    77A     -0.221615    78A     -0.210324  
  79A     -0.182651  

Virtual:                                                              

  80A     -0.032026    81A      0.003263    82A      0.019307  
  83A      0.041860    84A      0.052751    85A      0.061038  
  86A      0.093344    87A      0.107177    88A      0.111418  
  89A      0.123600    90A      0.140935    91A      0.144160  
  92A      0.148547    93A      0.153858    94A      0.157671  
  95A      0.160684    96A      0.166714    97A      0.206896  
  98A      0.222202    99A      0.229564   100A      0.234610  
 101A      0.247792   102A      0.256087   103A      0.268556  
 104A      0.276086   105A      0.285289   106A      0.304637  
 107A      0.312227   108A      0.340886   109A      0.353622  
 110A      0.377487   111A      0.387953   112A      0.399146  
 113A      0.435320   114A      0.441075   115A      0.445769  
 116A      0.490574   117A      0.495508   118A      0.499960  
 119A      0.521536   120A      0.541319   121A      0.548056  
 122A      0.554373   123A      0.570134   124A      0.576140  
 125A      0.587756   126A      0.595777   127A      0.604986  
 128A      0.609738   129A      0.635145   130A      0.642379  
 131A      0.653852   132A      0.662402   133A      0.664832  
 134A      0.672229   135A      0.680533   136A      0.683892  
 137A      0.686596   138A      0.697455   139A      0.700368  
 140A      0.702424   141A      0.703845   142A      0.717133  
 143A      0.738714   144A      0.760205   145A      0.775418  
 146A      0.810456   147A      0.833144   148A      0.849191  
 149A      0.869447   150A      0.871155   151A      0.884795  
 152A      0.915865   153A      0.926290   154A      0.933036  
 155A      0.947522   156A      0.968947   157A      0.975024  
 158A      1.012627   159A      1.027849   160A      1.041947  
 161A      1.052161   162A      1.089064   163A      1.093360  
 164A      1.111289   165A      1.119993   166A      1.141502  
 167A      1.151358   168A      1.172983   169A      1.183707  
 170A      1.186544   171A      1.219619   172A      1.245118  
 173A      1.255009   174A      1.262473   175A      1.276894  
 176A      1.290172   177A      1.309387   178A      1.315753  
 179A      1.327700   180A      1.342156   181A      1.367995  
 182A      1.398383   183A      1.409528   184A      1.423637  
 185A      1.443915   186A      1.454686   187A      1.465590  
 188A      1.472055   189A      1.508070   190A      1.519879  
 191A      1.536830   192A      1.545517   193A      1.566815  
 194A      1.583640   195A      1.612066   196A      1.622982  
 197A      1.663806   198A      1.673814   199A      1.682203  
 200A      1.691456   201A      1.703308   202A      1.724901  
 203A      1.729632   204A      1.740190   205A      1.760395  
 206A      1.773286   207A      1.777318   208A      1.793865  
 209A      1.798373   210A      1.806282   211A      1.811932  
 212A      1.817659   213A      1.838801   214A      1.850286  
 215A      1.859241   216A      1.868491   217A      1.889026  
 218A      1.891332   219A      1.900930   220A      1.904814  
 221A      1.924443   222A      1.940120   223A      1.949793  
 224A      1.961632   225A      1.989861   226A      2.008815  
 227A      2.034242   228A      2.038022   229A      2.067274  
 230A      2.099185   231A      2.111723   232A      2.126014  
 233A      2.138117   234A      2.142524   235A      2.157253  
 236A      2.167016   237A      2.175563   238A      2.182479  
 239A      2.193612   240A      2.226664   241A      2.254298  
 242A      2.265792   243A      2.291905   244A      2.314358  
 245A      2.321297   246A      2.338229   247A      2.385364  
 248A      2.400964   249A      2.432659   250A      2.473478  
 251A      2.482013   252A      2.490497   253A      2.499793  
 254A      2.549941   255A      2.595957   256A      2.601431  
 257A      2.675879   258A      2.687991   259A      2.693783  
 260A      2.707124   261A      2.740916   262A      2.741386  
 263A      2.766573   264A      2.794292   265A      2.813133  
 266A      2.825215   267A      2.835924   268A      2.847783  
 269A      2.858245   270A      2.876548   271A      2.892626  
 272A      2.918719   273A      2.948632   274A      2.958189  
 275A      2.963916   276A      2.976998   277A      2.981834  
 278A      3.008211   279A      3.023152   280A      3.030262  
 281A      3.041220   282A      3.062293   283A      3.090409  
 284A      3.119569   285A      3.125239   286A      3.143710  
 287A      3.150744   288A      3.174211   289A      3.198107  
 290A      3.244466   291A      3.248166   292A      3.299221  
 293A      3.385611   294A      3.435496   295A      3.454144  
 296A      3.459704   297A      3.489523   298A      3.525216  
 299A      3.636530   300A      3.639197   301A      3.674372  
 302A      3.689819   303A      3.803386   304A      3.817984  
 305A      4.114563   306A      4.174568   307A      4.248175  
 308A      4.446264   309A      4.504195  

Final Occupation by Irrep:
          A 
DOCC [    79 ]

  Energy converged.

  @DF-RKS Final Energy: -5635.00404403311404

   => Energetics <=

Nuclear Repulsion Energy =           2018.5982855052438936
One-Electron Energy =              -11807.4021601024014672
Two-Electron Energy =                4352.3276754430444271
DFT Exchange-Correlation Energy =    -198.3734912351995376
Empirical Dispersion Energy =          -0.0704084900000000
VV10 Nonlocal Energy =                  0.0000000000000000
PCM Polarization Energy =              -0.0839451538019041
Total Energy =                      -5635.0040440331140417

Alert: EFP and PCM quantities not currently incorporated into SCF psivars.

Properties will be evaluated at   0.000000,   0.000000,   0.000000 Bohr

Properties computed using the SCF density matrix

  Nuclear Dipole Moment: (a.u.)
 X:     0.3826      Y:    -0.6246      Z:    -0.4699

  Electronic Dipole Moment: (a.u.)
 X:     0.2862      Y:     0.6848      Z:     0.1558

  Dipole Moment: (a.u.)
 X:     0.6688      Y:     0.0602      Z:    -0.3141     Total:     0.7413

  Dipole Moment: (Debye)
 X:     1.6999      Y:     0.1531      Z:    -0.7983     Total:     1.8843


*** tstop() called on compute-0-27.local at Mon Jan 29 08:40:49 2018
Module time:
	user time   =    1729.77 seconds =      28.83 minutes
	system time =       4.15 seconds =       0.07 minutes
	total time  =       1271 seconds =      21.18 minutes
Total time:
	user time   =    1729.77 seconds =      28.83 minutes
	system time =       4.15 seconds =       0.07 minutes
	total time  =       1271 seconds =      21.18 minutes

*** Psi4 exiting successfully. Buy a developer a beer!

It is true PCMSolver should only contribute to a fraction of the cost, but it can become a bottleneck in parallel calculations (Amdahl’s law). In the calculation reported here the nr. of finite elements (1400) is basically as large as the nr. of basis functions (1200), making the PCM integrals in practice a three-index quantity, rather than two.

The first step would be to parallelize integral calculations. For truly big systems one should also consider screening methods for the integrals (many PCM integrals can and should be converted to point-charge potentials) and FMM methods for the apparent surface problem. Another quite well known :wink: code already has these features.

I agree to that using the pcmsolver in psi4 for the scf iteration part more or less only use one thread (when looking at process cpu usage in top, it stays at 100% most of the time).

Are there any plans to make this type of calculation scale better?

A simple acetic acid calculation on 4 cores (pbe/def2-kttvppd)
pcm:

	user time   =     217.58 seconds =       3.63 minutes
	system time =       1.13 seconds =       0.02 minutes
	total time  =        163 seconds =       2.72 minutes

no pcm:

	user time   =      72.72 seconds =       1.21 minutes
	system time =       0.52 seconds =       0.01 minutes
	total time  =         21 seconds =       0.35 minutes

Regards
Termo

We should look into this, depending on where the PCM bottleneck is it should be a fairly straightforward parallelization.

1 Like

I would very much like to help on this. Currently I have set pcmsolver up with git and I’m trying to see if I can get the openMP part to work in pcmsolver that have been pushed recently.

please let me know if I can be of any assistance!

That would be great @robertodr, do you have any suggested starting points?

If you could make an issue on github.com/psi4/psi4 we can getting the broader development community to pitch in ideas.

Is there any progress on parallelisation of PCMSolver? I just run few calculations using PCMsolver and it is mostly running as a single core process.

There is! The PR to watch is https://github.com/psi4/psi4/pull/2388. It will soon be merged.

1 Like