Changeset 5783


Ignore:
Timestamp:
May 16, 2012 10:42:39 PM (7 years ago)
Author:
wehart
Message:

Adding large diagonal models for profiling.

Location:
coopr.data.pyomo/trunk/coopr/data/pyomo
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.data.pyomo/trunk/coopr/data/pyomo/test_perf.py

    r4689 r5783  
    6262    root = name.split('_')[1]
    6363    #print >>sys.stderr, fname
    64     res = convert.pyomo2nl(['--save-model',fname]+self.get_options(name)+[datadir+root+'.dat'])
     64    options = self.get_options(name)
     65    if os.path.exists(datadir+root+'.dat'):
     66        options.append(datadir+root+'.dat')
     67    res = convert.pyomo2nl(['--save-model',fname]+options)
    6568    if not os.path.exists(fname):
    6669        raise ValueError, "Missing file %s generated in test2" % fname
     
    7477    root = name.split('_')[1]
    7578    #print >>sys.stderr, fname
    76     res = convert.pyomo2lp(['--save-model',fname]+self.get_options(name)+[datadir+root+'.dat'])
     79    options = self.get_options(name)
     80    if os.path.exists(datadir+root+'.dat'):
     81        options.append(datadir+root+'.dat')
     82    res = convert.pyomo2lp(['--save-model',fname]+options)
    7783    if not os.path.exists(fname):
    7884        raise ValueError, "Missing file %s generated in test2" % fname
     
    8793    Test2.add_fn_test(fn=nl_test, name='nl_pmedian.'+name, options=[datadir+'pmedian.py'])
    8894    Test2.add_fn_test(fn=nl_test, name='nl-O_pmedian.'+name, options=['--disable-gc', datadir+'pmedian.py'] )
    89     if i < 4:
    90         Test3.add_fn_test(fn=nl_test, name='nl-memcov_pmedian.'+name, options=['--profile-memory','1',datadir+'pmedian.py'] )
     95    #if i < 4:
     96        #Test3.add_fn_test(fn=nl_test, name='nl-memcov_pmedian.'+name, options=['--profile-memory','1',datadir+'pmedian.py'] )
    9197    #
    9298    Test2.add_fn_test(fn=lp_test, name='lp_pmedian.'+name, options=[datadir+'pmedian.py'])
    9399    Test2.add_fn_test(fn=lp_test, name='lp-O_pmedian.'+name, options=['--disable-gc', datadir+'pmedian.py'] )
    94     if i < 4:
    95         Test3.add_fn_test(fn=lp_test, name='lp-memcov_pmedian.'+name, options=['--profile-memory','1',datadir+'pmedian.py'] )
     100    #if i < 4:
     101        #Test3.add_fn_test(fn=lp_test, name='lp-memcov_pmedian.'+name, options=['--profile-memory','1',datadir+'pmedian.py'] )
    96102
     103for name in ['diag1', 'diag2']:
     104    Test3.add_fn_test(fn=nl_test, name='nl_'+name, options=[currdir+'performance'+os.sep+name+'.py'])
     105    Test3.add_fn_test(fn=nl_test, name='nl_O_'+name, options=['--disable-gc',currdir+'performance'+os.sep+name+'.py'])
     106    Test3.add_fn_test(fn=lp_test, name='lp_'+name, options=[currdir+'performance'+os.sep+name+'.py'])
     107    Test3.add_fn_test(fn=lp_test, name='lp_O_'+name, options=['--disable-gc',currdir+'performance'+os.sep+name+'.py'])
    97108
    98109if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.