00001
00002
00003
00004
00011 #include <ctype.h>
00012 #include <errno.h>
00013 #include <fcntl.h>
00014 #include <limits.h>
00015 #include <signal.h>
00016 #include <stdarg.h>
00017 #include <stdio.h>
00018 #include <stdlib.h>
00019 #include <string.h>
00020 #include <sys/time.h>
00021
00022 #include "converse.h"
00023
00024 #define VMI_DEVICENAME "converse"
00025 #undef PACKAGE_BUGREPORT
00026 #undef PACKAGE_NAME
00027 #undef PACKAGE_STRING
00028 #undef PACKAGE_TARNAME
00029 #undef PACKAGE_VERSION
00030
00031 #include "vmi.h"
00032
00033
00034 #define CMI_VMI_OPTIMIZE 0
00035
00036
00037
00038
00039
00040 #define CMI_VMI_WAN_LATENCY 1000
00041 #define CMI_VMI_PROBE_CLUSTERS 0
00042 #define CMI_VMI_GRID_QUEUE 0
00043 #define CMI_VMI_GRID_QUEUE_MAXIMUM 100
00044 #define CMI_VMI_GRID_QUEUE_INTERVAL 0
00045 #define CMI_VMI_GRID_QUEUE_THRESHOLD 0
00046 #define CMI_VMI_MEMORY_POOL 1
00047 #define CMI_VMI_TERMINATE_VMI_HACK 1
00048 #define CMI_VMI_CONNECTION_TIMEOUT 300
00049 #define CMI_VMI_MAXIMUM_HANDLES 10000
00050 #define CMI_VMI_SMALL_MESSAGE_BOUNDARY 2048
00051 #define CMI_VMI_MEDIUM_MESSAGE_BOUNDARY 16384
00052 #define CMI_VMI_EAGER_PROTOCOL 0
00053 #define CMI_VMI_EAGER_INTERVAL 10000
00054 #define CMI_VMI_EAGER_THRESHOLD 1000
00055 #define CMI_VMI_EAGER_SHORT_POLLSET_SIZE_MAXIMUM 32
00056 #define CMI_VMI_EAGER_SHORT_SLOTS 16
00057 #define CMI_VMI_EAGER_SHORT_MESSAGE_BOUNDARY 16384
00058 #define CMI_VMI_EAGER_LONG_BUFFERS 3
00059 #define CMI_VMI_EAGER_LONG_BUFFER_SIZE 1048576
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 #if CMI_VMI_OPTIMIZE
00070 #define CMI_VMI_CHECK_SUCCESS(status,message)
00071 #else
00072 #define CMI_VMI_CHECK_SUCCESS(status,message) \
00073 if (!VMI_SUCCESS (status)) { \
00074 VMI_perror (message, status); \
00075 }
00076 #endif
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 #define CONTEXTFIELD(m) (((CMI_VMI_Memory_Chunk_T *)(m))[-1].context)
00090
00091 typedef struct
00092 {
00093 void *context;
00094 CmiChunkHeader chunk_header;
00095 } CMI_VMI_Memory_Chunk_T;
00096
00097 #define CMI_VMI_EAGER_SHORT_SENTINEL_READY 0
00098 #define CMI_VMI_EAGER_SHORT_SENTINEL_DATA 1
00099 #define CMI_VMI_EAGER_SHORT_SENTINEL_RECEIVED 2
00100 #define CMI_VMI_EAGER_SHORT_SENTINEL_FREE 3
00101
00102 typedef struct
00103 {
00104 unsigned short msgsize;
00105 unsigned short sentinel;
00106 } CMI_VMI_Eager_Short_Slot_Footer_T;
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116 #define CMI_VMI_BUCKET1_SIZE 1024
00117 #define CMI_VMI_BUCKET2_SIZE 2048
00118 #define CMI_VMI_BUCKET3_SIZE 4096
00119 #define CMI_VMI_BUCKET4_SIZE 8192
00120 #define CMI_VMI_BUCKET5_SIZE 16384
00121
00122 #define CMI_VMI_BUCKET1_PREALLOCATE 128
00123 #define CMI_VMI_BUCKET1_GROW 128
00124
00125 #define CMI_VMI_BUCKET2_PREALLOCATE 128
00126 #define CMI_VMI_BUCKET2_GROW 128
00127
00128 #define CMI_VMI_BUCKET3_PREALLOCATE 128
00129 #define CMI_VMI_BUCKET3_GROW 128
00130
00131 #define CMI_VMI_BUCKET4_PREALLOCATE 128
00132 #define CMI_VMI_BUCKET4_GROW 128
00133
00134 #define CMI_VMI_BUCKET5_PREALLOCATE 128
00135 #define CMI_VMI_BUCKET5_GROW 128
00136
00137
00138
00139
00140
00141
00142
00143 #define CMI_VMI_STARTUP_TYPE_UNKNOWN 0
00144 #define CMI_VMI_STARTUP_TYPE_CRM 1
00145 #define CMI_VMI_STARTUP_TYPE_CHARMRUN 2
00146
00147
00148
00149
00150
00151 #define CMI_VMI_CRM_PORT 7777
00152
00153 #define CMI_VMI_CRM_MESSAGE_SUCCESS 0
00154 #define CMI_VMI_CRM_MESSAGE_FAILURE 1
00155 #define CMI_VMI_CRM_MESSAGE_REGISTER 2
00156
00157 #define CMI_VMI_CRM_ERROR_CONFLICT 0
00158 #define CMI_VMI_CRM_ERROR_TIMEOUT 1
00159
00160 typedef struct CMI_VMI_CRM_Register_Message_T
00161 {
00162 int numpes;
00163 int cluster;
00164 int node_context;
00165 int key_length;
00166 char key[1024];
00167 } CMI_VMI_CRM_Register_Message_T;
00168
00169 typedef struct CMI_VMI_CRM_Nodeblock_Message_T
00170 {
00171 int node_IP;
00172 int node_context;
00173 int cluster;
00174 } CMI_VMI_CRM_Nodeblock_Message_T;
00175
00176
00177
00178
00179
00180 typedef struct CMI_VMI_Charmrun_Message_Header_T
00181 {
00182 int msg_len;
00183 char msg_type[12];
00184 } CMI_VMI_Charmrun_Message_Header_T;
00185
00186 typedef struct CMI_VMI_Charmrun_Register_Message_T
00187 {
00188 int node_number;
00189 int numpes;
00190 int dataport;
00191 int mach_id;
00192 int node_IP;
00193 } CMI_VMI_Charmrun_Register_Message_T;
00194
00195 typedef struct CMI_VMI_Charmrun_Nodeblock_Message_T
00196 {
00197 int numpes;
00198 int dataport;
00199 int mach_id;
00200 int node_IP;
00201 } CMI_VMI_Charmrun_Nodeblock_Message_T;
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212 #define CMI_VMI_LATENCY_UNKNOWN LONG_MAX
00213 #define CMI_VMI_CLUSTER_UNKNOWN -1
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249 #define CMI_VMI_MESSAGE_TYPE(msg) ((CmiMsgHeaderBasic *)msg)->vmitype
00250 #define CMI_VMI_MESSAGE_CREDITS(msg) ((CmiMsgHeaderBasic *)msg)->vmicredits
00251
00252 #define CMI_VMI_MESSAGE_TYPE_UNKNOWN 0
00253 #define CMI_VMI_MESSAGE_TYPE_STANDARD 1
00254 #define CMI_VMI_MESSAGE_TYPE_BARRIER 2
00255 #define CMI_VMI_MESSAGE_TYPE_PERSISTENT_REQUEST 3
00256 #define CMI_VMI_MESSAGE_TYPE_CREDIT 4
00257 #define CMI_VMI_MESSAGE_TYPE_LATENCY_VECTOR_REQUEST 5
00258 #define CMI_VMI_MESSAGE_TYPE_LATENCY_VECTOR_REPLY 6
00259 #define CMI_VMI_MESSAGE_TYPE_CLUSTER_MAPPING 7
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287 typedef struct
00288 {
00289 int rank;
00290 } CMI_VMI_Connect_Message_T;
00291
00292 typedef struct
00293 {
00294 char header[CmiMsgHeaderSizeBytes];
00295 } CMI_VMI_Barrier_Message_T;
00296
00297 typedef struct
00298 {
00299 char header[CmiMsgHeaderSizeBytes];
00300 int maxsize;
00301 } CMI_VMI_Persistent_Request_Message_T;
00302
00303 typedef struct
00304 {
00305 char header[CmiMsgHeaderSizeBytes];
00306 } CMI_VMI_Credit_Message_T;
00307
00308 typedef struct
00309 {
00310 char header[CmiMsgHeaderSizeBytes];
00311 } CMI_VMI_Latency_Vector_Request_Message_T;
00312
00313 typedef struct
00314 {
00315 char header[CmiMsgHeaderSizeBytes];
00316 unsigned long latency[1];
00317 } CMI_VMI_Latency_Vector_Reply_Message_T;
00318
00319 typedef struct
00320 {
00321 char header[CmiMsgHeaderSizeBytes];
00322 int cluster[1];
00323 } CMI_VMI_Cluster_Mapping_Message_T;
00324
00325
00326
00327 typedef enum
00328 {
00329 CMI_VMI_PUBLISH_TYPE_GET,
00330 CMI_VMI_PUBLISH_TYPE_EAGER_SHORT,
00331 CMI_VMI_PUBLISH_TYPE_EAGER_LONG
00332 } CMI_VMI_Publish_Type_T;
00333
00334 typedef struct
00335 {
00336 CMI_VMI_Publish_Type_T type;
00337 } CMI_VMI_Publish_Message_T;
00338
00339
00340
00341
00342
00343
00344
00345
00346 typedef enum
00347 {
00348 CMI_VMI_HANDLE_TYPE_SEND,
00349 CMI_VMI_HANDLE_TYPE_RECEIVE
00350 } CMI_VMI_Handle_Type_T;
00351
00352 typedef enum
00353 {
00354 CMI_VMI_SEND_HANDLE_TYPE_STREAM,
00355 CMI_VMI_SEND_HANDLE_TYPE_RDMAGET,
00356 CMI_VMI_SEND_HANDLE_TYPE_RDMABROADCAST,
00357 CMI_VMI_SEND_HANDLE_TYPE_EAGER_SHORT,
00358 CMI_VMI_SEND_HANDLE_TYPE_EAGER_LONG
00359 } CMI_VMI_Send_Handle_Type_T;
00360
00361 typedef enum
00362 {
00363 CMI_VMI_MESSAGE_DISPOSITION_NONE,
00364 CMI_VMI_MESSAGE_DISPOSITION_FREE,
00365 CMI_VMI_MESSAGE_DISPOSITION_ENQUEUE
00366 } CMI_VMI_Message_Disposition_T;
00367
00368 typedef struct
00369 {
00370 PVMI_CACHE_ENTRY cacheentry;
00371 } CMI_VMI_Send_Handle_Stream_T;
00372
00373 typedef struct
00374 {
00375 PVMI_CACHE_ENTRY cacheentry;
00376 int publishes_pending;
00377 } CMI_VMI_Send_Handle_RDMAGet_T;
00378
00379 typedef struct
00380 {
00381 PVMI_CACHE_ENTRY cacheentry;
00382 int publishes_pending;
00383 } CMI_VMI_Send_Handle_RDMABroadcast_T;
00384
00385 typedef struct
00386 {
00387 PVMI_REMOTE_BUFFER remote_buffer;
00388 int offset;
00389 PVMI_CACHE_ENTRY cacheentry;
00390 PVMI_RDMA_OP rdmaop;
00391 } CMI_VMI_Send_Handle_Eager_Short_T;
00392
00393 typedef struct
00394 {
00395 int maxsize;
00396 PVMI_REMOTE_BUFFER remote_buffer;
00397 PVMI_CACHE_ENTRY cacheentry;
00398 } CMI_VMI_Send_Handle_Eager_Long_T;
00399
00400 typedef struct
00401 {
00402 CMI_VMI_Send_Handle_Type_T send_handle_type;
00403 CMI_VMI_Message_Disposition_T message_disposition;
00404
00405 union
00406 {
00407 CMI_VMI_Send_Handle_Stream_T stream;
00408 CMI_VMI_Send_Handle_RDMAGet_T rdmaget;
00409 CMI_VMI_Send_Handle_RDMABroadcast_T rdmabroadcast;
00410 CMI_VMI_Send_Handle_Eager_Short_T eager_short;
00411 CMI_VMI_Send_Handle_Eager_Long_T eager_long;
00412 } data;
00413 } CMI_VMI_Send_Handle_T;
00414
00415 typedef enum
00416 {
00417 CMI_VMI_RECEIVE_HANDLE_TYPE_RDMAGET,
00418 CMI_VMI_RECEIVE_HANDLE_TYPE_EAGER_SHORT,
00419 CMI_VMI_RECEIVE_HANDLE_TYPE_EAGER_LONG
00420 } CMI_VMI_Receive_Handle_Type_T;
00421
00422 typedef struct
00423 {
00424 PVMI_CACHE_ENTRY cacheentry;
00425 void *process;
00426 } CMI_VMI_Receive_Handle_RDMAGet_T;
00427
00428 typedef struct
00429 {
00430 int sender_rank;
00431 char *publish_buffer;
00432 PVMI_CACHE_ENTRY cacheentry;
00433 char *eager_buffer;
00434 CMI_VMI_Eager_Short_Slot_Footer_T *footer;
00435 int publishes_pending;
00436 } CMI_VMI_Receive_Handle_Eager_Short_T;
00437
00438 typedef struct
00439 {
00440 int sender_rank;
00441 int maxsize;
00442 PVMI_CACHE_ENTRY cacheentry;
00443 int publishes_pending;
00444 } CMI_VMI_Receive_Handle_Eager_Long_T;
00445
00446 typedef struct
00447 {
00448 CMI_VMI_Receive_Handle_Type_T receive_handle_type;
00449
00450 union
00451 {
00452 CMI_VMI_Receive_Handle_RDMAGet_T rdmaget;
00453 CMI_VMI_Receive_Handle_Eager_Short_T eager_short;
00454 CMI_VMI_Receive_Handle_Eager_Long_T eager_long;
00455 } data;
00456 } CMI_VMI_Receive_Handle_T;
00457
00458 typedef struct
00459 {
00460 int index;
00461 int refcount;
00462 char *msg;
00463 int msgsize;
00464 CMI_VMI_Handle_Type_T handle_type;
00465
00466 union
00467 {
00468 CMI_VMI_Send_Handle_T send;
00469 CMI_VMI_Receive_Handle_T receive;
00470 } data;
00471 } CMI_VMI_Handle_T;
00472
00473
00474
00475
00476
00477
00478
00479
00480 typedef enum
00481 {
00482 CMI_VMI_CONNECTION_CONNECTING,
00483 CMI_VMI_CONNECTION_CONNECTED,
00484 CMI_VMI_CONNECTION_DISCONNECTING,
00485 CMI_VMI_CONNECTION_DISCONNECTED,
00486 CMI_VMI_CONNECTION_ERROR
00487 } CMI_VMI_Connection_State_T;
00488
00489 typedef struct
00490 {
00491 int rank;
00492 int node_IP;
00493 PVMI_CONNECT connection;
00494 CMI_VMI_Connection_State_T connection_state;
00495 int cluster;
00496
00497 unsigned long *latency_vector;
00498
00499 int normal_short_count;
00500 int normal_long_count;
00501 int eager_short_count;
00502 int eager_long_count;
00503
00504 CMI_VMI_Handle_T *eager_short_send_handles[CMI_VMI_EAGER_SHORT_SLOTS];
00505 int eager_short_send_size;
00506 int eager_short_send_index;
00507 int eager_short_send_credits_available;
00508
00509 CMI_VMI_Handle_T *eager_short_receive_handles[CMI_VMI_EAGER_SHORT_SLOTS];
00510 int eager_short_receive_size;
00511 int eager_short_receive_index;
00512 int eager_short_receive_dirty;
00513 int eager_short_receive_credits_replentish;
00514
00515 CMI_VMI_Handle_T *eager_long_send_handles[CMI_VMI_EAGER_LONG_BUFFERS];
00516 int eager_long_send_size;
00517
00518 CMI_VMI_Handle_T *eager_long_receive_handles[CMI_VMI_EAGER_LONG_BUFFERS];
00519 int eager_long_receive_size;
00520 } CMI_VMI_Process_T;
00521
00522
00523
00524
00525
00526
00527
00528 #if CMK_BROADCAST_SPANNING_TREE
00529 #ifndef CMI_VMI_BROADCAST_SPANNING_FACTOR
00530 #define CMI_VMI_BROADCAST_SPANNING_FACTOR 4
00531 #endif
00532
00533 #define CMI_BROADCAST_ROOT(msg) ((CmiMsgHeaderBasic *)msg)->tree_root
00534 #define CMI_DEST_RANK(msg) ((CmiMsgHeaderBasic *)msg)->tree_rank
00535
00536 #define CMI_SET_BROADCAST_ROOT(msg,tree_root) CMI_BROADCAST_ROOT(msg) = (tree_root);
00537 #endif
00538
00539
00540 #if CMK_GRID_QUEUE_AVAILABLE
00541 typedef struct
00542 {
00543 int gid;
00544 int nInts;
00545 int index1;
00546 int index2;
00547 int index3;
00548 } CMI_VMI_Grid_Object_T;
00549
00550 #define CkMsgAlignmentMask (sizeof(double)-1)
00551 #define CkMsgAlignLength(x) (((x)+CkMsgAlignmentMask)&(~(CkMsgAlignmentMask)))
00552 #define CkMsgAlignOffset(x) (CkMsgAlignLength(x)-(x))
00553
00554 typedef union
00555 {
00556 struct s_chare
00557 {
00558 void *ptr;
00559 unsigned int forAnyPe;
00560 } chare;
00561
00562 struct s_group
00563 {
00564 int g;
00565 int rednMgr;
00566 int epoch;
00567 unsigned short arrayEp;
00568 } group;
00569
00570 struct s_array
00571 {
00572 struct
00573 {
00574 int nInts;
00575 int index[3];
00576 } index;
00577 int listenerData[3];
00578 int arr;
00579 unsigned char hopCount;
00580 unsigned char ifNotThere;
00581 } array;
00582
00583 struct s_roData
00584 {
00585 unsigned int count;
00586 } roData;
00587
00588 struct s_roMsg
00589 {
00590 unsigned int roIdx;
00591 } roMsg;
00592 } CMI_VMI_Envelope_utype;
00593
00594 typedef struct
00595 {
00596 unsigned char msgIdx;
00597 unsigned char mtype;
00598 unsigned char queueing:4;
00599 unsigned char isPacked:1;
00600 unsigned char isUsed:1;
00601 } CMI_VMI_Envelope_sattribs;
00602
00603 typedef struct
00604 {
00605 char core[CmiReservedHeaderSize];
00606 CMI_VMI_Envelope_utype u_type;
00607 unsigned short ref;
00608 CMI_VMI_Envelope_sattribs s_attribs;
00609
00610 unsigned char align[CkMsgAlignOffset(CmiReservedHeaderSize+sizeof(CMI_VMI_Envelope_utype)+sizeof(unsigned short)+sizeof(CMI_VMI_Envelope_sattribs))];
00611
00612
00613
00614 unsigned short priobits;
00615 unsigned short epIdx;
00616 unsigned int pe;
00617 unsigned int event;
00618 unsigned int totalsize;
00619 } CMI_VMI_Envelope;
00620 #endif
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631 void ConverseInit (int argc, char **argv, CmiStartFn start_function, int user_calls_scheduler, int init_returns);
00632 void ConverseExit ();
00633 void CmiAbort (const char *message);
00634
00635 void CmiNotifyIdle ();
00636
00637 void CmiMemLock ();
00638 void CmiMemUnlock ();
00639
00640 void CmiPrintf (const char *format, ...);
00641 void CmiError (const char *format, ...);
00642 int CmiScanf (const char *format, ...);
00643
00644 int CmiBarrier ();
00645 int CmiBarrierZero ();
00646
00647 void CmiSyncSendFn (int destrank, int msgsize, char *msg);
00648 CmiCommHandle CmiAsyncSendFn (int destrank, int msgsize, char *msg);
00649 void CmiFreeSendFn (int destrank, int msgsize, char *msg);
00650
00651 void CmiSyncBroadcastFn (int msgsize, char *msg);
00652 CmiCommHandle CmiAsyncBroadcastFn (int msgsize, char *msg);
00653 void CmiFreeBroadcastFn (int msgsize, char *msg);
00654
00655 void CmiSyncBroadcastAllFn (int msgsize, char *msg);
00656 CmiCommHandle CmiAsyncBroadcastAllFn (int msgsize, char *msg);
00657 void CmiFreeBroadcastAllFn (int msgsize, char *msg);
00658
00659 int CmiAsyncMsgSent (CmiCommHandle commhandle);
00660 int CmiAllAsyncMsgsSent ();
00661 void CmiReleaseCommHandle (CmiCommHandle commhandle);
00662
00663 void *CmiGetNonLocal ();
00664
00665 void CmiProbeLatencies ();
00666 unsigned long CmiGetLatency (int process1, int process2);
00667 int CmiGetCluster (int process);
00668
00669
00670 #if CMK_GRID_QUEUE_AVAILABLE
00671 int CmiGridQueueGetInterval ();
00672 int CmiGridQueueGetThreshold ();
00673 void CmiGridQueueRegister (int gid, int nInts, int index1, int index2, int index3);
00674 void CmiGridQueueDeregister (int gid, int nInts, int index1, int index2, int index3);
00675 void CmiGridQueueDeregisterAll ();
00676 int CmiGridQueueLookup (int gid, int nInts, int index1, int index2, int index3);
00677 int CmiGridQueueLookupMsg (char *msg);
00678 int CMI_VMI_Grid_Objects_Compare (const void *ptr1, const void *ptr2);
00679 #endif
00680
00681 #if CMK_PERSISTENT_COMM
00682 void CmiPersistentInit ();
00683 PersistentHandle CmiCreatePersistent (int destrank, int maxsize);
00684 void CmiUsePersistentHandle (PersistentHandle *handle_array, int array_size);
00685 void CmiDestroyPersistent (PersistentHandle phandle);
00686 void CmiDestroyAllPersistent ();
00687 PersistentReq CmiCreateReceiverPersistent (int maxsize);
00688 PersistentHandle CmiRegisterReceivePersistent (PersistentReq request);
00689 #endif
00690
00691
00692
00693 void CMI_VMI_Read_Environment ();
00694
00695 int CMI_VMI_Startup_CRM ();
00696
00697 int CMI_VMI_Startup_Charmrun ();
00698
00699 int CMI_VMI_Initialize_VMI ();
00700
00701 int CMI_VMI_Terminate_VMI ();
00702
00703
00704
00705 int CMI_VMI_Socket_Send (int sockfd, const void *msg, int size);
00706 int CMI_VMI_Socket_Receive (int sockfd, void *msg, int size);
00707
00708
00709
00710 int CMI_VMI_Open_Connections ();
00711 int CMI_VMI_Open_Connection (int remote_rank, char *remote_key, PVMI_BUFFER connect_message_buffer);
00712 VMI_CONNECT_RESPONSE CMI_VMI_Connection_Handler (PVMI_CONNECT connection, PVMI_SLAB slab, ULONG data_size);
00713 void CMI_VMI_Connection_Response_Handler (PVOID context, PVOID response, USHORT size, PVOID handle, VMI_CONNECT_RESPONSE remote_status);
00714
00715 int CMI_VMI_Close_Connections ();
00716 void CMI_VMI_Disconnection_Handler (PVMI_CONNECT connection);
00717 void CMI_VMI_Disconnection_Response_Handler (PVMI_CONNECT connection, PVOID context, VMI_STATUS remote_status);
00718
00719
00720
00721 void CMI_VMI_Reply_Latencies (int sourcerank);
00722 void CMI_VMI_Compute_Cluster_Mapping ();
00723 void CMI_VMI_Distribute_Cluster_Mapping ();
00724 void CMI_VMI_Wait_Cluster_Mapping ();
00725
00726
00727
00728 void *CMI_VMI_CmiAlloc (int request_size);
00729 void CMI_VMI_CmiFree (void *ptr);
00730
00731 PVMI_CACHE_ENTRY CMI_VMI_CacheEntry_From_Context (void *context);
00732
00733
00734
00735 CMI_VMI_Handle_T *CMI_VMI_Handle_Allocate ();
00736 void CMI_VMI_Handle_Deallocate (CMI_VMI_Handle_T *handle);
00737
00738
00739
00740 void CMI_VMI_Eager_Short_Setup (int sender_rank);
00741 void CMI_VMI_Eager_Long_Setup (int sender_rank, int maxsize);
00742
00743
00744
00745 VMI_RECV_STATUS CMI_VMI_Stream_Notification_Handler (PVMI_CONNECT connection, PVMI_STREAM_RECV stream, VMI_STREAM_COMMAND command, PVOID context, PVMI_SLAB slab);
00746 void CMI_VMI_Stream_Completion_Handler (PVOID context, VMI_STATUS remote_status);
00747
00748 void CMI_VMI_RDMA_Publish_Notification_Handler (PVMI_CONNECT connection, PVMI_REMOTE_BUFFER remote_buffer, PVMI_SLAB publish_data, ULONG publish_data_size);
00749 void CMI_VMI_RDMA_Publish_Completion_Handler (PVOID context, VMI_STATUS remote_status);
00750
00751 void CMI_VMI_RDMA_Put_Notification_Handler (PVMI_CONNECT connection, UINT32 rdma_size, UINT32 context, VMI_STATUS remote_status);
00752 void CMI_VMI_RDMA_Put_Completion_Handler (PVMI_RDMA_OP rdmaop, PVOID context, VMI_STATUS remote_status);
00753
00754 void CMI_VMI_RDMA_Get_Notification_Handler (PVMI_CONNECT connection, UINT32 context, VMI_STATUS remote_status);
00755 void CMI_VMI_RDMA_Get_Completion_Handler (PVMI_RDMA_OP rdmaop, PVOID context, VMI_STATUS remote_status);
00756
00757
00758
00759 #if CMK_BROADCAST_SPANNING_TREE
00760 int CMI_VMI_Spanning_Children_Count (char *msg);
00761 void CMI_VMI_Send_Spanning_Children (int msgsize, char *msg);
00762 #endif
00763
00764
00765
00766 void CMI_VMI_Common_Receive ();
00767