Added human-readable descriptions for command-line arguments.
authorOrion Lawlor <olawlor@acm.org>
Wed, 18 Dec 2002 21:22:08 +0000 (21:22 +0000)
committerOrion Lawlor <olawlor@acm.org>
Wed, 18 Dec 2002 21:22:08 +0000 (21:22 +0000)
14 files changed:
src/arch/net/machine-dgram.c
src/arch/net/machine.c
src/ck-core/init.C
src/ck-ldb/LBDatabase.C
src/ck-perf/trace-common.C
src/ck-perf/trace-counter.C
src/ck-perf/trace-projections.C
src/ck-perf/trace-summary.C
src/conv-ccs/conv-ccs.c
src/conv-core/memory-paranoid.c
src/conv-core/threads.c
src/langs/bluegene/blue.C
src/libs/ck-libs/fem/fem.C
src/libs/ck-libs/tcharm/tcharm.C

index 74dbc97e9aa295c628bed32d13e3ecdb5038cf84..a76a16cd2ad23e50e130106b4ed7c9274a692abb 100644 (file)
@@ -92,16 +92,16 @@ static void extract_args(char **argv)
 {
   int ms;
   setspeed_eth();
-  if (CmiGetArgFlag(argv,"+atm"))
+  if (CmiGetArgFlagDesc(argv,"+atm","Tune for a low-latency ATM network"))
     setspeed_atm();
-  if (CmiGetArgFlag(argv,"+eth"))
+  if (CmiGetArgFlagDesc(argv,"+eth","Tune for an ethernet network"))
     setspeed_eth();
-  CmiGetArgInt(argv,"+max_dgram_size",&Cmi_max_dgram_size);
-  CmiGetArgInt(argv,"+window_size",&Cmi_window_size);
-  CmiGetArgInt(argv,"+os_buffer_size",&Cmi_os_buffer_size);
-  if (CmiGetArgInt(argv,"+delay_retransmit",&ms))
+  CmiGetArgIntDesc(argv,"+max_dgram_size",&Cmi_max_dgram_size,"Size of each UDP packet");
+  CmiGetArgIntDesc(argv,"+window_size",&Cmi_window_size,"Number of unacknowledged packets");
+  CmiGetArgIntDesc(argv,"+os_buffer_size",&Cmi_os_buffer_size, "UDP socket's SO_RCVBUF/SO_SNDBUF");
+  if (CmiGetArgIntDesc(argv,"+delay_retransmit",&ms, "Milliseconds to wait before retransmit"))
          Cmi_delay_retransmit=0.001*ms;
-  if (CmiGetArgInt(argv,"+ack_delay",&ms))
+  if (CmiGetArgIntDesc(argv,"+ack_delay",&ms, "Milliseconds to wait before ack'ing"))
          Cmi_delay_retransmit=0.001*ms;
   extract_common_args(argv);
   Cmi_dgram_max_data = Cmi_max_dgram_size - DGRAM_HEADER_SIZE;
index a6bfb348d7672a559c978cda63ae0c33e10d9ab3..23dab24cb7c1f82e3ee313533b5b070458d60cb7 100644 (file)
@@ -590,7 +590,7 @@ static void parse_netstart(void)
 
 static void extract_common_args(char **argv)
 {
-  if (CmiGetArgFlag(argv,"+stats"))
+  if (CmiGetArgFlagDesc(argv,"+stats","Print network statistics at shutdown"))
     Cmi_print_stats = 1;
 }
 
@@ -1281,7 +1281,7 @@ static void node_addresses_obtain(char **argv)
        ChSingleNodeinfo *fakeTab;
        ChMessage_new("nodeinfo",sizeof(ChSingleNodeinfo),&nodetabmsg);
        fakeTab=(ChSingleNodeinfo *)(nodetabmsg.data);
-       CmiGetArgInt(argv,"+p",&npes);
+       CmiGetArgIntDesc(argv,"+p",&npes,"Set the number of processes to create");
 #if CMK_SHARED_VARS_UNAVAILABLE
        if (npes!=1) {
                fprintf(stderr,
@@ -1897,15 +1897,15 @@ void ConverseInit(int argc, char **argv, CmiStartFn fn, int usc, int everReturn)
   Cmi_idlepoll = 1;
 #endif
   Cmi_truecrash = 0;
-  if (CmiGetArgFlag(argv,"+truecrash") ||
-      CmiGetArgFlag(argv,"++debug")) Cmi_truecrash = 1;
+  if (CmiGetArgFlagDesc(argv,"+truecrash","Do not install signal handlers") ||
+      CmiGetArgFlagDesc(argv,"++debug",NULL /*meaning: don't show this*/)) Cmi_truecrash = 1;
     /* netpoll disable signal */
-  if (CmiGetArgFlag(argv,"+netpoll")) Cmi_netpoll = 1;
+  if (CmiGetArgFlagDesc(argv,"+netpoll","Do not use SIGIO--poll instead")) Cmi_netpoll = 1;
     /* idlepoll use poll instead if sleep when idle */
-  if (CmiGetArgFlag(argv,"+idlepoll")) Cmi_idlepoll = 1;
+  if (CmiGetArgFlagDesc(argv,"+idlepoll","Do not sleep when idle")) Cmi_idlepoll = 1;
     /* idlesleep use sleep instead if busywait when idle */
-  if (CmiGetArgFlag(argv,"+idlesleep")) Cmi_idlepoll = 0;
-  Cmi_syncprint = CmiGetArgFlag(argv,"+syncprint");
+  if (CmiGetArgFlagDesc(argv,"+idlesleep","Make sleep calls when idle")) Cmi_idlepoll = 0;
+  Cmi_syncprint = CmiGetArgFlagDesc(argv,"+syncprint", "Flush each CmiPrintf to the terminal");
 
   MACHSTATE2(5,"Init: (netpoll=%d), (idlepoll=%d)",Cmi_netpoll,Cmi_idlepoll);
 
index 43ea34ce21d9271d7072437ad4c34e981549f01d..8c0f8a80d48660bfcac2f47874eb70b58cd5df9c 100644 (file)
@@ -72,21 +72,21 @@ static int   _exitStarted = 0;
 
 static inline void _parseCommandLineOpts(char **argv)
 {
-  if (CmiGetArgFlag(argv,"+cs"))
+  if (CmiGetArgFlagDesc(argv,"+cs", "Print extensive statistics at shutdown"))
       _STATS_ON(_printCS);
-  if (CmiGetArgFlag(argv,"+ss"))
+  if (CmiGetArgFlagDesc(argv,"+ss", "Print summary statistics at shutdown"))
       _STATS_ON(_printSS);
-  if (CmiGetArgFlag(argv,"+fifo"))
+  if (CmiGetArgFlagDesc(argv,"+fifo", "Default to FIFO queuing"))
       _defaultQueueing = CK_QUEUEING_FIFO;
-  if (CmiGetArgFlag(argv,"+lifo"))
+  if (CmiGetArgFlagDesc(argv,"+lifo", "Default to LIFO queuing"))
       _defaultQueueing = CK_QUEUEING_LIFO; 
-  if (CmiGetArgFlag(argv,"+ififo"))
+  if (CmiGetArgFlagDesc(argv,"+ififo", "Default to integer-prioritized FIFO queuing"))
       _defaultQueueing = CK_QUEUEING_IFIFO; 
-  if (CmiGetArgFlag(argv,"+ilifo"))
+  if (CmiGetArgFlagDesc(argv,"+ilifo", "Default to integer-prioritized LIFO queuing"))
       _defaultQueueing = CK_QUEUEING_ILIFO;
-  if (CmiGetArgFlag(argv,"+bfifo"))
+  if (CmiGetArgFlagDesc(argv,"+bfifo", "Default to bitvector-prioritized FIFO queuing"))
       _defaultQueueing = CK_QUEUEING_BFIFO; 
-  if (CmiGetArgFlag(argv,"+blifo"))
+  if (CmiGetArgFlagDesc(argv,"+blifo", "Default to bitvector-prioritized LIFO queuing"))
       _defaultQueueing = CK_QUEUEING_BLIFO;
 }
 
@@ -423,9 +423,8 @@ extern void _registerExternalModules(char **argv);
 extern void _ckModuleInit(void);
 extern void _loadbalancerInit();
 
-void _initCharm(int argc, char **argv)
-{
-
+void _initCharm(int unused_argc, char **argv)
+{ 
        CkpvInitialize(PtrQ*,_buffQ);
        CkpvInitialize(PtrVec*,_bocInitVec);
        CkpvInitialize(void*, _currentChare);
@@ -495,8 +494,9 @@ void _initCharm(int argc, char **argv)
 
        _futuresModuleInit(); // part of futures implementation is a converse module
        _loadbalancerInit();
-       if(CkMyRank()==0) 
+       if(CkMyRank()==0)  /* Register */
        {
+               CmiArgGroup("Charm++",NULL);
                _parseCommandLineOpts(argv);
                _registerInit();
                CkRegisterMsg("System", 0, 0, 0, sizeof(int));
@@ -528,7 +528,7 @@ void _initCharm(int argc, char **argv)
        {
                _allStats = new Stats*[CkNumPes()];
                register int i;
-               for(i=0;i<_numMains;i++) 
+               for(i=0;i<_numMains;i++)  /* Create all mainchares */
                {
                        register int size = _chareTable[_mainTable[i]->chareIdx]->size;
                        register void *obj = malloc(size);
@@ -544,7 +544,7 @@ void _initCharm(int argc, char **argv)
 
                _STATS_RECORD_CREATE_CHARE_N(_numMains);
                _STATS_RECORD_PROCESS_CHARE_N(_numMains);
-               for(i=0;i<_numReadonlyMsgs;i++) 
+               for(i=0;i<_numReadonlyMsgs;i++) /* Send out readonly messages */
                {
                        register void *roMsg = (void *) *((char **)(_readonlyMsgs[i]->pMsg));
                        if(roMsg==0)
index 467a36da9dc43418547b8d6d27c50c4b8e3c11cd..44276c577f1e822d77a1129510fa673b039ac2bc 100644 (file)
@@ -124,16 +124,17 @@ void _loadbalancerInit()
 
   char **argv = CkGetArgv();
   char *balancer = NULL;
-  if (CmiGetArgString(argv, "+balancer", &balancer)) {
+  CmiArgGroup("Charm++","Load Balancer");
+  if (CmiGetArgStringDesc(argv, "+balancer", &balancer, "Use this load balancer")) {
     lbRegistry.defaultLB() = balancer;
   }
 
   // get the step number at which to dump the LB database
-  CmiGetArgInt(argv, "+LBDump", &CkpvAccess(dumpStep));
-  CmiGetArgString(argv, "+LBDumpFile", &CkpvAccess(dumpFile));
+  CmiGetArgIntDesc(argv, "+LBDump", &CkpvAccess(dumpStep), "Dump the LB state at this step");
+  CmiGetArgStringDesc(argv, "+LBDumpFile", &CkpvAccess(dumpFile), "Set the LB state file name");
 
   // get the simulation flag
-  CkpvAccess(doSimulation) = CmiGetArgFlag(argv, "+LBSim");
+  CkpvAccess(doSimulation) = CmiGetArgFlagDesc(argv, "+LBSim", "Read LB state from LBDumpFile");
 }
 
 int LBDatabase::manualOn = 0;
index 4a8b4d12b827028ffa2fa90d193a75a9d68498cc..5a167e0f0a09dc54b82a788fffff8e64b419c041 100644 (file)
@@ -44,6 +44,7 @@ CkpvDeclare(char*, traceRoot);
 /// decide parameters from command line
 static void traceCommonInit(char **argv)
 {
+  CmiArgGroup("Charm++","Tracing");
   DEBUGF(("[%d] in traceCommonInit.\n", CkMyPe()));
   CkpvInitialize(double, traceInitTime);
   CkpvAccess(traceInitTime) = TRACE_TIMER();
@@ -63,11 +64,11 @@ static void traceCommonInit(char **argv)
 #endif
 #endif
   CkpvAccess(CtrLogBufSize) = LogBufSize;
-  if (CmiGetArgInt(argv,"+logsize",&CkpvAccess(CtrLogBufSize)))
+  if (CmiGetArgIntDesc(argv,"+logsize",&CkpvAccess(CtrLogBufSize), "Log entries to buffer per I/O"))
     if (CkMyPe() == 0) 
       CmiPrintf("Trace: logsize: %d\n", CkpvAccess(CtrLogBufSize));
   char *root;
-  if (CmiGetArgString(argv, "+traceroot", &root)) {
+  if (CmiGetArgStringDesc(argv, "+traceroot", &root, "Directory to write trace files to")) {
     int i;
     for (i=strlen(argv[0])-1; i>=0; i--) if (argv[0][i] == '/') break;
     i++;
@@ -122,7 +123,7 @@ static inline void _traceInit(char **argv)
   // in moduleInit.C
   _createTraces(argv);
 
-  if (CkpvAccess(_traces)->length() && !CmiGetArgFlag(argv,"+traceoff"))
+  if (CkpvAccess(_traces)->length() && !CmiGetArgFlagDesc(argv,"+traceoff","Disable tracing"))
     traceBegin();
 }
 
index a65d41e311d09b1cb3f4d2843764a15461070deb..dc2e0673f35ff7ba72db5ba87fc6d1397ed80c29 100644 (file)
@@ -604,7 +604,7 @@ void TraceCounter::traceInit(char **argv)
   CounterArg* commandLine_ = NULL;
   bool badArg = false;
   int numCounters = 0;
-  if (CmiGetArgString(argv, "+counters", &counters)) {
+  if (CmiGetArgStringDesc(argv, "+counters", &counters, "Measure these performance counters")) {
     if (CmiMyPe()==0) { CmiPrintf("Counters: %s\n", counters); }
     int offset = 0;
     int limit = strlen(counters);
@@ -633,7 +633,7 @@ void TraceCounter::traceInit(char **argv)
   commandLineSz_ = numCounters;
 
   // check to see if args are valid, output if not
-  if (badArg || CmiGetArgFlag(argv, "+count-help")) {
+  if (badArg || CmiGetArgFlagDesc(argv, "+count-help", "List available performance counters")) {
     if (CmiMyPe() == 0) { printHelp(); }
     ConverseExit();  return;
   }
index 7e8d4f27633f920fe28af470c834b8e90ae6d0c3..b97cd430e2f4468309546938fea79b6d9812d5bf 100644 (file)
@@ -34,7 +34,7 @@ CkpvStaticDeclare(CkVec<UsrEvent *>, usrEvents);
 static int warned=0;
 #define OPTIMIZED_VERSION      \
        if (!warned) { warned=1;        \
-       CmiPrintf("\n\n!!!! Warning: traceUserEvent not availbale in optimized version!!!!\n\n\n"); }
+       CmiPrintf("\n\n!!!! Warning: traceUserEvent not available in optimized version!!!!\n\n\n"); }
 #else
 #define OPTIMIZED_VERSION /*empty*/
 #endif
@@ -441,9 +441,9 @@ TraceProjections::TraceProjections(char **argv): curevent(0), isIdle(0)
 
   CtvInitialize(int,curThreadEvent);
   CtvAccess(curThreadEvent)=0;
-  int binary = CmiGetArgFlag(argv,"+binary-trace");
+  int binary = CmiGetArgFlagDesc(argv,"+binary-trace","Write log files in (unreadable) binary format");
 #if CMK_PROJECTIONS_USE_ZLIB
-  int compressed = CmiGetArgFlag(argv,"+gz-trace");
+  int compressed = CmiGetArgFlagDesc(argv,"+gz-trace","Write log files pre-compressed with gzip");
 #endif
   _logPool = new LogPool(CkpvAccess(traceRoot));
   _logPool->setBinary(binary);
index cbcac22bfb0a939ed110b743283fc5ee16735d58..92dd1af288da2e8638407ff534dac41a4f1d4b7f 100644 (file)
@@ -289,17 +289,17 @@ TraceSummary::TraceSummary(char **argv):curevent(0),binStart(0.0),bin(0.0),msgNu
   CkpvInitialize(double, version);
   CkpvAccess(binSize) = BIN_SIZE;
   CkpvAccess(version) = VER;
-  if (CmiGetArgString(argv,"+binsize",&tmpStr))
-       sscanf(tmpStr,"%lf",&CkpvAccess(binSize));
-  if (CmiGetArgString(argv,"+version",&tmpStr))
-       sscanf(tmpStr,"%lf",&CkpvAccess(version));
-
+  CmiGetArgDoubleDesc(argv,"+binsize",&CkpvAccess(binSize),
+       "CPU usage log time resolution");
+  CmiGetArgDoubleDesc(argv,"+version",&CkpvAccess(version),
+       "Write this .sum file version");
+  
   epThreshold = 0.001; 
-  if (CmiGetArgString(argv,"+epThreshold",&tmpStr))
-       sscanf(tmpStr,"%lf",&epThreshold);
+  CmiGetArgDoubleDesc(argv,"+epThreshold",&epThreshold,
+       "Execution time histogram lower bound");
   epInterval = 0.001; 
-  if (CmiGetArgString(argv,"+epInterval",&tmpStr))
-       sscanf(tmpStr,"%lf",&epInterval);
+  CmiGetArgDoubleDesc(argv,"+epInterval",&epInterval,
+       "Execution time histogram bin size");
 
   sumonly = CmiGetArgFlag(argv, "+sumonly");
 
index 5478091b55002b2fe6f5d8a33a76627c95f6ca7d..67597503b6d1bb4d9cc8e5de89e8f080d09b7b6e 100644 (file)
@@ -325,9 +325,9 @@ void CcsInit(char **argv)
    int ccs_serverPort=0;
    char *ccs_serverAuth=NULL;
    
-   if (CmiGetArgFlag(argv,"++server") | 
-      CmiGetArgInt(argv,"++server-port",&ccs_serverPort) |
-      CmiGetArgString(argv,"++server-auth",&ccs_serverAuth)) 
+   if (CmiGetArgFlagDesc(argv,"++server", "Create a CCS server port") | 
+      CmiGetArgIntDesc(argv,"++server-port",&ccs_serverPort, "Listen on this TCP/IP port number") |
+      CmiGetArgStringDesc(argv,"++server-auth",&ccs_serverAuth, "Use this CCS authentication file")) 
     if (CmiMyPe()==0)
     {/*Create and occasionally poll on a CCS server port*/
       CcsServer_new(NULL,&ccs_serverPort,ccs_serverAuth);
index 3deab26d463b21891288cf9e8802d62c1432a0d3..16dea54bc0de31ae5aecc2e3d1c2428533088ea0 100644 (file)
@@ -231,32 +231,30 @@ static int meta_getpagesize(void)
 
 /*Only display startup status messages from processor 0*/
 static void status(char *msg) {
-  if (CmiMyPe()==0) {
+  if (CmiMyPe()==0 && !CmiArgGivingUsage()) {
     CmiPrintf("%s",msg);
   }
 }
 static void meta_init(char **argv)
 {
+  CmiArgGroup("Converse","memory-paranoid");
   status("Converse -memory mode: paranoid");
   /*Parse uninitialized-memory-fill options:*/
-  if (CmiGetArgInt(argv,"+memory_fill",&memory_fill)) { 
+  if (CmiGetArgIntDesc(argv,"+memory_fill",&memory_fill, "Overwrite new and deleted memory")) { 
     status(" fill");
   }
-  if (CmiGetArgFlag(argv,"+memory_fillphase")) { 
+  if (CmiGetArgFlagDesc(argv,"+memory_fillphase", "Invert memory overwrite pattern")) { 
     status(" phaseflip");
     memory_fillphase=1;
   }
-  if (CmiGetArgFlag(argv,"+memory_verbose")) {
-    status(" verbose");
-    memory_verbose=1;
-  }  
-  if (CmiGetArgInt(argv,"+memory_fillphase",&memory_fillphase)) { 
-    status(" phaseflip");
-  }  
   /*Parse heap-check options*/
-  if (CmiGetArgInt(argv,"+memory_checkfreq",&memory_checkfreq)) {
+  if (CmiGetArgIntDesc(argv,"+memory_checkfreq",&memory_checkfreq, "Check heap this many mallocs")) {
     status(" checkfreq");
   }
+  if (CmiGetArgFlagDesc(argv,"+memory_verbose", "Give a printout at each heap check")) {
+    status(" verbose");
+    memory_verbose=1;
+  }  
   status("\n");
 }
 
index d4e248b892ecd9e453619688749078f8da0ec3cc..5280fb8649dff50acf12c908405f474f589cda08 100644 (file)
@@ -260,7 +260,8 @@ static void CthBaseInit(char **argv)
 
   CthCpvInitialize(int,  _defaultStackSize);
   CthCpvAccess(_defaultStackSize)=32768;
-  CmiGetArgInt(argv,"+stacksize",&CthCpvAccess(_defaultStackSize));  
+  CmiGetArgIntDesc(argv,"+stacksize",&CthCpvAccess(_defaultStackSize),
+       "Default user-level thread stack size");  
   
   CthCpvInitialize(CthThread,  CthCurrent);
   CthCpvInitialize(char *, CthData);
index 4e9e869fb064de45f0ad853e5cb4a998668b21a0..4c2d06d98a17e82fe602aefd0be95aa6ee72f6e2 100644 (file)
@@ -980,20 +980,22 @@ CmiStartFn bgMain(int argc, char **argv)
   cva(numX) = cva(numY) = cva(numZ) = 0;
   cva(numCth) = cva(numWth) = 0;
 
-  CmiGetArgInt(argv, "+x", &cva(numX));
-  CmiGetArgInt(argv, "+y", &cva(numY));
-  CmiGetArgInt(argv, "+z", &cva(numZ));
-  CmiGetArgInt(argv, "+cth", &cva(numCth));
-  CmiGetArgInt(argv, "+wth", &cva(numWth));
+  CmiArgGroup("Charm++","BlueGene Simulator");
+  CmiGetArgIntDesc(argv, "+x", &cva(numX), "The x size of the grid of nodes");
+  CmiGetArgIntDesc(argv, "+y", &cva(numY), "The y size of the grid of nodes");
+  CmiGetArgIntDesc(argv, "+z", &cva(numZ), "The z size of the grid of nodes");
+  CmiGetArgIntDesc(argv, "+cth", &cva(numCth), "The number of simulated communication threads per node");
+  CmiGetArgIntDesc(argv, "+wth", &cva(numWth), "The number of simulated worker threads per node");
 
 //  printTimeLog = CmiGetArgFlag(argv, "+bglog");
-  genTimeLog = CmiGetArgFlag(argv, "+bglog");
-  correctTimeLog = CmiGetArgFlag(argv, "+bgcorrect");
+  genTimeLog = CmiGetArgFlagDesc(argv, "+bglog", "Write events to log file");
+  correctTimeLog = CmiGetArgFlagDesc(argv, "+bgcorrect", "Apply timestamp correction to logs");
   if (correctTimeLog) genTimeLog = 1;
 
   // for timing method, default using elapse calls.
   timingMethod = BG_ELAPSE;
-  if(CmiGetArgFlag(argv, "+bgwalltime"))  timingMethod = BG_WALLTIME;
+  if(CmiGetArgFlagDesc(argv, "+bgwalltime", "Use walltime, not CPU time, for time estimate")) 
+        timingMethod = BG_WALLTIME;
 
   if (CmiMyPe() == 0) {
     CmiPrintf("BG info> Simulating %dx%dx%d nodes with %d comm + %d work threads each.\n", cva(numX), cva(numY), cva(numZ), cva(numCth), cva(numWth));
index 32c84ef92522812eaa23a2234fbe544aecd3fc6f..ce9488630d9193712b196879115286e75f34ade9 100644 (file)
@@ -61,9 +61,10 @@ void FEMnodeInit(void) {
        PUPable_reg(FEM_Sym_Linear);
        CtvInitialize(FEMchunk*, _femptr);
        TCHARM_Set_fallback_setup(FEMfallbackSetup);
+       CmiArgGroup("Library","FEM Framework");
        char **argv=CkGetArgv();
-       if (CmiGetArgFlag(argv,"-read")) initFlags|=FEM_INIT_READ;
-       if (CmiGetArgFlag(argv,"-write")) initFlags|=FEM_INIT_WRITE;    
+       if (CmiGetArgFlagDesc(argv,"-read","Skip init()--read mesh from files")) initFlags|=FEM_INIT_READ;
+       if (CmiGetArgFlagDesc(argv,"-write","Skip driver()--write mesh to files")) initFlags|=FEM_INIT_WRITE;   
 }
 
 static void 
index 60eb2c5ba2186447699ec1cda434562813d42848..bfdc78db2edb246f6f7a771bf5357e45246bdece 100644 (file)
@@ -59,18 +59,19 @@ void TCharm::nodeInit(void)
   CtvInitialize(TCharm *,_curTCharm);
   CtvAccess(_curTCharm)=NULL;
   CpvInitialize(inState,_stateTCharm);
+  CmiArgGroup("Library","TCharm");
   char **argv=CkGetArgv();
-  tcharm_nomig=CmiGetArgFlag(argv,"+tcharm_nomig");
-  tcharm_nothreads=CmiGetArgFlag(argv,"+tcharm_nothread");
-  tcharm_nothreads|=CmiGetArgFlag(argv,"+tcharm_nothreads");
+  tcharm_nomig=CmiGetArgFlagDesc(argv,"+tcharm_nomig","Disable migration support (debugging)");
+  tcharm_nothreads=CmiGetArgFlagDesc(argv,"+tcharm_nothread","Disable thread support (debugging)");
+  tcharm_nothreads|=CmiGetArgFlagDesc(argv,"+tcharm_nothreads",NULL);
   char *traceLibName=NULL;
-  while (CmiGetArgString(argv,"+tcharm_trace",&traceLibName))
+  while (CmiGetArgStringDesc(argv,"+tcharm_trace",&traceLibName,"Print each call to this library"))
       tcharm_tracelibs.addTracing(traceLibName);
-  CmiGetArgInt(argv,"+tcharm_stacksize",&tcharm_stacksize);
+  CmiGetArgIntDesc(argv,"+tcharm_stacksize",&tcharm_stacksize,"Set the thread stack size (default 1MB)");
   if (CkMyPe()!=0) { //Processor 0 eats "+vp<N>" and "-vp<N>" later:
        int ignored;
-       while (CmiGetArgInt(argv,"-vp",&ignored)) {}
-       while (CmiGetArgInt(argv,"+vp",&ignored)) {}
+       while (CmiGetArgIntDesc(argv,"-vp",&ignored,NULL)) {}
+       while (CmiGetArgIntDesc(argv,"+vp",&ignored,NULL)) {}
   }
 
   TCharm::setState(inNodeSetup);
@@ -659,8 +660,8 @@ CDECL int TCHARM_Get_num_chunks(void)
        if (CkMyPe()!=0) CkAbort("TCHARM_Get_num_chunks should only be called on PE 0 during setup!");
        int nChunks=CkNumPes();
        char **argv=CkGetArgv();
-       CmiGetArgInt(argv,"-vp",&nChunks);
-       CmiGetArgInt(argv,"+vp",&nChunks);
+       CmiGetArgIntDesc(argv,"-vp",&nChunks,"Set the total number of virtual processors");
+       CmiGetArgIntDesc(argv,"+vp",&nChunks,NULL);
        lastNumChunks=nChunks;
        return nChunks;
 }