27 #include "sion_fortran_omp.h" 49 sion_int64 *chunksize,
50 sion_int32 *fsblksize,
59 char *fname_tmp,*fmode_tmp;
61 fname_tmp = (
char *) malloc((
size_t) ((fname_len + 1) *
sizeof(
char)));
62 fmode_tmp = (
char *) malloc((
size_t) ((file_mode_len + 1) *
sizeof(
char)));
65 strncpy(fname_tmp, fname, fname_len);
66 strncpy(fmode_tmp, file_mode, file_mode_len);
68 fname_tmp[fname_len] =
'\0';
69 fmode_tmp[file_mode_len] =
'\0';
71 #ifdef SION_DEBUG_UNUSED 72 if (*globalrank == 0){
73 fprintf(stderr,
"fsion_paropen_omp: filename_len: %d\n", (
int) fname_len);
74 fprintf(stderr,
"fsion_paropen_omp: filename: %s\n",fname_tmp);
76 fprintf(stderr,
"fsion_paropen_omp: filemode_len: %d\n", (
int) file_mode_len);
77 fprintf(stderr,
"fsion_paropen_omp: filemode: %s\n",fmode_tmp);
79 fprintf(stderr,
"fsion_paropen_omp: chunksize: %lld\n",*chunksize);
80 fprintf(stderr,
"fsion_paropen_omp: fsblksize: %d\n",*fsblksize);
84 (*sid) = sion_paropen_omp(fname_tmp, fmode_tmp, chunksize, fsblksize, globalrank, &fileptr, NULL);
106 (*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.