Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/args.c	(revision 36505)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/args.c	(revision 36506)
@@ -359,4 +359,7 @@
     remove_argument (N, &argc, argv);
     mode = PARALLEL_REGIONS;
+    if (N >= argc) relphot_usage();
+    REGION_FILE = strcreate (argv[N])
+    remove_argument (N, &argc, argv);
   }
 
Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/assign_images.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/assign_images.c	(revision 36505)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/assign_images.c	(revision 36506)
@@ -3,5 +3,5 @@
 // This function generates a subset of the images based on selections.  Input db has already
 // been loaded with the raw fits table data
-SkyList *assign_images (FITS_DB *db, RegionHostTable *regionHosts) {
+int assign_images (FITS_DB *db, RegionHostTable *regionHosts) {
 
   off_t Nimage;
@@ -30,8 +30,10 @@
   select_images_hostregion (regionHosts, image, Nimage);
 
+  return TRUE;
 }
 
 # define D_NIMAGE 1000
 
+// assign images to the region hosts; at the end, each host will have its list of images
 int select_images_hostregion (RegionHostTable *hosts, Image *image, off_t Nimage) {
 
@@ -66,4 +68,7 @@
       continue;
     }
+
+    // XXX need to make sure mosaics for each saved image are also saved
+    // skip them here and add explicitly below.
 
     /* define image center - note the DIS images (mosaic phu) are special */
Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/help.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/help.c	(revision 36505)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/help.c	(revision 36506)
@@ -6,5 +6,5 @@
   fprintf (stderr, "       or:    relphot -averages -region RA RA DEC DEC\n");
   fprintf (stderr, "       or:    relphot -apply-offsets -region RA RA DEC DEC\n");
-  fprintf (stderr, "       or:    relphot -parallel-regions ()\n");
+  fprintf (stderr, "       or:    relphot -parallel-regions (RegionFile)\n");
   fprintf (stderr, "       or:    relphot -parallel-images ()\n");
   fprintf (stderr, "  use -h for more usage information\n");
Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 36505)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c	(revision 36506)
@@ -3,5 +3,5 @@
 // measure.M contains: -2.5*log(DN) + 2.5*log(exptime) + 25.0 
 
-int relphot_parallel_images () {
+int relphot_parallel_regions () {
 
   int i, status, Ncatalog;
@@ -13,5 +13,5 @@
 
   // load the RegionTable (UserRegion should not be used at this level)
-  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, "RegionHostTable.dat");
+  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
 
   /* register database handle with shutdown procedure */
@@ -38,5 +38,5 @@
 
   /* assign the images to the different region hosts */
-  XXX = assign_images (&db, regionHosts);
+  if (!assign_images (&db, regionHosts)) Shutdown ("error assigning images to region hosts");
   MARKTIME("-- assign images: %f sec\n", dtime);
 
Index: /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c
===================================================================
--- /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c	(revision 36505)
+++ /branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c	(revision 36506)
@@ -58,4 +58,3 @@
     catalog[catSeq].secfilt[objSeq*Nsec + Nsecfilt].mag = meanmags[i].mag;
   }
-  SaveMeanMags (meanmags, Nmeanmags, where);
 }
