source: XMLIO_V2/dev/common/src/fortran/oasis_cinterface.cpp @ 300

Last change on this file since 300 was 300, checked in by ymipsl, 12 years ago

nouvelle version de developpement de xios

  • nouvelle interface fortran
  • recodage complet de la couche de communication
  • et bien d'autres choses...

YM

  • Property svn:eol-style set to native
File size: 921 bytes
Line 
1#include "oasis_cinterface.hpp"
2#include <string>
3#include <mpi.h>
4
5namespace xmlioserver
6{ 
7 
8  void oasis_init(const std::string& server_id)
9  {
10    fxios_oasis_init(server_id.data(),server_id.size()) ;
11  }
12 
13  void oasis_finalize(void)
14  {
15    fxios_oasis_finalize() ;
16  }
17 
18  void oasis_get_localcomm(MPI_Comm& comm)
19  {
20    MPI_Fint f_comm ;
21   
22    fxios_oasis_get_localcomm(&f_comm) ;
23    comm=MPI_Comm_f2c(f_comm) ;
24  }
25 
26  void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id)
27  {
28    MPI_Fint f_comm ;
29   
30    fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ;
31    comm_client_server=MPI_Comm_f2c(f_comm) ;
32  }
33 
34  void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id)
35  {
36    MPI_Fint f_comm ;
37   
38    fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ;
39    comm_client_server=MPI_Comm_f2c(f_comm) ;
40  }
41}
Note: See TracBrowser for help on using the repository browser.