Index: trunk/ippScripts/scripts/sc_prepare_warp.pl
===================================================================
--- trunk/ippScripts/scripts/sc_prepare_warp.pl	(revision 36966)
+++ trunk/ippScripts/scripts/sc_prepare_warp.pl	(revision 37102)
@@ -18,5 +18,6 @@
 
 # Hard coded values
-my $remote_root   = '/scratch3/watersc1/';  # Far side destination base location
+# my $remote_root   = '/scratch3/watersc1/';  
+my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; # Far side destination base location
 my $threads       = 2;                      # How many threads are we going to use?
 my $job_cost      = 70 / 60 / 60;           # Estimate of how long a job runs, in hours.
@@ -27,5 +28,5 @@
 my $max_time      = 8;                      # longest allocation to ask for
 my $remote_hostname= "LANL/Mustang";         # Name of the remote node.
-my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.SAVE","LOG.EXP","TRACE.EXP");
+my @return_component_list = ("DBINFO.EXP", "PSWARP.CONFIG", "PSWARP.OUTPUT", "PSWARP.OUTPUT.MASK", "PSWARP.OUTPUT.VARIANCE", "PSWARP.OUTPUT.SOURCES","PSPHOT.PSF.SKY.SAVE","LOG.EXP");
 # Look for programs we need
 my $missing_tools;
@@ -202,5 +203,5 @@
 	$pswarp_command    .= " -threads 4 "; # -image_id ${image_id} -source_id ${source_id} ";
 	$pswarp_command    .= " -recipe PPSTATS WARPSTATS ";
-	$pswarp_command    .= " -dumpconfig ${remote_outroot}.mdc -stats ${remote_outroot}.stats ";
+	$pswarp_command    .= " -dumpconfig ${remote_outroot}.pswarp.mdc -stats ${remote_outroot}.stats ";
 
 #	print "$pswarp_command \n";
@@ -218,8 +219,8 @@
 	# Determine which output files need to be returned
 	foreach my $component(@return_component_list) {
-	    my $filename = $ipprc->filename($component,$ipp_outroot);
+	    my $filename = $ipprc->filename($component,$ipp_outroot,$skycell_id);
 	    my ($ipp_disk, $remote_disk) = uri_to_outputs_for_return( $filename);
 	    my $remote_outroot_dir = dirname($ipp_disk);
-	    print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} ";
+	    print CONFIG " && mkdir -p ${remote_root}/tmp/${remote_outroot_dir} && ln -sf $remote_disk ${remote_root}/tmp/${ipp_disk} && touch $remote_disk ";
 	}
 
@@ -255,4 +256,5 @@
     $node_req = int(($node_need * $job_cost) / ($fill_factor * $time_req)) + 1;
 }
+$time_req += 1; # Safety addition.
 
 open(COMMAND,  ">$disk_command") || &my_die("Couldn't open file? $disk_command",$remote_id,$PS_EXIT_SYS_ERROR);
