#include <ga++.h>
Collaboration diagram for GA:

Public Methods | |
| _GA_STATIC_ void | Initialize (int argc, char *argv[], size_t limit=0) |
| Initialize Global Arrays. More... | |
| _GA_STATIC_ void | Initialize (int argc, char *argv[], unsigned long heapSize, unsigned long stackSize, int type, size_t limit=0) |
| Initialize Global Arrays. More... | |
| _GA_STATIC_ void | Terminate () |
| Delete all active arrays and destroy internal data structures. More... | |
Public Attributes | |
| _GA_EXTERN_ _GA_STATIC_ GAServices | SERVICES = GA::GAServices() |
Private Methods | |
| GA () | |
|
|
|
|
||||||||||||||||
|
Initialize Global Arrays. Allocate and initialize internal data structures in Global Arrays. The limit is per process: it is the amount of memory that the given processor can contribute to collective allocation of global arrays. It does not include temporary storage that GA might be allocating (and releasing) during execution of a particular operation. limit < 0 means "allow unlimited memory usage" in which case this operation is equivalent to GA_initialize.
Definition at line 5 of file init_term.cc.
00005 {
00006
00007 int val;
00008
00009 #ifndef MPIPP
00010 PBEGIN_(argc, argv);
00011 #else
00012 if((val=MPI_Init(&argc, &argv)) < 0)
00013 fprintf(stderr, "MPI_Init() failed\n");
00014 #endif
00015
00016 // GA Initialization
00017 if(limit == 0)
00018 GA_Initialize();
00019 else
00020 GA_Initialize_ltd(limit);
00021 }
|
|
||||||||||||||||||||||||||||
|
Initialize Global Arrays. Allocate and initialize internal data structures in Global Arrays. The limit is per process: it is the amount of memory that the given processor can contribute to collective allocation of global arrays. It does not include temporary storage that GA might be allocating (and releasing) during execution of a particular operation. limit < 0 means "allow unlimited memory usage" in which case this operation is equivalent to GA_initialize.
Definition at line 24 of file init_term.cc.
00025 {
00026
00027 int val;
00028
00029 // Initialize MPI/TCGMSG
00030 #ifndef MPIPP
00031 PBEGIN_(argc, argv);
00032 #else
00033 if((val=MPI_Init(&argc, &argv)) < 0)
00034 fprintf(stderr, "MPI_Init() failed\n");
00035 #endif
00036
00037
00038 // GA Initialization
00039 if(limit == 0)
00040 GA_Initialize();
00041 else
00042 GA_Initialize_ltd(limit);
00043
00044
00045 //if(GA_Uses_ma()) {
00046
00047 int nProcs = GA_Nnodes();
00048
00049 // Initialize memory allocator
00050 heapSize /= ((unsigned long) nProcs);
00051 stackSize /= ((unsigned long) nProcs);
00052
00053 if(!MA_init(type, stackSize, heapSize))
00054 GA_Error("MA_init failed",stackSize+heapSize);
00055 // }
00056 }
|
|
|
Delete all active arrays and destroy internal data structures. This is a collective operation. Definition at line 59 of file init_term.cc.
00060 {
00061
00062 /* Terminate GA */
00063 GA_Terminate();
00064
00065 #ifndef MPIPP
00066 PEND_();
00067 #else
00068 MPI_Finalize();
00069 #endif
00070 }
|
|
|
Definition at line 72 of file init_term.cc. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002