Changeset 2901


Ignore:
Timestamp:
01/25/10 08:12:56 (15 years ago)
Author:
Mathieu Morlighem
Message:

some modifications for Dakota

Location:
issm/trunk/src/m/classes/public
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/loadresultsfromcluster.m

    r2900 r2901  
    3737
    3838%erase the log and output files
    39 delete([md.name '.outlog']);
    40 delete([md.name '.errlog']);
    41 delete([md.name '.outbin']);
     39if md.qmu_analysis,
     40        delete(['qmu/' md.name '.outlog']);
     41        delete(['qmu/' md.name '.errlog']);
     42else
     43        delete([md.name '.outlog']);
     44        delete([md.name '.errlog']);
     45        delete([md.name '.outbin']);
     46end
    4247
    4348%erase input file if run was carried out on same platform.
    4449hostname=oshostname();
    4550if strcmpi(hostname,md.cluster),
    46         delete([md.name '.bin']);
    47         delete([md.name '.queue']);
     51        if md.qmu_analysis,
     52                delete(['qmu/' md.name '.bin']);
     53                delete(['qmu/' md.name '.queue']);
     54        else
     55                delete([md.name '.bin']);
     56                delete([md.name '.queue']);
     57        end
    4858end
    4959
  • issm/trunk/src/m/classes/public/loadresultsfromdisk.m

    r2896 r2901  
    1212
    1313if ~md.qmu_analysis,
    14         %load result onto model
     14
     15        %initialize md.results if not a structure yet
    1516        if ~isstruct(md.results),
    1617                md.results=struct();
    1718        end
    1819
     20        %load results onto model
    1921        structure=parseresultsfromdisk(filename);
    2022        md.results.(structure.analysis_type)=structure;
     23
     24        %recover analysis_type from results
     25        md.analysis_type=structure(1).analysis_type;
     26        if isscalar(md.sub_analysis_type),
     27                md.sub_analysis_type=AnalysisTypeFromEnum(md.sub_analysis_type);
     28        end
    2129
    2230        %Check result is consistent, only if it exists
    2331        disp(sprintf('%s\n','checking result consistency'));
    2432        if ~isresultconsistent(md,structure(1).analysis_type),
    25                 %it would be very cruel to put an error, it would kill the computed results (even if not consistent...)
     33                %it would be very cruel to use an error, it would kill the computed results (although they are not consistent...)
    2634                disp('!! results not consistent correct the model !!')
    2735        end
    28 end
    29 
    30 %recover analysis_type from results
    31 md.analysis_type=structure(1).analysis_type;
    32 if isscalar(md.sub_analysis_type),
    33         md.sub_analysis_type=AnalysisTypeFromEnum(md.sub_analysis_type);
    34 end
    3536
    3637%post processes qmu results if necessary
    37 if md.qmu_analysis,
     38else
     39
     40        md.analysis_type    =AnalysisTypeFromEnum(md.analysis_type);
     41        md.sub_analysis_type=AnalysisTypeFromEnum(md.sub_analysis_type);
    3842        md=postqmu(md);
    3943        cd ..
     44
    4045end
  • issm/trunk/src/m/classes/public/solveparallel.m

    r2689 r2901  
    2626
    2727%Do we return, or just wait for results?
    28 if md.waitonlock~=0 &  ~strcmpi(options.batch,'yes'),
     28if (md.waitonlock~=0 &  ~strcmpi(options.batch,'yes')),
    2929        %we wait for the done file
    3030        islock=waitonlock(md,executionpath);
Note: See TracChangeset for help on using the changeset viewer.