void chpl_comm_ofi_oob_bcast(void* buf, size_t size) { DBG_PRINTF(DBG_OOB, "OOB bcast: %zd", size); PMI_CHK(PMI_Bcast(buf, size)); }
/****************** * Initialization routine * currently just testing start up * ****************/ void CmiInitPxshm(char **argv){ char *env; MACHSTATE(3,"CminitPxshm start"); pxshmContext = (PxshmContext *)calloc(1,sizeof(PxshmContext)); calculateNodeSizeAndRank(argv); if(pxshmContext->nodesize == 1) return; MACHSTATE1(3,"CminitPxshm %d calculateNodeSizeAndRank",pxshmContext->nodesize); env = getenv("CHARM_PXSHM_POOL_SIZE"); if (env) { SHMBUFLEN = CmiReadSize(env); } env = getenv("CHARM_PXSHM_MESSAGE_MAX_SIZE"); if (env) { SHMMAXSIZE = CmiReadSize(env); } if (SHMMAXSIZE > SHMBUFLEN) CmiAbort("Error> Pxshm pool size is set too small in env variable CHARM_PXSHM_POOL_SIZE"); SENDQSTARTSIZE = 32 * pxshmContext->nodesize; if (_Cmi_mynode == 0) printf("Charm++> pxshm enabled: %d cores per node, buffer size: %.1fMB\n", pxshmContext->nodesize, SHMBUFLEN/1024.0/1024.0); #if CMK_CRAYXE || CMK_CRAYXC srand(getpid()); int Cmi_charmrun_pid = rand(); PMI_Bcast(&Cmi_charmrun_pid, sizeof(int)); snprintf(&(pxshmContext->prefixStr[0]),PREFIXSTRLEN-1,"charm_pxshm_%d",Cmi_charmrun_pid); #endif MACHSTATE2(3,"CminitPxshm %s %d pre setupSharedBuffers",pxshmContext->prefixStr,pxshmContext->nodesize); setupSharedBuffers(); MACHSTATE2(3,"CminitPxshm %s %d setupSharedBuffers",pxshmContext->prefixStr,pxshmContext->nodesize); initAllSendQs(); MACHSTATE2(3,"CminitPxshm %s %d initAllSendQs",pxshmContext->prefixStr,pxshmContext->nodesize); MACHSTATE2(3,"CminitPxshm %s %d done",pxshmContext->prefixStr,pxshmContext->nodesize); #if PXSHM_STATS pxshmContext->sendCount=0; pxshmContext->sendTime=0.0; pxshmContext->validCheckCount=0; pxshmContext->validCheckTime=0.0; pxshmContext->commServerTime = 0; pxshmContext->lockRecvCount = 0; #endif signal(SIGSEGV, cleanupOnAllSigs); signal(SIGFPE, cleanupOnAllSigs); signal(SIGILL, cleanupOnAllSigs); signal(SIGTERM, cleanupOnAllSigs); signal(SIGABRT, cleanupOnAllSigs); signal(SIGQUIT, cleanupOnAllSigs); signal(SIGBUS, cleanupOnAllSigs); signal(SIGINT, cleanupOnAllSigs); signal(SIGTRAP, cleanupOnAllSigs); #if 0 char name[64]; gethostname(name,64); printf("[%d] name: %s\n", myrank, name); #endif };