source: XIOS/dev/branch_yushan_merged/src/log.cpp @ 1205

Last change on this file since 1205 was 1164, checked in by yushan, 7 years ago

Bug fixed in MPI_(All)Gatherv with displs

  • 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
  • Property svn:eol-style set to native
File size: 595 bytes
Line 
1#include "log.hpp"
2#include <string>
3#include <iostream>
4#include <string>
5
6namespace xios
7{
8
9  std::filebuf* info_FB[16];
10
11
12  CLog info("info") ;
13  CLog report("report") ;
14  CLog error("error", cerr.rdbuf()) ;
15
16 
17  CLog& CLog::operator()(int l)
18    {
19      if (l<=level)
20      {
21        omp_set_lock( &mutex );
22        //rdbuf(strBuf_);
23        rdbuf(strBuf_array[omp_get_thread_num()]); 
24        *this<<"-> "<<name<<" : " ;
25        omp_unset_lock( &mutex );
26      }
27      else rdbuf(NULL) ;
28      return *this;
29    }
30
31
32
33  int test_omp_rank;
34  #pragma omp threadprivate(test_omp_rank)
35
36 
37
38}
Note: See TracBrowser for help on using the repository browser.