Changeset 15093


Ignore:
Timestamp:
05/23/13 23:16:00 (12 years ago)
Author:
Eric.Larour
Message:

CHG: generic again capable of running on windows platforms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/generic.m

    r13825 r15093  
    115115                                fprintf(fid,'@echo off\n');
    116116                                if cluster.interactive
    117                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    118                                 else
    119                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog',...
    120                                                 cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
     117                                        fprintf(fid,'"%s/issm.exe" %s ./ %s ',cluster.codepath,EnumToString(solution),modelname);
     118                                else
     119                                        fprintf(fid,'"%s/issm.exe" %s ./ %s 2> %s.errlog >%s.outlog',...
     120                                                cluster.codepath,EnumToString(solution),modelname,modelname,modelname);
    121121                                end
    122122                                fclose(fid);
     
    178178                function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
    179179
    180                         %compress the files into one zip.
    181                         compressstring=['tar -zcf ' dirname '.tar.gz '];
    182                         for i=1:numel(filelist),
    183                                 compressstring = [compressstring ' ' filelist{i}];
    184                         end
    185                         if cluster.interactive,
    186                                 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
    187                         end
    188                         system(compressstring);
    189 
    190                         disp('uploading input file and queueing script');
    191                         issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
    192 
    193                         disp('launching solution sequence on remote cluster');
    194                         launchcommand=['source ' cluster.etcpath '/environment.sh && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
    195                                 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
    196                         issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
     180                        if ~ispc,
     181                                %compress the files into one zip.
     182                                compressstring=['tar -zcf ' dirname '.tar.gz '];
     183                                for i=1:numel(filelist),
     184                                        compressstring = [compressstring ' ' filelist{i}];
     185                                end
     186                                if cluster.interactive,
     187                                        compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
     188                                end
     189                                system(compressstring);
     190
     191                                disp('uploading input file and queueing script');
     192                                issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
     193
     194                                disp('launching solution sequence on remote cluster');
     195                                launchcommand=['source ' cluster.etcpath '/environment.sh && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     196                                        ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
     197                                issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
     198                        else
     199                                system([modelname '.bat']);
     200                        end
    197201                end %}}}
    198202                function Download(cluster,dirname,filelist)% {{{
Note: See TracChangeset for help on using the changeset viewer.