Changeset b514adf in sasmodels for sasmodels/compare_many.py


Ignore:
Timestamp:
Nov 24, 2015 1:43:22 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
92da231
Parents:
062c56d
Message:

set constraints so multi_compare has fewer spurious errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare_many.py

    rcd3dba0 rb514adf  
    5757    num_good = 0 
    5858    first = True 
     59    max_diff = 0 
    5960    for k in range(N): 
    6061        print >>sys.stderr, name, k 
     
    7374            columns.extend(stats) 
    7475            labels.append('GPU single') 
    75             good = good and (stats[0] < 1e-14) 
     76            max_diff = max(max_diff, stats[0]) 
     77            good = good and (stats[0] < 5e-5) 
    7678        if 0 and environment().has_double: 
    7779            gpu_double_value = trymodel(eval_opencl, dtype='double', cutoff=cutoff) 
     
    7981            columns.extend(stats) 
    8082            labels.append('GPU double') 
    81             good = good and (stats[0] < 1e-14) 
     83            max_diff = max(max_diff, stats[0]) 
     84            good = good and (stats[0] < 1e-12) 
    8285        if 1: 
    8386            cpu_double_value = trymodel(eval_ctypes, dtype='double', cutoff=cutoff) 
     
    8588            columns.extend(stats) 
    8689            labels.append('CPU double') 
    87             good = good and (stats[0] < 1e-14) 
     90            max_diff = max(max_diff, stats[0]) 
     91            good = good and (stats[0] < 1e-12) 
    8892        if 0: 
    8993            stats = get_stats(cpu_double_value, gpu_single_value, index) 
    9094            columns.extend(stats) 
    9195            labels.append('single/double') 
    92             good = good and (stats[0] < 1e-14) 
     96            max_diff = max(max_diff, stats[0]) 
     97            good = good and (stats[0] < 5e-5) 
    9398 
    9499        columns += [v for _,v in sorted(pars_i.items())] 
     
    100105        else: 
    101106            print(("%d,"%seed)+','.join("%g"%v for v in columns)) 
    102     print '"%d/%d good"'%(num_good, N) 
     107    print '"good","%d/%d","max diff",%g'%(num_good, N, max_diff) 
    103108 
    104109 
Note: See TracChangeset for help on using the changeset viewer.