added abort because of too much smsg mailbox
authorYanhua Sun <yanhuas@jyc1.(none)>
Thu, 15 Mar 2012 04:14:27 +0000 (23:14 -0500)
committerYanhua Sun <yanhuas@jyc1.(none)>
Thu, 15 Mar 2012 04:14:27 +0000 (23:14 -0500)
src/arch/gemini_gni/machine.c

index df78445f414e4a681e8df3e70210ddf67f0372b9..0ed34cec4c2c1a4c3d25716fa10cbbc7c1dbaad2 100644 (file)
@@ -1617,6 +1617,11 @@ static void set_limit()
         MAX_BUFF_SEND = MAX_REG_MEM / 2;
         if (CmiMyPe() == 0)
            printf("mem_max = %lld, send_max =%lld\n", MAX_REG_MEM, MAX_BUFF_SEND);
+        if(CmiMyPe() == 0 && (smsg_memlen*mysize + _expand_mem > MAX_BUFF_SEND ||  smsg_memlen*mysize + _mempool_size > MAX_BUFF_SEND))
+        {
+             printf("Charm++> FATAL ERROR your program has risk of hanging \n please try large page or use Dynamic smsg +useDynamicSmsg or contact Charm++ developers\n");
+             CmiAbort("memory registration\n");
+        }
     }
 }