ReactionMechanismGenerator / RMG-database

The database of chemical parameters used with Reaction Mechanism Generator
http://rmg.mit.edu/database/
95 stars 137 forks source link

Termination due to "uncaught exception" #428

Open PWstmrlnd opened 4 years ago

PWstmrlnd commented 4 years ago

Run was proceeding fine, adding reactions, when suddenly during reaction generation:

For reaction generation 7 processes are used. libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file

Yesterday I got the same error in a different calculation, but the message repeated for 1000++ times before I killed the job. What is the cause, and can the problem be avoided?

PWstmrlnd commented 4 years ago

Here is another example. It crashed during thermo generation. The log file ends with the problematic adjacency list, but here is the terminal output:

For reaction generation 6 processes are used. Generating thermo for new species... Error: Could not update atomtypes for this molecule: multiplicity 2 1 O u0 p1 c+1 {7,S} {8,D} 2 O u1 p2 c0 {3,S} 3 C u0 p0 c0 {2,S} {4,S} {8,S} {9,S} 4 C u0 p0 c0 {3,S} {5,D} {10,S} 5 C u0 p0 c0 {4,D} {6,S} {12,S} 6 C u0 p0 c0 {5,S} {7,D} {11,S} 7 C u0 p0 c0 {1,S} {6,D} {13,S} 8 C u2 p0 c-1 {1,D} {3,S} 9 H u0 p0 c0 {3,S} 10 H u0 p0 c0 {4,S} 11 H u0 p0 c0 {6,S} 12 H u0 p0 c0 {5,S} 13 H u0 p0 c0 {7,S}

Traceback (most recent call last): File "/Users/mcninch/anaconda3/envs/rmg_env/bin/rmg.py", line 111, in main() File "/Users/mcninch/anaconda3/envs/rmg_env/bin/rmg.py", line 105, in main rmg.execute(**kwargs) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/main.py", line 893, in execute trimolecular_react=self.trimolecular_react) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 610, in enlarge self.apply_thermo_to_species(procnum) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 820, in apply_thermo_to_species self.generate_thermo(spc, rename=True) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/rmg/model.py", line 827, in generate_thermo submit(spc, self.solvent_name) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 174, in submit spc.thermo = evaluator(spc, solvent_name=solvent_name) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 159, in evaluator thermo = generate_thermo_data(spc, solvent_name=solvent_name) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 142, in generate_thermo_data return process_thermo_data(spc, thermo0, thermo_class, solvent_name) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/thermo/thermoengine.py", line 66, in process_thermo_data solute_data = solvation_database.get_solute_data(spc) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/solvation.py", line 655, in get_solute_data solute_data = self.get_solute_data_from_groups(species) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/solvation.py", line 712, in get_solute_data_from_groups solute_data = self.estimate_solute_via_group_additivity(molecule) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/solvation.py", line 822, in estimate_solute_via_group_additivity saturated_struct, added_to_pairs = self.transform_lone_pairs(saturated_struct) File "/Users/mcninch/anaconda3/envs/rmg_env/lib/python3.7/site-packages/rmgpy/data/solvation.py", line 757, in transform_lone_pairs saturated_struct.update() File "rmgpy/molecule/molecule.py", line 1129, in rmgpy.molecule.molecule.Molecule.update File "rmgpy/molecule/molecule.py", line 1352, in rmgpy.molecule.molecule.Molecule.update_atomtypes File "rmgpy/molecule/molecule.py", line 1347, in rmgpy.molecule.molecule.Molecule.update_atomtypes File "rmgpy/molecule/atomtype.py", line 720, in rmgpy.molecule.atomtype.get_atomtype File "rmgpy/molecule/atomtype.py", line 748, in rmgpy.molecule.atomtype.get_atomtype rmgpy.exceptions.AtomTypeError: Unable to determine atom type for atom C..-, which has 1 single bonds, 0 double bonds to C, 1 double bonds to O, 0 double bonds to S, 0 triple bonds, 0 benzene bonds, 0 lone pairs, and 0 charge. libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file Abort trap: 6

mjohnson541 commented 4 years ago

@yunsiechung is this related to changes in handling lone pairs in solvation corrections?

PWstmrlnd commented 4 years ago

Note that it also occurred in a gas-phase simpleReactor case, hanging up the calculations.

For reaction generation 7 processes are used. libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file

I'm going to try without the multiprocessor option next.

PWstmrlnd commented 4 years ago

Ran without the multiprocessor option (-n 7) for 21 hr without any "Couldn't close file" errors. Seems like that may be the issue. It sure was faster with multiprocessing, though.

mjohnson541 commented 4 years ago

Oh, are you running with automated semiemprical calculations? They're usually less accurate than RMG current thermo estimation, so unless you're sure there's an improvement I'd recommend turning them off anyway, which may fix your multiprocessing problem.

PWstmrlnd commented 4 years ago

No, just a straight calc of the form "rmg.py -n 7 input.py" Input and output files attached.

inputVP1_10ppmO2.py.txt RMG.log.txt

The error lines don't appear in the log file, just in the streaming output: libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file