netlrts: replace some CMK_SHARED_VARS_UNAVAILABLE with not CMK_SMP
authorYanhuaSun <sun51@illinois.edu>
Mon, 4 Mar 2013 22:53:42 +0000 (16:53 -0600)
committerNikhil Jain <nikhil@illinois.edu>
Fri, 24 May 2013 20:27:17 +0000 (15:27 -0500)
src/arch/net/machine-persistent.c
src/arch/net/machine-tcp.c
src/arch/net/machine.c
src/ck-core/ck.C
src/conv-core/converse.h

index 2e5cc3cf022f6b2b8262bc21fd17432aba2f4d02..81d597e240977667bc7c8056552383b0d89cc337 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include "persist_impl.h"
 
+#define CMI_DEST_RANK_NET(msg) *(int *)(msg)
 int persistentSendMsgHandlerIdx;
 
 static void sendPerMsgHandler(char *msg)
index 30bef315b703f23dd69724e6a783afe311dee58f..63e48bccafa77171eed7ccfc942c45493c6c1654 100644 (file)
@@ -68,7 +68,7 @@ static void CmiNotifyBeginIdle(CmiIdleState *s)
 
 static void CmiNotifyStillIdle(CmiIdleState *s)
 {
-#if CMK_SHARED_VARS_UNAVAILABLE
+#if  !CMK_SMP 
   CommunicationServerNet(10, COMM_SERVER_FROM_SMP);
 #else
   int nSpins=20; /*Number of times to spin before sleeping*/
@@ -258,7 +258,7 @@ static void CommunicationServerNet(int sleepTime, int where)
   LOG(GetClock(), Cmi_nodestart, 'I', 0, 0);
   MACHSTATE2(sleepTime?3:2,"CommunicationsServer(%d,%d) {",
             sleepTime,writeableAcks||writeableDgrams)  
-#if !CMK_SHARED_VARS_UNAVAILABLE /*SMP mode: comm. lock is precious*/
+#if CMK_SMP
   if (sleepTime!=0) {/*Sleep *without* holding the comm. lock*/
     MACHSTATE(2,"CommServer going to sleep (NO LOCK)");
     if (CheckSocketsReady(sleepTime, 0)<=0) {
index 723f11b84c5b8f839e8dc7143b50a0c140abda19..62bb3a4943a91eaa9b119703a8842cb252b24775 100644 (file)
@@ -556,13 +556,6 @@ void LrtsAbort(const char *message)
 {
   if (already_aborting) machine_exit(1);
   already_aborting=1;
-       {
-/*      char str[100];
-        sprintf(str,"dead.%d",CmiMyNode());
-        FILE *fp = fopen(str,"w");
-        fprintf(fp,"%s",message);
-         fclose(fp);*/
-       }
   MACHSTATE1(5,"CmiAbort(%s)",message);
 
 #if CMK_CCS_AVAILABLE
@@ -573,16 +566,6 @@ void LrtsAbort(const char *message)
   }
 #endif
   
-  /* CmiDestroyLocks();  */
-
-  {
-/*    char str[22];
-    snprintf(str,18,"dead.%d",CmiMyPe());
-    FILE *fp = fopen(str,"w");
-    fprintf(fp,"Abort:%s\n",message);
-    fclose(fp);*/
-  }
-
   CmiError("------------- Processor %d Exiting: Called CmiAbort ------------\n"
        "Reason: %s\n",CmiMyPe(),message);
   CmiPrintStackTrace(0);
@@ -746,16 +729,6 @@ static void extract_common_args(char **argv)
     Cmi_print_stats = 1;
 }
 
-/* for SMP */
-//#include "machine-smp.c"
-
-/* Immediate message support */
-#define CMI_DEST_RANK_NET(msg) *(int *)(msg)
-//#include "immediate.c"
-
-#if CMK_SMP && CMK_LEVERAGE_COMMTHREAD
-//#include "machine-commthd-util.c"
-#endif
 
 /******************************************************************************
  *
@@ -869,7 +842,7 @@ static double         Cmi_check_delay = 3.0;
  *****************************************************************************/
 
 /************************ No kernel SMP threads ***************/
-#if CMK_SHARED_VARS_UNAVAILABLE
+#if !CMK_SMP 
 
 static volatile int memflag=0;
 void CmiMemLock() { memflag++; }
@@ -1341,7 +1314,8 @@ static void CmiStdoutInit(void) {
 #if 0 /*Keep writes from blocking.  This just drops excess output, which is bad.*/
                CmiEnableNonblockingIO(srcFd);
 #endif
-#if CMK_SHARED_VARS_UNAVAILABLE
+//NOTSURE #if CMK_SHARED_VARS_UNAVAILABLE
+#if !CMK_SMP 
                 if (Cmi_asyncio)
                {
   /*No communication thread-- get a SIGIO on each write(), which keeps the buffer clean*/
@@ -1511,7 +1485,8 @@ static void node_addresses_obtain(char **argv)
        ChMessage_new("nodeinfo",sizeof(ChSingleNodeinfo),&nodetabmsg);
        fakeTab=(ChSingleNodeinfo *)(nodetabmsg.data);
        CmiGetArgIntDesc(argv,"+p",&npes,"Set the number of processes to create");
-#if CMK_SHARED_VARS_UNAVAILABLE
+//#if CMK_SHARED_VARS_UNAVAILABLE
+#if !CMK_SMP 
        if (npes!=1) {
                fprintf(stderr,
                        "To use multiple processors, you must run this program as:\n"
index 953f5ee98576acb25043fb740ba234c49b2aa3e1..ff2fec20cd39d4cf1e3075a72161678496d6095a 100644 (file)
@@ -2578,7 +2578,7 @@ void CkMessageWatcherInit(char **argv,CkCoreState *ck) {
            forceReplay = true;
            CpdSetInitializeMemory(1);
            // Set the parameters of the processor
-#if CMK_SHARED_VARS_UNAVAILABLE
+#if !CMK_SMP
            _Cmi_mype = atoi(procs);
            while (procs[0]!='/') procs++;
            procs++;
index f0072137f7c6cba6bd084b516df5f53c249101cc..5dc86b339a8c34b7427e2ae262222826e4c5c341 100644 (file)
@@ -405,7 +405,7 @@ extern CmiNodeLock CmiMemLock_lock;
 
 #endif
 
-#if CMK_SHARED_VARS_UNAVAILABLE   /* non-SMP version */
+#if !CMK_SMP /* non-SMP version */
 
 typedef int CmiImmediateLockType;
 extern int _immediateLock;