CASPT2 crashed in IO Error with a large amount of states, might be caused by buffer overflow
Code Version: v19.11 Compiler: OpenMPI-2.0.4, GA-5.6.3, Python-3.6.9
Hey guys, I am trying to run CASPT2 with DyO+ system. It has 224 States and I wanna run CASPT2 on top-128 states. However, when I trying to run molcas with an input file like this, It got CRASH with error
&GATEWAY
ricd
Basis
Dy.ano-rcc-vtzp
Dy0 0.00 0.00 0.00 Angstrom
end of basis
Basis
O.ano-rcc-vtzp
O2 0.00 0.00 1.75080 Angstrom
end of basis
AMFI
DOUG
ANGM
0.00 0.00 0.00 Angstrom
&SEWARD
&RASSCF
Title
Energy of sixtet state
thrs
1.0e-08 1.0e-04 1.0e-04
symmetry
1
CIMX
200
Spin
4
ciroot
224 224 1
Nactel
9 0 0
CHARge
1
Ras2
7
Iterations
200 100
levshift
1.5
lumorb
&CASPT2
Title = sixtet for Dy
XMultistate = 128 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
Shift = 0.1
MAXIter = 200
NOMULT
NOORBITALS
[ process 0]: xquit (rc = 112): _INPUT_ERROR_
###############################################################################
### ###
### ###
### ERROR: I/O error when reading line. ###
### ###
### ###
###############################################################################
###############################################################################
-> last line from input that was read: Shift
[ process 21]: xquit (rc = 112): _INPUT_ERROR_
[ process 4]: xquit (rc = 112): _INPUT_ERROR_
[ process 20]: xquit (rc = 112): _INPUT_ERROR_
[ process 28]: xquit (rc = 112): _INPUT_ERROR_
[ process 5]: xquit (rc = 112): _INPUT_ERROR_
#0 0x7FC5ADFD7697
#1 0x51F61D in xabort_
#2 0x51D3CB in xquit_
#3 0x51D3FD in quit_onusererror_
#4 0x430B79 in __inputdata_MOD_readin_caspt2
#5 0x4644C7 in pt2ini_
#6 0x4B3E94 in caspt2_
HOWEVER, while I changed XMULTISTATE= 128 (Other numbers...)
to XMULTISTATE = 42 (1 to 42)
or XMULTISTATE = ALL
, No more error will occured and molcas runs smoothly. It should not be OOM because IT IS ABLE to run on CASPT2 with all 224 states.
When I try to inspect codes, I found that there is a undocumented limit in https://gitlab.com/Molcas/OpenMolcas/-/blob/master/src/caspt2/readin_caspt2.f#L196, It seems each line in CASPT2 input should not be longer than 128 chars, otherwise it would be cut silently. It would caused potiential bug for who wanna calculate more than 40 or 50 states....
I dont know why such code is written in this way, and it do support multiline input. but it should be well-documented...
(And it seems that such code is being used in MOLCAS 8.2...)
-- EOF --