Index: /issm/trunk/src/m/clusters/astrid.m
===================================================================
--- /issm/trunk/src/m/clusters/astrid.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/astrid.m	(revision 5980)
@@ -6,61 +6,77 @@
 classdef astrid
     properties (SetAccess=public) 
-	% {{{1
-		name='astrid'
-        np   =15; %number of processors
-		codepath=[issmdir() '/bin'];
-		executionpath=[issmdir() '/../execution'];
-		valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
-		valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
-		valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
-		login='larour';
-		port=0;
-	%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		disp(sprintf('    valgrind: %s',md.valgrind));
-		disp(sprintf('    valgrindlib: %s',md.valgrindlib));
-		disp(sprintf('    valgrindsup: %s',md.valgrindsup));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
-			if md.np>16,
-				error('IsConsistent error message: number of processors should be lest than 16!');
-			end
-			if isnan(md.np),
-				error('IsConsistent error message: number of processors should not be NaN!');
-			end
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
+		 % {{{1
+		 name='astrid'
+		 login='larour';
+		 np=15;
+		 port=0;
+		 codepath=[issmdir() '/bin'];
+		 executionpath=[issmdir() '/../execution'];
+		 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
+		 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
+		 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
 
-		%write instructions for launching a job on the cluster
-		fprintf(fid,'#!/bin/sh\n');
-		if mem_debug==0,
-			fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		else
-			%fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-			fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup, md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		end
+		 %}}}
+	 end
+	 methods
+		 function cluster=astrid(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(astrid)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster astrid']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+			 disp(sprintf('    valgrind: %s',cluster.valgrind));
+			 disp(sprintf('    valgrindlib: %s',cluster.valgrindlib));
+			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
+			 if cluster.np>16,
+				 error('IsConsistent error message: number of processors should be lest than 16!');
+			 end
+			 if isnan(cluster.np),
+				 error('IsConsistent error message: number of processors should not be NaN!');
+			 end
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		%close file
-		fclose(fid);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
-		end
-		%}}}
+			 %write instructions for launching a job on the cluster
+			 fprintf(fid,'#!/bin/sh\n');
+			 if mem_debug==0,
+				 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 else
+				 %fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+				 fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 end
+
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/castor.m
===================================================================
--- /issm/trunk/src/m/clusters/castor.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/castor.m	(revision 5980)
@@ -6,65 +6,80 @@
 classdef castor
     properties (SetAccess=public) 
-	% {{{1
-		name='castor'
-		np   =128; %number of processors
-		queue='shortc';
-		time=180;
-		codepath='/workp/edw/larour/issm-2.0/bin'
-		executionpath='/workp/edw/larour/Testing/Execution'
-		login='larour';
-		port=0;
-	%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    queue: %s',md.queue));
-		disp(sprintf('    time: %i',md.time));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
+		 % {{{1
+		 name='castor'
+		 login='larour';
+		 np   =128; %number of processors
+		 port=0;
+		 queue='shortc';
+		 time=180;
+		 codepath='/workp/edw/larour/issm-2.0/bin'
+		 executionpath='/workp/edw/larour/Testing/Execution'
+		 %}}}
+	 end
+	 methods
+		 function cluster=castor(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(castor)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster castor']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
 
-		available_queues={'shortc','longc'};
-		queue_requirements_time=[180 720];
-		queue_requirements_np=[128 128];
+			 available_queues={'shortc','longc'};
+			 queue_requirements_time=[180 720];
+			 queue_requirements_np=[128 128];
 
-		QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,md.queue,md.np,md.time)
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
-		
-		fprintf(fid,'#!/bin/sh\n');
-		fprintf(fid,'#PBS -l walltime=%i\n',md.time*60); %walltime is in seconds.
-		fprintf(fid,'#PBS -N %s\n',modelname);
-		fprintf(fid,'#PBS -l ncpus=%i\n',md.np);
-		if ~isempty(queue),
-			fprintf(fid,'#PBS -q %s\n',md.queue);
-		end
-		fprintf(fid,'#PBS -o %s.outlog \n',modelname);
-		fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		fprintf(fid,'export PBS_O_WORKDIR=%s\n',md.executionpath);
-		fprintf(fid,'cd $PBS_O_WORKDIR\n');
-		fprintf(fid,'export OMP_NUM_THREADS=1\n');
-		fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',md.np-1,md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 fprintf(fid,'#!/bin/sh\n');
+			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -N %s\n',modelname);
+			 fprintf(fid,'#PBS -l ncpus=%i\n',cluster.np);
+			 if ~isempty(queue),
+				 fprintf(fid,'#PBS -q %s\n',cluster.queue);
+			 end
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
-		end
-		%}}}
+			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+			 fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname);
+
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/cosmos.m
===================================================================
--- /issm/trunk/src/m/clusters/cosmos.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/cosmos.m	(revision 5980)
@@ -6,64 +6,79 @@
 classdef cosmos
     properties (SetAccess=public) 
-	% {{{1
-		name='cosmos'
-		np   =128; %number of processors
-		queue='shortq';
-		time=3*60;
-		codepath='/work00/edw/larour/issm-2.0/bin';
-		executionpath='/work00/edw/larour/Execution';
-		login='larour';
-		port=0;
-	%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    queue: %s',md.queue));
-		disp(sprintf('    time: %i',md.time));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
+		 % {{{1
+		 name='cosmos'
+		 login='larour';
+		 np=128;
+		 port=0;
+		 queue='shortq';
+		 time=3*60;
+		 codepath='/work00/edw/larour/issm-2.0/bin';
+		 executionpath='/work00/edw/larour/Execution';
+		 %}}}
+	 end
+	 methods
+		 function cluster=cosmos(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(cosmos)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster cosmos']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
 
-		available_queues={'debug','shortq','longq'};
-		queue_requirements_time=[60*1 60*3 60*17];
-		queue_requirements_np=[32 128 256];
+			 available_queues={'debug','shortq','longq'};
+			 queue_requirements_time=[60*1 60*3 60*17];
+			 queue_requirements_np=[32 128 256];
 
-		QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,md.queue,md.np,md.time)
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		fprintf(fid,'#!/bin/bash\n');
-		fprintf(fid,'#PBS -l select=%i:ncpus=1\n',md.np);
-		fprintf(fid,'#PBS -N %s\n',modelname);
-		fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
-		fprintf(fid,'#PBS -q %s\n',queue);
-		fprintf(fid,'#PBS -o %s.outlog \n',modelname);
-		fprintf(fid,'#PBS -e %s.errlog \n',modelname);
-		fprintf(fid,'export PBS_O_WORKDIR=%s\n',md.executionpath);
-		fprintf(fid,'cd $PBS_O_WORKDIR\n');
-		fprintf(fid,'export OMP_NUM_THREADS=1\n');
-		fprintf(fid,'ulimit -s unlimited\n');
-		fprintf(fid,'ulimit -c 0\n');
-		fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 fprintf(fid,'#!/bin/bash\n');
+			 fprintf(fid,'#PBS -l select=%i:ncpus=1\n',cluster.np);
+			 fprintf(fid,'#PBS -N %s\n',modelname);
+			 fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -q %s\n',queue);
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+			 fprintf(fid,'ulimit -s unlimited\n');
+			 fprintf(fid,'ulimit -c 0\n');
+			 fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname);
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub -S/bin/sh ' modelname '.queue '];
-		end
-		%}}}
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub -S/bin/sh ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/eric-mac.m
===================================================================
--- /issm/trunk/src/m/clusters/eric-mac.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/eric-mac.m	(revision 5980)
@@ -4,63 +4,78 @@
 %          cluster=eric-mac();
 %
-classdef astrid
+classdef ericmac
     properties (SetAccess=public) 
-	% {{{1
-		name='eric-mac'
-        np   =3; %number of processors
-		codepath=[issmdir() '/bin'];
-		executionpath=[issmdir() '/../execution'];
-		valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
-		valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
-		valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
-		login='larour';
-		port=0;
-	%}}}
+		 % {{{1
+		 name='eric-mac'
+		 login='larour';
+		 np=3;
+		 port=0;
+		 codepath=[issmdir() '/bin'];
+		 executionpath=[issmdir() '/../execution'];
+		 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
+		 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
+		 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
+		 %}}}
     end
     methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		disp(sprintf('    valgrind: %s',md.valgrind));
-		disp(sprintf('    valgrindlib: %s',md.valgrindlib));
-		disp(sprintf('    valgrindsup: %s',md.valgrindsup));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
-			if md.np>4,
-				error('IsConsistent error message: number of processors should be lest than 16!');
-			end
-			if isnan(md.np),
-				error('IsConsistent error message: number of processors should not be NaN!');
-			end
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
+		 function cluster=ericmac(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(ericmac)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster ericmac']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+			 disp(sprintf('    valgrind: %s',cluster.valgrind));
+			 disp(sprintf('    valgrindlib: %s',cluster.valgrindlib));
+			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
+			 if cluster.np>4,
+				 error('IsConsistent error message: number of processors should be lest than 16!');
+			 end
+			 if isnan(cluster.np),
+				 error('IsConsistent error message: number of processors should not be NaN!');
+			 end
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		%write instructions for launching a job on the cluster
-		fprintf(fid,'#!/bin/sh\n');
-		if mem_debug==0,
-			fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		else
-			%fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-			fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup, md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		end
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 %write instructions for launching a job on the cluster
+			 fprintf(fid,'#!/bin/sh\n');
+			 if mem_debug==0,
+				 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 else
+				 %fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+				 fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 end
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
-		end
-		%}}}
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/gemini.m
===================================================================
--- /issm/trunk/src/m/clusters/gemini.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/gemini.m	(revision 5980)
@@ -8,63 +8,78 @@
 	% {{{1
 		name='gemini'
-		np   =50; %number of processors
+		login='larour';
+		np=50;
+		port=0;
 		queue='debug';
 		time=60;
 		codepath='/workg/edw/larour/issm-2.0/bin'
 		executionpath='/workg/edw/larour/Testing/Execution'
-		login='larour';
-		port=0;
 	%}}}
     end
     methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    queue: %s',md.queue));
-		disp(sprintf('    time: %i',md.time));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
+		 function cluster=gemini(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(gemini)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster gemini']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
 
-		available_queues={'debug','shortg','longg'};
-		queue_requirements_time=[60 180 720];
-		queue_requirements_np=[50 50 50];
+			 available_queues={'debug','shortg','longg'};
+			 queue_requirements_time=[60 180 720];
+			 queue_requirements_np=[50 50 50];
 
-		QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,md.queue,md.np,md.time)
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
-		
-		fprintf(fid,'#!/bin/sh\n');
-		fprintf(fid,'#PBS -l walltime=%i\n',md.time*60); %walltime is in seconds.
-		fprintf(fid,'#PBS -N %s\n',modelname);
-		fprintf(fid,'#PBS -l ncpus=%i\n',md.np);
-		if ~isempty(queue),
-			fprintf(fid,'#PBS -q %s\n',md.queue);
-		end
-		fprintf(fid,'#PBS -o %s.outlog \n',modelname);
-		fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		fprintf(fid,'export PBS_O_WORKDIR=%s\n',md.executionpath);
-		fprintf(fid,'cd $PBS_O_WORKDIR\n');
-		fprintf(fid,'export OMP_NUM_THREADS=1\n');
-		fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',md.np-1,md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 fprintf(fid,'#!/bin/sh\n');
+			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -N %s\n',modelname);
+			 fprintf(fid,'#PBS -l ncpus=%i\n',cluster.np);
+			 if ~isempty(queue),
+				 fprintf(fid,'#PBS -q %s\n',cluster.queue);
+			 end
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
-		end
-		%}}}
+			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+			 fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname);
+
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/larsen.m
===================================================================
--- /issm/trunk/src/m/clusters/larsen.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/larsen.m	(revision 5980)
@@ -6,61 +6,76 @@
 classdef larsen
     properties (SetAccess=public) 
-	% {{{1
-		name='larsen'
-		np=7;
-		codepath=[issmdir() '/bin'];
-		executionpath=[issmdir() '/../execution'];
-		valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
-		valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
-		valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
-		login='larour';
-		port=0;
-	%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		disp(sprintf('    valgrind: %s',md.valgrind));
-		disp(sprintf('    valgrindlib: %s',md.valgrindlib));
-		disp(sprintf('    valgrindsup: %s',md.valgrindsup));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
-			if md.np>8,
-				error('IsConsistent error message: number of processors should be lest than 16!');
-			end
-			if isnan(md.np),
-				error('IsConsistent error message: number of processors should not be NaN!');
-			end
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
+		 % {{{1
+		 name='larsen'
+		 login='larour';
+		 np=7;
+		 port=0;
+		 codepath=[issmdir() '/bin'];
+		 executionpath=[issmdir() '/../execution'];
+		 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
+		 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
+		 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
+		 %}}}
+	 end
+	 methods
+		 function cluster=larsen(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(larsen)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster larsen']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+			 disp(sprintf('    valgrind: %s',cluster.valgrind));
+			 disp(sprintf('    valgrindlib: %s',cluster.valgrindlib));
+			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
+			 if cluster.np>8,
+				 error('IsConsistent error message: number of processors should be lest than 16!');
+			 end
+			 if isnan(cluster.np),
+				 error('IsConsistent error message: number of processors should not be NaN!');
+			 end
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		%write instructions for launching a job on the cluster
-		fprintf(fid,'#!/bin/sh\n');
-		if mem_debug==0,
-			fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		else
-			%fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-			fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup, md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		end
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 %write instructions for launching a job on the cluster
+			 fprintf(fid,'#!/bin/sh\n');
+			 if mem_debug==0,
+				 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 else
+				 %fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+				 fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 end
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
-		end
-		%}}}
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/none.m
===================================================================
--- /issm/trunk/src/m/clusters/none.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/none.m	(revision 5980)
@@ -9,17 +9,30 @@
     end
     methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('cluster class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		error('none.BuildQueueScript error message: serial cluster cannot build queue script');
-		end
-		%}}}
+		 function cluster=none(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(none)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster none']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('cluster class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
+			 error('none.BuildQueueScript error message: serial cluster cannot build queue script');
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/pfe.m
===================================================================
--- /issm/trunk/src/m/clusters/pfe.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/pfe.m	(revision 5980)
@@ -6,97 +6,112 @@
 classdef pfe
     properties (SetAccess=public)  
-		% {{{1
-		name='pfe'
-		numnodes=20;
-		cpuspernode=8; 
-		queue='long';
-		time=12*60;
-		processor='neh';
-		codepath='/staff/elarour/trunk/bin';
-		executionpath='/nobackupp10/elarour/Testing';
-		login='elarour';
-		port=1025;
-	end
-    properties (SetAccess=private) 
-		np=20*8;
-		%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    numnodes: %i',md.numnodes));
-		disp(sprintf('    cpuspernode: %i',md.cpuspernode));
-		disp(sprintf('    np: %i',md.cpuspernode*md.numnodes));
-		disp(sprintf('    queue: %s',md.queue));
-		disp(sprintf('    time: %i',md.time));
-		disp(sprintf('    processor: %s',md.processor));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
+		 % {{{1
+		 name='pfe'
+		 login='elarour';
+		 numnodes=20;
+		 cpuspernode=8; 
+		 port=1025;
+		 queue='long';
+		 time=12*60;
+		 processor='neh';
+		 codepath='/staff/elarour/trunk/bin';
+		 executionpath='/nobackupp10/elarour/Testing';
+	 end
+	 properties (SetAccess=private) 
+		 np=20*8;
+		 % }}}
+	 end
+	 methods
+		 function cluster=pfe(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(pfe)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster pfe']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    numnodes: %i',cluster.numnodes));
+			 disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
+			 disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    processor: %s',cluster.processor));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
 
-			available_queues={'long'};
-			queue_requirements_time=[7200];
-			queue_requirements_np=[2048];
+			 available_queues={'long'};
+			 queue_requirements_time=[7200];
+			 queue_requirements_np=[2048];
 
-			QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,md.queue,md.np,md.time)
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
 
-			%now, check md.cpuspernode according to processor type
-			if (strcmpi(md.processor,'har') | strcmpi(md.processor,'neh')),
-				if ((md.cpuspernode>8 ) | (md.cpuspernode<1)),
-					error('IsConsistent error message: cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
-				end
-			elseif strcmpi(md.processor,'wes'),
-				if ((md.cpuspernode>12 ) | (md.cpuspernode<1)),
-					error('IsConsistent error message: cpuspernode should be between 1 and 12 for ''wes'' processors');
-				end
-			else
-				error('IsConsistent error message: unknown processor type, should be ''neh'',''wes'' or ''har''');
-			end
+			 %now, check cluster.cpuspernode according to processor type
+			 if (strcmpi(cluster.processor,'har') | strcmpi(cluster.processor,'neh')),
+				 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
+					 error('IsConsistent error message: cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
+				 end
+			 elseif strcmpi(cluster.processor,'wes'),
+				 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)),
+					 error('IsConsistent error message: cpuspernode should be between 1 and 12 for ''wes'' processors');
+				 end
+			 else
+				 error('IsConsistent error message: unknown processor type, should be ''neh'',''wes'' or ''har''');
+			 end
 
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-			%compute number of processors
-			md.np=md.numnodes*md.cpuspernode;
-			
-			%open file for writing: 
-			fid=fopen([modelname '.queue'],'w');
+			 %compute number of processors
+			 cluster.np=cluster.numnodes*cluster.cpuspernode;
 
-			fprintf(fid,'#PBS -S /bin/bash\n');
-			fprintf(fid,'#PBS -N %s\n',modelname);
-			fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',md.numnodes,md.cpuspernode,md.processor);
-			fprintf(fid,'#PBS -l walltime=%i\n',md.time*60); %walltime is in seconds.
-			fprintf(fid,'#PBS -W group_list=s1010\n');
-			fprintf(fid,'#PBS -m e\n');
-			fprintf(fid,'#PBS -o %s.outlog \n',modelname);
-			fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-			fprintf(fid,'. /usr/share/modules/init/bash\n\n');
+			 fprintf(fid,'#PBS -S /bin/bash\n');
+			 fprintf(fid,'#PBS -N %s\n',modelname);
+			 fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
+			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -W group_list=s1010\n');
+			 fprintf(fid,'#PBS -m e\n');
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
 
-			fprintf(fid,'module load comp-intel/11.1.046\n');
-			fprintf(fid,'module load mpi/mpt.1.25\n');
-			fprintf(fid,'module load math/intel_mkl_64_10.0.011\n\n');
+			 fprintf(fid,'. /usr/share/modules/init/bash\n\n');
 
-			fprintf(fid,'export PATH="$PATH:."\n\n');
-			fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
+			 fprintf(fid,'module load comp-intel/11.1.046\n');
+			 fprintf(fid,'module load mpi/mpt.1.25\n');
+			 fprintf(fid,'module load math/intel_mkl_64_10.0.011\n\n');
 
-			fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
+			 fprintf(fid,'export PATH="$PATH:."\n\n');
+			 fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
 
-			fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s.bin %s.petsc %s.outbin %s.lock',md.np,md.codepath,EnumToString(analysis_type),modelname,modelname,modelname,modelname);
+			 fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
 
-			%close file
-			fclose(fid);
+			 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s.bin %s.petsc %s.outbin %s.lock',cluster.np,cluster.codepath,EnumToString(analysis_type),modelname,modelname,modelname,modelname);
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-			command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
-		end
-		%}}}
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/pollux.m
===================================================================
--- /issm/trunk/src/m/clusters/pollux.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/pollux.m	(revision 5980)
@@ -6,65 +6,80 @@
 classdef pollux
     properties (SetAccess=public) 
-	% {{{1
-		name='pollux'
-		np   =128; %number of processors
-		queue='shortp';
-		time=180;
-		codepath='/workc/edw/larour/issm-2.0/bin'
-		executionpath='/workc/edw/larour/Testing/Execution'
-		login='larour';
-		port=0;
-	%}}}
-    end
-    methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    queue: %s',md.queue));
-		disp(sprintf('    time: %i',md.time));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
+		 % {{{1
+		 name='pollux'
+		 login='larour';
+		 np=128;
+		 port=0;
+		 queue='shortp';
+		 time=180;
+		 codepath='/workc/edw/larour/issm-2.0/bin'
+		 executionpath='/workc/edw/larour/Testing/Execution'
+		 %}}}
+	 end
+	 methods
+		 function cluster=pollux(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(pollux)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster pollux']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    queue: %s',cluster.queue));
+			 disp(sprintf('    time: %i',cluster.time));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
 
-		available_queues={'shortp','longp'};
-		queue_requirements_time=[180 720];
-		queue_requirements_np=[128 128];
+			 available_queues={'shortp','longp'};
+			 queue_requirements_time=[180 720];
+			 queue_requirements_np=[128 128];
 
-		QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,md.queue,md.np,md.time)
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
-		
-		fprintf(fid,'#!/bin/sh\n');
-		fprintf(fid,'#PBS -l walltime=%i\n',md.time*60); %walltime is in seconds.
-		fprintf(fid,'#PBS -N %s\n',modelname);
-		fprintf(fid,'#PBS -l ncpus=%i\n',md.np);
-		if ~isempty(queue),
-			fprintf(fid,'#PBS -q %s\n',md.queue);
-		end
-		fprintf(fid,'#PBS -o %s.outlog \n',modelname);
-		fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		fprintf(fid,'export PBS_O_WORKDIR=%s\n',md.executionpath);
-		fprintf(fid,'cd $PBS_O_WORKDIR\n');
-		fprintf(fid,'export OMP_NUM_THREADS=1\n');
-		fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',md.np-1,md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname);
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 fprintf(fid,'#!/bin/sh\n');
+			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+			 fprintf(fid,'#PBS -N %s\n',modelname);
+			 fprintf(fid,'#PBS -l ncpus=%i\n',cluster.np);
+			 if ~isempty(queue),
+				 fprintf(fid,'#PBS -q %s\n',cluster.queue);
+			 end
+			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
-		end
-		%}}}
+			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+			 fprintf(fid,'dplace -s1 -c0-%i mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname);
+
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && qsub ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
Index: /issm/trunk/src/m/clusters/wilkes.m
===================================================================
--- /issm/trunk/src/m/clusters/wilkes.m	(revision 5979)
+++ /issm/trunk/src/m/clusters/wilkes.m	(revision 5980)
@@ -8,5 +8,7 @@
 	% {{{1
 		name='wilkes'
-        np   =7; %number of processors
+		login='larour';
+		np=7;
+		port=0;
 		codepath=[issmdir() '/bin'];
 		executionpath=[issmdir() '/../execution'];
@@ -14,53 +16,66 @@
 		valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
 		valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
-		login='larour';
-		port=0;
 	%}}}
     end
     methods
-		function []=disp(md) % {{{1
-		%  display the object
-		disp(sprintf('class ''%s'' object ''%s'' = ',class(md),inputname(1)));
-		disp(sprintf('    name: %s',md.name));
-		disp(sprintf('    np: %i',md.np));
-		disp(sprintf('    codepath: %s',md.codepath));
-		disp(sprintf('    executionpath: %s',md.executionpath));
-		disp(sprintf('    valgrind: %s',md.valgrind));
-		disp(sprintf('    valgrindlib: %s',md.valgrindlib));
-		disp(sprintf('    valgrindsup: %s',md.valgrindsup));
-		end
-		%}}}
-		function IsConsistent(md) % {{{1
-			if md.np>8,
-				error('IsConsistent error message: number of processors should be lest than 16!');
-			end
-			if isnan(md.np),
-				error('IsConsistent error message: number of processors should not be NaN!');
-			end
-		end
-		%}}}
-		function BuildQueueScript(md,modelname,analysis_type,mem_debug) % {{{1
-		
-		%open file for writing: 
-		fid=fopen([modelname '.queue'],'w');
+		 function cluster=wilkes(varargin) % {{{1
+			 options=pairoptions(varargin{:});
+			 for i=1:size(options.list,1),
+				 fieldname=options.list{i,1};
+				 fieldvalue=options.list{i,2};
+				 if ismember(fieldname,properties(wilkes)),
+					 cluster.(fieldname)=fieldvalue;
+				 else
+					 disp(['''' fieldname ''' is not a property of cluster wilkes']);
+				 end
+			 end
+		 end
+		 %}}}
+		 function disp(cluster) % {{{1
+			 %  display the object
+			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+			 disp(sprintf('    name: %s',cluster.name));
+			 disp(sprintf('    login: %s',cluster.login));
+			 disp(sprintf('    np: %i',cluster.np));
+			 disp(sprintf('    port: %i',cluster.port));
+			 disp(sprintf('    codepath: %s',cluster.codepath));
+			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+			 disp(sprintf('    valgrind: %s',cluster.valgrind));
+			 disp(sprintf('    valgrindlib: %s',cluster.valgrindlib));
+			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+		 end
+		 %}}}
+		 function IsConsistent(cluster) % {{{1
+			 if cluster.np>8,
+				 error('IsConsistent error message: number of processors should be lest than 16!');
+			 end
+			 if isnan(cluster.np),
+				 error('IsConsistent error message: number of processors should not be NaN!');
+			 end
+		 end
+		 %}}}
+		 function BuildQueueScript(cluster,modelname,analysis_type,mem_debug) % {{{1
 
-		%write instructions for launching a job on the cluster
-		fprintf(fid,'#!/bin/sh\n');
-		if mem_debug==0,
-			fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.np,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		else
-			%fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup,md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-			fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.valgrindlib,md.np,md.valgrind,md.valgrindsup, md.codepath,EnumToString(analysis_type),md.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
-		end
+			 %open file for writing: 
+			 fid=fopen([modelname '.queue'],'w');
 
-		%close file
-		fclose(fid);
+			 %write instructions for launching a job on the cluster
+			 fprintf(fid,'#!/bin/sh\n');
+			 if mem_debug==0,
+				 fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.np,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 else
+				 %fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+				 fprintf(fid,'LD_PRELOAD=%s mpirun -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s.bin %s.petsc %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(analysis_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);
+			 end
 
-		end
-		%}}}
-		function command=LaunchCommand(md,modelruntimename,modelname)% {{{1
-		command=['cd ' md.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
-		end
-		%}}}
+			 %close file
+			 fclose(fid);
+
+		 end
+		 %}}}
+		 function command=LaunchCommand(cluster,modelruntimename,modelname)% {{{1
+			 command=['cd ' cluster.executionpath ' && rm -rf ./' modelruntimename ' && mkdir ' modelruntimename ' && cd ' modelruntimename ' && mv ../' modelruntimename '.tar.gz ./ && tar -zxf ' modelruntimename '.tar.gz  && source  ' modelname '.queue '];
+		 end
+		 %}}}
 	end
 end
