Ignore:
Timestamp:
11/16/17 16:20:41 (6 years ago)
Author:
yushan
Message:

dev_omp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/cxios.cpp

    r1328 r1331  
    1515namespace xios 
    1616{ 
    17   string CXios::rootFile="./iodef.xml" ; 
    18   string CXios::xiosCodeId="xios.x" ; 
    19   string CXios::clientFile="./xios_client"; 
    20   string CXios::serverFile="./xios_server"; 
     17  const string CXios::rootFile="./iodef.xml" ; 
     18  const string CXios::xiosCodeId="xios.x" ; 
     19  const string CXios::clientFile="./xios_client"; 
     20  const string CXios::serverFile="./xios_server"; 
    2121 
    2222  bool CXios::isClient ; 
     
    3737  { 
    3838    set_new_handler(noMemory); 
    39     parseFile(rootFile); 
     39    int tmp_rank; 
     40    MPI_Comm_rank(MPI_COMM_WORLD, &tmp_rank); 
     41    #pragma omp critical 
     42    { 
     43      std::cout<<"thread "<<tmp_rank<<"("<<omp_get_thread_num()<<")"<<" parsing rootfile"<<std::endl; 
     44      parseFile(rootFile); 
     45      std::cout<<"thread "<<tmp_rank<<"("<<omp_get_thread_num()<<")"<<" parsed rootfile"<<std::endl; 
     46    } 
     47    #pragma omp barrier 
    4048    parseXiosConfig(); 
    4149  } 
     
    7886    if(isServer)  
    7987    {  
    80       num_ep = omp_get_num_threads(); 
     88      num_ep = 1; 
    8189    } 
    8290         
Note: See TracChangeset for help on using the changeset viewer.