Index: /issm/trunk/etc/cluster.rc
===================================================================
--- /issm/trunk/etc/cluster.rc	(revision 227)
+++ /issm/trunk/etc/cluster.rc	(revision 227)
@@ -0,0 +1,48 @@
+begin
+
+#This file sets default platform settings used by ISSM. 
+#This file should always start with begin, and end with end. 
+#Comments start with #. 
+
+#The syntax to add a computational cluster is the following: 
+#cluster_name=foobar
+#cluster_codepath=/home/foobar/issm/bin
+#cluster_executionpath=/home/foobar/issm/bin
+
+#Just uncomment the 3 lines above if you want to add a cluster 
+#with hostname foobar, where issm code has been installed in 
+#cluster_codepath, and where execution will be carried out in cluster_executionpath
+#The cluster_name can be of any form, provided it's a string. Using 
+#the network hostname is good practice.
+
+#Default 
+
+#Final remark on including cluster settings: do not include spaces 
+#between a field, the '=' sign and its value. Do not also include trailing spaces
+#at the end of a line.
+
+cluster_name=cosmos
+cluster_codepath=/home/larour/tier2_ice/cluster_delivery
+cluster_executionpath=/scratch/larour/Testing/AGU_2008
+
+cluster_name=mustang
+cluster_codepath=/proj/ice/larour/Ice/tier2_ice/cluster_delivery
+cluster_executionpath=/proj/ice/larour/Testing_ice/Execution
+
+cluster_name=metro
+cluster_codepath=/home/larour/Ice/tier2_ice/cluster_delivery
+cluster_executionpath=/home/larour/Testing/Execution
+
+cluster_name=wilkes
+cluster_codepath=/u/wilkes-r1b/larour/Ice/ice1.proto/bin
+cluster_executionpath=/home/larour/Testing/Execution
+
+cluster_name=astrid
+cluster_codepath=/u/astrid1/larour/issm/trunk/bin
+cluster_executionpath=/home/larour/Testing/Execution
+
+cluster_name=gemini
+cluster_codepath=/home/larour/issm/bin
+cluster_executionpath=/home/larour/Testing/Execution
+
+end
Index: sm/trunk/etc/issm.rc
===================================================================
--- /issm/trunk/etc/issm.rc	(revision 226)
+++ 	(revision )
@@ -1,73 +1,0 @@
-begin
-
-#This file sets default platform settings used by Cielo. 
-#This file should always start with begin, and end with end. 
-#Comments start with #. 
-
-#The syntax to add a computational server is the following: 
-#server_name=foobar
-#server_ip=127.0.0.1
-#server_port=1025
-#server_tunneling=yes:1025
-
-#Just uncomment the 4 lines above if you want to add a server 
-#with hostname foobar, ip 127.0.0.1, listening on port 1025 and 
-#using ssh tunneling on local port 1025. 
-#The server_name can be of any form, provided it's a string. Using 
-#the network hostname is good practice.
-#The server_ip needs to be of the format a.b.c.d where a,b,c,d are 
-#numbers from 0 to 255. 
-#The server_port is any valid port number on the current platform (usually, 
-#using ports 1025 and higher is good practice, as those ports 
-#are dedicated for users).
-#server_tunneling can be either yes, or no. It sets the ssh tunneling option
-#for secure connections. If set to yes, it needs to be followed by the 
-#local port that is ssh tunneled to the server port. Don't forget the semi colon.
-#Final remark on including server settings: do not include spaces 
-#between a field, the '=' sign and its value. Do not also include trailing spaces
-#at the end of a line.
-
-server_name=cosmos
-server_ip=128.149.134.43
-server_port=1025
-server_tunneling=yes:1025
-server_codepath=/home/larour/tier2_ice/server_delivery
-server_executionpath=/scratch/larour/Testing/AGU_2008
-
-server_name=mustang
-server_ip=128.149.26.108
-server_port=1030
-server_tunneling=no
-server_codepath=/proj/ice/larour/Ice/tier2_ice/server_delivery
-server_executionpath=/proj/ice/larour/Testing_ice/Execution
-
-server_name=metro
-server_ip=128.149.26.85
-server_port=1025
-server_tunneling=no
-server_codepath=/home/larour/Ice/tier2_ice/server_delivery
-server_executionpath=/home/larour/Testing/Execution
-
-server_name=wilkes
-server_ip=137.79.160.187
-server_port=1025
-server_tunneling=no
-server_codepath=/u/wilkes-r1b/larour/Ice/ice1.proto/bin
-server_executionpath=/home/larour/Testing/Execution
-
-server_name=astrid
-server_ip=137.79.160.65
-server_port=1025
-server_tunneling=no
-server_codepath=/u/astrid1/larour/issm/trunk/bin
-server_executionpath=/home/larour/Testing/Execution
-
-server_name=gemini
-server_ip=128.149.134.21
-server_port=1025
-server_tunneling=no
-server_codepath=/home/larour/issm/bin
-server_executionpath=/home/larour/Testing/Execution
-
-
-end
Index: /issm/trunk/src/m/classes/public/ClusterParameters.m
===================================================================
--- /issm/trunk/src/m/classes/public/ClusterParameters.m	(revision 227)
+++ /issm/trunk/src/m/classes/public/ClusterParameters.m	(revision 227)
@@ -0,0 +1,96 @@
+function [cluster_codepath cluster_executionpath]=ClusterParameters(cluster_name,cluster_rc_location)
+%CLUSTERPARAMETERS - from cluster_name, find out cluster parameters in cluster.rc file
+%
+%   This function reads through the cluster_rc_location file  for cluster settings (name,  
+%   code location, execution directory) used to run parallel solution sequences
+%
+%   Usage:
+%      [cluster_codepath cluster_executionpath]=ClusterParameters(cluster_name,cluster_rc_location)
+
+lines_per_cluster=3;
+
+%open cluster.rc file
+
+fid=fopen(cluster_rc_location);
+if fid==-1,
+	error('Could not find cluster.rc file in delivery directory');
+end
+
+found=0;
+
+%Read first line and check it starts with begin. 
+line=fgetl(fid);
+if ~strcmp(line,'begin'),
+	error('cluster.rc file in delivery directory should always start with the begin statement');
+end
+
+%Read until we find the end statement. 
+while 1
+	line=fgetl(fid);
+	
+	%Check for 'end' statement
+	if strcmp(line,'end'),
+		break;
+	end 
+	%Check for end of file
+	if ~ischar(line),
+		error('cluster.rc file in delivery directory should end with an end statement');
+	end
+	%Ignore empty lines
+	if length(line)==0,
+		continue;
+	end
+	%Ignore comments
+	if strcmp(line(1),'#'),
+		continue
+	end
+
+	%Handle cluster name: 
+	if length(line)>12,
+		if strcmp(line(1:12),'cluster_name'),
+			%ok, the next 2 lines deal with one cluster settings.
+			%check if this is the cluster we are looking for.
+			splittedstring=strsplit(line,'=');
+			this_cluster_name=splittedstring{2};
+			if strcmp(this_cluster_name,cluster_name),
+
+				%Get next line for cluster code path
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_codepath'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_codepath=value;
+				found=1;
+				
+				
+				%Get next line for cluster execution path
+				line=fgetl(fid);
+				splittedstring=strsplit(line,'=');
+				descriptor=splittedstring{1};
+				value=splittedstring{2};
+				if ~strcmp(descriptor,'cluster_executionpath'),
+					error('cluster settings in cluster.rc don''t follow the correct syntax');
+				end
+				cluster_executionpath=value;
+
+			else
+				%Wrong cluster name, skip next lines_per_cluster lines and continue;
+				for i=1:lines_per_cluster,
+					line=fgetl(fid);
+				end
+				continue;
+			end
+		end
+	end
+end
+
+fclose(fid);
+
+if found==0,
+	error(['ClusterParameters error message: could not find setting for cluster ' cluster_name ' in cluster.rc file']);
+end
+
+end %close of function
Index: /issm/trunk/src/m/classes/public/loadresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 226)
+++ /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 227)
@@ -5,9 +5,9 @@
 %      md=loadresultsfromcluster(md,solutiontype);
 
-%Get issm.rc location
-issm_rc_location=which('issm.rc');
+%Get cluster.rc location
+cluster_rc_location=which('cluster.rc');
 
 %Figure out parameters for this particular cluster
-[codepath,executionpath]=ProcessParallelParametersFromCieloRc(md.cluster,issm_rc_location);
+[codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location);
 
 %if we are running locally, no need to call ssh to recover the logs and results. We figure out by comparing the 
Index: /issm/trunk/src/m/classes/public/peek.m
===================================================================
--- /issm/trunk/src/m/classes/public/peek.m	(revision 226)
+++ /issm/trunk/src/m/classes/public/peek.m	(revision 227)
@@ -7,9 +7,9 @@
 %   See also: QueueJobPeek
 
-%Get issm.rc location
-issm_rc_location=which('issm.rc');
+%Get cluster.rc location
+cluster_rc_location=which('cluster.rc');
 
 %Figure out parameters for this particular cluster
-[codepath,executionpath]=ProcessParallelParametersFromCieloRc(md.cluster,issm_rc_location);
+[codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location);
 
 %peek at the queued job
Index: /issm/trunk/src/m/classes/public/preparerun.m
===================================================================
--- /issm/trunk/src/m/classes/public/preparerun.m	(revision 226)
+++ /issm/trunk/src/m/classes/public/preparerun.m	(revision 227)
@@ -20,9 +20,9 @@
 end
 
-%Get issm.rc location
-issm_rc_location=which('issm.rc');
+%Get cluster.rc location
+cluster_rc_location=which('cluster.rc');
 
 %Figure out parameters for this particular cluster
-[codepath,executionpath]=ProcessParallelParametersFromCieloRc(md.cluster,issm_rc_location);
+[codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location);
 
 %Marshall model data into a binary file.
Index: /issm/trunk/src/m/classes/public/solveparallel.m
===================================================================
--- /issm/trunk/src/m/classes/public/solveparallel.m	(revision 226)
+++ /issm/trunk/src/m/classes/public/solveparallel.m	(revision 227)
@@ -20,9 +20,9 @@
 end
 
-%Get issm.rc location
-issm_rc_location=which('issm.rc');
+%Get cluster.rc location
+cluster_rc_location=which('cluster.rc');
 
 %Figure out parameters for this particular cluster
-[codepath,executionpath]=ProcessParallelParametersFromCieloRc(md.cluster,issm_rc_location);
+[codepath,executionpath]=ClusterParameters(md.cluster,cluster_rc_location);
 
 %Marshall model data into a binary file.
Index: sm/trunk/src/m/utils/Model/ProcessParallelParametersFromCieloRc.m
===================================================================
--- /issm/trunk/src/m/utils/Model/ProcessParallelParametersFromCieloRc.m	(revision 226)
+++ 	(revision )
@@ -1,99 +1,0 @@
-function [server_codepath server_executionpath]=ProcessParallelParametersFromCieloRc(server_name,issm_rc_location)
-%PROCESSPARALLELPARAMETERSFROMCIELORC - process parallel parameters from issm
-%
-%   This function reads through the issm_rc_location for server settings (name, ip, port and 
-%   tunneling) used to run parallel solution sequences
-%
-%   Usage:
-%      [server_codepath server_executionpath]=ProcessParallelParametersFromCieloRc(server_name,issm_rc_location)
-
-lines_per_server=5;
-%open issm.rc file
-fid=fopen(issm_rc_location);
-if fid==-1,
-	error('Could not find issm.rc file in delivery directory');
-end
-
-found=0;
-
-%Read first line and check it starts with begin. 
-line=fgetl(fid);
-if ~strcmp(line,'begin'),
-	error('issm.rc file in delivery directory should always start with the begin statement');
-end
-
-%Read until we find the end statement. 
-while 1
-	line=fgetl(fid);
-	
-	%Check for 'end' statement
-	if strcmp(line,'end'),
-		break;
-	end 
-	%Check for end of file
-	if ~ischar(line),
-		error('issm.rc file in delivery directory should end with an end statement');
-	end
-	%Ignore empty lines
-	if length(line)==0,
-		continue;
-	end
-	%Ignore comments
-	if strcmp(line(1),'#'),
-		continue
-	end
-
-	%Handle server name: 
-	if length(line)>11,
-		if strcmp(line(1:11),'server_name'),
-			%ok, the next 4 lines deal with one server settings.
-			%check if this is the server we are looking for.
-			splittedstring=strsplit(line,'=');
-			this_server_name=splittedstring{2};
-			if strcmp(this_server_name,server_name),
-
-				%Skip next 3 lines
-				line=fgetl(fid);
-				line=fgetl(fid);
-				line=fgetl(fid);
-
-				%Get next line for server code path
-				line=fgetl(fid);
-				splittedstring=strsplit(line,'=');
-				descriptor=splittedstring{1};
-				value=splittedstring{2};
-				if ~strcmp(descriptor,'server_codepath'),
-					error('server settings in issm.rc don''t follow the correct syntax');
-				end
-				server_codepath=value;
-				found=1;
-				
-				
-				%Get next line for server execution path
-				line=fgetl(fid);
-				splittedstring=strsplit(line,'=');
-				descriptor=splittedstring{1};
-				value=splittedstring{2};
-				if ~strcmp(descriptor,'server_executionpath'),
-					error('server settings in issm.rc don''t follow the correct syntax');
-				end
-				server_executionpath=value;
-
-			else
-				%Wrong server name, skip next lines_per_server lines and continue;
-				for i=1:lines_per_server,
-					line=fgetl(fid);
-				end
-				continue;
-			end
-		end
-	end
-end
-
-fclose(fid);
-
-if found==0,
-	error(['ProcessParallelParametersFromCieloRc error message: could not find setting for cluster ' server_name 'in issm.rc file']);
-end
-
-end %close of function
