added write throttling for large concurency jobs with MPI-POSIX VFD
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
/README -text
|
||||
/autogen.sh -text
|
||||
/config.guess -text
|
||||
/config.h.in -text
|
||||
/config.sub -text
|
||||
/configure.ac -text
|
||||
/depcomp -text
|
||||
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* "" */
|
||||
#undef MY_BUILD_CPU
|
||||
|
||||
/* "" */
|
||||
#undef MY_BUILD_OS
|
||||
|
||||
/* "" */
|
||||
#undef MY_BUILD_VENDOR
|
||||
|
||||
/* "" */
|
||||
#undef MY_GNUNAME
|
||||
|
||||
/* "" */
|
||||
#undef MY_UNAME
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
@@ -998,6 +998,30 @@ _H5MultiBlock_write_data (
|
||||
#endif
|
||||
if ( dataset < 0 ) return HANDLE_H5D_CREATE_ERR ( name, f->timestep );
|
||||
|
||||
#if H5PART_THROTTLE_WRITES > 0
|
||||
int ret;
|
||||
int token = 1;
|
||||
if (f->myproc == 0) {
|
||||
_H5Part_print_info ("Using throttled writes with factor = %d",
|
||||
H5PART_THROTTLE_WRITES);
|
||||
}
|
||||
if (f->myproc % H5PART_THROTTLE_WRITES > 0) {
|
||||
_H5Part_print_debug_detail (
|
||||
"[%d] Waiting on write token from %d",
|
||||
f->myproc, f->myproc - 1);
|
||||
// wait to receive token before continuing with write
|
||||
ret = MPI_Recv(
|
||||
&token, 1, MPI_INT,
|
||||
f->myproc - 1, // receive from previous proc
|
||||
f->myproc, // use this proc id as message tag
|
||||
f->comm,
|
||||
MPI_STATUS_IGNORE
|
||||
);
|
||||
if ( ret != MPI_SUCCESS ) return HANDLE_MPI_SENDRECV_ERR;
|
||||
}
|
||||
_H5Part_print_debug_detail ("[%d] Executing write", f->myproc);
|
||||
#endif
|
||||
|
||||
herr = H5Dwrite (
|
||||
dataset,
|
||||
type,
|
||||
@@ -1007,6 +1031,24 @@ _H5MultiBlock_write_data (
|
||||
data );
|
||||
if ( herr < 0 ) return HANDLE_H5D_WRITE_ERR ( name, f->timestep );
|
||||
|
||||
#if H5PART_THROTTLE_WRITES > 0
|
||||
if (f->myproc % H5PART_THROTTLE_WRITES < H5PART_THROTTLE_WRITES - 1) {
|
||||
// pass token to next proc
|
||||
if (f->myproc + 1 < f->nprocs) {
|
||||
_H5Part_print_debug_detail (
|
||||
"[%d] Passing write token to %d",
|
||||
f->myproc, f->myproc + 1);
|
||||
ret = MPI_Send(
|
||||
&token, 1, MPI_INT,
|
||||
f->myproc + 1, // send to next proc
|
||||
f->myproc + 1, // use the id of the target as tag
|
||||
f->comm
|
||||
);
|
||||
}
|
||||
if ( ret != MPI_SUCCESS ) return HANDLE_MPI_SENDRECV_ERR;
|
||||
}
|
||||
#endif
|
||||
|
||||
herr = H5Dclose ( dataset );
|
||||
if ( herr < 0 ) return HANDLE_H5D_CLOSE_ERR;
|
||||
|
||||
|
||||
+1
-1
@@ -1687,7 +1687,7 @@ _H5Part_set_step (
|
||||
f->timestep = step;
|
||||
|
||||
if( f->mode & H5PART_READ ) {
|
||||
_H5Part_print_info (
|
||||
_H5Part_print_debug (
|
||||
"Proc[%d]: Set step to #%lld for file %lld",
|
||||
f->myproc,
|
||||
(long long)step,
|
||||
|
||||
Reference in New Issue
Block a user