MPI_MachineBroker.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.1 $ 00022 // $Date: 2003/08/29 07:17:38 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/actor/machineBroker/MPI_MachineBroker.h,v $ 00024 00025 00026 // Written: fmk 00027 // Revision: A 00028 // 00029 // Purpose: This file contains the class definition for MPI_MachineBroker. 00030 // MPI_MachineBroker is the broker responsible for monitoring the usage of 00031 // the processes in an mpi run. 00032 // 00033 // What: "@(#) MPI_MachineBroker.h, revA" 00034 00035 #ifndef MPI_MachineBroker_h 00036 #define MPI_MachineBroker_h 00037 00038 #include <MachineBroker.h> 00039 class ID; 00040 class MPI_Channel; 00041 class FEM_ObjectBroker; 00042 00043 class MPI_MachineBroker : public MachineBroker 00044 { 00045 public: 00046 MPI_MachineBroker(FEM_ObjectBroker *theBroker, int argc, char **argv); 00047 ~MPI_MachineBroker(); 00048 00049 // methods to return info about local process id and num processes 00050 int getPID(void); 00051 int getNP(void); 00052 00053 // methods to get and free Channels (processes) 00054 Channel *getMyChannel(void); 00055 Channel *getRemoteProcess(void); 00056 int freeProcess(Channel *); 00057 00058 protected: 00059 00060 private: 00061 int rank; 00062 int size; 00063 ID *usedChannels; 00064 MPI_Channel **theChannels; 00065 }; 00066 00067 #endif |