Changeset 20320
- Timestamp:
- 03/16/16 19:09:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/discover.m
r19673 r20320 11 11 name=oshostname(); 12 12 login=''; 13 modules = {}; 13 14 numnodes=20; 14 15 cpuspernode=8; 15 16 port=0; 16 17 queue='general'; 17 time=12*60 ;18 time=12*60*60; 18 19 processor='west'; 19 20 codepath=''; … … 23 24 numstreams=8; 24 25 hyperthreading=0; 26 email=''; 25 27 end 26 28 %}}} … … 40 42 disp(sprintf(' name: %s',cluster.name)); 41 43 disp(sprintf(' login: %s',cluster.login)); 44 disp(sprintf(' modules: %s',strjoin(cluster.modules,', '))); 42 45 disp(sprintf(' port: %i',cluster.port)); 43 46 disp(sprintf(' numnodes: %i',cluster.numnodes)); … … 51 54 disp(sprintf(' interactive: %i',cluster.interactive)); 52 55 disp(sprintf(' hyperthreading: %i',cluster.hyperthreading)); 56 disp(sprintf(' email: %s',cluster.email)); 53 57 end 54 58 %}}} … … 60 64 function md = checkconsistency(cluster,md,solution,analyses) % {{{ 61 65 62 available_queues={' general_long','general','debug'};63 queue_requirements_time=[24*60 12*60 60];64 queue_requirements_np=[ 516 102432];66 available_queues={'long','general','debug'}; 67 queue_requirements_time=[24*60*60 12*60*60 60]; 68 queue_requirements_np=[4116 532 532]; 65 69 66 70 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time) … … 71 75 md = checkmessage(md,'cpuspernode should be between 1 and 16 for ''sand'' processors'); 72 76 end 73 elseif strcmpi(cluster.processor,' west'),74 if ((cluster.cpuspernode> 12) | (cluster.cpuspernode<1)),75 md = checkmessage(md,'cpuspernode should be between 1 and 12 for ''west'' processors');76 end 77 else 78 md = checkmessage(md,'unknown processor type, should be ''sand'' or '' west'' ');77 elseif strcmpi(cluster.processor,'hasw'), 78 if ((cluster.cpuspernode>28 ) | (cluster.cpuspernode<1)), 79 md = checkmessage(md,'cpuspernode should be between 1 and 28 for ''hasw'' processors'); 80 end 81 else 82 md = checkmessage(md,'unknown processor type, should be ''sand'' or ''hasw'' '); 79 83 end 80 84 … … 90 94 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 91 95 92 %write queuing script 96 %write queuing script 93 97 fid=fopen([modelname '.queue'],'w'); 98 94 99 fprintf(fid,'#!/bin/bash\n'); 95 % fprintf(fid,'#PBS -N %s\n',modelname); 96 fprintf(fid,'#PBS -l select=%i:mpiprocs=%i:proc=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor); 97 fprintf(fid,'#PBS -l walltime=%i:00\n',cluster.time); %SLURM walltime is in minutes: 98 if ~strcmp(cluster.queue,'general'), 99 fprintf(fid,'#PBS -q %s \n',cluster.queue); 100 end 101 fprintf(fid,'#PBS -W group_list=s1010\n'); 102 fprintf(fid,'#PBS -m e\n'); 103 fprintf(fid,'#PBS -o %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]); 104 fprintf(fid,'#PBS -e %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]); 100 fprintf(fid,'#SBATCH -J %s \n',modelname); 101 fprintf(fid,'#SBATCH --qos=%s \n',cluster.queue); 102 fprintf(fid,'#SBATCH -o %s.outlog \n',modelname); 103 fprintf(fid,'#SBATCH -e %s.errlog \n',modelname); 104 fprintf(fid,'#SBATCH -n %i \n',cluster.numnodes*cluster.cpuspernode); 105 fprintf(fid,'#SBATCH -N %i \n',cluster.numnodes); 106 fprintf(fid,'#SBATCH -t %02i:%02i:00 \n',floor(cluster.time/3600),floor(mod(cluster.time,3600)/60)); 107 fprintf(fid,'#SBATCH -A s1010 \n\n'); 108 for i=1:numel(cluster.modules), 109 fprintf(fid,['module load ' cluster.modules{i} '\n']); 110 end 111 if length(find(cluster.email=='@'))>0 112 fprintf(fid,'#SBATCH --mail-user=%s \n',cluster.email); 113 fprintf(fid,'#SBATCH --mail-type=end \n\n'); 114 end 105 115 fprintf(fid,'. /usr/share/modules/init/bash\n\n'); 106 fprintf(fid,'module purge\n'); 107 fprintf(fid,'module load comp/intel-11.1.038\n'); 116 fprintf(fid,'module load comp/intel-15.0.0.090\n'); 108 117 fprintf(fid,'module load mpi/impi-4.0.3.008\n'); 109 fprintf(fid,'module load lib/mkl-10.1.2.024\n\n');110 118 fprintf(fid,'export PATH="$PATH:."\n\n'); 111 fprintf(fid,'export MPI_GROUP_MAX=64\n\n'); 112 fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname); 119 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME 120 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n'); %FIXME 121 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname); 122 113 123 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 114 124 if ~io_gather, %concatenate the output files: … … 162 172 end 163 173 %}}} 164 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart )% {{{174 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart,batch)% {{{ 165 175 166 176 if ~cluster.interactive,
Note:
See TracChangeset
for help on using the changeset viewer.