18 #define _XOPEN_SOURCE 700
29 #include "sion_fortran_omp.h"
51 sion_int64 *chunksize,
52 sion_int32 *fsblksize,
60 char *fname_tmp,*fmode_tmp;
62 fname_tmp = (
char *) malloc((
size_t) ((fname_len + 1) *
sizeof(
char)));
63 fmode_tmp = (
char *) malloc((
size_t) ((file_mode_len + 1) *
sizeof(
char)));
66 strncpy(fname_tmp, fname, fname_len);
67 strncpy(fmode_tmp, file_mode, file_mode_len);
69 fname_tmp[fname_len] =
'\0';
70 fmode_tmp[file_mode_len] =
'\0';
72 #ifdef SION_DEBUG_UNUSED
73 if (*globalrank == 0){
74 fprintf(stderr,
"fsion_paropen_omp: filename_len: %d\n", (
int) fname_len);
75 fprintf(stderr,
"fsion_paropen_omp: filename: %s\n",fname_tmp);
77 fprintf(stderr,
"fsion_paropen_omp: filemode_len: %d\n", (
int) file_mode_len);
78 fprintf(stderr,
"fsion_paropen_omp: filemode: %s\n",fmode_tmp);
80 fprintf(stderr,
"fsion_paropen_omp: chunksize: %lld\n",*chunksize);
81 fprintf(stderr,
"fsion_paropen_omp: fsblksize: %d\n",*fsblksize);
85 (*sid) = sion_paropen_omp(fname_tmp, fmode_tmp, chunksize, fsblksize, globalrank, NULL, NULL);
107 (*ierr) = sion_parclose_omp(*sid);
void fsion_paropen_omp_c(char *fname, char *file_mode, 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_omp.
void fsion_parclose_omp_c(int *sid, int *ierr)
Fortran procedure to close a sion file opened with OpenMP in parallel.