Skip to content

Commit

Permalink
Now also pickling/unpicking species.speciesCounter in restart file.
Browse files Browse the repository at this point in the history
Should have done this from the beginning.
  • Loading branch information
jwallen committed Nov 12, 2009
1 parent 0585978 commit fe837a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/rmg/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def execute(inputFile, options):
logging.info('Loading previous restart file...')
f = open(os.path.join(settings.outputDirectory,'restart.pkl'), 'rb')
species.speciesList = cPickle.load(f)
species.speciesCounter = len(species.speciesList)
species.speciesCounter = cPickle.load(f)
reaction.reactionList = cPickle.load(f)
reactionModel = cPickle.load(f)
reactionSystems = cPickle.load(f)
Expand Down Expand Up @@ -151,6 +151,7 @@ def execute(inputFile, options):
logging.info('Saving restart file...')
f = open(os.path.join(settings.outputDirectory,'restart.pkl'), 'wb')
cPickle.dump(species.speciesList, f)
cPickle.dump(species.speciesCounter, f)
cPickle.dump(reaction.reactionList, f)
cPickle.dump(reactionModel, f)
cPickle.dump(reactionSystems, f)
Expand Down

0 comments on commit fe837a2

Please sign in to comment.