Index: /issm/trunk/src/m/classes/@model/model.m
===================================================================
--- /issm/trunk/src/m/classes/@model/model.m	(revision 5545)
+++ /issm/trunk/src/m/classes/@model/model.m	(revision 5546)
@@ -12,5 +12,6 @@
 	%Model general information
 	md.notes='';
-	md.name='';
+	md.name=''; 
+	md.runtimename=''; %name used when running a parallel job
 	md.counter=0; %1 mesh, 2 geography, 3 parameterize
 	md.domainoutline=NaN;
Index: /issm/trunk/src/m/classes/public/loadresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 5546)
@@ -10,4 +10,7 @@
 %Figure out parameters for this particular cluster
 [codepath,executionpath,login,port]=ClusterParameters(md.cluster,cluster_rc_location);
+
+%Figure out the  directory where all the files are in: 
+directory=[executionpath '/' md.runtimename '/'];
 
 %What packages are we picking up from remote cluster
@@ -26,5 +29,5 @@
 
 %copy files from cluster to present directory
-issmscpin(md.cluster, login, port, executionpath, packages);
+issmscpin(md.cluster, login, port, directory, packages);
 
 %read log files onto  fields
Index: /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/queue/ClusterLaunchCommand.m	(revision 5546)
@@ -1,3 +1,3 @@
-function command=ClusterLaunchCommand(cluster,name,executionpath)
+function command=ClusterLaunchCommand(cluster,runtimename,name,executionpath)
 %CLUSTERLAUNCHCOMMAND: build command to launch job on cluster
 %
@@ -7,16 +7,16 @@
 %if cluster is current hostname, just source queue file
 if strcmpi(oshostname(),cluster),
-	command=['cd ' executionpath ' && source ' name '.queue '];
+	command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && source  ' name '.queue '];
 else
 	if strcmpi(cluster,'cosmos'),
-		command=['cd ' executionpath ' && rm -rf ' name '.lock ' name '.outlog ' name '.errlog ' name '.outbin && qsub -S/bin/sh ' name '.queue '];
+		command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && qsub -S/bin/sh ' name '.queue '];
 	elseif strcmpi(cluster,'gemini'),
-		command=['cd ' executionpath ' && rm -rf ' name '.lock ' name '.outlog ' name '.errlog ' name '.outbin && qsub ' name '.queue '];
+		command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && qsub ' name '.queue '];
 	elseif strcmpi(cluster,'pollux'),
-		command=['cd ' executionpath ' && rm -rf ' name '.lock ' name '.outlog ' name '.errlog ' name '.outbin && qsub ' name '.queue '];
+		command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && qsub ' name '.queue '];
 	elseif strcmpi(cluster,'castor'),
-		command=['cd ' executionpath ' && rm -rf ' name '.lock ' name '.outlog ' name '.errlog ' name '.outbin && qsub ' name '.queue '];
+		command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && qsub ' name '.queue '];
 	elseif strcmpi(cluster,'pfe'),
-		command=['cd ' executionpath ' && rm -rf ' name '.lock ' name '.outlog ' name '.errlog ' name '.outbin && qsub ' name '.queue '];
+		command=['cd ' executionpath ' && rm -rf ./' runtimename ' && mkdir ' runtimename ' && cd ' runtimename ' && mv ../' runtimename '.tar.gz ./ && tar -zxvf ' runtimename '.tar.gz  && qsub ' name '.queue '];
 	else
 		error('ClusterLaunchCommand error message: unknown cluster command');
Index: /issm/trunk/src/m/classes/public/queue/ClusterScript.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/ClusterScript.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/queue/ClusterScript.m	(revision 5546)
@@ -11,4 +11,5 @@
 	fprintf(fid,'#!/bin/bash\n');
 	fprintf(fid,'#PBS -l select=%i:ncpus=1\n',np);
+	fprintf(fid,'#PBS -N %s\n',name);
 	fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
 	fprintf(fid,'#PBS -q %s\n',queue);
@@ -26,5 +27,4 @@
 
 	fprintf(fid,'#!/bin/sh\n');
-	fprintf(fid,'rm -rf %s/%s.lock\n',executionpath,name);
 	if mem_debug==0,
 		fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s.bin %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',np,codepath,EnumToString(analysis_type),executionpath,name,name,name,name,name);
@@ -39,4 +39,5 @@
 	fprintf(fid,'#!/bin/sh\n');
 	fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
+	fprintf(fid,'#PBS -N %s\n',name);
 	fprintf(fid,'#PBS -l ncpus=%i\n',np);
 	if ~isempty(queue),
Index: /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m
===================================================================
--- /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/queue/LaunchQueueJob.m	(revision 5546)
@@ -21,15 +21,16 @@
 if ~strcmpi(options.batch,'yes'),
 	
-	%what files are we sending?
-	packages={[md.name '.bin'],[md.name '.queue']};
+	%compress the files into one zip.
+	compressstring=['tar -zcvf ' md.runtimename '.tar.gz ' md.name '.bin ' md.name '.queue '];
 	if md.qmu_analysis,
-		packages{end+1}=[md.name '.qmu.in'];
+		compressstring=[compressstring md.name '.qmu.in'];
 	end
-
+	system(compressstring);
+	
 	disp('uploading input file and queueing script');
-	issmscpout(md.cluster,executionpath,login,port,packages);
+	issmscpout(md.cluster,executionpath,login,port,{[md.runtimename '.tar.gz']});
 
 	disp('launching solution sequence on remote cluster');
-	issmssh(md.cluster,login,port,ClusterLaunchCommand(md.cluster,md.name,executionpath));
+	issmssh(md.cluster,login,port,ClusterLaunchCommand(md.cluster,md.runtimename,md.name,executionpath));
 
 else
Index: /issm/trunk/src/m/classes/public/solveparallel.m
===================================================================
--- /issm/trunk/src/m/classes/public/solveparallel.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/solveparallel.m	(revision 5546)
@@ -5,4 +5,8 @@
 %      md=solveparallel(md);
 
+%First, build a runtime name that is unique, that we will use to create 
+%directories, name jobs, etc ...
+c=clock;
+md.runtimename=sprintf('%s-%i-%i-%i-%i-%i-%i',md.name,GetPId,c(2),c(3),c(1),c(4),c(5));
 
 %Get cluster.rc location
@@ -11,7 +15,4 @@
 %Figure out parameters for this particular cluster
 [codepath,executionpath,login,port]=ClusterParameters(md.cluster,cluster_rc_location);
-
-%Append name of directory if specified in options: 
-executionpath=[executionpath '/' options.directory];
 
 %Marshall model data into a binary file.
Index: /issm/trunk/src/m/classes/public/waitonlock.m
===================================================================
--- /issm/trunk/src/m/classes/public/waitonlock.m	(revision 5545)
+++ /issm/trunk/src/m/classes/public/waitonlock.m	(revision 5546)
@@ -9,5 +9,5 @@
 
 %Get filename (lock file) and options
-filename=[executionpath '/' md.name '.lock'];
+filename=[executionpath '/' md.runtimename '/' md.name '.lock'];
 cluster=md.cluster;
 timelimit=md.waitonlock;
@@ -22,5 +22,6 @@
 		time=0; ispresent=0;
 		while (ispresent==0 & time<timelimit)
-			[status, result]=system(['ssh -q -p ' num2str(port) ' ' login '@localhost "if ( -e ' executionpath '/' md.name '.lock ) echo 1"']);
+			[status, result]=system(['ssh -q -p ' num2str(port) ' ' login '@localhost "if ( -e ' executionpath '/' md.runtimename '/' md.name '.lock ) echo 1"']);
+			result
 			if ~isempty(result),
 				if ismember('1',result),
