source: XIOS/trunk/src/client.hpp @ 1615

Last change on this file since 1615 was 1587, checked in by ymipsl, 6 years ago

XIOS - OASIS interaction : due to many problem occurring in the oasis/XIOS initialization phase due to a bad order of intialization call from both, you have now the possibily to explicitly inform xios that the servers must call oasis_enddef().
New rules : On model side, before calling oasis_enddef, you must add a call to "xios_oasis_enddef()"
Old rules : oasis_enddef must be call before any call to "xios_context_initialize" otherwise it may lead to a deadlock.
You can use the old rules if the variable <call_oasis_enddef> is set to false (default value is true), and by this way no need to modify the source code of the models

YM

  • 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.6 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
[335]7namespace xios
[490]8{
[300]9    class CClient
10    {
[523]11      public:
12        static void initialize(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm);
13        static void finalize(void);
14        static void registerContext(const string& id, MPI_Comm contextComm);
[1587]15        static void callOasisEnddef(void) ;
[490]16
[523]17        static MPI_Comm intraComm;
18        static MPI_Comm interComm;
[655]19        static std::list<MPI_Comm> contextInterComms;
[1148]20        static int serverLeader;
[523]21        static bool is_MPI_Initialized ;
[300]22
[992]23        static MPI_Comm& getInterComm();
24
[1243]25        //! Get global rank without oasis and current rank in model intraComm in case of oasis
[490]26        static int getRank();
27
[523]28        //! Open a file stream to write the info logs
[490]29        static void openInfoStream(const StdString& fileName);
[523]30        //! Write the info logs to standard output
[490]31        static void openInfoStream();
[523]32        //! Close the info logs file if it opens
[490]33        static void closeInfoStream();
34
[523]35        //! Open a file stream to write the error log
36        static void openErrorStream(const StdString& fileName);
37        //! Write the error log to standard error output
38        static void openErrorStream();
39        //! Close the error log file if it opens
40        static void closeErrorStream();
[490]41
[523]42      protected:
[1148]43        static int rank_;                 //!< Rank in model intraComm
[523]44        static StdOFStream m_infoStream;
45        static StdOFStream m_errorStream;
[490]46
[523]47        static void openStream(const StdString& fileName, const StdString& ext, std::filebuf* fb);
48    };
[300]49}
50
51#endif
Note: See TracBrowser for help on using the repository browser.