source: XIOS/dev/branch_yushan/src/client.hpp @ 1095

Last change on this file since 1095 was 1087, checked in by yushan, 7 years ago

save modif from local. context_init/finalize OK

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.9 KB
RevLine 
[342]1#ifndef __CLIENT_HPP__
2#define __CLIENT_HPP__
[300]3
[591]4#include "xios_spl.hpp"
[382]5#include "mpi.hpp"
[300]6
[1037]7
[335]8namespace xios
[490]9{
[300]10    class CClient
11    {
[523]12      public:
13        static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm);
14        static void finalize(void);
[1053]15        static void registerContext(const string& id, ep_lib::MPI_Comm contextComm);
[490]16
[523]17        static MPI_Comm intraComm;
[1072]18        #pragma omp threadprivate(intraComm)
19
[523]20        static MPI_Comm interComm;
[1072]21        #pragma omp threadprivate(interComm)
22
[1085]23        //static std::list<MPI_Comm> contextInterComms;
[1087]24       
[1081]25        static std::list<MPI_Comm> * contextInterComms_ptr;
26        #pragma omp threadprivate(contextInterComms_ptr)
[1072]27
[523]28        static int serverLeader;
[1081]29        #pragma omp threadprivate(serverLeader)
[1072]30
[523]31        static bool is_MPI_Initialized ;
[1081]32        #pragma omp threadprivate(is_MPI_Initialized)
[300]33
[523]34        //! Get rank of the current process
[490]35        static int getRank();
36
[523]37        //! Open a file stream to write the info logs
[490]38        static void openInfoStream(const StdString& fileName);
[523]39        //! Write the info logs to standard output
[490]40        static void openInfoStream();
[523]41        //! Close the info logs file if it opens
[490]42        static void closeInfoStream();
43
[523]44        //! Open a file stream to write the error log
45        static void openErrorStream(const StdString& fileName);
46        //! Write the error log to standard error output
47        static void openErrorStream();
48        //! Close the error log file if it opens
49        static void closeErrorStream();
[490]50
[523]51      protected:
52        static int rank;
[1072]53        #pragma omp threadprivate(rank)
54
[523]55        static StdOFStream m_infoStream;
[1081]56        #pragma omp threadprivate(m_infoStream) 
[1072]57
[523]58        static StdOFStream m_errorStream;
[1081]59        #pragma omp threadprivate(m_errorStream)
[490]60
[523]61        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
62    };
[300]63}
64
65#endif
Note: See TracBrowser for help on using the repository browser.