SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
All Data Structures Files Functions Variables Typedefs Macros Modules Pages
sion_f90_ompi.F90
1 !*****************************************************************************
2 !** SIONLIB http://www.fz-juelich.de/jsc/sionlib **
3 !*****************************************************************************
4 !** Copyright (c) 2008-2019 **
5 !** Forschungszentrum Juelich, Juelich Supercomputing Centre **
6 !** **
7 !** See the file COPYRIGHT in the package base directory for details **
8 !*****************************************************************************
9 
10 !*****************************************************************************
11 !** Module file of Fortran 90 hybrid MPI/OpenMP interface to SIONlib **
12 !*****************************************************************************
13 !*
14 !* @file sion_f90.f90
15 !*
16 !* @brief Fortran90 interface
17 !*
18 !* @author Florian Janetzko
19 !* @date 05.07.2013
20 !*
21 module sion_f90_ompi
22  use sion_f90
23 
24  implicit none
25 
26 
27 !***********************************************
28 !* Fortran interface subroutines and functions *
29 !***********************************************
30 contains
31 ! Subroutines (without overloading)
32  subroutine fsion_paropen_ompi(fname,file_mode,nfiles,fgComm,flComm,chunksizes,&
33  & fsblksize,globalranks,newfname,sid)
34 
35  implicit none
36 
37  character(len=*), intent(in) :: fname
38  character(len=*), intent(inout) :: file_mode
39  integer, intent(in) :: nfiles
40  integer, intent(in) :: fgComm
41  integer, intent(in) :: flComm
42  integer*8, intent(inout) :: chunksizes
43  integer*4, intent(inout) :: fsblksize
44  integer, intent(inout) :: globalranks
45  character(len=*), intent(out) :: newfname
46  integer, intent(out) :: sid
47 
48  call fsion_paropen_ompi_c(fname,file_mode,nfiles,fgcomm,flcomm,chunksizes,&
49  & fsblksize,globalranks,newfname,sid)
50  end subroutine fsion_paropen_ompi
51 
52  subroutine fsion_parclose_ompi(sid,ierr)
53 
54  implicit none
55 
56  integer, intent(in) :: sid
57  integer, intent(out) :: ierr
58 
59  call fsion_parclose_ompi_c(sid,ierr)
60  end subroutine fsion_parclose_ompi
61 
62 end module sion_f90_ompi
void fsion_paropen_ompi_c(char *fname, char *file_mode, int *numFiles, MPI_Fint *fgComm, MPI_Fint *flComm, sion_int64 *chunksize, sion_int32 *fsblksize, int *globalrank, char *newfname, int *sid, int fname_len, int file_mode_len, int newfname_len)
Fortran wrapper function that calls sion_paropen_mpi for 1 file.
void fsion_parclose_ompi_c(int *sid, int *ierr)
Fortran procedure to close a sion file opened in OpenMP/MPI in parallel.