Changeset 23394 for issm/trunk/test


Ignore:
Timestamp:
10/05/18 10:42:45 (7 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 23392

Location:
issm/trunk
Files:
22 edited
12 copied

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/test

  • issm/trunk/test/NightlyRun/runme.py

    r23189 r23394  
    1111        """
    1212        RUNME - test deck for ISSM nightly runs
    13  
     13
    1414            In a test deck directory (tests/Vertification/NightlyRun for example)
    1515            The following command will launch all the existing tests:
     
    1818            >> runme(id=[101,102])
    1919            etc...
    20  
     20
    2121            Available options:
    2222               'id'            followed by the list of ids or (parts of) test names requested
     
    3737               'procedure'     'check' : run the test (default)
    3838                               'update': update the archive
    39  
     39
    4040            Usage:
    4141               runme(varargin)
    42  
     42
    4343            Examples:
    4444               runme()
     
    4949               runme(id=[[101,102],['Dakota','Slr']])
    5050        """
    51 
    5251        from parallelrange import parallelrange
    5352        from IdToName import IdToName
     
    8281        flist=glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
    8382        list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py']    #Keep test id only (skip 'test' and '.py')
    84         #print 'list_ids =',list_ids
    8583
    8684        i1,i2=parallelrange(rank,numprocs,len(list_ids))    #Get tests for this cpu only
    8785        list_ids=list_ids[i1:i2+1]
    88         #print 'list_ids after parallelrange =',list_ids
    89        
    90         if id:
     86
     87        if np.size(id) > 0 and not id==None:
    9188                test_ids = set(GetIds(id)).intersection(set(list_ids))
    9289        else:
    9390                # if no tests are specifically provided, do them all
    9491                test_ids = set(list_ids)
    95                
    96         #print 'test_ids after list =',test_ids
     92
    9793        # }}}
    9894        #GET exclude {{{
     
    10096
    10197        test_ids=test_ids.difference(exclude_ids)
    102         #print 'test_ids after exclude =',sorted(test_ids)
    103         #return
    10498        # }}}
    10599        #Process Ids according to benchmarks {{{
     
    124118        elif benchmark=='adolc':
    125119                test_ids=test_ids.intersection(set(range(3001,3200)))
    126         #print 'test_ids after benchmark =',test_ids
    127120        test_ids=list(test_ids)
    128121        test_ids.sort()
    129         #print 'test_ids after sort =',test_ids
    130122        # }}}
    131123
     
    190182                                                        if np.shape(field) != np.shape(archive):
    191183                                                                raise RuntimeError("Field '"+archive_name+"' from test is malformed; shape is "+str(np.shape(field.T))+", should be "+str(np.shape(archive))+" (or "+str(np.shape(archive.T))+").")
    192                                                
     184
    193185                                                error_diff=np.amax(np.abs(archive-field),axis=0)/(np.amax(np.abs(archive),axis=0)+float_info.epsilon)
    194186
  • issm/trunk/test/NightlyRun/test2084.m

    r23189 r23394  
    1 
    2 %Test Name: GiaCaron.
     1%Test Name: GiaCaron
    32%Forward Love number solution for a viscoelastic earth, model M3-L70-V01 from
    43%Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., Martinec, Z.,
     
    3938%loading love numbers
    4039field_names     ={'LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic'};
    41 field_tolerances={7.0e-10,7.0e-10,7.0e-10};
     40field_tolerances={4.3e-9,4.3e-9,4.3e-9};
    4241field_values={...
    4342        (md.results.LoveSolution.LoveHr(:,1)),...
     
    5756%Fields and tolerances to track changes
    5857field_names     ={field_names{:},'LoveH_loading_realpart','LoveK_loading_realpart','LoveL_loading_realpart','LoveH_loading_imagpart','LoveK_loading_imagpart','LoveL_loading_imagpart'};
    59 field_tolerances={field_tolerances{:},7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};
     58field_tolerances={field_tolerances{:},5e-7,5e-7,5e-7,5e-7,5e-7,5e-7};
    6059field_values={field_values{:},...
    6160        (md.results.LoveSolution.LoveHr(:,:)),...
     
    7574%tidal love numbers
    7675field_names     ={field_names{:},'LoveH_tidal_elastic','LoveK_tidal_elastic','LoveL_tidal_elastic','LoveH_tidal_realpart','LoveK_tidal_realpart','LoveL_tidal_realpart','LoveH_tidal_imagpart','LoveK_tidal_imagpart','LoveL_tidal_imagpart'};
    77 field_tolerances={field_tolerances{:},7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};
     76field_tolerances={field_tolerances{:},8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6};
    7877field_values={field_values{:},...
    7978        (md.results.LoveSolution.LoveHr(:,1)),...
     
    115114%
    116115%field_names     ={field_names{:},'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'};
    117 %field_tolerances={field_tolerances{:},7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};
     116%field_tolerances={field_tolerances{:},2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6};
    118117%field_values={field_values{:},...
    119118%       (md.results.LoveSolution.LoveHr(:,1)),...
     
    147146
    148147field_names     ={field_names{:},'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart'};
    149 field_tolerances={field_tolerances{:},7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10,7.0e-10};
     148field_tolerances={field_tolerances{:},2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6};
    150149field_values={field_values{:},...
    151150        (md.results.LoveSolution.LoveHr(:,1)),...
  • issm/trunk/test/NightlyRun/test2084.py

    r23189 r23394  
    1 #Test Name: GiaCaron. Forward Love number solution for a viscoelastic earth,
    2 #       model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M.,
    3 #       Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A.
    4 #       and King, M. A. (2011), A benchmark study for glacial isostatic
    5 #       adjustment codes. Geophysical Journal International,
    6 #       185: 106-132. doi:10.1111/j.1365-246X.2011.04952.x
     1#Test Name: GiaCaron
     2#Forward Love number solution for a viscoelastic earth,
     3#model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M.,
     4#Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A.
     5#and King, M. A. (2011), A benchmark study for glacial isostatic
     6#adjustment codes. Geophysical Journal International,
     7#185: 106-132. doi:10.1111/j.1365-246X.2011.04952.x
    78
    89from model import *
     
    4849#Fields and tolerances to track changes
    4950#loading love numbers
    50 field_names=['LoveHe','LoveKe','LoveLe']
    51 field_tolerances=[3.7e-9,3.7e-9,3.7e-9]
     51field_names=['LoveH_loading_elastic','LoveK_loading_elastic','LoveL_loading_elastic']
     52field_tolerances=[4.3e-9,4.3e-9,4.3e-9]
    5253field_values=[
    5354np.array(md.results.LoveSolution.LoveHr)[:,0],
     
    6768#Fields and tolerances to track changes
    6869#loading love numbers
    69 field_names+=['LoveHlr','LoveKlr','LoveLlr','LoveHli','LoveKli','LoveLli']
    70 field_tolerances+=[3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]
     70field_names+=['LoveH_loading_realpart','LoveK_loading_realpart','LoveL_loading_realpart','LoveH_loading_imagpart','LoveK_loading_imagpart','LoveL_loading_imagpart']
     71field_tolerances+=[5e-7,5e-7,5e-7,5e-7,5e-7,5e-7]
    7172field_values+=[
    7273np.array(md.results.LoveSolution.LoveHr),
     
    8788
    8889#tidal love numbers, check
    89 field_names+=['LoveHtr','LoveKtr','LoveLtr','LoveHti','LoveKti','LoveLti']
    90 field_tolerances+=[3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]
     90field_names+=['LoveH_tidal_elastic','LoveK_tidal_elastic','LoveL_tidal_elastic','LoveH_tidal_realpart','LoveK_tidal_realpart','LoveL_tidal_realpart','LoveH_tidal_imagpart','LoveK_tidal_imagpart','LoveL_tidal_imagpart']
     91field_tolerances+=[8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6,8e-6]
    9192field_values+=[
    9293np.array(md.results.LoveSolution.LoveHr)[:,0],
     
    127128#md=solve(md,'lv')
    128129#
    129 #field_names=[field_names,'LoveHmr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi']
    130 #field_tolerances=[field_tolerances,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
     130#field_names=[field_names,'LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart']
     131#field_tolerances=[field_tolerances,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9,4.3e-9]
    131132#field_values=[field_values,\
    132133#       (md.results.LoveSolution.LoveHr[:][0]),\
     
    186187md.love.nfreq=len(md.love.frequencies)
    187188
    188 field_names+=['LoveHmr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi']
    189 field_tolerances+=[3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9,3.7e-9]
     189field_names+=['LoveH_loadingVSS96_elastic','LoveK_loadingVSS96_elastic','LoveL_loadingVSS96_elastic','LoveH_loadingVSS96_realpart','LoveK_loadingVSS96_realpart','LoveL_loadingVSS96_realpart','LoveH_loadingVSS96_imagpart','LoveK_loadingVSS96_imagpart','LoveL_loadingVSS96_imagpart']
     190field_tolerances+=[2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6,2e-6]
    190191field_values+=[
    191192np.array(md.results.LoveSolution.LoveHr)[:,0],
  • issm/trunk/test/NightlyRun/test211.js

    r21341 r23394  
    1212//Fields and tolerances to track changes
    1313field_names=[
    14         'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1', 
    15         'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2', 
     14        'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsGroundediceMeltingRate1',
     15        'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsGroundediceMeltingRate2',
    1616        'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3'];
    1717field_tolerances=[
    1818        2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,
    19         5e-06,5e-06,8e-05,5e-06,1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,
     19        5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05,
    2020        8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05];
    2121field_values=[
  • issm/trunk/test/NightlyRun/test211.m

    r21341 r23394  
    1616field_tolerances={...
    1717        2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,...
    18         5e-06,5e-06,8e-05,5e-06,1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,...
     18        5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05,...
    1919        8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05};
    2020field_values={...
  • issm/trunk/test/NightlyRun/test211.py

    r21729 r23394  
    2626                                                 'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsGroundediceMeltingRate3']
    2727field_tolerances=[2e-08,2e-08,5e-05,2e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,
    28                                                                         5e-06,5e-06,8e-05,5e-06,1e-07,5e-07,5e-07,5e-07,3e-06,5e-05,
    29                                                                         8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05]
     28        5e-06,5e-06,8e-05,5e-06,5e-07,5e-07,5e-07,5e-07,3e-06,5e-05,
     29        8e-06,8e-06,8e-05,8e-06,5e-07,8e-07,8e-07,8e-07,5e-06,8e-05]
    3030field_values=[md.results.TransientSolution[0].Vx,
    3131                                                        md.results.TransientSolution[0].Vy,
  • issm/trunk/test/NightlyRun/test215.m

    r23189 r23394  
    2424%Fields and tolerances to track changes
    2525field_names     ={'Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy'};
    26 field_tolerances={4.6e-08,1e-08,2e-08,1e-09,2e-09,2e-08,2e-08};
     26field_tolerances={4.6e-08,1e-08,2e-08,2e-09,3e-09,2e-08,2e-08};
    2727field_values={...
    2828        (md.results.StressbalanceSolution.Gradient1),...
  • issm/trunk/test/NightlyRun/test215.py

    r23189 r23394  
    3737# Fields and tolerances to track changes
    3838field_names     =['Gradient','Misfits','MaterialsRheologyBbar','Pressure','Vel','Vx','Vy']
    39 field_tolerances=[4.6e-08,1e-08,2e-09,1e-08,2e-09,2e-08,2e-08]
     39field_tolerances=[4.6e-08,1e-08,2e-08,2e-09,3e-09,2e-08,2e-08]
    4040field_values=[md.results.StressbalanceSolution.Gradient1,
    4141        md.results.StressbalanceSolution.J,
  • issm/trunk/test/NightlyRun/test290.m

    r21341 r23394  
    1111%Fields and tolerances to track changes
    1212field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
    13 field_tolerances={5e-5,5e-5,8e-5,5e-5,1e-7};
     13field_tolerances={5e-5,5e-5,8e-4,5e-4,2e-7};
    1414field_values={...
    1515        (md.results.StressbalanceSolution.Vx),...
  • issm/trunk/test/NightlyRun/test290.py

    r21729 r23394  
    2121#Fields and tolerances to track changes
    2222field_names     =['Vx', 'Vy', 'Vz', 'Vel','Pressure']
    23 field_tolerances=[5e-5,5e-5,8e-5,5e-5,1e-7]
     23field_tolerances=[5e-5,5e-5,8e-4,5e-4,2e-7]
    2424field_values=[\
    2525        md.results.StressbalanceSolution.Vx,\
  • issm/trunk/test/NightlyRun/test3015.m

    r22758 r23394  
    1515%setup autodiff parameters
    1616index=1; %this is the scalar component we are checking against
    17 md.autodiff.independents={...
    18         independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
     17
     18if IssmConfig('_HAVE_CODIPACK_')
     19        md.autodiff.independents={...
     20                independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices)
     21        };
     22        md.autodiff.dependents={...
     23                dependent('name','IceVolume','type','scalar','fos_reverse_index',index)...
     24                };
     25        md.autodiff.driver='fos_reverse';
     26else
     27        md.autodiff.independents={...
     28                independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
    1929        };
    2030
    21 md.autodiff.dependents={...
    22         dependent('name','IceVolume','type','scalar')...
    23         };
    24 md.autodiff.driver='fos_forward';
     31        md.autodiff.dependents={...
     32                dependent('name','IceVolume','type','scalar')...
     33                };
     34        md.autodiff.driver='fos_forward';
     35end
    2536
    2637%parameters for the step-wise derivative
     
    7081md=solve(md,'Masstransport');
    7182%retrieve directly
    72 dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian;
     83if IssmConfig('_HAVE_CODIPACK_')
     84        dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian(index);
     85else
     86        dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian;
     87end
    7388
    74 disp(sprintf('dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n',dVdh_an,dVdh_ad));
     89disp(sprintf('dV/dh: analytical:  %16.16g\n       using ad  %16.16g\n',dVdh_an,dVdh_ad));
    7590
    7691%Fields and tolerances to track changes
  • issm/trunk/test/NightlyRun/test3480.m

    r22758 r23394  
    1818md.inversion.iscontrol=1;
    1919md.autodiff.isautodiff=1;
     20md.autodiff.driver='fos_reverse';
    2021
    2122md.friction.coefficient(1:md.mesh.numberofvertices,1)=50;
  • issm/trunk/test/NightlyRun/test3481.m

    r22758 r23394  
    1818md.inversion.iscontrol=1;
    1919md.autodiff.isautodiff=1;
     20md.autodiff.driver='fos_reverse';
    2021
    2122md.friction.coefficient(1:md.mesh.numberofvertices,1)=50;
  • issm/trunk/test/NightlyRun/test421.m

    r23189 r23394  
    1010%Fields and tolerances to track changes
    1111field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
    12 field_tolerances={1e-06,9e-07,2e-05,2e-06,2e-06};
     12field_tolerances={2e-06,9e-07,2e-05,2e-06,2e-06};
    1313field_values={...
    1414        (md.results.StressbalanceSolution.Vx),...
  • issm/trunk/test/NightlyRun/test421.py

    r23189 r23394  
    2020#Fields and tolerances to track changes
    2121field_names     =['Vx','Vy','Vz','Vel','Pressure']
    22 field_tolerances=[1e-06,9e-07,2e-05,2e-06,2e-06]
     22field_tolerances=[2e-06,9e-07,2e-05,2e-06,2e-06]
    2323field_values=[\
    2424        md.results.StressbalanceSolution.Vx,\
  • issm/trunk/test/NightlyRun/test455.m

    r21341 r23394  
    1414        md=solve(md,'Stressbalance');
    1515        field_names     ={field_names{:},['Vx' i{1}],['Vy' i{1}],['Vz' i{1}],['Vel' i{1}],['Pressure' i{1}]};
    16         field_tolerances={field_tolerances{:},6e-08,6e-08,6e-08,6e-08,3e-13};
     16        field_tolerances={field_tolerances{:},7e-08,6e-08,6e-08,6e-08,3e-13};
    1717        field_values={field_values{:},...
    1818        (md.results.StressbalanceSolution.Vx),...
  • issm/trunk/test/NightlyRun/test455.py

    r21729 r23394  
    2424        md=solve(md,'Stressbalance')
    2525        field_names     =field_names+['Vx'+i,'Vy'+i,'Vz'+i,'Vel'+i,'Pressure'+i]
    26         field_tolerances=field_tolerances+[6e-08,6e-08,6e-08,6e-08,3e-13]
     26        field_tolerances=field_tolerances+[7e-08,6e-08,6e-08,6e-08,3e-13]
    2727        field_values=field_values+[\
    2828                        md.results.StressbalanceSolution.Vx,\
  • issm/trunk/test/NightlyRun/test701.m

    r23189 r23394  
    3535md.stressbalance.spcvx(find(vertexflags(md.mesh,4)))=0;
    3636md.stressbalance.spcvy(find(vertexflags(md.mesh,4)))=0;
     37md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);
    3738
    3839%Misc
  • issm/trunk/test/NightlyRun/test701.py

    r23189 r23394  
    4242md.stressbalance.spcvx[np.where(md.mesh.vertexflags(4))] = 0.
    4343md.stressbalance.spcvy[np.where(md.mesh.vertexflags(4))] = 0.
     44md.basalforcings.floatingice_melting_rate=np.zeros((md.mesh.numberofvertices,))
    4445
    4546#Misc
  • issm/trunk/test/NightlyRun/test702.m

    r23189 r23394  
    3434md.stressbalance.spcvx(find(vertexflags(md.mesh,4)))=800;
    3535md.stressbalance.spcvy(find(vertexflags(md.mesh,4)))=0;
     36md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);
    3637
    3738%Misc
Note: See TracChangeset for help on using the changeset viewer.