bug fix in multicore Bamboo, TILERZ_LINUX mode now works for 56 cores
authorjzhou <jzhou>
Thu, 18 Mar 2010 22:15:37 +0000 (22:15 +0000)
committerjzhou <jzhou>
Thu, 18 Mar 2010 22:15:37 +0000 (22:15 +0000)
Robust/src/Runtime/multicoreruntime.h
Robust/src/Runtime/multicoretask.c

index e9a44c6153e0647f8509c4b0eccf274ccca79c1d..d8be4b5c37b768416582ec561d899517f573170d 100644 (file)
@@ -494,8 +494,9 @@ void outputProfileData();
 // BAMBOO_COORDS(c, x, y): convert the cpu # to coords (*x, *y)            //
 // BAMBOO_DEBUGPRINT(x): print out integer x                               //
 // BAMBOO_DEBUGPRINT_REG(x): print out value of variable x                 //
-// BAMBOO_EXIT(x): exit routine                                            //
-// BAMBOO_DIE(x): error exit routine                                       //
+// BAMBOO_EXIT_APP(x): exit the whole application                          //
+// BAMBOO_EXIT(x): error exit routine with error #                         //
+// BAMBOO_DIE(x): error exit routine with error msg                        //
 // BAMBOO_GET_EXE_TIME(): rountine to get current clock cycle number       //
 // BAMBOO_MSG_AVAIL(): checking if there are msgs coming in                //
 // BAMBOO_GCMSG_AVAIL(): checking if there are gcmsgs coming in            //
index aaa092c349f6fdebf967f6ad41945c3a85c2c545..5e8281f6f0b72532b5a9a50dcd53ce9068d502bc 100644 (file)
@@ -390,13 +390,15 @@ void checkCoreStatus() {
                                        BAMBOO_DEBUGPRINT(0xee05);
 #endif
                                        corestatus[BAMBOO_NUM_OF_CORE] = 1;
+                                       waitconfirm = true;
+                                       numconfirm = NUMCORESACTIVE - 1;
+                                       BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
                                        for(i = 1; i < NUMCORESACTIVE; ++i) {   
                                                corestatus[i] = 1;
                                                // send status confirm msg to core i
                                                send_msg_1(i, STATUSCONFIRM);
                                        } // for(i = 1; i < NUMCORESACTIVE; ++i)
-                                       waitconfirm = true;
-                                       numconfirm = NUMCORESACTIVE - 1;
+                                       return;
                                } else {
                                        // all the core status info are the latest
                                        // terminate; for profiling mode, send request to all
@@ -455,6 +457,7 @@ void checkCoreStatus() {
                                                        while(halt--) {
                                                        }
                                                } else {
+                                                       BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
                                                        break;
                                                } // if(!allStall)
                                        } // while(true)
@@ -467,6 +470,7 @@ void checkCoreStatus() {
 #endif // #ifdef GC_PROFILE
 #endif // #ifdef MULTICORE_GC
                                        disruntimedata();
+                                       BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();
                                        terminate(); // All done.
                                } // if(!waitconfirm)
                        } else {
@@ -1895,8 +1899,8 @@ INLINE void processmsg_statusconfirm_I() {
                // cache the msg first
                //if(isMsgSending) {
                        cache_msg_5(STARTUPCORE, STATUSREPORT, 
-                                                                       busystatus?1:0, BAMBOO_NUM_OF_CORE,
-                                                                       self_numsendobjs, self_numreceiveobjs);
+                                               busystatus?1:0, BAMBOO_NUM_OF_CORE,
+                                               self_numsendobjs, self_numreceiveobjs);
                /*} else {
                        send_msg_5(STARTUPCORE, STATUSREPORT, busystatus?1:0, 
                                                                 BAMBOO_NUM_OF_CORE, self_numsendobjs, 
@@ -1943,7 +1947,7 @@ INLINE void processmsg_terminate_I() {
 #endif
 #endif
        disruntimedata();
-       BAMBOO_EXIT(0);
+       BAMBOO_EXIT_APP(0);
 }
 
 INLINE void processmsg_memrequest_I() {