44 #ifndef EPETRA_MPISMPCOMM_H
45 #define EPETRA_MPISMPCOMM_H
118 int Broadcast(
double * MyVals,
int Count,
int Root)
const;
132 int Broadcast(
int * MyVals,
int Count,
int Root)
const;
146 int Broadcast(
long * MyVals,
int Count,
int Root)
const;
162 int Broadcast(
char * MyVals,
int Count,
int Root)
const;
178 int GatherAll(
double * MyVals,
double * AllVals,
int Count)
const;
191 int GatherAll(
int * MyVals,
int * AllVals,
int Count)
const;
204 int GatherAll(
long * MyVals,
long * AllVals,
int Count)
const;
221 int SumAll(
double * PartialSums,
double * GlobalSums,
int Count)
const;
234 int SumAll(
int * PartialSums,
int * GlobalSums,
int Count)
const;
247 int SumAll(
long * PartialSums,
long * GlobalSums,
int Count)
const;
263 int MaxAll(
double * PartialMaxs,
double * GlobalMaxs,
int Count)
const;
276 int MaxAll(
int * PartialMaxs,
int * GlobalMaxs,
int Count)
const;
289 int MaxAll(
long * PartialMaxs,
long * GlobalMaxs,
int Count)
const;
302 int MinAll(
double * PartialMins,
double * GlobalMins,
int Count)
const;
315 int MinAll(
int * PartialMins,
int * GlobalMins,
int Count)
const;
328 int MinAll(
long * PartialMins,
long * GlobalMins,
int Count)
const;
344 int ScanSum(
double * MyVals,
double * ScanSums,
int Count)
const;
357 int ScanSum(
int * MyVals,
int * ScanSums,
int Count)
const;
370 int ScanSum(
long * MyVals,
long * ScanSums,
int Count)
const;
377 MPI_Comm
Comm()
const {
return(MpiSmpCommData_->Comm_);};
383 int MyPID()
const {
return(MpiSmpCommData_->rank_);};
389 int NumProc()
const {
return(MpiSmpCommData_->size_);};
402 int GetMpiTag()
const {
int tag = MpiSmpCommData_->curTag_++;
if (tag>MpiSmpCommData_->maxTag_) tag = MpiSmpCommData_->minTag_;
return(tag);};
405 MPI_Comm
GetMpiComm()
const {
return(MpiSmpCommData_->Comm_);};
417 void NodeBarrier()
const;
423 int MyThreadID()
const {
return(MpiSmpCommData_->ThreadID_);};
429 int MyNodeID()
const {
return(MpiSmpCommData_->NodeID_);};
434 int SetNumThreads(
int NumThreads) {MpiSmpCommData_->NumThreads_ = NumThreads;
return(0);};
439 int NumThreads()
const {
return(MpiSmpCommData_->NumThreads_);};
446 int SetMyThreadID(
int ThreadID) {MpiSmpCommData_->ThreadID_ = ThreadID;
return(0);};
453 int SetMyNodeID(
int NodeID) {MpiSmpCommData_->NodeID_ = NodeID;
return(0);};
458 inline void Print(std::ostream & os)
const {
460 os <<
"::Processor "<<
MyPID()<<
" of " <<
NumProc() <<
" total processors" << std::endl;
461 os <<
"::Thread "<< MyThreadID()<<
" of " << NumThreads() <<
" on node " << MyNodeID() << std::endl;
int NumThreads() const
Get number of threads on this node.
int SetMyThreadID(int ThreadID)
Set my thread ID.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
void PrintInfo(std::ostream &os) const
Print method that implements Epetra_Comm virtual PrintInfo method.
int MyThreadID() const
Return my thread ID.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int GatherAll(double *MyVals, double *AllVals, int Count) const =0
Epetra_Comm All Gather function.
virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap &Map) const =0
Create a directory object for the given Epetra_BlockMap.
Epetra_MpiSmpComm: The Epetra MPI Shared Memory Parallel Communication Class.
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
Epetra_Comm Global Min function.
virtual void Barrier() const =0
Epetra_Comm Barrier function.
virtual int MyPID() const =0
Return my process ID.
Epetra_MpiSmpCommData * MpiSmpCommData_
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const =0
Epetra_Comm Global Max function.
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const =0
Epetra_Comm Global Sum function.
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
void Print(std::ostream &os) const
Print method that implements Epetra_Object virtual Print method.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Object & operator=(const Epetra_Object &src)
MPI_Comm Comm() const
Extract MPI Communicator from a Epetra_MpiSmpComm object.
Epetra_Object: The base Epetra class.
MPI_Comm GetMpiComm() const
Acquire an MPI tag from the Epetra range of 24050-24099, increment tag.
Epetra_MpiSmpCommData: The Epetra Mpi Shared Memory ParallelCommunication Data Class.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int SetNumThreads(int NumThreads)
Set number of threads on this node.
virtual int Broadcast(double *MyVals, int Count, int Root) const =0
Epetra_Comm Broadcast function.
int MyPID() const
Return my process ID.
virtual int NumProc() const =0
Returns total number of processes.
int MyNodeID() const
Return my node ID.
virtual Epetra_Distributor * CreateDistributor() const =0
Create a distributor object.
int SetMyNodeID(int NodeID)
Set my node ID.
int NumProc() const
Returns total number of processes.
virtual int ScanSum(double *MyVals, double *ScanSums, int Count) const =0
Epetra_Comm Scan Sum function.
Epetra_Comm * Clone() const
Clone method.