Cleanup #1980: Remove old RDMA API from Converse, netlrts & verbs 62/4662/4
authorNitin Bhat <nbhat4@illinois.edu>
Mon, 8 Oct 2018 16:57:37 +0000 (12:57 -0400)
committerNitin Bhat <nbhat4@illinois.edu>
Mon, 17 Dec 2018 18:40:19 +0000 (12:40 -0600)
This patch removes conv-onesided.{h,c} and its dependencies

Change-Id: Ie5449c6d930a6d55f4d6234eac01238bd2bf60c8

src/arch/multicore-linux-ppc/conv-mach.h
src/arch/netlrts-linux/conv-mach.h
src/arch/netlrts/machine.C
src/arch/verbs/machine.C
src/conv-core/conv-onesided.c [deleted file]
src/conv-core/conv-onesided.h [deleted file]
src/conv-core/converse.h

index 6b1d26f33afa02ed06c086d811d93f7be569fa9b..cfaea66aa933a1cd27458f15fefa2e3a2ad908c3 100644 (file)
@@ -57,9 +57,6 @@
 
 #define CMK_STACKSIZE_DEFAULT                              65536
 
-#define __ONESIDED_IMPL 1
-#define __ONESIDED_NO_HARDWARE  1
-
 /*#define CMK_MMAP_PROBE                                      1 */
 
 /*#define CMK_PCQUEUE_LOCK                                   1  */
index 6f71bab415eb7a28d5db603ec95c54e76663a6d0..4b95a0794fb3de0d982b7740b07b1c4e9a46c176 100644 (file)
 
 #define CMK_LBDB_ON                                       1
 
-#define __ONESIDED_IMPL 1
-
-#define __ONESIDED_NO_HARDWARE  1
-
 #endif
 
 
index 6370bff5686867e6a9eeaf905d89bff6cacc6259..cace043681a7b8b76c0d82e1849adcc5e0ac8f15 100644 (file)
@@ -265,16 +265,6 @@ int _kq = -1;
 
 #define PRINTBUFSIZE 16384
 
-#ifdef __ONESIDED_IMPL
-#ifdef __ONESIDED_NO_HARDWARE
-int putSrcHandler;
-int putDestHandler;
-int getSrcHandler;
-int getDestHandler;
-#include "conv-onesided.c"
-#endif
-#endif
-
 #include "machine-rdma.h"
 #if CMK_ONESIDED_IMPL
 #include "machine-onesided.h"
@@ -1939,15 +1929,6 @@ void LrtsPostCommonInit(int everReturn)
        CMK_RANDOMLY_CORRUPT_MESSAGES,rand());
 #endif
 
-#ifdef __ONESIDED_IMPL
-#ifdef __ONESIDED_NO_HARDWARE
-  putSrcHandler = CmiRegisterHandler((CmiHandler)handlePutSrc);
-  putDestHandler = CmiRegisterHandler((CmiHandler)handlePutDest);
-  getSrcHandler = CmiRegisterHandler((CmiHandler)handleGetSrc);
-  getDestHandler = CmiRegisterHandler((CmiHandler)handleGetDest);
-#endif
-#endif
-    
 }
 
 void LrtsExit(int exitcode)
index 4000e84475c937e14fee6335486b058461a9056f..57972a044d23eb2d2b2cb19eee03edb92d250d77 100644 (file)
@@ -268,16 +268,6 @@ int _kq = -1;
 
 #define PRINTBUFSIZE 16384
 
-#ifdef __ONESIDED_IMPL
-#ifdef __ONESIDED_NO_HARDWARE
-int putSrcHandler;
-int putDestHandler;
-int getSrcHandler;
-int getDestHandler;
-#include "conv-onesided.c"
-#endif
-#endif
-
 static void CommunicationServerNet(int withDelayMs, int where);
 //static void CommunicationServer(int withDelayMs);
 
@@ -1935,16 +1925,6 @@ void LrtsPostCommonInit(int everReturn)
     CmiPrintf("Charm++: Machine layer will randomly corrupt every %d'th message (rand %d)\n",
        CMK_RANDOMLY_CORRUPT_MESSAGES,rand());
 #endif
-
-#ifdef __ONESIDED_IMPL
-#ifdef __ONESIDED_NO_HARDWARE
-  putSrcHandler = CmiRegisterHandler((CmiHandler)handlePutSrc);
-  putDestHandler = CmiRegisterHandler((CmiHandler)handlePutDest);
-  getSrcHandler = CmiRegisterHandler((CmiHandler)handleGetSrc);
-  getDestHandler = CmiRegisterHandler((CmiHandler)handleGetDest);
-#endif
-#endif
-    
 }
 
 void LrtsExit(int exitcode)
diff --git a/src/conv-core/conv-onesided.c b/src/conv-core/conv-onesided.c
deleted file mode 100644 (file)
index da31af1..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * The emulated version of Get/Put in converse for 
- * messaging hardware that does not have hardware 
- * support for one sided communication
- * Author: Nilesh
- * Date: 05/17/2006
- */
-#include "conv-onesided.h"
-
-#ifdef __ONESIDED_IMPL
-#ifdef __ONESIDED_NO_HARDWARE
-
-#ifndef _CONV_ONESIDED_C_
-#define _CONV_ONESIDED_C_
-
-struct CmiCb {
-  CmiRdmaCallbackFn fn;
-  void *param;
-};
-typedef struct CmiCb CmiCb;
-
-/* This is an object which is kindof a handle to a get or put call.
- * This object is polled in test to verify if the get/put has completed.
- * The completed bit is always set if the operation is complete
- */
-struct CmiRMA {
-  int type;
-  union {
-    int completed;
-    CmiCb *cb;
-  } ready;
-};
-typedef struct CmiRMA CmiRMA;
-
-struct CmiRMAMsg {
-  char core[CmiMsgHeaderSizeBytes];
-  CmiRMA* stat;
-};
-typedef struct CmiRMAMsg CmiRMAMsg;
-
-struct RMAPutMsg {
-  char core[CmiMsgHeaderSizeBytes];
-  void *Saddr;
-  void *Taddr;
-  unsigned int size;
-  unsigned int targetId;
-  unsigned int sourceId;
-  CmiRMA *stat;
-};
-typedef struct RMAPutMsg RMAPutMsg;
-
-int CmiRegisterMemory(void *addr, unsigned int size){
-  //in the emulated version, this is blank
-  return 1;
-}
-
-int CmiUnRegisterMemory(void *addr, unsigned int size){
-  //in the emulated version, this is blank
-  return 1;
-}
-
-void handlePutSrc(void *msg) {
-  CmiRMA* stat = ((CmiRMAMsg*)msg)->stat;
-  if(stat->type==1) {
-    stat->ready.completed = 1;
-    //the handle is active, and the user will clean it
-  }
-  else {
-    (*(stat->ready.cb->fn))(stat->ready.cb->param);
-    CmiFree(stat->ready.cb);
-    CmiFree(stat); //clean up the internal handle
-  }
-  CmiFree(msg);
-  return;
-}
-
-void handlePutDest(void *msg) {
-  RMAPutMsg *context = (RMAPutMsg*)msg;
-  void* putdata = (void*)(((char*)(msg))+sizeof(RMAPutMsg));
-  unsigned int sizeRmaStat = sizeof(CmiRMAMsg);
-  void *msgRmaStat;
-  //copy the message
-  memcpy(context->Taddr,putdata,context->size);
-  //send the ack
-  msgRmaStat = (void*)CmiAlloc(sizeRmaStat);
-  ((CmiRMAMsg*)msgRmaStat)->stat = context->stat;
-  CmiSetHandler(msgRmaStat,putSrcHandler);
-  CmiSyncSendAndFree(context->sourceId,sizeRmaStat,(char*)msgRmaStat);
-
-  CmiFree(msg);
-  return;
-}
-
-void *CmiPut(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size) {
-  unsigned int sizeRma = sizeof(RMAPutMsg)+size;
-  void *msgRma = (void*)CmiAlloc(sizeRma);
-  RMAPutMsg *context = (RMAPutMsg*)msgRma;
-
-  context->Saddr = Saddr;
-  context->Taddr = Taddr;
-  context->size = size;
-  context->targetId = targetId;
-  context->sourceId = sourceId;
-  context->stat = (CmiRMA*)CmiAlloc(sizeof(CmiRMA));
-  context->stat->type = 1;
-  context->stat->ready.completed = 0;
-  void* putdata = (void*)(((char*)(msgRma))+sizeof(RMAPutMsg));
-  memcpy(putdata,Saddr,size);
-  void *stat = context->stat;
-
-  CmiSetHandler(msgRma,putDestHandler);
-  CmiSyncSendAndFree(targetId,sizeRma,(char*)msgRma);
-
-  return stat;
-}
-
-void CmiPutCb(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size, CmiRdmaCallbackFn fn, void *param) {
-  unsigned int sizeRma = sizeof(RMAPutMsg)+size;
-  void *msgRma = (void*)CmiAlloc(sizeRma);
-  RMAPutMsg *context = (RMAPutMsg*)msgRma;
-
-  context->Saddr = Saddr;
-  context->Taddr = Taddr;
-  context->size = size;
-  context->targetId = targetId;
-  context->sourceId = sourceId;
-  context->stat = (CmiRMA*)CmiAlloc(sizeof(CmiRMA));
-  context->stat->type = 0;
-  context->stat->ready.cb = (CmiCb*)CmiAlloc(sizeof(CmiCb));
-  context->stat->ready.cb->fn = fn;
-  context->stat->ready.cb->param = param;
-  void* putdata = (void*)(((char*)(msgRma))+sizeof(RMAPutMsg));
-  memcpy(putdata,Saddr,size);
-
-  CmiSetHandler(msgRma,putDestHandler);
-  CmiSyncSendAndFree(targetId,sizeRma,(char*)msgRma);
-  return;
-}
-
-void handleGetSrc(void *msg) {
-  RMAPutMsg *context = (RMAPutMsg*)msg;
-  void* putdata = (void*)(((char*)(msg))+sizeof(RMAPutMsg));
-  //copy the message
-  memcpy(context->Saddr,putdata,context->size);
-  //note the ack
-  if(context->stat->type==1) {
-    context->stat->ready.completed = 1;
-    //the handle will be used still, and the user will clean it
-  }
-  else {
-    (*(context->stat->ready.cb->fn))(context->stat->ready.cb->param);
-    CmiFree(context->stat->ready.cb);
-    CmiFree(context->stat); //clean up the internal handle
-  }
-  CmiFree(msg);
-  return;
-}
-
-void handleGetDest(void *msg) {
-  RMAPutMsg *context1 = (RMAPutMsg*)msg;
-  unsigned int sizeRma = sizeof(RMAPutMsg)+context1->size;
-  void *msgRma = (void*)CmiAlloc(sizeRma);
-  RMAPutMsg *context = (RMAPutMsg*)msgRma;
-  memcpy(context,context1,sizeof(RMAPutMsg));
-  void* putdata = (void*)(((char*)(msgRma))+sizeof(RMAPutMsg));
-  memcpy(putdata,context->Taddr,context->size);
-  CmiSetHandler(msgRma,getSrcHandler);
-  CmiSyncSendAndFree(context->sourceId,sizeRma,(char*)msgRma);
-  CmiFree(msg);
-  return;
-}
-
-void *CmiGet(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size) {
-  unsigned int sizeRma;
-  char *msgRma;
-  RMAPutMsg *context;
-  sizeRma = sizeof(RMAPutMsg);
-  msgRma = (char*)CmiAlloc(sizeRma*sizeof(char));
-
-  context = (RMAPutMsg*)msgRma;
-  context->Saddr = Saddr;
-  context->Taddr = Taddr;
-  context->size = size;
-  context->targetId = targetId;
-  context->sourceId = sourceId;
-  context->stat = (CmiRMA*)CmiAlloc(sizeof(CmiRMA));
-  context->stat->type = 1;
-  context->stat->ready.completed = 0;
-  void *stat = context->stat;
-
-  CmiSetHandler(msgRma,getDestHandler);
-  CmiSyncSendAndFree(targetId,sizeRma,msgRma);
-  return stat;
-}
-
-void CmiGetCb(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size, CmiRdmaCallbackFn fn, void *param) {
-  unsigned int sizeRma;
-  char *msgRma;
-  RMAPutMsg *context;
-  sizeRma = sizeof(RMAPutMsg);
-  msgRma = (char*)CmiAlloc(sizeRma*sizeof(char));
-
-  context = (RMAPutMsg*)msgRma;
-  context->Saddr = Saddr;
-  context->Taddr = Taddr;
-  context->size = size;
-  context->targetId = targetId;
-  context->sourceId = sourceId;
-  context->stat = (CmiRMA*)CmiAlloc(sizeof(CmiRMA));
-  context->stat->type = 0;
-  context->stat->ready.cb = (CmiCb*)CmiAlloc(sizeof(CmiCb));
-  context->stat->ready.cb->fn = fn;
-  context->stat->ready.cb->param = param;
-
-  CmiSetHandler(msgRma,getDestHandler);
-  CmiSyncSendAndFree(targetId,sizeRma,msgRma);
-  return;
-}
-
-
-int CmiWaitTest(void *obj){
-  CmiRMA *stat = (CmiRMA*)obj;
-  return stat->ready.completed;
-}
-
-#endif
-#endif
-#endif
-
diff --git a/src/conv-core/conv-onesided.h b/src/conv-core/conv-onesided.h
deleted file mode 100644 (file)
index 779f60d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This is a one sided communication model to support 
- * Get/Put like communiation in converse
- * Author: Nilesh
- * Date: 05/17/2006
- */
-#include "converse.h"
-#ifdef __ONESIDED_IMPL
-
-#ifndef _CONV_ONESIDED_H_
-#define _CONV_ONESIDED_H_
-
-typedef void (*CmiRdmaCallbackFn)(void *param);
-
-#ifdef __ONESIDED_GM_HARDWARE
-void *CmiDMAAlloc(int size);
-#endif
-
-int CmiRegisterMemory(void *addr, unsigned int size);
-int CmiUnRegisterMemory(void *addr, unsigned int size);
-
-
-/* Version of One sided communication when there is no callback,
- * so a handle is returned which needs to polled to check for completion
- * of the operation.
- */
-void *CmiPut(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size);
-void *CmiGet(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size);
-int CmiWaitTest(void *obj);
-
-
-/* Version of One sided communication when there is a callback
- * immediately when the operation finishes. So, there is no need
- * to poll for completion of the operation.
- */
-void CmiPutCb(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size, CmiRdmaCallbackFn fn, void *param);
-void CmiGetCb(unsigned int sourceId, unsigned int targetId, void *Saddr, void *Taddr, unsigned int size, CmiRdmaCallbackFn fn, void *param);
-
-#endif
-#endif
-
index 97d1b902d13605d7c7a21b4a0eed58ee14d6bf3a..cb6d9153b1ebe61495c6be2b342198173d948ea1 100644 (file)
@@ -2154,9 +2154,6 @@ extern void setMemoryTypeMessage(void*); /* for memory debugging */
 #if CMK_CELL
 #include "cell-api.h"
 #endif
-#ifdef __ONESIDED_IMPL
-#include "conv-onesided.h"
-#endif
 
 #include "conv-rdma.h"