~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/armci/src/include/armcip.h

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: armcip.h,v 1.82.2.9 2007-08-29 17:32:31 manoj Exp $ */
 
2
/* armci private header file */
 
3
#ifndef _ARMCI_P_H
 
4
 
 
5
#define _ARMCI_P_H
 
6
#if HAVE_STDLIB_H
 
7
#   include <stdlib.h>
 
8
#endif
 
9
#include "armci.h"
 
10
#include "parmci.h"
 
11
#include "message.h"
 
12
 
 
13
/*#define ARMCI_PR_DBG(__ARMCI_ST,__ARMCI_NU) \
 
14
        printf("\n%d:%s:%d:%s:%s:%d",armci_me,__FILE__,__LINE__,FUNCTION_NAME,__ARMCI_ST,__ARMCI_NU)*/
 
15
#define ARMCI_PR_DBG(__ARMCI_ST,__ARMCI_NU) 
 
16
 
 
17
#ifdef QUADRICS
 
18
#include <elan/elan.h>
 
19
#ifdef QSNETLIBS_VERSION_CODE
 
20
#ifndef DECOSF
 
21
#  define ELAN_ACC
 
22
#  define PENDING_OPER(x) ARMCI_ACC_INT
 
23
#endif
 
24
 
 
25
#  if QSNETLIBS_VERSION_CODE > QSNETLIBS_VERSION(1,5,0)
 
26
#     define LIBELAN_ATOMICS
 
27
#  endif
 
28
 
 
29
#endif
 
30
extern void armci_elan_fence(int p);
 
31
#endif
 
32
 
 
33
/* we got problems on IA64/Linux64 with Elan if inlining is used */
 
34
#if defined(__GNUC__) && !defined(QUADRICS)
 
35
#   define INLINE inline
 
36
#else
 
37
#   define INLINE
 
38
#endif
 
39
 
 
40
#if HAVE_UNISTD_H
 
41
#   include <unistd.h>
 
42
#elif HAVE_WINDOWS_H
 
43
#   include <windows.h>
 
44
#   define sleep(x) Sleep(100*(x))
 
45
#endif
 
46
 
 
47
#if (defined(SYSV) || defined(WIN32)|| defined(MMAP)) && !defined(NO_SHM) && !defined(HITACHI) && !defined(CATAMOUNT)
 
48
#define CLUSTER
 
49
 
 
50
#ifdef SERVER_THREAD
 
51
#  define SERVER_NODE(c) (armci_clus_info[(c)].master);
 
52
#  define NODE_SERVER(c) (c);
 
53
#else
 
54
#  define SOFFSET -10000
 
55
#  define SERVER_NODE(c) ((int)(SOFFSET -armci_clus_info[(c)].master));
 
56
#  define NODE_SERVER(c) ((int)(SOFFSET - c))
 
57
#endif
 
58
 
 
59
#endif
 
60
 
 
61
/**Symbol to stamp end of buffers in certain networks*/
 
62
#define ARMCI_STAMP 20080528
 
63
 
 
64
/*\GPC call stuff
 
65
\*/
 
66
typedef struct {
 
67
  int hndl, hlen, dlen;
 
68
  void *hdr, *data;
 
69
}gpc_send_t;
 
70
 
 
71
 
 
72
/*\ Stuff for non-blocking API
 
73
\*/ 
 
74
#define NB_MULTI -1 /*more than one armci buffer(buffers.c) used for nbcall*/
 
75
#define NB_NONE  -2 /*no armci buffer(buffers.c) used for nbcall*/
 
76
extern unsigned int _armci_get_next_tag();
 
77
#define GET_NEXT_NBTAG _armci_get_next_tag
 
78
#define ARMCI_MAX_IMPLICIT 15
 
79
 
 
80
typedef struct{
 
81
  int len;
 
82
  int last;
 
83
  void *exthdr;
 
84
} ext_header_t;
 
85
 
 
86
typedef struct{
 
87
int val;
 
88
void *ptr;
 
89
} armci_flag_t;
 
90
 
 
91
 
 
92
#if defined(LAPI) || defined(PTHREADS) || defined(POSIX_THREADS)
 
93
# include <pthread.h>
 
94
  typedef pthread_t thread_id_t;
 
95
# define  THREAD_ID_SELF pthread_self
 
96
#elif defined(WIN32)
 
97
# include <windows.h>
 
98
  typedef DWORD thread_id_t;
 
99
# define  THREAD_ID_SELF GetCurrentThreadId  
 
100
#else
 
101
  typedef int thread_id_t;
 
102
# define  THREAD_ID_SELF() 1  
 
103
#endif
 
104
 
 
105
extern thread_id_t armci_usr_tid;
 
106
extern thread_id_t armci_serv_tid;
 
107
#ifdef SERVER_THREAD
 
108
#  define SERVER_CONTEXT (armci_serv_tid == THREAD_ID_SELF())
 
109
#else
 
110
#  define SERVER_CONTEXT (armci_me<0)
 
111
#endif
 
112
 
 
113
#if defined(LAPI) || defined(CLUSTER) || defined(CRAY) || defined(CRAY_XT)\
 
114
        || defined(CRAY_SHMEM) || defined(BGML) || defined(DCMF)
 
115
#  include "request.h"
 
116
#endif
 
117
 
 
118
#ifdef ARMCIX
 
119
#include "armcix.h"
 
120
#endif
 
121
 
 
122
/* ------------------------ ARMCI threads support ------------------------- */
 
123
#define ARMCI_THREADS_LIMIT 32
 
124
 
 
125
#include "utils.h"
 
126
#if defined(THREAD_SAFE)
 
127
typedef struct {
 
128
    int max;                /* max # of threads per proc */
 
129
    int avail;              /* next available position */
 
130
    thread_id_t *ids;       /* list of threads' ids */
 
131
    thread_lock_t lock;     /* general case lock */
 
132
    thread_lock_t buf_lock; /* lock for buffer access */
 
133
    thread_lock_t net_lock; /* lock for network accees */
 
134
} armci_user_threads_t;
 
135
 
 
136
extern armci_user_threads_t armci_user_threads;
 
137
 
 
138
extern void armci_init_threads();
 
139
extern void armci_finalize_threads();
 
140
extern int armci_thread_idx();
 
141
extern INLINE int armci_register_thread(thread_id_t id);
 
142
 
 
143
#define ARMCI_THREAD_IDX armci_thread_idx() /* needs to be optimized */
 
144
 
 
145
#else
 
146
#   define ARMCI_THREAD_IDX 0
 
147
#endif
 
148
 
 
149
/* ------------------------------------------------------------------------ */
 
150
 
 
151
/* min amount of data in strided request to be sent in single TCP/IP message*/
 
152
#if defined(SOCKETS) || defined(MPI_SPAWN_ZEROCOPY)
 
153
#  define TCP_PAYLOAD 128 
 
154
#  define LONG_GET_THRESHOLD  TCP_PAYLOAD  
 
155
#  define LONG_GET_THRESHOLD_STRIDED LONG_GET_THRESHOLD
 
156
#  define LONG_PUT_THRESHOLD 128  
 
157
#endif
 
158
 
 
159
#ifdef WIN32
 
160
#  define bzero(a,len){\
 
161
     int _i;\
 
162
     char *_c = (char*)(a);\
 
163
     for(_i=0; _i< (int)(len); _i++)_c[_i]=(char)0;\
 
164
   }
 
165
#  define bcopy(a,b,len) memcpy(b,a,len)
 
166
#else
 
167
#   if HAVE_STRINGS_H
 
168
#       include <strings.h>
 
169
#   endif
 
170
#endif
 
171
 
 
172
#if defined(CRAY_XT) || defined(CRAY_T3E) || defined(FUJITSU)\
 
173
       || defined(HITACHI) || (defined(QUADRICS) && !defined(ELAN_ACC))
 
174
#define ACC_COPY
 
175
#endif
 
176
 
 
177
#ifndef FATR
 
178
# ifdef WIN32
 
179
#   define FATR __stdcall
 
180
# else
 
181
#   define FATR 
 
182
# endif
 
183
#endif
 
184
 
 
185
#define MAX_PROC 8096
 
186
#define MAX_STRIDE_LEVEL ARMCI_MAX_STRIDE_LEVEL
 
187
 
 
188
/* msg tag ARMCI uses in collective ops */
 
189
#define ARMCI_TAG 30000
 
190
 
 
191
#ifndef EXTRA_MSG_BUFLEN_DBL
 
192
#   define RESERVED_BUFLEN ((sizeof(request_header_t)>>3)+3*MAX_STRIDE_LEVEL)
 
193
#else
 
194
#   define RESERVED_BUFLEN ((sizeof(request_header_t)>>3)+3*MAX_STRIDE_LEVEL +\
 
195
                           EXTRA_MSG_BUFLEN_DBL)
 
196
#endif
 
197
 
 
198
#if defined(HITACHI)
 
199
#  define BUFSIZE  ((0x50000) * sizeof(double))
 
200
#else   
 
201
   /* packing algorithm for double complex numbers requires even number */
 
202
#  ifdef MSG_BUFLEN_DBL
 
203
#    define BUFSIZE_DBL (MSG_BUFLEN_DBL - RESERVED_BUFLEN)
 
204
#  else
 
205
#    define BUFSIZE_DBL 32768
 
206
#  endif
 
207
#  define BUFSIZE  (BUFSIZE_DBL * sizeof(double))
 
208
#endif
 
209
 
 
210
/* note opcodes must be lower than ARMCI_ACC_OFF !!! */
 
211
#define PUT 1
 
212
#define GET 2
 
213
#define RMW 3
 
214
#define LOCK   4
 
215
#define UNLOCK 5
 
216
#define ACK 6 
 
217
 
 
218
/* must fit in two bits, see msginfo->format in request.h */
 
219
#define STRIDED 1
 
220
#define VECTOR  2
 
221
 
 
222
extern  int armci_me, armci_nproc;
 
223
extern int _armci_initialized;
 
224
#ifdef HITACHI
 
225
   extern int sr8k_server_ready;
 
226
   extern  double *armci_internal_buffer;
 
227
#else
 
228
#if !defined(THREAD_SAFE)
 
229
   extern  double armci_internal_buffer[BUFSIZE_DBL];
 
230
#endif
 
231
#endif
 
232
 
 
233
extern void armci_shmem_init();
 
234
extern void armci_krmalloc_init_localmem();
 
235
#if 0
 
236
extern void armci_die(char *msg, int code);
 
237
extern void armci_die2(char *msg, int code1, int code2);
 
238
#endif
 
239
extern void armci_write_strided(void *ptr, int stride_levels, 
 
240
                                int stride_arr[], int count[], char *buf);
 
241
extern void armci_read_strided(void *ptr, int stride_levels, 
 
242
                               int stride_arr[], int count[], char *buf);
 
243
extern int armci_op_strided(int op, void* scale, int proc,void *src_ptr, 
 
244
                        int src_stride_arr[],  void* dst_ptr, 
 
245
                        int dst_stride_arr[], int count[],  
 
246
                        int stride_levels, int lockit,armci_ihdl_t nb_handle);
 
247
extern int armci_copy_vector(int op, /* operation code */
 
248
                armci_giov_t darr[], /* descriptor array */
 
249
                int len,  /* length of descriptor array */
 
250
                int proc /* remote process(or) ID */
 
251
              );
 
252
 
 
253
extern int armci_acc_vector(int op, /* operation code */
 
254
                void *scale,        /* scale factor */
 
255
                armci_giov_t darr[],/* descriptor array */
 
256
                int len,  /* length of descriptor array */
 
257
                int proc  /* remote process(or) ID */
 
258
              );
 
259
 
 
260
extern int armci_pack_strided(int op, void* scale, int proc,
 
261
                       void *src_ptr, int src_stride_arr[],
 
262
                       void* dst_ptr, int dst_stride_arr[],
 
263
                       int count[], int stride_levels, ext_header_t *hdr,
 
264
                       int fit_level, int nb, int last,armci_ihdl_t nb_handle);
 
265
 
 
266
extern int armci_pack_vector(int op, void *scale, 
 
267
                    armci_giov_t darr[],int len,int proc,armci_ihdl_t nb_handle);
 
268
 
 
269
extern void armci_lockmem(void *pstart, void* pend, int proc);
 
270
extern void armci_unlockmem(int proc);
 
271
 
 
272
extern int armci_acc_copy_strided(int optype, void* scale, int proc,
 
273
                                  void* src_ptr, int src_stride_arr[],  
 
274
                                  void* dst_ptr, int dst_stride_arr[], 
 
275
                                  int count[], int stride_levels);
 
276
 
 
277
extern void armci_vector_to_buf(armci_giov_t darr[], int len, void* buf);
 
278
extern void armci_vector_from_buf(armci_giov_t darr[], int len, void* buf);
 
279
extern void armci_init_fence();
 
280
extern void armci_finalize_fence();
 
281
 
 
282
#ifdef SOCKETS
 
283
#ifdef SERVER_THREAD
 
284
  extern void armci_create_server_thread ( void* (* func)(void*) );
 
285
  extern void armci_terminate_server_thread();
 
286
#else
 
287
  extern void armci_create_server_process ( void* (* func)(void*) );
 
288
  extern void armci_wait_server_process();
 
289
  extern void RestoreSigChldDfl();
 
290
#endif
 
291
#endif
 
292
 
 
293
#if defined(MPI_SPAWN) || defined(MPI_MT)
 
294
  extern void armci_create_server_MPIprocess ();
 
295
#endif
 
296
 
 
297
 
 
298
#define ARMCI_MAX(a,b) (((a)>(b))?(a):(b))
 
299
#define ARMCI_MIN(a,b) (((a)<(b))?(a):(b))
 
300
#define ARMCI_ABS(a)   (((a) >= 0) ? (a) : (-(a)))
 
301
#define ARMCI_ACC(op)  ((((int)(op))-ARMCI_ACC_INT)>=0)
 
302
 
 
303
#ifdef CLUSTER
 
304
   extern char *_armci_fence_arr;
 
305
#ifdef THREAD_SAFE
 
306
#  define FENCE_ARR(p_) (_armci_fence_arr[ARMCI_THREAD_IDX*armci_nproc+p_])
 
307
#else
 
308
#  define FENCE_ARR(p_) (_armci_fence_arr[p_])
 
309
#endif
 
310
 
 
311
#  define SAMECLUSNODE(p)\
 
312
     ( ((p) <= armci_clus_last) && ((p) >= armci_clus_first) )
 
313
#elif defined(__crayx1)
 
314
#  define SAMECLUSNODE(p) 1
 
315
#elif defined(ARMCIX)
 
316
#  define SAMECLUSNODE(p) 0
 
317
#else
 
318
#  define SAMECLUSNODE(p) ((p)==armci_me) 
 
319
#endif
 
320
 
 
321
 
 
322
#if defined(LAPI) || defined(ELAN_ACC)
 
323
#  define ORDER(op,proc)\
 
324
        if( proc == armci_me || ( ARMCI_ACC(op) && ARMCI_ACC(PENDING_OPER(proc))) );\
 
325
        else  FENCE_NODE(proc)
 
326
#  define UPDATE_FENCE_INFO(proc_)
 
327
#elif defined(CLUSTER) && !defined(QUADRICS) && !defined(HITACHI)\
 
328
        && !defined(CRAY_SHMEM) && !defined(PORTALS)
 
329
#  define ORDER(op_,proc_)\
 
330
          if(!SAMECLUSNODE(proc_) && op_ != GET )FENCE_ARR(proc_)=1
 
331
#  define UPDATE_FENCE_INFO(proc_) if(!SAMECLUSNODE(proc_))FENCE_ARR(proc_)=1
 
332
#else
 
333
#  if defined(GM) && defined(ACK_FENCE) 
 
334
#   define ORDER(op,proc)
 
335
#  else
 
336
#   define ORDER(op,proc) if(proc != armci_me) FENCE_NODE(proc)
 
337
#  endif 
 
338
#  define UPDATE_FENCE_INFO(proc_)
 
339
#endif
 
340
        
 
341
typedef struct {
 
342
    int  ptr_array_len;
 
343
    int bytes;
 
344
    void **ptr_array;
 
345
} armci_riov_t;
 
346
 
 
347
/*\ consider up to HOSTNAME_LEN characters in host name 
 
348
 *  we can truncate names of the SP nodes since it is not used
 
349
 *  to establish socket communication like on the networks of workstations
 
350
 *  SP node names must be distinct within first HOSTNAME_LEN characters
 
351
\*/
 
352
#if defined(LAPI) && defined(AIX)
 
353
#  define HOSTNAME_TRUNCATE 
 
354
#  define HOSTNAME_LEN 12
 
355
#else
 
356
#  define HOSTNAME_LEN 64
 
357
#endif
 
358
 
 
359
typedef struct {
 
360
  int master;
 
361
  int nslave;
 
362
  char hostname[HOSTNAME_LEN];
 
363
} armci_clus_t;
 
364
 
 
365
extern armci_clus_t *armci_clus_info;
 
366
extern int armci_nclus, armci_clus_me, armci_master;
 
367
extern int armci_clus_first, armci_clus_last;
 
368
extern int armci_clus_id(int p);
 
369
extern void armci_init_clusinfo();
 
370
extern void armci_set_mem_offset(void *ptr);
 
371
extern int _armci_terminating;
 
372
extern void armci_acc_2D(int op, void* scale, int proc, void *src_ptr, 
 
373
                         void *dst_ptr, int bytes, int cols, int src_stride, 
 
374
                         int dst_stride, int lockit);
 
375
extern void armci_lockmem_scatter(void *ptr_array[], int len, int bytes, int p);
 
376
extern void armci_generic_rmw(int op, void *ploc, void *prem, int extra, int p);
 
377
extern unsigned long armci_max_region();
 
378
extern void armci_dispatch_strided(void *ptr, int stride_arr[], int count[],
 
379
                            int strides, int fit_level, int nb, int bufsize, 
 
380
                            void (*fun)(void*,int*,int*,int,void*), void *arg);
 
381
extern void armci_msg_gop_init();
 
382
extern void armci_msg_gop_finalize();
 
383
extern void armci_util_spin(int n, void *notused);
 
384
 
 
385
#if defined(SYSV) || defined(WIN32)
 
386
extern void armci_shmem_init();
 
387
extern void armci_set_shmem_limit(unsigned long shmemlimit);
 
388
#endif
 
389
 
 
390
#define ALIGN_PTR_LONG(type, x) if( ((long)(x)) % sizeof(long)) { long _y = (long)(x);\
 
391
              if(sizeof(long)==8){_y>>=3; _y<<=3; }\
 
392
                            else { _y>>=2; _y<<=2; }\
 
393
              _y += sizeof(long); (x) = (type*)_y; }
 
394
 
 
395
#define SIXTYFOUR 64
 
396
#define ALIGN64ADD(buf) (SIXTYFOUR-(((ssize_t)(buf))%SIXTYFOUR))
 
397
#define ALIGNLONGADD(buf) ((((ssize_t)(buf))%sizeof(long))?(sizeof(long)-(((ssize_t)(buf))%sizeof(long))):0)
 
398
 
 
399
#define SET   1
 
400
#define UNSET 0
 
401
 
 
402
extern int armci_agg_save_strided_descriptor(void *src_ptr, 
 
403
                                             int src_stride_arr[],
 
404
                                             void* dst_ptr, 
 
405
                                             int dst_stride_arr[],
 
406
                                             int count[], 
 
407
                                             int stride_levels, int proc,
 
408
                                             int op, armci_ihdl_t nb_handle);
 
409
     
 
410
extern int armci_agg_save_giov_descriptor(armci_giov_t darr[], int len, 
 
411
                                           int proc, int op, 
 
412
                                           armci_ihdl_t nb_handle);
 
413
 
 
414
extern int armci_agg_save_descriptor(void *src, void *dst, int bytes, 
 
415
                                      int proc, int op, int is_registered_put,
 
416
                                      armci_ihdl_t nb_handle);
 
417
 
 
418
extern void armci_agg_complete(armci_ihdl_t nb_handle, int condition);
 
419
 
 
420
extern armci_hdl_t *armci_set_implicit_handle (int op, int proc);
 
421
 
 
422
extern int armci_getnumcpus(void);
 
423
extern long armci_util_long_getval(long* p);
 
424
extern int armci_util_int_getval(int* p);
 
425
extern void armci_region_register_shm(void *start, long size);
 
426
extern void armci_region_register_loc(void *start, long size);
 
427
extern void armci_region_clus_record(int node, void *start, long size);
 
428
extern void armci_region_init();
 
429
extern int armci_region_clus_found(int node, void *start, int size);
 
430
extern int armci_region_loc_found(void *start, int size);
 
431
extern int armci_region_both_found(void *loc, void *rem, int size, int node);
 
432
#ifdef REGIONS_REQUIRE_MEMHDL
 
433
extern int get_armci_region_local_hndl(void *loc, int node, ARMCI_MEMHDL_T **loc_memhdl);
 
434
#endif
 
435
extern void armci_region_exchange(void *start, long size);
 
436
extern void cpu_yield();
 
437
 
 
438
#ifdef ALLOW_PIN
 
439
extern void armci_global_region_exchange(void *, long); 
 
440
#endif
 
441
 
 
442
/* -------------------- ARMCI Groups ---------------------- */
 
443
/* data structure that caches a group's attribute */
 
444
#ifdef BGML
 
445
#define   PCLASS 3
 
446
#endif
 
447
#ifdef MPI
 
448
 
 
449
typedef int ARMCI_Datatype;
 
450
 
 
451
extern int ATTR_KEY; /* attribute key */
 
452
 
 
453
/* #define ARMCI_GROUP /\*Generic ARMCI implementation*\/ */
 
454
 
 
455
typedef struct {
 
456
  armci_clus_t *grp_clus_info;
 
457
  int grp_me;              /* my group id */
 
458
  int grp_nclus;           /* number of cluster nodes */
 
459
  int grp_clus_me;         /* my cluster node id */
 
460
  int mem_offset;          /* memory offset */
 
461
#ifdef ARMCI_GROUP
 
462
  int nproc;               /* #procs in this group*/
 
463
  int *proc_list;          /* Ids of procs in this group
 
464
                              (w.r.t. MPI_COMM_WORLD)*/
 
465
#endif
 
466
}armci_grp_attr_t;
 
467
 
 
468
#include "mpi.h"
 
469
 
 
470
/**dup of MPI_COMM_WORLD for internal MPI communication*/
 
471
extern MPI_Comm ARMCI_COMM_WORLD;
 
472
 
 
473
typedef MPI_Comm ARMCI_Comm;
 
474
typedef struct {
 
475
#ifndef ARMCI_GROUP
 
476
  MPI_Comm icomm;
 
477
  MPI_Group igroup;
 
478
#endif
 
479
  armci_grp_attr_t grp_attr;
 
480
}ARMCI_iGroup;
 
481
 
 
482
armci_grp_attr_t *ARMCI_Group_getattr(ARMCI_Group *grp);
 
483
 
 
484
extern void armci_group_init();
 
485
extern void armci_group_finalize();
 
486
extern ARMCI_iGroup* armci_get_igroup_from_group(ARMCI_Group *group);
 
487
 
 
488
#endif /* ifdef MPI */ 
 
489
/* -------------------------------------------------------- */
 
490
 
 
491
/* ------------ ARMCI Chekcpointing/Recovery -------------- */
 
492
#ifdef ENABLE_CHECKPOINT
 
493
extern int armci_init_checkpoint();
 
494
extern void armci_create_ckptds(armci_ckpt_ds_t *ckptds, int count);
 
495
extern int armci_icheckpoint_init(char *filename, ARMCI_Group *grp,
 
496
                                  int savestack, int saveheap,
 
497
                                  armci_ckpt_ds_t *ckptds);
 
498
extern int armci_icheckpoint(int rid);
 
499
extern int armci_irecover(int rid,int iamreplacement);
 
500
extern void armci_icheckpoint_finalize(int rid);
 
501
 
 
502
 
 
503
#endif /* ifdef ENABLE_CHECKPOINT */
 
504
/* -------------------------------------------------------- */
 
505
 
 
506
#ifdef BGML     
 
507
#define ARMCI_CRITICAL_SECTION_ENTER() BGML_CriticalSection_enter();
 
508
#define ARMCI_CRITICAL_SECTION_EXIT()  BGML_CriticalSection_exit();
 
509
#else
 
510
#define ARMCI_CRITICAL_SECTION_ENTER()
 
511
#define ARMCI_CRITICAL_SECTION_EXIT()     
 
512
#endif    
 
513
 
 
514
#endif