Changeset 13631


Ignore:
Timestamp:
10/11/12 20:44:58 (12 years ago)
Author:
Eric.Larour
Message:

NEW: cloud cluster class, to control Amazon cloud computing.
Needed equivalents of ssh and scp using the starcluster commands put and get.
waitonlock also needed to not depend on the port value of the cluster so much.

Location:
issm/trunk-jpl/src/m
Files:
3 added
3 edited

Legend:

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

    r13629 r13631  
    1919                function cluster=cloud(varargin) % {{{
    2020
    21                         %use provided options to change fields
    22                         options=pairoptions(varargin{:});
    23 
    2421                        %initialize cluster using user settings if provided
    25                         if (exist([cluster.name '_settings'])==2), eval([cluster.name '_settings']); end
     22                        if (exist('cloud_settings')==2),
     23                                eval('cloud_settings');
     24                        end
    2625
    2726                        %OK get other fields
     
    7473
    7574                        disp('uploading input file and queueing script');
    76                         issmstscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
     75                        issmstscpout(cluster.name,cluster.executionpath,cluster.login,{[dirname '.tar.gz']});
    7776
    7877                        disp('launching solution sequence on remote cluster');
    79                         launchcommand=['source ' codepath '/etc/environment.sh && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     78                        launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
    8079                                ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
    81                         issmstssh(cluster.name,cluster.login,cluster.port,launchcommand);
     80                        issmstssh(cluster.name,cluster.login,launchcommand);
    8281                end %}}}
    8382                function Download(cluster,dirname,filelist)% {{{
     
    8584                        %copy files from cluster to current directory
    8685                        directory=[cluster.executionpath '/' dirname '/'];
    87                         issmstscpin(cluster.name,cluster.login,cluster.port,directory,filelist);
     86                        issmstscpin(cluster.name,cluster.login,directory,filelist);
    8887                end %}}}
    8988        end
  • issm/trunk-jpl/src/m/os/issmstscpin.m

    r13629 r13631  
    55%
    66%
    7 
    8 %first get hostname
    9 hostname=oshostname();
    107
    118%get initial warning mode
     
    2421        string=packages{1};
    2522else
    26         string='\{';
     23        string='';
    2724        for i=1:numel(packages)-1,
    28                 string=[string packages{i} ','];
     25                string=[string ' ' path packages{i} ' '];
    2926        end
    30         string=[string packages{end} '\}'];
     27        string=[string path packages{end}];
    3128end
    3229
    33 eval(['!starcluster get ' host ' --user ' login ' ' path '/' string  ' ./']);
     30system([starcluster() ' get ' host ' --user ' login ' ' string  ' ./']);
    3431
    3532%check starcluster get  worked
  • issm/trunk-jpl/src/m/solve/waitonlock.m

    r13071 r13631  
    1212cluster=md.cluster.name;
    1313login=md.cluster.login;
    14 port=md.cluster.port;
     14if any(strcmp(properties(md.cluster), 'port'))
     15        port=md.cluster.port;
     16end
    1517timelimit=md.settings.waitonlock;
    1618filename=[executionpath '/' md.private.runtimename '/' md.miscellaneous.name '.lock'];
Note: See TracChangeset for help on using the changeset viewer.