Index: trunk/Ohana/src/opihi/pcontrol/StartJob.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/StartJob.c	(revision 17477)
+++ trunk/Ohana/src/opihi/pcontrol/StartJob.c	(revision 19124)
@@ -14,4 +14,5 @@
 
   /* construct command line : job arg0 arg1 ... argN\n */
+  // arguments of the form @MAX_THREADS@ are replaced here
   Nline = 10 + job[0].argc;
   for (i = 0; i < job[0].argc; i++) {
@@ -23,6 +24,14 @@
   for (i = 0; i < job[0].argc; i++) {
     strcat (line, " ");
+    if (!strcmp (job[0].argv[i], "@MAX_THREADS@")) {
+      char threads[10];
+      snprintf (threads, 10, "%5d", host[0].max_threads);
+      strcat (line, threads);
+      continue;
+    } 
     strcat (line, job[0].argv[i]);
   }
+
+  fprintf (stderr, "command: %s\n", line);
 
   status = PclientCommand (host, line, PCLIENT_PROMPT, PCONTROL_RESP_START_JOB);
