RMG-Java icon indicating copy to clipboard operation
RMG-Java copied to clipboard

NullPointerException in jing.rxn.FastMasterEqn

Open rwest opened this issue 14 years ago • 8 comments

This was reported by @rajeshdparmar in a comment to another issue, but it is an issue of its own:

After pulling... I started two jobs and both are failed within few seconds.... Folder location

~/Rajesh/New_jobs_after_July_7/MultiT_PM3_pdep_Prun_15000_single_pressure_1_3
~/Rajesh/New_jobs_after_July_7/MultiT_PM3_pdep_Prun_15000_single_pressure_2_3

Both errors are same----

Reading frequency database from /home/rajesh/RMG-Java/databases/RMG_database/frequencies_groups/
For reaction CH3(21) + C13H27J(35) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 3.0 .
For reaction npropyl(39) + C11H23J(40) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 3.1 .
For reaction butyl_1(42) + C10H21J(43) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 4.1 .
For reaction C5H11J(45) + C9H19J(46) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 5.5 .
For reaction C6H13J(48) + C8H17J(49) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 5.5 .
For reaction C7H15J(51) + C7H15J(51) (included =true)  TD(1) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 5.5 .
ERROR: java.lang.NullPointerException
    at jing.rxn.FastMasterEqn.readMeaningfulLine(FastMasterEqn.java:749)
    at jing.rxn.FastMasterEqn.parseOutputStream(FastMasterEqn.java:861)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:383)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1335)
    at RMG.main(RMG.java:96)

ERROR: java.lang.NullPointerException
    at jing.rxnSys.Logger.log(Logger.java:160)
    at jing.rxnSys.Logger.error(Logger.java:213)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:400)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1335)
    at RMG.main(RMG.java:96)

Exception in thread "main" java.lang.NullPointerException
        at jing.rxnSys.Logger.log(Logger.java:160)
        at jing.rxnSys.Logger.critical(Logger.java:204)
        at RMG.main(RMG.java:106)

rwest avatar Jul 07 '11 15:07 rwest

Hi,

Even after "make clean" and "make" process. I got similar error...

The file location

rajesh@pharos:~/Rajesh/New_jobs_after_Aug_11/MultiT_PM3_pdep_Prun_15000_multiple_concentration_single_presssure_conversion$

Error Message:

Created new reverse Alkene_to_1,2-birad reaction: C4H8O(4552) --> C4H8OJJ(5231)


Solving PDepNetwork #344 (propanal)
For reaction CH3CH2CO(355) + H(29) (included =true)  propanal(368) (included =true)
Pressure-dependent rate coefficient at 679K 4.5Bar exceeds high-P-limit rate  by factor of 2.4 .
Re-running fame with 501 grains.
Solving PDepNetwork #344 (propanal)
Solving PDepNetwork #583 (C14H29O2J)
ERROR: java.lang.NullPointerException
    at jing.rxn.FastMasterEqn.readMeaningfulLine(FastMasterEqn.java:749)
    at jing.rxn.FastMasterEqn.parseOutputStream(FastMasterEqn.java:854)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:383)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1472)
    at RMG.main(RMG.java:96)

ERROR: java.lang.NullPointerException
    at jing.rxnSys.Logger.log(Logger.java:161)
    at jing.rxnSys.Logger.error(Logger.java:214)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:400)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1472)
    at RMG.main(RMG.java:96)

Exception in thread "main" java.lang.NullPointerException
        at jing.rxnSys.Logger.log(Logger.java:161)
        at jing.rxnSys.Logger.critical(Logger.java:205)
        at RMG.main(RMG.java:106)

rajeshdparmar avatar Aug 14 '11 16:08 rajeshdparmar

To help interpret line numbers, note that the stack trace above was made with RMG at commit b688a393fe7c58442a717f49fdedf4ba5f884f6f

The NullPointerException is because it's trying to read more kinetics than there are in the fame output. Running fame.exe on the input file works without any error messages, but the output says it will contain 8856 phenomenological rate coefficients, but then reports only three.

The fame.log file ends as follows:

Fitting Chebyshev interpolation models...
Warning: One or more k(T,P) values for a net reaction was zero.
These have been set to 1e-300 to allow for k(T,P) interpolation model fitting.
c14h29o2j(547) -> c14h29o2j(1659)
   0.0000000000000000        0.0000000000000000        0.0000000000000000     
   0.0000000000000000        0.0000000000000000        0.0000000000000000     
   0.0000000000000000        0.0000000000000000        0.0000000000000000     
   0.0000000000000000        0.0000000000000000        0.0000000000000000     
   0.0000000000000000        0.0000000000000000        0.0000000000000000     
   0.0000000000000000        0.0000000000000000        0.0000000000000000     

I have made some extra commits to improve the error messages around this section of code, but this won't help to solve whatever the problem is in fame.exe, which perhaps @jwallen can look at next week. (I've a copy of 0583_4_input.txt in my home folder)

My commits should however allow it to fall back from ReservoirState to ModifiedStrongCollision method and try again, so I suggest you get my latest commits and restart @rajeshdparmar.

rwest avatar Aug 14 '11 18:08 rwest

I seem to have a similar issue. Was going to post as new issue after discussion with @jwallen, but found this similar issue and figured I'd post it here:

Created new species: C10H8O2JJ(13834)
Created new BiradFromMultipleBond reaction: C10H8O2(13561) --> C10H8O2JJ(13834)
Ea raised by 0.7 from 7.8 to dHrxn(298K)=8.5 kcal/mol.

Solving PDepNetwork #9391 (C10H8O2JJ)
ERROR: java.lang.NullPointerException
    at jing.rxn.FastMasterEqn.readMeaningfulLine(FastMasterEqn.java:745)
    at jing.rxn.FastMasterEqn.parseOutputStream(FastMasterEqn.java:850)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:383)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1466)
    at RMG.main(RMG.java:96)

ERROR: java.lang.NullPointerException
    at jing.rxnSys.Logger.log(Logger.java:160)
    at jing.rxnSys.Logger.error(Logger.java:213)
    at jing.rxn.FastMasterEqn.runPDepCalculation(FastMasterEqn.java:400)
    at jing.rxnSys.ReactionSystem.initializePDepNetwork(ReactionSystem.java:542)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1466)
    at RMG.main(RMG.java:96)

Exception in thread "main" java.lang.NullPointerException
        at jing.rxnSys.Logger.log(Logger.java:160)
        at jing.rxnSys.Logger.critical(Logger.java:204)
        at RMG.main(RMG.java:106)

I've uploaded fame input and output files at https://github.com/GreenGroup/RMG-Java/downloads

gmagoon avatar Aug 29 '11 19:08 gmagoon

Per discussion with @jwallen, it sounds like this may be related to use of a branch off an outdated version of the master branch...I'll pull in the most recent changes and retry.

gmagoon avatar Aug 29 '11 19:08 gmagoon

I believe we "fixed" this - in that it now falls back to modified strong collision rather than crashing out - in some recent commits, e.g. 61057c47dc456c1efdc5e047454e16ae75062869. You might try that if you're not on an up-to-date branch.

jwallen avatar Aug 29 '11 19:08 jwallen

NB. "fixed" is rightly in inverted commas...

On Aug 29, 2011, at 9:48 AM, jwallen wrote:

I believe we "fixed" this - in that it now falls back to modified strong collision rather than crashing out - in some recent commits, e.g. 61057c47dc456c1efdc5e047454e16ae75062869. You might try that if you're not on an up-to-date branch.

Reply to this email directly or view it on GitHub: https://github.com/GreenGroup/RMG-Java/issues/195#issuecomment-1935591

rwest avatar Aug 29 '11 21:08 rwest

Hi Richard,

Even after updating (i.e. falling back to modified strong collision) one of my job failed. Please find the folder location and error message as below

Folder location:

rajesh@pharos:~/Rajesh/New_jobs_after_Aug_11/MultiT_PM3_pdep_Prun_15000_single_concentration_single_presssure_O2_C_0.15_conversion_restarted_afterupdate$

Error message:

1955    C7H13J(1955)        4.5463E-11    2.2989E-07
ERROR: java.lang.NullPointerException
    at jing.rxn.Reaction.getDirection(Reaction.java:924)
    at jing.rxnSys.ReactionModelGenerator.writePDepNetworks(ReactionModelGenerator.java:2794)
    at jing.rxnSys.ReactionModelGenerator.modelGeneration(ReactionModelGenerator.java:1565)
    at RMG.main(RMG.java:96)

rajeshdparmar avatar Aug 30 '11 17:08 rajeshdparmar

This last stack trace looks like issue #207 not #195 to me. Could you paste it in a comment there?

rwest avatar Aug 30 '11 18:08 rwest