Index: branches/sc_branches/pantasks_condor/include/pantasks.h
===================================================================
--- trunk/Ohana/src/opihi/include/pantasks.h	(revision 34621)
+++ branches/sc_branches/pantasks_condor/include/pantasks.h	(revision 34783)
@@ -11,6 +11,6 @@
 typedef enum {
   JOB_NONE,
-  JOB_BUSY, 
-  JOB_EXIT, 
+  JOB_BUSY,
+  JOB_EXIT,
   JOB_HUNG,
   JOB_CRASH,
@@ -19,6 +19,6 @@
 
 typedef enum {
-  JOB_LOCAL, 
-  JOB_CONTROLLER, 
+  JOB_LOCAL,
+  JOB_CONTROLLER,
 } JobMode;
 
@@ -32,20 +32,20 @@
 enum {TIMER_ALLJOBS, TIMER_SUCCESS, TIMER_FAILURE};
 
-enum {TASK_NONE, 
-      TASK_EMPTY, 
-      TASK_COMMENT, 
-      TASK_NMAX, 
-      TASK_ACTIVE, 
-      TASK_TRANGE, 
-      TASK_END, 
-      TASK_HOST, 
-      TASK_NICE, 
-      TASK_STDOUT, 
-      TASK_STDERR, 
-      TASK_COMMAND, 
-      TASK_OPTIONS, 
-      TASK_PERIODS, 
-      TASK_NPENDING, 
-      TASK_EXIT, 
+enum {TASK_NONE,
+      TASK_EMPTY,
+      TASK_COMMENT,
+      TASK_NMAX,
+      TASK_ACTIVE,
+      TASK_TRANGE,
+      TASK_END,
+      TASK_HOST,
+      TASK_NICE,
+      TASK_STDOUT,
+      TASK_STDERR,
+      TASK_COMMAND,
+      TASK_OPTIONS,
+      TASK_PERIODS,
+      TASK_NPENDING,
+      TASK_EXIT,
       TASK_EXEC
 } TaskHashResults;
@@ -68,6 +68,6 @@
 /* a task is a description of the wrapping of a job */
 typedef struct {
-  Macro  *exec;				/* name is 'exec' */
-  Macro  *crash;			/* name is 'crash' */
+  Macro  *exec;                         /* name is 'exec' */
+  Macro  *crash;                        /* name is 'crash' */
   Macro  *timeout;
   Macro  *defexit;
@@ -75,5 +75,5 @@
   int     NEXIT;
   int     Nexit;
-  Macro **exit;				/* name is exit status */
+  Macro **exit;                         /* name is exit status */
 
   int     argc;
@@ -120,6 +120,6 @@
 } Task;
 
-// time period include/exclude periods: 
-// date ranges (e_time - e_time) 
+// time period include/exclude periods:
+// date ranges (e_time - e_time)
 // time ranges (e_time - e_time) (use e_time % 86400)
 // time-of-week ranges  (e_time - e_time
@@ -131,8 +131,8 @@
 // keep: TRUE: perform action within this time period
 // keep: FALSE: do not perform action within this time period
-  
+
 typedef struct {
-  int JobID;				/* internal ID for job */
-  int pid;				/* external ID for job */
+  int JobID;                            /* internal ID for job */
+  int pid;                              /* external ID for job */
 
   struct timeval last;
@@ -160,5 +160,5 @@
   int         stderr_fd;      /* stderr pipe (local only) */
 
-  JobMode     mode;			/* local or controller? */
+  JobMode     mode;                     /* local or controller? */
   int     priority;
   char   *realhost;
@@ -302,2 +302,7 @@
 
 int FlushJobs (void);
+
+#ifdef IPP_CONDOR
+char* get_hosts_requirement(void);
+char *get_host_status(char* hostname);
+#endif
Index: branches/sc_branches/pantasks_condor/pantasks/ControllerOps.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/ControllerOps.c	(revision 34783)
@@ -9,5 +9,12 @@
 static IOBuffer stdout_buffer;
 static IOBuffer stderr_buffer;
+#ifndef IPP_CONDOR
 static int ControllerPID = 0;
+#else
+#include "ipp_condor.h"
+#include <condor/condor.nsmap>
+#include <shell.h>
+static struct soap soap;
+#endif
 
 /* local static variables to track the controller host properties */
@@ -18,16 +25,38 @@
 static int NHOSTS = 0;
 
+#ifdef IPP_CONDOR
+#include "ipp_condor.h"
+static int hosts_list_modified = TRUE;
+static char* hosts_requirement = NULL;
+static int is_host_in_list(char *hostname);
+#endif
+
 int AddHost (char *hostname, int max_threads) {
-
   int N;
-
+#ifdef IPP_CONDOR
+  int index;
+  index = is_host_in_list(hostname);
+  if (index != -1) {
+      if (hosts[index].max_threads != max_threads) {
+          fprintf(stderr, "Hostname [%s] already declared. Changing max_threads from %d to %d",
+                 hostname,
+                 hosts[index].max_threads,
+                 max_threads);
+          hosts[index].max_threads = max_threads;
+      } else {
+          fprintf(stderr, "Hostname [%s] already declared. Aborting", hostname);
+      }
+      return (TRUE);
+  }
+#endif
   N = Nhosts;
   Nhosts ++;
-
   CHECK_REALLOCATE (hosts, Host, NHOSTS, Nhosts, 16);
-
   hosts[N].hostname = strcreate (hostname);
   hosts[N].max_threads = max_threads;
-  
+#ifdef IPP_CONDOR
+  fprintf(stderr, "Adding host %s (%d)\n", hostname, max_threads);
+  hosts_list_modified = TRUE; //Tell get_hosts_requirements to rebuild the hosts based requirement
+#endif
   return (TRUE);
 }
@@ -37,10 +66,15 @@
 // but perhaps mark it in the client_thread?
 int DeleteHost (char *hostname) {
-
   int i, j;
-
-  for (i = 0; i < Nhosts; i++) {
+  fprintf(stderr, "Attempting to delete %s\n", hostname);
+#ifdef IPP_CONDOR
+  int index;
+  index = is_host_in_list(hostname);
+  if (index == -1) {
+      return (FALSE);
+  }
+#endif
+  for (i = 0; i < Nhosts; i++) { //Optimize this for condor
     if (strcmp (hosts[i].hostname, hostname)) continue;
-    
     // delete this one
     free (hosts[i].hostname);
@@ -50,4 +84,7 @@
     }
     Nhosts --;
+#ifdef IPP_CONDOR
+    hosts_list_modified = TRUE; //Tell get_hosts_requirements to rebuild the hosts based requirement
+#endif
     return (TRUE);
   }
@@ -88,5 +125,5 @@
     // float dtime = DTIME (stop, start);
     /* if (VerboseMode()) gprint (GP_ERR, "delete job %f\n", dtime); */
-  }  
+  }
   return (TRUE);
 }
@@ -95,5 +132,5 @@
 
   int status;
-  char cmd[128]; 
+  char cmd[128];
   IOBuffer buffer;
 
@@ -104,5 +141,5 @@
   return (status);
 }
-  
+
 /* ask controller about job status */
 int CheckControllerJobStatus (Job *job) {
@@ -169,7 +206,7 @@
 }
 
-/* we read Nbytes from the host, then watch for the prompt */ 
+/* we read Nbytes from the host, then watch for the prompt */
 int GetJobOutput (char *cmd, int pid, IOBuffer *buffer, int Nbytes) {
-  
+
   int i, status, Nstart;
   char *line;
@@ -222,18 +259,16 @@
 /* submitting a job to the controller automatically starts controller */
 int SubmitControllerJob (Job *job) {
-
+#ifndef IPP_CONDOR
+  fprintf(stderr, "Submitting job to pcontrol");
+  fprintf(stdout, "Submitting job to pcontrol");
   int i, Nchar, status;
   char *cmd, *p, string[64];
   IOBuffer buffer;
-
-  if (job[0].task[0].host == NULL) return (FALSE); 
-
+  if (job[0].task[0].host == NULL) return (FALSE);
   if (!StartController ()) {
     gprint (GP_ERR, "failure to start pcontrol\n");
     return (FALSE);
   }
-
   /** construct the line to be sent to the controller **/
-
   /* determine the total line length */
   Nchar = 0;
@@ -247,5 +282,4 @@
   ALLOCATE (cmd, char, Nchar);
   bzero (cmd, Nchar);
-
   /* construct the controller command portion */
   if (!strcasecmp (job[0].task[0].host, "ANYHOST")) {
@@ -258,5 +292,4 @@
     }
   }
-  
   if (job[0].priority) {
     char tmp[64];
@@ -264,5 +297,4 @@
     strcat (cmd, tmp);
   }
-
   /* add the command arguments */
   for (i = 0; i < job[0].task[0].argc; i++) {
@@ -270,5 +302,4 @@
     strcat (cmd, job[0].task[0].argv[i]);
   }
-
   // This function is called by the JobTaskThread via SubmitJob.  We need to unlock the
   // JobTaskLock to avoid a dead lock with the JobTaskLock called in CheckController
@@ -280,6 +311,4 @@
   ControlUnlock(__func__);
   JobTaskLock();
-
-
   /* extract the job PID from the controller response */
   p = memstr (buffer.buffer, "JobID", buffer.Nbuffer);
@@ -292,14 +321,29 @@
   sscanf (p, "%*s %s", string);
   FreeIOBuffer (&buffer);
-
   job[0].pid = atoi (string);
   if (job[0].pid < 0) {
     return (FALSE);
   }
+#else
+  struct ns1__Transaction *transaction;
+  int clusterId;
+  //Create a Transaction
+  transaction = beginTransaction(&soap, 10);
+  //Get a clusterId
+  clusterId = newCluster(&soap, transaction);
+  fprintf(stderr, "ClusterId = %d\n", clusterId);
+  fprintf(stdout, "Submitting job to HTCondor\n");
+  char *args = paste_args(job[0].task[0].argc-1, job[0].task[0].argv+1);
+  submitJob(&soap, transaction, clusterId, 0,
+            job[0].task[0].argv[0],
+            args,
+            get_hosts_requirements());
+  commitTransaction(&soap, transaction);
+#endif
   return (TRUE);
 }
 
 int StartController () {
-
+#ifndef IPP_CONDOR
   char *p;
   char **argv, cmd[128];
@@ -307,68 +351,52 @@
   int stdin_fd[2], stdout_fd[2], stderr_fd[2];
   IOBuffer buffer;
-
   if (ControllerStatus) return (TRUE);
-
   if (VarConfig ("CONTROLLER", "%s", cmd) == NULL) strcpy (cmd, "pcontrol");
-
   if (hosts == NULL) {
     NHOSTS = 16;
     ALLOCATE (hosts, Host, NHOSTS);
   }
-
   bzero (stdin_fd,  2*sizeof(int));
   bzero (stdout_fd, 2*sizeof(int));
   bzero (stderr_fd, 2*sizeof(int));
-
   if (pipe (stdin_fd)  < 0) goto pipe_error;
   if (pipe (stdout_fd) < 0) goto pipe_error;
   if (pipe (stderr_fd) < 0) goto pipe_error;
-
   ALLOCATE (argv, char *, 2);
   argv[0] = cmd;
   argv[1] = 0;
-
   pid = fork ();
   if (!pid) { /* must be child process */
     gprint (GP_LOG, "starting controller connection\n");
-
     /* close the other ends of the pipes */
     close (stdin_fd[1]);
     close (stdout_fd[0]);
     close (stderr_fd[0]);
-
     /* tie our ends of the pipes to stdin, stdout, stderr */
     dup2 (stdin_fd[0],  STDIN_FILENO);
     dup2 (stdout_fd[1], STDOUT_FILENO);
     dup2 (stderr_fd[1], STDERR_FILENO);
-
     /* set all three unblocking */
     setvbuf (stdin,  (char *) NULL, _IONBF, BUFSIZ);
     setvbuf (stdout, (char *) NULL, _IONBF, BUFSIZ);
     setvbuf (stderr, (char *) NULL, _IONBF, BUFSIZ);
-
-    status = execvp (argv[0], argv); 
+    status = execvp (argv[0], argv);
     exit (1);
   }
   free (argv);
-
   /* close the other ends of the pipes */
   close (stdin_fd[0]);  stdin_fd[0]  = 0;
   close (stdout_fd[1]); stdout_fd[1] = 0;
   close (stderr_fd[1]); stderr_fd[1] = 0;
-
   /* make the pipes non-blocking */
   fcntl (stdin_fd[1],  F_SETFL, O_NONBLOCK);
   fcntl (stdout_fd[0], F_SETFL, O_NONBLOCK);
   fcntl (stderr_fd[0], F_SETFL, O_NONBLOCK);
-
   /* perform handshake with controller to verify alive & running */
   /** this handshake is similar to ControllerCommand, but has important differences **/
   InitIOBuffer (&buffer, 0x100);
-
   /* send handshake command */
   status = write_fmt (stdin_fd[1], "echo CONNECTED\n");
   if ((status == -1) && (errno == EPIPE)) goto pipe_error;
-
   /* try to get evidence connection is alive - wait upto a few seconds */
   /* connection is likely slow; don't bother with nanosleep here */
@@ -383,26 +411,28 @@
   if (status == -1) goto io_error;
   FreeIOBuffer (&buffer);
-
   /* set local static vars to pipe connections */
   stdin_cntl  = stdin_fd[1];
   stdout_cntl = stdout_fd[0];
   stderr_cntl = stderr_fd[0];
-
   InitIOBuffer (&stdout_buffer, 0x100);
   InitIOBuffer (&stderr_buffer, 0x100);
-
   ControllerPID = pid;
+#else
+  if (ControllerStatus == FALSE) {
+      //Initiate the HTcondor connection
+      soap_init(&soap);
+      soap_set_namespaces(&soap, condor_namespaces);
+  }
+#endif
   ControllerStatus = TRUE;
   gprint (GP_LOG, "Connected\n");
   return (TRUE);
-
+#ifndef IPP_CONDOR
 pipe_error:
   perror ("pipe error:");
   goto close_pipes;
-
 io_error:
   gprint (GP_ERR, "timeout while connecting\n");
   goto close_pipes;
-
 close_pipes:
   if (stdin_fd[0]  != 0) close (stdin_fd[0]);
@@ -413,19 +443,18 @@
   if (stderr_fd[1] != 0) close (stderr_fd[1]);
   return (FALSE);
+#endif
 }
 
 int ControllerCommand (char *cmd, char *response, IOBuffer *buffer) {
-
+#ifndef IPP_CONDOR
   int i, j, status;
   char *line;
   struct timespec request, remain;
-
+  //fprintf(stderr, "ControllerCommand: [%s]\n", cmd);
   /* avoid blocking on waitpid, test every 100 usec, up to 50 msec */
   request.tv_sec = 0;
   request.tv_nsec = 100000;
-
   ReadtoIOBuffer (buffer, stdout_cntl);
   FlushIOBuffer (buffer);
-
   /* send command, is pipe still open? */
   status = write_fmt (stdin_cntl, "%s\n", cmd);
@@ -438,10 +467,8 @@
     return (FALSE);
   }
-  
   /* for commands which don't return a prompt, don't look for one */
   if (response == NULL) {
     return (TRUE);
   }
-
   /* watch for response - wait up to 1 second */
   line = NULL;
@@ -457,5 +484,5 @@
       fprintf (stderr, "controller is down (EOF), restarting\n");
       if (!RestartController ()) {
-	return (FALSE);
+        return (FALSE);
       }
       return (FALSE);
@@ -470,5 +497,4 @@
     return (FALSE);
   }
-
   /* need to strip off the prompt */
   line = memstr (buffer[0].buffer, response, buffer[0].Nbuffer);
@@ -478,4 +504,5 @@
   }
   if (VerboseMode()) fprintf (stderr, "message received, %d cycles\n", i);
+#endif
   return (TRUE);
 }
@@ -498,5 +525,5 @@
       break;
   }
-  
+
   /* read stderr buffer */
   Nread = ReadtoIOBuffer (&stderr_buffer, stderr_cntl);
@@ -576,27 +603,27 @@
 
 int QuitController () {
-
+#ifndef IPP_CONDOR
   char cmd[128];
   IOBuffer buffer;
-
   if (!ControllerStatus) return (TRUE);
-
   sprintf (cmd, "quit");
   InitIOBuffer (&buffer, 0x100);
   ControllerCommand (cmd, NULL, &buffer);
   FreeIOBuffer (&buffer);
-
-  /* the quit command does not return a prompt, 
+  /* the quit command does not return a prompt,
      check that the controller exited */
   StopController ();
+#else
+  soap_destroy(&soap);
+  soap_end(&soap);
+  soap_done(&soap);
+#endif
   return (TRUE);
 }
 
 int StopController () {
-
+#ifndef IPP_CONDOR
   int i, waitstatus, result;
-
   if (!ControllerStatus) return (TRUE);
-
   ControllerStatus = FALSE;
   result = waitpid (ControllerPID, &waitstatus, WNOHANG);
@@ -611,13 +638,13 @@
   FreeIOBuffer (&stdout_buffer);
   FreeIOBuffer (&stderr_buffer);
+#endif
   return (TRUE);
 }
 
 int RestartController () {
-
+#ifndef IPP_CONDOR
   int i, status;
   char command[256];
   IOBuffer buffer;
-
   gprint (GP_ERR, "attempting to restart pcontrol\n");
   if (!StartController ()) {
@@ -625,9 +652,6 @@
     return (FALSE);
   }
-
   InitIOBuffer (&buffer, 0x100);
-
   status = TRUE;
-
   // XXX lock the host table? no: that would risk a dead lock between client and controller threads:
   gprint (GP_ERR, "pcontrol restarted, reloading hosts\n");
@@ -637,9 +661,61 @@
     status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
   }
-
   if (status) gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
-
-  FreeIOBuffer (&buffer);
-
-  return (TRUE);
-}
+  FreeIOBuffer (&buffer);
+#endif
+  return (TRUE);
+}
+
+#ifdef IPP_CONDOR
+char* get_hosts_requirements(void) {
+    int i;
+    int hr_length;
+    char* base_requirement_pattern_b = " (machine == \"";
+    char* base_requirement_pattern_e = "\")";
+    char* base_requirement_pattern_or = " || ";
+    if ( (hosts_requirement != NULL) && (hosts_list_modified == FALSE) ) {
+        return hosts_requirement;
+    }
+    if (hosts_requirement != NULL) {
+        free(hosts_requirement);
+    }
+    printf("Generating hosts based requirement\n");
+    hosts_requirement = strcreate("");
+    hr_length = strlen(hosts_requirement);
+    if (Nhosts > 0) {
+        hosts_requirement = opihi_append(hosts_requirement, &hr_length, "( ", NULL);
+        for (i = 0; i < Nhosts; i++) {
+            hosts_requirement = opihi_append(hosts_requirement, &hr_length,
+                                             base_requirement_pattern_b, NULL);
+            hosts_requirement = opihi_append(hosts_requirement, &hr_length,
+                                             hosts[i].hostname, NULL);
+            hosts_requirement = opihi_append(hosts_requirement, &hr_length,
+                                             base_requirement_pattern_e, NULL);
+            if (i != Nhosts-1) {
+                hosts_requirement = opihi_append(hosts_requirement, &hr_length,
+                                                 base_requirement_pattern_or, NULL);
+            }
+        }
+    } else { // No host defined: leave it empty
+        //pass
+    }
+    hosts_list_modified = FALSE;
+    printf("end of Generating hosts based requirement\n");
+    return hosts_requirement;
+}
+
+static int is_host_in_list(char *hostname) {
+    int i;
+    for (i = 0; i < Nhosts; i++) {
+        if (strcmp(hosts[i].hostname, hostname) == 0) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+char *get_host_status(char* hostname) {
+    return getHostStatus(&soap, hostname);
+}
+
+#endif
Index: branches/sc_branches/pantasks_condor/pantasks/JobOps.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/JobOps.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/JobOps.c	(revision 34783)
@@ -27,5 +27,5 @@
 /* provide a mechanism to loop over the list of jobs */
 Job *NextJob () {
-  
+
   Job *job;
 
@@ -52,5 +52,5 @@
   }
   return (NULL);
-}  
+}
 
 /* return job with given controller Job ID */
@@ -67,5 +67,5 @@
   }
   return (NULL);
-}  
+}
 
 /* list known jobs */
@@ -90,8 +90,8 @@
 /* make a new job from a task */
 Job *CreateJob (Task *task) {
-  
+
   int i;
   Job *job;
-  
+
   ALLOCATE (job, Job, 1);
 
@@ -131,5 +131,5 @@
   job[0].task = task;
   job[0].realhost = NULL;
-  
+
   /* if we decide we need to be able to dynamically set task qualities (like host, timeouts, etc), the we will
      need to have matched entries to these quantites in the job structure */
@@ -160,9 +160,9 @@
 
 void FreeJob (Job *job) {
-  
+
   int i;
 
   if (job == NULL) return;
-  
+
   FreeJobID (job[0].JobID);
 
@@ -230,17 +230,17 @@
     if (jobs[i][0].mode == JOB_LOCAL) {
       if (!KillLocalJob (jobs[i])) {
-	jobs[i][0].state = JOB_HUNG;
-	if (VerboseMode()) gprint (GP_LOG, "child process %d is hung, cannot kill\n", jobs[i][0].pid);
+        jobs[i][0].state = JOB_HUNG;
+        if (VerboseMode()) gprint (GP_LOG, "child process %d is hung, cannot kill\n", jobs[i][0].pid);
       }
     } else {
       if (!KillControllerJob (jobs[i])) {
-	jobs[i][0].state = JOB_HUNG;
-	if (VerboseMode()) gprint (GP_LOG, "child process %d is hung, cannot kill\n", jobs[i][0].pid);
+        jobs[i][0].state = JOB_HUNG;
+        if (VerboseMode()) gprint (GP_LOG, "child process %d is hung, cannot kill\n", jobs[i][0].pid);
       }
-    }    
+    }
     jobs[i][0].task[0].Npending = 0;
     FreeJob (jobs[i]);
   }
-    
+
   Njobs = 0;
   NJOBS = 20;
@@ -255,8 +255,10 @@
 
   if (job[0].mode == JOB_LOCAL) {
-    if (DEBUG) fprintf (stderr, "submit job: (%zx) %d of %d\n", (size_t) job[0].stdout_buff.buffer, job[0].stdout_buff.Nbuffer, job[0].stdout_buff.Nalloc); 
-    status = SubmitLocalJob (job);
+      if (DEBUG) { fprintf (stderr, "submit job: (%zx) %d of %d\n", (size_t) job[0].stdout_buff.buffer, job[0].stdout_buff.Nbuffer, job[0].stdout_buff.Nalloc); }
+      fprintf (stdout, "submit job (local)\n");
+      status = SubmitLocalJob (job);
   } else {
-    status = SubmitControllerJob (job);
+      fprintf (stdout, "submit job (non local)\n");
+      status = SubmitControllerJob (job);
   }
   if (!status) {
@@ -306,5 +308,5 @@
     default:
       return JobStateNone;
-  }      
+  }
   return JobStateNone;
 }
Index: branches/sc_branches/pantasks_condor/pantasks/Makefile
===================================================================
--- trunk/Ohana/src/opihi/pantasks/Makefile	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/Makefile	(revision 34783)
@@ -12,7 +12,7 @@
 # programs may add their own internal requirements here
 LIBS1   =       -lbasiccmd -ldatacmd -lastrocmd -lshell -ldata 
-LIBS2   =       -ldvo -lkapa -lFITS -lohana
-FULL_CFLAGS   = $(BASE_CFLAGS)
-FULL_CPPFLAGS = $(BASE_CPPFLAGS)
+LIBS2   =       -ldvo -lkapa -lFITS -lohana -lCondor -lgsoap 
+FULL_CFLAGS   = $(BASE_CFLAGS) -I/home/panstarrs/ippdor/local/include/gsoap -DIPP_CONDOR
+FULL_CPPFLAGS = $(BASE_CPPFLAGS) -DIPP_CONDOR
 FULL_LDFLAGS  = $(LIBS1) $(LIBS2) $(BASE_LDFLAGS)
 
@@ -58,5 +58,6 @@
 $(SRC)/JobOps.$(ARCH).o \
 $(SRC)/JobIDOps.$(ARCH).o \
-$(SRC)/TaskOps.$(ARCH).o
+$(SRC)/TaskOps.$(ARCH).o \
+$(SRC)/ipp_condor.$(ARCH).o
 
 cmds = \
Index: branches/sc_branches/pantasks_condor/pantasks/controller_check.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_check.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/controller_check.c	(revision 34783)
@@ -1,3 +1,7 @@
 # include "pantasks.h"
+
+#ifdef IPP_CONDOR
+#include "ipp_condor.h"
+#endif
 
 int controller_check (int argc, char **argv) {
@@ -8,7 +12,8 @@
 
   if (argc != 3) goto usage;
-  if (strcasecmp (argv[1], "JOB") && 
+  if (strcasecmp (argv[1], "JOB") &&
       strcasecmp (argv[1], "HOST")) goto usage;
 
+#ifndef IPP_CONDOR
   /* check if controller is running */
   status = CheckControllerStatus ();
@@ -22,9 +27,14 @@
   status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
   if (VerboseMode()) {
-    gprint (GP_LOG, "controller command sent\n");  
-    gprint (GP_LOG, "\n Nbytes received: %d\n", buffer.Nbuffer);  
+    gprint (GP_LOG, "controller command sent\n");
+    gprint (GP_LOG, "\n Nbytes received: %d\n", buffer.Nbuffer);
   }
   gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
   FreeIOBuffer (&buffer);
+#else
+  status = 2;
+  sprintf(command, "balh");
+  InitIOBuffer (&buffer, 0x100);
+#endif
   return (TRUE);
 
Index: branches/sc_branches/pantasks_condor/pantasks/controller_host.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_host.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/controller_host.c	(revision 34783)
@@ -1,9 +1,12 @@
-# include "pantasks.h"
+#include "pantasks.h"
+
+#ifdef IPP_CONDOR
+#include "ipp_condor.h"
+#endif
 
 int controller_host (int argc, char **argv) {
+  int N, max_threads;
 
-  int N, status, max_threads;
-  char command[1024];
-  IOBuffer buffer;
+  fprintf(stderr, "in controller_host\n");
 
   max_threads = 0;
@@ -16,4 +19,8 @@
   if (argc != 3) goto usage;
   if (max_threads && strcasecmp (argv[1], "ADD")) goto usage;
+
+  char command[1024];
+  IOBuffer buffer;
+  int status;
 
   /* start controller connection (if needed) */
@@ -28,5 +35,5 @@
   if (!strcasecmp (argv[1], "ADD")) {
     AddHost (argv[2], max_threads);
-  } 
+  }
 
   if (!strcasecmp (argv[1], "DELETE")) {
@@ -46,6 +53,13 @@
 
   FreeIOBuffer (&buffer);
+
+#ifdef IPP_CONDOR
+# ifdef DEBUG
+  printf("Showing hosts requirements\n");
+  printf("[%s]\n", get_hosts_requirements());
+# endif
+#endif
   return (TRUE);
-  
+
 usage:
   gprint (GP_LOG, "USAGE: controller host (command) (hostname)\n");
Index: branches/sc_branches/pantasks_condor/pantasks/controller_run.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_run.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/controller_run.c	(revision 34783)
@@ -3,4 +3,5 @@
 int controller_run (int argc, char **argv) {
 
+#ifndef IPP_CONDOR
   int status;
   char command[1024];
@@ -10,5 +11,5 @@
       get_argument (argc, argv, "help") ||
       get_argument (argc, argv, "-h") ||
-      get_argument (argc, argv, "--help")) 
+      get_argument (argc, argv, "--help"))
   {
     if (!strcmp (argv[0], "run")) {
@@ -46,4 +47,8 @@
   }
   FreeIOBuffer (&buffer);
+#else
+  gprint (GP_ERR, "Not used in Condor\n");
+#endif
+
   return (TRUE);
 }
Index: branches/sc_branches/pantasks_condor/pantasks/controller_status.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_status.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/controller_status.c	(revision 34783)
@@ -1,15 +1,14 @@
-# include "pantasks.h"
+#include "pantasks.h"
+#include "ipp_condor.h"
 
 int controller_status (int argc, char **argv) {
-
+#ifndef IPP_CONDOR
   int status;
   char command[1024];
   IOBuffer buffer;
-
   if (argc != 1) {
     gprint (GP_ERR, "USAGE: controller status\n");
     return (FALSE);
   }
-
   /* check if controller is running */
   status = CheckControllerStatus ();
@@ -18,11 +17,7 @@
     return (TRUE);
   }
-
-
   sprintf (command, "status");
   InitIOBuffer (&buffer, 0x100);
-
   status = ControllerCommand (command, CONTROLLER_PROMPT, &buffer);
-
   if (status) {
     gwrite (buffer.buffer, 1, buffer.Nbuffer, GP_LOG);
@@ -31,4 +26,9 @@
   }
   FreeIOBuffer (&buffer);
+#else
+  gprint(GP_LOG, strprintf("%s\n", get_hosts_requirements()));
+  gprint(GP_LOG, strprintf("%s\n", get_host_status("ippc63.ifa.hawaii.edu")));
+
+#endif
   return (TRUE);
 }
Index: branches/sc_branches/pantasks_condor/pantasks/controller_version.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/controller_version.c	(revision 34621)
+++ branches/sc_branches/pantasks_condor/pantasks/controller_version.c	(revision 34783)
@@ -3,4 +3,5 @@
 int controller_version (int argc, char **argv) {
 
+#ifndef IPP_CONDOR
   int status;
   char command[1024];
@@ -19,5 +20,4 @@
   }
 
-
   sprintf (command, "version");
   InitIOBuffer (&buffer, 0x100);
@@ -31,4 +31,9 @@
   }
   FreeIOBuffer (&buffer);
+
+#else
+  gprint(GP_ERR, "TODO: Show a version here\n");
+#endif
+
   return (TRUE);
 }
