Index: /issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m
===================================================================
--- /issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m	(revision 1583)
+++ /issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m	(revision 1584)
@@ -14,36 +14,22 @@
 end
 
-if ispc,
-	SCP='winscp';
-else
-	SCP='scp';
-end
-
 if ~strcmpi(options.batch,'yes'),
 
-	%if we are running locally, no need to call ssh to launch the job. We figure out by comparing the 
-	%hostname to the cluster name
-	[result,hostname]=system('hostname -s');hostname=hostname(1:end-1);
-	disp('uploading input file and queueing script');
-	if strcmpi(hostname,md.cluster),
-		if md.qmu_analysis,
-			system(['cp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' executionpath]);
-		else
-			system(['cp ' md.name '.bin' ' ' md.name '.queue' ' ' executionpath]);
-		end
-	else
-		if md.qmu_analysis,
-			system([SCP ' -v ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' ' ' md.cluster ':' executionpath]);
-		else
-			system([SCP ' -v ' md.name '.bin' ' ' md.name '.queue' ' ' md.cluster ':' executionpath]);
-		end
+	%what files are we sending?
+	packages={[md.name '.bin'],[md.name '.queue']};
+	if md.qmu_analysis,
+		packages{end+1}=[md.name '.qmu.in '];
 	end
 
+	disp('uploading input file and queueing script');
+	scpout(md.cluster,executionpath,packages);
+	
 	disp('launching solution sequence on remote cluster');
-	%now call the queuing script to launch the job.
-	if strcmpi(hostname,md.cluster),
-		system(['cd ' executionpath ' && source ' md.name '.queue ']);
-	else
-		system(['ssh  ' md.cluster ' ''cd ' executionpath ' && source ' md.name '.queue ''']);
+	issmssh(md.cluster,['cd ' executionpath ' && source ' md.name '.queue ']);
+
+	%waitonlock will work if the lock is on the same machine only: 
+	if ~strcmpi(hostname,md.cluster),
+		disp('solution launched on remote cluster. log in to detect job completion, then run md=loadresultsfromcluster(md)');
+		md.waitonlock=0;
 	end
 
@@ -54,4 +40,2 @@
 	md.waitonlock=0;
 end
-
-
Index: /issm/trunk/src/m/classes/public/loadresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 1583)
+++ /issm/trunk/src/m/classes/public/loadresultsfromcluster.m	(revision 1584)
@@ -11,22 +11,14 @@
 [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 
-%hostname to the cluster name
-[result,hostname]=system('hostname -s');hostname=hostname(1:end-1);
+%What packages are we picking up from remote cluster
+packages={[md.name '.outlog'],[md.name '.errlog'], [md.name '.outbin']};
+if md.qmu_analysis,
+	packages{end+1}=[md.name '.qmu.err'];
+	packages{end+1}=[md.name '.qmu.out'];
+	packages{end+1}='dakota_tabular.dat';
+end
 
-%Go pickup output file and logs on cluster
-if strcmpi(hostname,md.cluster),
-	if md.qmu_analysis,
-		system(['cp ' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ' executionpath '/' md.name '.qmu.err ' executionpath '/' md.name '.qmu.out ' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files
-	else
-		system(['cp ' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files
-	end
-else
-	if md.qmu_analysis,
-		system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ' md.cluster ':' executionpath '/' md.name '.qmu.err ' md.cluster ':' executionpath '/' md.name '.qmu.out ' md.cluster ':' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files
-	else
-		system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files
-	end
-end
+%copy files from cluster to present directory
+scpin(md.cluster, executionpath, packages);
 
 %read log files onto  fields
