Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
6d938263
Commit
6d938263
authored
Dec 10, 2020
by
Shane Snyder
Browse files
Merge remote-tracking branch 'upstream/master' into python-package
parents
c05399ed
2d54cd8e
Changes
13
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6d938263
...
...
@@ -2,6 +2,11 @@
Darshan Release Change Log
--------------------------
Darshan-3.2.2
=============
* add wrappers for preadv, preadv2, pwritev, and pwritev2 (improves profiling
of ompio)
Darshan-3.2.1
=============
* fixed bug causing corruption of Darshan common access
...
...
darshan-runtime/configure
View file @
6d938263
...
...
@@ -650,6 +650,7 @@ __DARSHAN_LOG_PATH
darshan_share_path
darshan_lib_path
PRI_MACROS_BROKEN
H5PCC_CHECK
EGREP
GREP
CPP
...
...
@@ -1824,6 +1825,73 @@ $as_echo "$ac_res" >&6; }
eval
$as_lineno_stack
;
${
as_lineno_stack
:+:
}
unset
as_lineno
}
# ac_fn_c_check_type
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_c_check_func
()
{
as_lineno
=
${
as_lineno
-
"
$1
"
}
as_lineno_stack
=
as_lineno_stack
=
$as_lineno_stack
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$2
"
>
&5
$as_echo_n
"checking for
$2
... "
>
&6
;
}
if
eval
\$
{
$3
+:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* Define
$2
to an innocuous variant, in case <limits.h> declares
$2
.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define
$2
innocuous_
$2
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$2
(); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
#undef
$2
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char
$2
();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined __stub_
$2
|| defined __stub___
$2
choke me
#endif
int
main ()
{
return
$2
();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
eval
"
$3
=yes"
else
eval
"
$3
=no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
fi
eval
ac_res
=
\$
$3
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_res
"
>
&5
$as_echo
"
$ac_res
"
>
&6
;
}
eval
$as_lineno_stack
;
${
as_lineno_stack
:+:
}
unset
as_lineno
}
# ac_fn_c_check_func
cat
>
config.log
<<
_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
...
...
@@ -4156,6 +4224,49 @@ $as_echo "#define DARSHAN_HDF5_VERS_1_10_PLUS 1" >>confdefs.h
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
# Extract the first word of "h5pcc", so it can be a program name with args.
set
dummy h5pcc
;
ac_word
=
$2
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for
$ac_word
"
>
&5
$as_echo_n
"checking for
$ac_word
... "
>
&6
;
}
if
${
ac_cv_prog_H5PCC_CHECK
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
if
test
-n
"
$H5PCC_CHECK
"
;
then
ac_cv_prog_H5PCC_CHECK
=
"
$H5PCC_CHECK
"
# Let the user override the test.
else
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
for
as_dir
in
"
${
enable_hdf5_mod
}
/bin"
do
IFS
=
$as_save_IFS
test
-z
"
$as_dir
"
&&
as_dir
=
.
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
if
as_fn_executable_p
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
then
ac_cv_prog_H5PCC_CHECK
=
""
yes
""
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
break
2
fi
done
done
IFS
=
$as_save_IFS
test
-z
"
$ac_cv_prog_H5PCC_CHECK
"
&&
ac_cv_prog_H5PCC_CHECK
=
""
no
""
fi
fi
H5PCC_CHECK
=
$ac_cv_prog_H5PCC_CHECK
if
test
-n
"
$H5PCC_CHECK
"
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$H5PCC_CHECK
"
>
&5
$as_echo
"
$H5PCC_CHECK
"
>
&6
;
}
else
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result: no"
>
&5
$as_echo
"no"
>
&6
;
}
fi
if
test
x
"
$H5PCC_CHECK
"
=
x
"yes"
;
then
:
$as_echo
"#define DARSHAN_HDF5_PAR_BUILD 1"
>>
confdefs.h
fi
fi
...
...
@@ -4880,6 +4991,51 @@ $as_echo "#define HAVE_FSCANF_REDIRECT 1" >>confdefs.h
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
# look for glibc-specific functions
for
ac_func
in
pwritev
do
:
ac_fn_c_check_func
"
$LINENO
"
"pwritev"
"ac_cv_func_pwritev"
if
test
"x
$ac_cv_func_pwritev
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_PWRITEV 1
_ACEOF
fi
done
for
ac_func
in
preadv
do
:
ac_fn_c_check_func
"
$LINENO
"
"preadv"
"ac_cv_func_preadv"
if
test
"x
$ac_cv_func_preadv
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_PREADV 1
_ACEOF
fi
done
for
ac_func
in
pwritev2
do
:
ac_fn_c_check_func
"
$LINENO
"
"pwritev2"
"ac_cv_func_pwritev2"
if
test
"x
$ac_cv_func_pwritev2
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_PWRITEV2 1
_ACEOF
fi
done
for
ac_func
in
preadv2
do
:
ac_fn_c_check_func
"
$LINENO
"
"preadv2"
"ac_cv_func_preadv2"
if
test
"x
$ac_cv_func_preadv2
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_PREADV2 1
_ACEOF
fi
done
DARSHAN_VERSION
=
"3.2.1"
...
...
darshan-runtime/configure.in
View file @
6d938263
...
...
@@ -247,6 +247,8 @@ AS_IF([test "x$enable_hdf5_mod" != "xno"],
AC_DEFINE(DARSHAN_HDF5_VERS_1_10_PLUS, 1, Define if HDF5 module built with version 1.10+)
DARSHAN_HDF5_ADD_DFLUSH_LD_OPTS="--undefined=H5Dflush --wrap=H5Dflush"
)
AC_CHECK_PROG(H5PCC_CHECK, h5pcc, "yes", "no", "${enable_hdf5_mod}/bin")
AS_IF([test x"$H5PCC_CHECK" = x"yes"], [AC_DEFINE(DARSHAN_HDF5_PAR_BUILD, 1, Define if HDF5 built with parallel support)])
)
# PNETCDF module
...
...
@@ -493,6 +495,11 @@ AC_TRY_COMPILE(
DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
)
# look for glibc-specific functions
AC_CHECK_FUNCS([pwritev],[],[])
AC_CHECK_FUNCS([preadv],[],[])
AC_CHECK_FUNCS([pwritev2],[],[])
AC_CHECK_FUNCS([preadv2],[],[])
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
...
...
darshan-runtime/darshan-mk-log-dirs.pl.in
View file @
6d938263
...
...
@@ -25,7 +25,12 @@ umask(0);
# go through the end of next year
for
(
$i
=
$year
;
$i
<
(
$year
+
2
);
$i
++
)
{
mkdir
("
$LOGDIR
/
$i
",
0755
)
or
die
("
Error: could not mkdir
$LOGDIR
/
$i
.
\n
");
if
(
!
mkdir
("
$LOGDIR
/
$i
",
0755
))
{
print
STDERR
"
Error: mkdir(
$LOGDIR
/
$i
): $!.
\n
";
print
STDERR
"
Error: please make sure that the
$LOGDIR
directory already exists and is writeable.
\n
";
exit
(
1
);
}
for
(
$j
=
1
;
$j
<
13
;
$j
++
)
{
mkdir
("
$LOGDIR
/
$i
/
$j
",
0755
)
or
die
("
Error: could not mkdir
$LOGDIR
/
$i
/
$j
.
\n
");
...
...
darshan-runtime/darshan-runtime-config.h.in
View file @
6d938263
...
...
@@ -3,6 +3,9 @@
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define if HDF5 built with parallel support */
#undef DARSHAN_HDF5_PAR_BUILD
/* Define if HDF5 module built with version 1.10+ */
#undef DARSHAN_HDF5_VERS_1_10_PLUS
...
...
@@ -36,6 +39,18 @@
/* Define if off64_t type is defined */
#undef HAVE_OFF64_T
/* Define to 1 if you have the `preadv' function. */
#undef HAVE_PREADV
/* Define to 1 if you have the `preadv2' function. */
#undef HAVE_PREADV2
/* Define to 1 if you have the `pwritev' function. */
#undef HAVE_PWRITEV
/* Define to 1 if you have the `pwritev2' function. */
#undef HAVE_PWRITEV2
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
...
...
darshan-runtime/lib/darshan-core.c
View file @
6d938263
...
...
@@ -602,7 +602,7 @@ void darshan_core_shutdown()
}
/* allow the module an opportunity to reduce shared files */
if
(
this_mod
->
mod_funcs
.
mod_redux_func
&&
(
mod_shared_rec
s
>
0
)
&&
if
(
this_mod
->
mod_funcs
.
mod_redux_func
&&
(
mod_shared_rec
_cnt
>
0
)
&&
(
!
getenv
(
"DARSHAN_DISABLE_SHARED_REDUCTION"
)))
this_mod
->
mod_funcs
.
mod_redux_func
(
mod_buf
,
final_core
->
mpi_comm
,
mod_shared_recs
,
mod_shared_rec_cnt
);
...
...
@@ -778,7 +778,10 @@ static void *darshan_init_mmap_log(struct darshan_core_runtime* core, int jobid)
(
void
)
gethostname
(
hname
,
sizeof
(
hname
));
logmod
=
darshan_hash
((
void
*
)
hname
,
strlen
(
hname
),
hlevel
);
}
PMPI_Bcast
(
&
logmod
,
1
,
MPI_UINT64_T
,
0
,
core
->
mpi_comm
);
#ifdef HAVE_MPI
if
(
using_mpi
)
PMPI_Bcast
(
&
logmod
,
1
,
MPI_UINT64_T
,
0
,
core
->
mpi_comm
);
#endif
/* construct a unique temporary log file name for this process
* to write mmap log data to
...
...
@@ -1080,13 +1083,17 @@ static void darshan_get_exe_and_mounts(struct darshan_core_runtime *core,
if
(
fh
)
{
ii
=
0
;
s
=
fgets
(
cmdl
,
DARSHAN_EXE_LEN
,
fh
);
for
(
i
=
1
;
i
<
DARSHAN_EXE_LEN
;
i
++
)
{
if
(
cmdl
[
i
]
==
0
&&
ii
==
0
)
{
cmdl
[
i
]
=
' '
;
ii
=
1
;
}
else
if
(
cmdl
[
i
]
==
0
&&
ii
==
1
)
{
break
;
}
else
{
ii
=
0
;
if
(
!
s
)
sprintf
(
cmdl
,
"%s <unknown args>"
,
__progname_full
);
else
{
for
(
i
=
1
;
i
<
DARSHAN_EXE_LEN
;
i
++
)
{
if
(
cmdl
[
i
]
==
0
&&
ii
==
0
)
{
cmdl
[
i
]
=
' '
;
ii
=
1
;
}
else
if
(
cmdl
[
i
]
==
0
&&
ii
==
1
)
{
break
;
}
else
{
ii
=
0
;
}
}
}
fclose
(
fh
);
...
...
darshan-runtime/lib/darshan-dxt.c
View file @
6d938263
...
...
@@ -280,9 +280,6 @@ void dxt_posix_runtime_initialize()
#endif
.
mod_shutdown_func
=
&
dxt_posix_shutdown
};
int
ret
;
double
tmpfloat
;
char
*
envstr
;
/* determine whether tracing should be generally disabled/enabled */
if
(
getenv
(
"DXT_ENABLE_IO_TRACE"
))
...
...
@@ -348,9 +345,6 @@ void dxt_mpiio_runtime_initialize()
#endif
.
mod_shutdown_func
=
&
dxt_mpiio_shutdown
};
int
ret
;
double
tmpfloat
;
char
*
envstr
;
/* determine whether tracing should be generally disabled/enabled */
if
(
getenv
(
"DXT_ENABLE_IO_TRACE"
))
...
...
darshan-runtime/lib/darshan-hdf5.c
View file @
6d938263
...
...
@@ -131,7 +131,7 @@ static int my_rank = -1;
HDF5_UNLOCK(); \
} while(0)
#define H5F_RECORD_OPEN(__ret, __path, __
fapl
, __tm1, __tm2) do { \
#define H5F_RECORD_OPEN(__ret, __path, __
use_mpio
, __tm1, __tm2) do { \
darshan_record_id __rec_id; \
struct hdf5_file_record_ref *__rec_ref; \
char *__newpath; \
...
...
@@ -148,8 +148,7 @@ static int my_rank = -1;
if(__newpath != __path) free(__newpath); \
break; \
} \
if(__fapl != H5P_DEFAULT && H5Pget_fapl_mpio(__fapl, NULL, NULL) >= 0) \
__rec_ref->file_rec->counters[H5F_USE_MPIIO] = 1; \
__rec_ref->file_rec->counters[H5F_USE_MPIIO] = __use_mpio; \
__rec_ref->file_rec->counters[H5F_OPENS] += 1; \
if(__rec_ref->file_rec->fcounters[H5F_F_OPEN_START_TIMESTAMP] == 0 || \
__rec_ref->file_rec->fcounters[H5F_F_OPEN_START_TIMESTAMP] > __tm1) \
...
...
@@ -168,14 +167,21 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
char
*
tmp
;
double
tm1
,
tm2
;
unsigned
majnum
,
minnum
,
relnum
;
int
tmp_rank
=
my_rank
;
int
use_mpio
=
0
;
H5get_libversion
(
&
majnum
,
&
minnum
,
&
relnum
);
#ifdef DARSHAN_HDF5_VERS_1_10_PLUS
if
((
majnum
==
1
)
&&
(
minnum
<
10
))
{
if
(
my_rank
<
0
)
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
if
(
tmp_rank
<
0
)
#ifdef HAVE_MPI
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
tmp_rank
);
#else
tmp_rank
=
0
;
#endif
if
(
tmp_rank
==
0
)
{
darshan_core_fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version (%d.%d) incompatible with Darshan module (1.10+).
\n
"
,
majnum
,
minnum
);
}
...
...
@@ -184,9 +190,14 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
#else
if
((
majnum
>
1
)
||
(
minnum
>=
10
))
{
if
(
my_rank
<
0
)
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
if
(
tmp_rank
<
0
)
#ifdef HAVE_MPI
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
tmp_rank
);
#else
tmp_rank
=
0
;
#endif
if
(
tmp_rank
==
0
)
{
darshan_core_fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version (%d.%d) incompatible with Darshan module (1.10-).
\n
"
,
majnum
,
minnum
);
}
...
...
@@ -212,8 +223,13 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
filename
=
tmp
+
1
;
}
#ifdef DARSHAN_HDF5_PAR_BUILD
if
(
access_plist
!=
H5P_DEFAULT
&&
H5Pget_fapl_mpio
(
access_plist
,
NULL
,
NULL
)
>=
0
)
use_mpio
=
1
;
#endif
H5F_PRE_RECORD
();
H5F_RECORD_OPEN
(
ret
,
filename
,
access_plist
,
tm1
,
tm2
);
H5F_RECORD_OPEN
(
ret
,
filename
,
use_mpio
,
tm1
,
tm2
);
H5F_POST_RECORD
();
}
...
...
@@ -227,14 +243,21 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
char
*
tmp
;
double
tm1
,
tm2
;
unsigned
majnum
,
minnum
,
relnum
;
int
tmp_rank
=
my_rank
;
int
use_mpio
=
0
;
H5get_libversion
(
&
majnum
,
&
minnum
,
&
relnum
);
#ifdef DARSHAN_HDF5_VERS_1_10_PLUS
if
((
majnum
==
1
)
&&
(
minnum
<
10
))
{
if
(
my_rank
<
0
)
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
if
(
tmp_rank
<
0
)
#ifdef HAVE_MPI
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
tmp_rank
);
#else
tmp_rank
=
0
;
#endif
if
(
tmp_rank
==
0
)
{
darshan_core_fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version (%d.%d) incompatible with Darshan module (1.10+).
\n
"
,
majnum
,
minnum
);
}
...
...
@@ -243,9 +266,14 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
#else
if
((
majnum
>
1
)
||
(
minnum
>=
10
))
{
if
(
my_rank
<
0
)
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
if
(
tmp_rank
<
0
)
#ifdef HAVE_MPI
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
tmp_rank
);
#else
tmp_rank
=
0
;
#endif
if
(
tmp_rank
==
0
)
{
darshan_core_fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version (%d.%d) incompatible with Darshan module (1.10-).
\n
"
,
majnum
,
minnum
);
}
...
...
@@ -271,8 +299,13 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
filename
=
tmp
+
1
;
}
#ifdef DARSHAN_HDF5_PAR_BUILD
if
(
access_plist
!=
H5P_DEFAULT
&&
H5Pget_fapl_mpio
(
access_plist
,
NULL
,
NULL
)
>=
0
)
use_mpio
=
1
;
#endif
H5F_PRE_RECORD
();
H5F_RECORD_OPEN
(
ret
,
filename
,
access_plist
,
tm1
,
tm2
);
H5F_RECORD_OPEN
(
ret
,
filename
,
use_mpio
,
tm1
,
tm2
);
H5F_POST_RECORD
();
}
...
...
@@ -580,7 +613,6 @@ herr_t DARSHAN_DECL(H5Dread)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_spac
hsize_t
count_dims
[
H5D_MAX_NDIMS
]
=
{
0
};
hsize_t
block_dims
[
H5D_MAX_NDIMS
]
=
{
0
};
int64_t
common_access_vals
[
H5D_MAX_NDIMS
+
H5D_MAX_NDIMS
+
1
]
=
{
0
};
H5FD_mpio_xfer_t
xfer_mode
;
struct
darshan_common_val_counter
*
cvc
;
int
i
;
double
tm1
,
tm2
,
elapsed
;
...
...
@@ -660,12 +692,15 @@ herr_t DARSHAN_DECL(H5Dread)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_spac
&
(
rec_ref
->
dataset_rec
->
counters
[
H5D_ACCESS1_ACCESS
]),
&
(
rec_ref
->
dataset_rec
->
counters
[
H5D_ACCESS1_COUNT
]),
cvc
->
vals
,
cvc
->
nvals
,
cvc
->
freq
,
0
);
#ifdef DARSHAN_HDF5_PAR_BUILD
if
(
xfer_plist_id
!=
H5P_DEFAULT
)
{
H5FD_mpio_xfer_t
xfer_mode
;
tmp_ret
=
H5Pget_dxpl_mpio
(
xfer_plist_id
,
&
xfer_mode
);
if
(
tmp_ret
>=
0
&&
xfer_mode
==
H5FD_MPIO_COLLECTIVE
)
rec_ref
->
dataset_rec
->
counters
[
H5D_USE_MPIIO_COLLECTIVE
]
=
1
;
}
#endif
if
(
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_READ_START_TIMESTAMP
]
==
0
||
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_READ_START_TIMESTAMP
]
>
tm1
)
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_READ_START_TIMESTAMP
]
=
tm1
;
...
...
@@ -699,7 +734,6 @@ herr_t DARSHAN_DECL(H5Dwrite)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_spa
hsize_t
count_dims
[
H5D_MAX_NDIMS
]
=
{
0
};
hsize_t
block_dims
[
H5D_MAX_NDIMS
]
=
{
0
};
int64_t
common_access_vals
[
H5D_MAX_NDIMS
+
H5D_MAX_NDIMS
+
1
]
=
{
0
};
H5FD_mpio_xfer_t
xfer_mode
;
struct
darshan_common_val_counter
*
cvc
;
int
i
;
double
tm1
,
tm2
,
elapsed
;
...
...
@@ -779,12 +813,15 @@ herr_t DARSHAN_DECL(H5Dwrite)(hid_t dataset_id, hid_t mem_type_id, hid_t mem_spa
&
(
rec_ref
->
dataset_rec
->
counters
[
H5D_ACCESS1_ACCESS
]),
&
(
rec_ref
->
dataset_rec
->
counters
[
H5D_ACCESS1_COUNT
]),
cvc
->
vals
,
cvc
->
nvals
,
cvc
->
freq
,
0
);
#ifdef DARSHAN_HDF5_PAR_BUILD
if
(
xfer_plist_id
!=
H5P_DEFAULT
)
{
H5FD_mpio_xfer_t
xfer_mode
;
tmp_ret
=
H5Pget_dxpl_mpio
(
xfer_plist_id
,
&
xfer_mode
);
if
(
tmp_ret
>=
0
&&
xfer_mode
==
H5FD_MPIO_COLLECTIVE
)
rec_ref
->
dataset_rec
->
counters
[
H5D_USE_MPIIO_COLLECTIVE
]
=
1
;
}
#endif
if
(
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_WRITE_START_TIMESTAMP
]
==
0
||
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_WRITE_START_TIMESTAMP
]
>
tm1
)
rec_ref
->
dataset_rec
->
fcounters
[
H5D_F_WRITE_START_TIMESTAMP
]
=
tm1
;
...
...
darshan-runtime/lib/darshan-posix.c
View file @
6d938263
...
...
@@ -62,7 +62,23 @@ DARSHAN_FORWARD_DECL(pwrite, ssize_t, (int fd, const void *buf, size_t count, of
DARSHAN_FORWARD_DECL
(
pread64
,
ssize_t
,
(
int
fd
,
void
*
buf
,
size_t
count
,
off64_t
offset
));
DARSHAN_FORWARD_DECL
(
pwrite64
,
ssize_t
,
(
int
fd
,
const
void
*
buf
,
size_t
count
,
off64_t
offset
));
DARSHAN_FORWARD_DECL
(
readv
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
));
#ifdef HAVE_PREADV
DARSHAN_FORWARD_DECL
(
preadv
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
));
DARSHAN_FORWARD_DECL
(
preadv64
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off64_t
offset
));
#endif
#ifdef HAVE_PREADV2
DARSHAN_FORWARD_DECL
(
preadv2
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
,
int
flags
));
DARSHAN_FORWARD_DECL
(
preadv64v2
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off64_t
offset
,
int
flags
));
#endif
DARSHAN_FORWARD_DECL
(
writev
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
));
#ifdef HAVE_PWRITEV
DARSHAN_FORWARD_DECL
(
pwritev
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
));
DARSHAN_FORWARD_DECL
(
pwritev64
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off64_t
offset
));
#endif
#ifdef HAVE_PWRITEV2
DARSHAN_FORWARD_DECL
(
pwritev2
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
,
int
flags
));
DARSHAN_FORWARD_DECL
(
pwritev64v2
,
ssize_t
,
(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off64_t
offset
,
int
flags
));
#endif
DARSHAN_FORWARD_DECL
(
lseek
,
off_t
,
(
int
fd
,
off_t
offset
,
int
whence
));
DARSHAN_FORWARD_DECL
(
lseek64
,
off64_t
,
(
int
fd
,
off64_t
offset
,
int
whence
));
DARSHAN_FORWARD_DECL
(
__xstat
,
int
,
(
int
vers
,
const
char
*
path
,
struct
stat
*
buf
));
...
...
@@ -247,7 +263,7 @@ static int darshan_mem_alignment = 1;
#define POSIX_RECORD_READ(__ret, __fd, __pread_flag, __pread_offset, __aligned, __tm1, __tm2) do { \
struct posix_file_record_ref* rec_ref; \
size
_t stride; \
int64
_t stride; \
int64_t this_offset; \
int64_t file_alignment; \
struct darshan_common_val_counter *cvc; \
...
...
@@ -310,7 +326,7 @@ static int darshan_mem_alignment = 1;
#define POSIX_RECORD_WRITE(__ret, __fd, __pwrite_flag, __pwrite_offset, __aligned, __tm1, __tm2) do { \
struct posix_file_record_ref* rec_ref; \
size
_t stride; \
int64
_t stride; \
int64_t this_offset; \
int64_t file_alignment; \
struct darshan_common_val_counter *cvc; \
...
...
@@ -991,6 +1007,115 @@ ssize_t DARSHAN_DECL(readv)(int fd, const struct iovec *iov, int iovcnt)
return
(
ret
);
}
#ifdef HAVE_PREADV
ssize_t
DARSHAN_DECL
(
preadv
)(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
)
{
ssize_t
ret
;
int
aligned_flag
=
1
;
int
i
;
double
tm1
,
tm2
;
MAP_OR_FAIL
(
preadv
);
for
(
i
=
0
;
i
<
iovcnt
;
i
++
)
{
if
(((
unsigned
long
)
iov
[
i
].
iov_base
%
darshan_mem_alignment
)
!=
0
)
aligned_flag
=
0
;
}
tm1
=
darshan_core_wtime
();
ret
=
__real_preadv
(
fd
,
iov
,
iovcnt
,
offset
);
tm2
=
darshan_core_wtime
();
POSIX_PRE_RECORD
();
POSIX_RECORD_READ
(
ret
,
fd
,
1
,
offset
,
aligned_flag
,
tm1
,
tm2
);
POSIX_POST_RECORD
();
return
(
ret
);
}
ssize_t
DARSHAN_DECL
(
preadv64
)(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off64_t
offset
)
{
ssize_t
ret
;
int
aligned_flag
=
1
;
int
i
;
double
tm1
,
tm2
;
MAP_OR_FAIL
(
preadv64
);
for
(
i
=
0
;
i
<
iovcnt
;
i
++
)
{
if
(((
unsigned
long
)
iov
[
i
].
iov_base
%
darshan_mem_alignment
)
!=
0
)
aligned_flag
=
0
;
}
tm1
=
darshan_core_wtime
();
ret
=
__real_preadv64
(
fd
,
iov
,
iovcnt
,
offset
);
tm2
=
darshan_core_wtime
();
POSIX_PRE_RECORD
();
POSIX_RECORD_READ
(
ret
,
fd
,
1
,
offset
,
aligned_flag
,
tm1
,
tm2
);
POSIX_POST_RECORD
();
return
(
ret
);
}
#endif
/* HAVE_PREADV */
#ifdef HAVE_PREADV2
ssize_t
DARSHAN_DECL
(
preadv2
)(
int
fd
,
const
struct
iovec
*
iov
,
int
iovcnt
,
off_t
offset
,
int
flags
)
{
ssize_t
ret
;
int
aligned_flag
=
1
;
int
i
;
double
tm1
,
tm2
;
MAP_OR_FAIL
(
preadv2
);