use more inclusive terms in the code
Specifically, this patch makes the following changes. build scripts: - master_top_srcdir -> main_top_srcdir Git: - "master" -> "main" branch (variable names and comments) global structures and variables: - MPIR_ThreadInfo.master_thread -> MPIR_ThreadInfo.main_thread - struct PMIMaster -> struct PMIMain - PMI2_Connect_comm_t.isMaster -> PMI2_Connect_comm_t.isMain names of tests: - spawntest_master -> spawntest_parent - taskmaster -> taskmanager - th_taskmaster -> th_taskmanager` comments and names of temporary/local variables: - master -> main, parent, server, ... - slave -> child, worker, client, ...
Esse commit está contido em:
+1
-1
@@ -7,7 +7,7 @@ agreement. http://www.mpich.org/documentation/contributor-docs/
|
||||
standards. https://wiki.mpich.org/mpich/index.php/Coding_Standards
|
||||
|
||||
3. Use the git pre-commit hook included with MPICH
|
||||
(https://github.com/pmodels/mpich/blob/master/maint/hooks/pre-commit)
|
||||
(mpich_root/maint/hooks/pre-commit)
|
||||
to catch whitespace violations in new code. Patches with improper
|
||||
whitespace may be automatically rejected for inclusion in MPICH. To
|
||||
activate the pre-commit hook (from the top-level of your working
|
||||
|
||||
@@ -50,7 +50,7 @@ else
|
||||
# come up with (see tt#1007) [goodell@]
|
||||
AS_CASE(["$INSTALL"],
|
||||
[/*],[:],
|
||||
[*install-sh*],[INSTALL="$master_top_srcdir/$INSTALL"])
|
||||
[*install-sh*],[INSTALL="$main_top_srcdir/$INSTALL"])
|
||||
|
||||
# Check that this install really works
|
||||
rm -f conftest
|
||||
|
||||
@@ -378,11 +378,11 @@ AC_DEFUN([PAC_CC_SUBDIR_SHLIBS],[
|
||||
if test -z "$LIBTOOL" ; then
|
||||
AC_MSG_WARN([libtool selected for shared library support but LIBTOOL is not defined])
|
||||
fi
|
||||
# Libtool needs master_top_builddir
|
||||
if test "X$master_top_builddir" = "X" ; then
|
||||
AC_MSG_ERROR([Libtool requires master_top_builddir - check configure.ac sources])
|
||||
# Libtool needs main_top_builddir
|
||||
if test "X$main_top_builddir" = "X" ; then
|
||||
AC_MSG_ERROR([Libtool requires main_top_builddir - check configure.ac sources])
|
||||
fi
|
||||
AC_SUBST(master_top_builddir)
|
||||
AC_SUBST(main_top_builddir)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
+23
-23
@@ -786,7 +786,7 @@ if test -z "$top_srcdir" ; then
|
||||
else
|
||||
use_top_srcdir=$top_srcdir
|
||||
fi
|
||||
if test -z "$master_top_srcdir" ; then
|
||||
if test -z "$main_top_srcdir" ; then
|
||||
# This needs to be an absolute pathname
|
||||
case "$use_top_srcdir" in
|
||||
/*) ;;
|
||||
@@ -794,20 +794,20 @@ if test -z "$master_top_srcdir" ; then
|
||||
use_top_srcdir=`(cd $use_top_srcdir && pwd)`
|
||||
;;
|
||||
esac
|
||||
master_top_srcdir=$use_top_srcdir
|
||||
main_top_srcdir=$use_top_srcdir
|
||||
fi
|
||||
# Get the directory that we're running in...
|
||||
if test -z "$master_top_builddir" ; then
|
||||
master_top_builddir="`pwd`"
|
||||
if test -z "$main_top_builddir" ; then
|
||||
main_top_builddir="`pwd`"
|
||||
fi
|
||||
AC_SUBST(master_top_builddir)
|
||||
AC_SUBST(master_top_srcdir)
|
||||
export master_top_builddir
|
||||
export master_top_srcdir
|
||||
AC_SUBST(main_top_builddir)
|
||||
AC_SUBST(main_top_srcdir)
|
||||
export main_top_builddir
|
||||
export main_top_srcdir
|
||||
|
||||
if test -z "$with_cross"; then
|
||||
if test -f "$master_top_srcdir/src/cross/$host_alias"; then
|
||||
with_cross="$master_top_srcdir/src/cross/$host_alias"
|
||||
if test -f "$main_top_srcdir/src/cross/$host_alias"; then
|
||||
with_cross="$main_top_srcdir/src/cross/$host_alias"
|
||||
else
|
||||
with_cross=no
|
||||
fi
|
||||
@@ -1026,7 +1026,7 @@ if test "$with_mpl_prefix" = "embedded" ; then
|
||||
# no need for libtool versioning when embedding MPL
|
||||
mpl_subdir_args="--disable-versioning --enable-embedded"
|
||||
PAC_CONFIG_SUBDIR_ARGS([src/mpl],[$mpl_subdir_args],[],[AC_MSG_ERROR(MPL configure failed)])
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/src/mpl/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/src/mpl/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/src/mpl/include], [CPPFLAGS])
|
||||
|
||||
mplsrcdir="src/mpl"
|
||||
@@ -1075,10 +1075,10 @@ if test "$enable_izem_queue" != "no" && test "$enable_izem_queue" != "none"; the
|
||||
if test -e "${use_top_srcdir}/modules/izem" ; then
|
||||
zm_subdir_args="--enable-embedded"
|
||||
PAC_CONFIG_SUBDIR_ARGS([modules/izem],[$zm_subdir_args],[],[AC_MSG_ERROR(Izem configure failed)])
|
||||
zmsrcdir="${master_top_builddir}/modules/izem"
|
||||
zmlib="${master_top_builddir}/modules/izem/src/lib${ZMLIBNAME}.la"
|
||||
zmsrcdir="${main_top_builddir}/modules/izem"
|
||||
zmlib="${main_top_builddir}/modules/izem/src/lib${ZMLIBNAME}.la"
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/izem/src/include],[CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/izem/src/include],[CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/izem/src/include],[CPPFLAGS])
|
||||
else
|
||||
AC_MSG_WARN([Attempted to use the embedded Izem source tree in "modules/izem", but it is missing. Configuration or compilation may fail later.])
|
||||
fi
|
||||
@@ -1149,7 +1149,7 @@ if test "$with_yaksa_prefix" = "embedded" ; then
|
||||
# no need for libtool versioning when embedding YAKSA
|
||||
yaksa_subdir_args="--enable-embedded"
|
||||
PAC_CONFIG_SUBDIR_ARGS([modules/yaksa],[$yaksa_subdir_args],[],[AC_MSG_ERROR(YAKSA configure failed)])
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/yaksa/src/frontend/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/yaksa/src/frontend/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/yaksa/src/frontend/include], [CPPFLAGS])
|
||||
|
||||
yaksasrcdir="modules/yaksa"
|
||||
@@ -1202,10 +1202,10 @@ PAC_PUSH_ALL_FLAGS()
|
||||
PAC_RESET_ALL_FLAGS()
|
||||
PAC_CONFIG_SUBDIR_ARGS([modules/json-c],[--disable-werror],[],[AC_MSG_ERROR(json-c configure failed)])
|
||||
PAC_POP_ALL_FLAGS()
|
||||
jsonsrcdir="${master_top_builddir}/modules/json-c"
|
||||
jsonlib="${master_top_builddir}/modules/json-c/libjson-c.la"
|
||||
jsonsrcdir="${main_top_builddir}/modules/json-c"
|
||||
jsonlib="${main_top_builddir}/modules/json-c/libjson-c.la"
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/json-c],[CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/json-c],[CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/json-c],[CPPFLAGS])
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# HWLOC
|
||||
@@ -1597,7 +1597,7 @@ if test "$enable_romio" = "yes" ; then
|
||||
# This ought to be sufficient, but there is also a symlink setup in
|
||||
# src/include to accomodate current mpicc limitations. See
|
||||
# src/mpi/Makefile.mk for more info.
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/src/mpi/romio/include],[CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/src/mpi/romio/include],[CPPFLAGS])
|
||||
|
||||
# Set environment variables that the romio configure expects
|
||||
export use_top_srcdir
|
||||
@@ -2200,7 +2200,7 @@ if test "$has_fort_real8" = "yes" ; then
|
||||
cp src/include/mpif.h src/binding/fortran/mpif_h/mpif.h
|
||||
fi
|
||||
fi],
|
||||
master_top_srcdir=$master_top_srcdir
|
||||
main_top_srcdir=$main_top_srcdir
|
||||
enable_f77=$enable_f77
|
||||
enable_fc=$enable_fc
|
||||
has_exclaim=$has_exclaim
|
||||
@@ -3425,7 +3425,7 @@ export MPIX_C_FLOAT16
|
||||
#
|
||||
# ----------------------------------------------------------------------------
|
||||
if test "$enable_f77" = yes ; then
|
||||
# Up to size checking code in master configure.ac (where it tries to
|
||||
# Up to size checking code in main configure.ac (where it tries to
|
||||
# find the matching C sizes) as part of defining mpi_integer8 etc.
|
||||
# The results are available in pac_cv_sizeof_f77_<type>
|
||||
# Size is 0 if unknown or unavailable (or cross-compiling)
|
||||
@@ -3954,7 +3954,7 @@ dnl Removed MPI_2COMPLEX and MPI_2DOUBLE_COMPLEX, leaving comments to explain th
|
||||
# interface (was error)
|
||||
# Check to see if the f77 binding has enabled the code to support
|
||||
# the case of int != fint.
|
||||
if grep HAVE_FINT_IS_INT $master_top_srcdir/src/binding/fortran/mpif_h/testf.c 2>&1 1>/dev/null ; then
|
||||
if grep HAVE_FINT_IS_INT $main_top_srcdir/src/binding/fortran/mpif_h/testf.c 2>&1 1>/dev/null ; then
|
||||
AC_MSG_WARN([Fortran integers and C ints are not the same size. Support for this case is experimental; use at your own risk])
|
||||
else
|
||||
AC_MSG_ERROR([Fortran integers and C ints are not the same size. The current Fortran binding does not support this case. Either force the Fortran compiler to use integers of $ac_cv_sizeof_int bytes, or use --disable-fortran on the configure line for MPICH.])
|
||||
@@ -4728,7 +4728,7 @@ typedef struct MPIR_Comm MPIR_Comm;
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "${master_top_srcdir}/src/include/mpir_bsend.h"]
|
||||
#include "${main_top_srcdir}/src/include/mpir_bsend.h"]
|
||||
)
|
||||
if test "$ac_cv_sizeof_MPII_Bsend_data_t" = "0" ; then
|
||||
AC_MSG_ERROR([Unable to determine the size of MPI_BSEND_OVERHEAD])
|
||||
|
||||
@@ -333,7 +333,7 @@ can be specified. Do
|
||||
\end{verbatim}
|
||||
for details. A typical example is:
|
||||
\begin{verbatim}
|
||||
mpiexec -f machinefile -n 1 ./master : -n 19 ./slave
|
||||
mpiexec -f machinefile -n 1 ./main : -n 19 ./child
|
||||
\end{verbatim}
|
||||
to ensure that the process with rank 0 runs on your workstation.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define MAX(x, y) (((x) > (y))?(x):(y))
|
||||
#endif
|
||||
|
||||
#define DEFAULT_NUM_SLAVES 3 /* default number of children to spawn */
|
||||
#define DEFAULT_NUM_CHILDREN 3 /* default number of children to spawn */
|
||||
#define DEFAULT_PORT 7470 /* default port to listen on */
|
||||
#define NOVALUE 99999 /* indicates a parameter is as of yet unspecified */
|
||||
#define MAX_ITERATIONS 10000 /* maximum 'depth' to look for mandelbrot value */
|
||||
@@ -160,8 +160,8 @@ int main(int argc, char *argv[])
|
||||
color_t *colors = NULL;
|
||||
MPI_Status status;
|
||||
int save_image = 0;
|
||||
int num_children = DEFAULT_NUM_SLAVES;
|
||||
int master = 1;
|
||||
int num_children = DEFAULT_NUM_CHILDREN;
|
||||
int parent = 1;
|
||||
MPI_Comm parent, *child_comm = NULL;
|
||||
MPI_Request *child_request = NULL;
|
||||
int error_code, error;
|
||||
@@ -179,7 +179,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (parent == MPI_COMM_NULL) {
|
||||
if (numprocs > 1) {
|
||||
printf("Error: only one process allowed for the master.\n");
|
||||
printf("Error: only one process allowed for the parent.\n");
|
||||
PrintUsage();
|
||||
error_code = MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
exit(error_code);
|
||||
@@ -187,7 +187,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("Welcome to the Mandelbrot/Julia set explorer.\n");
|
||||
|
||||
master = 1;
|
||||
parent = 1;
|
||||
|
||||
/* Get inputs-- region to view (must be within x/ymin to x/ymax, make sure
|
||||
* xmax>xmin and ymax>ymin) and resolution (number of pixels along an edge,
|
||||
@@ -205,18 +205,18 @@ int main(int argc, char *argv[])
|
||||
if (julia == 1) /* we're doing a julia figure */
|
||||
check_julia_params(&julia_constant.real, &julia_constant.imaginary);
|
||||
|
||||
/* spawn slaves */
|
||||
/* spawn children */
|
||||
child_comm = (MPI_Comm *) malloc(num_children * sizeof(MPI_Comm));
|
||||
child_request = (MPI_Request *) malloc(num_children * sizeof(MPI_Request));
|
||||
result = (header_t *) malloc(num_children * sizeof(header_t));
|
||||
if (child_comm == NULL || child_request == NULL || result == NULL) {
|
||||
printf
|
||||
("Error: unable to allocate an array of %d communicators, requests and work objects for the slaves.\n",
|
||||
("Error: unable to allocate an array of %d communicators, requests and work objects for the children.\n",
|
||||
num_children);
|
||||
error_code = MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
exit(error_code);
|
||||
}
|
||||
printf("Spawning %d slaves.\n", num_children);
|
||||
printf("Spawning %d children.\n", num_children);
|
||||
for (i = 0; i < num_children; i++) {
|
||||
error = MPI_Comm_spawn(argv[0], MPI_ARGV_NULL, 1,
|
||||
MPI_INFO_NULL, 0, MPI_COMM_WORLD, &child_comm[i], &error_code);
|
||||
@@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Send(&alternate_equation, 1, MPI_INT, 0, 0, child_comm[i]);
|
||||
}
|
||||
} else {
|
||||
master = 0;
|
||||
parent = 0;
|
||||
MPI_Recv(&num_colors, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&imax_iterations, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&ipixels_across, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Recv(&alternate_equation, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
colors = malloc((num_colors + 1) * sizeof(color_t));
|
||||
if (colors == NULL) {
|
||||
MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
@@ -272,7 +272,7 @@ int main(int argc, char *argv[])
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
int istep, jstep;
|
||||
int i1[400], i2[400], j1[400], j2[400];
|
||||
int ii, jj;
|
||||
@@ -504,7 +504,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* check for the end condition */
|
||||
if (x_min == x_max && y_min == y_max) {
|
||||
/*printf("slave done.\n");fflush(stdout); */
|
||||
/*printf("child done.\n");fflush(stdout); */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (master && save_image) {
|
||||
if (parent && save_image) {
|
||||
imax_iterations = 0;
|
||||
for (i = 0; i < ipixels_across * ipixels_down; ++i) {
|
||||
/* look for "brightest" pixel value, for image use */
|
||||
@@ -596,7 +596,7 @@ int main(int argc, char *argv[])
|
||||
file_message, num_colors, colors);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
for (i = 0; i < num_children; i++) {
|
||||
MPI_Comm_disconnect(&child_comm[i]);
|
||||
}
|
||||
@@ -614,7 +614,7 @@ void PrintUsage()
|
||||
{
|
||||
printf("usage: mpiexec -n 1 pmandel [options]\n");
|
||||
printf
|
||||
("options:\n -n # slaves\n -xmin # -xmax #\n -ymin # -ymax #\n -depth #\n -xscale # -yscale #\n -out filename\n -i\n");
|
||||
("options:\n -n # children\n -xmin # -xmax #\n -ymin # -ymax #\n -depth #\n -xscale # -yscale #\n -out filename\n -i\n");
|
||||
printf("All options are optional.\n");
|
||||
printf
|
||||
("-i will allow you to input the min/max parameters from stdin and output the resulting image to a ppm file.");
|
||||
@@ -750,7 +750,7 @@ void read_mand_args(int argc, char *argv[], int *o_max_iterations,
|
||||
*o_divergent_limit = INFINITE_LIMIT; /* default total range is assumed
|
||||
* if not explicitly overwritten */
|
||||
|
||||
*num_children = DEFAULT_NUM_SLAVES;
|
||||
*num_children = DEFAULT_NUM_CHILDREN;
|
||||
|
||||
/* We just cycle through all given parameters, matching what we can.
|
||||
* Note that we force casting, because we expect that a nonsensical
|
||||
@@ -894,12 +894,12 @@ void check_mand_params(int *m_max_iterations,
|
||||
}
|
||||
|
||||
if (*m_num_children < 1) {
|
||||
printf("Error, invalid number of slaves (%d), setting to %d\n", *m_num_children,
|
||||
DEFAULT_NUM_SLAVES);
|
||||
*m_num_children = DEFAULT_NUM_SLAVES;
|
||||
printf("Error, invalid number of children (%d), setting to %d\n", *m_num_children,
|
||||
DEFAULT_NUM_CHILDREN);
|
||||
*m_num_children = DEFAULT_NUM_CHILDREN;
|
||||
}
|
||||
if (*m_num_children > 400) {
|
||||
printf("Error, number of slaves (%d) exceeds the maximum, setting to 400.\n",
|
||||
printf("Error, number of children (%d) exceeds the maximum, setting to 400.\n",
|
||||
*m_num_children);
|
||||
*m_num_children = 400;
|
||||
}
|
||||
|
||||
+29
-29
@@ -32,7 +32,7 @@
|
||||
#define MAX(x, y) (((x) > (y))?(x):(y))
|
||||
#endif
|
||||
|
||||
#define DEFAULT_NUM_SLAVES 3 /* default number of children to spawn */
|
||||
#define DEFAULT_NUM_CHILDREN 3 /* default number of children to spawn */
|
||||
#define DEFAULT_PORT 7470 /* default port to listen on */
|
||||
#define NOVALUE 99999 /* indicates a parameter is as of yet unspecified */
|
||||
#define MAX_ITERATIONS 10000 /* maximum 'depth' to look for mandelbrot value */
|
||||
@@ -170,8 +170,8 @@ int main(int argc, char *argv[])
|
||||
int listener;
|
||||
int save_image = 0;
|
||||
int optval;
|
||||
int num_children = DEFAULT_NUM_SLAVES;
|
||||
int master = 1;
|
||||
int num_children = DEFAULT_NUM_CHILDREN;
|
||||
int parent = 1;
|
||||
MPI_Comm parent, *child_comm = NULL;
|
||||
MPI_Request *child_request = NULL;
|
||||
int error_code, error;
|
||||
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (parent == MPI_COMM_NULL) {
|
||||
if (numprocs > 1) {
|
||||
printf("Error: only one process allowed for the master.\n");
|
||||
printf("Error: only one process allowed for the parent.\n");
|
||||
PrintUsage();
|
||||
error_code = MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
exit(error_code);
|
||||
@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("Welcome to the Mandelbrot/Julia set explorer.\n");
|
||||
|
||||
master = 1;
|
||||
parent = 1;
|
||||
|
||||
/* Get inputs-- region to view (must be within x/ymin to x/ymax, make sure
|
||||
* xmax>xmin and ymax>ymin) and resolution (number of pixels along an edge,
|
||||
@@ -216,18 +216,18 @@ int main(int argc, char *argv[])
|
||||
if (julia == 1) /* we're doing a julia figure */
|
||||
check_julia_params(&julia_constant.real, &julia_constant.imaginary);
|
||||
|
||||
/* spawn slaves */
|
||||
/* spawn children */
|
||||
child_comm = (MPI_Comm *) malloc(num_children * sizeof(MPI_Comm));
|
||||
child_request = (MPI_Request *) malloc(num_children * sizeof(MPI_Request));
|
||||
result = (header_t *) malloc(num_children * sizeof(header_t));
|
||||
if (child_comm == NULL || child_request == NULL || result == NULL) {
|
||||
printf
|
||||
("Error: unable to allocate an array of %d communicators, requests and work objects for the slaves.\n",
|
||||
("Error: unable to allocate an array of %d communicators, requests and work objects for the children.\n",
|
||||
num_children);
|
||||
error_code = MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
exit(error_code);
|
||||
}
|
||||
printf("Spawning %d slaves.\n", num_children);
|
||||
printf("Spawning %d children.\n", num_children);
|
||||
for (i = 0; i < num_children; i++) {
|
||||
error = MPI_Comm_spawn(argv[0], MPI_ARGV_NULL, 1,
|
||||
MPI_INFO_NULL, 0, MPI_COMM_WORLD, &child_comm[i], &error_code);
|
||||
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Send(&alternate_equation, 1, MPI_INT, 0, 0, child_comm[i]);
|
||||
}
|
||||
} else {
|
||||
master = 0;
|
||||
parent = 0;
|
||||
MPI_Recv(&num_colors, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&imax_iterations, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&ipixels_across, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Recv(&alternate_equation, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
colors = malloc((num_colors + 1) * sizeof(color_t));
|
||||
if (colors == NULL) {
|
||||
MPI_Abort(MPI_COMM_WORLD, -1);
|
||||
@@ -283,7 +283,7 @@ int main(int argc, char *argv[])
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
int istep, jstep;
|
||||
int i1[400], i2[400], j1[400], j2[400];
|
||||
int ii, jj;
|
||||
@@ -445,7 +445,7 @@ int main(int argc, char *argv[])
|
||||
while (k < 400) {
|
||||
MPI_Waitany(num_children, child_request, &index, &status);
|
||||
memcpy(work, &result[index], 5 * sizeof(int));
|
||||
/*printf("master receiving data in k<400 loop.\n");fflush(stdout); */
|
||||
/*printf("parent receiving data in k<400 loop.\n");fflush(stdout); */
|
||||
MPI_Recv(in_grid_array, (work[2] + 1 - work[1]) * (work[4] + 1 - work[3]), MPI_INT,
|
||||
0, 201, child_comm[index], &status);
|
||||
/* draw data */
|
||||
@@ -466,7 +466,7 @@ int main(int argc, char *argv[])
|
||||
for (i = 0; i < num_children; i++) {
|
||||
MPI_Wait(&child_request[i], &status);
|
||||
memcpy(work, &result[i], 5 * sizeof(int));
|
||||
/*printf("master receiving data in tail loop.\n");fflush(stdout); */
|
||||
/*printf("parent receiving data in tail loop.\n");fflush(stdout); */
|
||||
MPI_Recv(in_grid_array, (work[2] + 1 - work[1]) * (work[4] + 1 - work[3]), MPI_INT,
|
||||
0, 201, child_comm[i], &status);
|
||||
/* draw data */
|
||||
@@ -491,17 +491,17 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
} else {
|
||||
for (;;) {
|
||||
/*printf("slave[%d] receiveing bounds.\n", pid);fflush(stdout); */
|
||||
/*printf("child[%d] receiveing bounds.\n", pid);fflush(stdout); */
|
||||
MPI_Recv(&x_min, 1, MPI_DOUBLE, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&x_max, 1, MPI_DOUBLE, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&y_min, 1, MPI_DOUBLE, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&y_max, 1, MPI_DOUBLE, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
MPI_Recv(&imax_iterations, 1, MPI_INT, 0, 0, parent, MPI_STATUS_IGNORE);
|
||||
/*printf("slave[%d] received bounding box: (%f,%f)(%f,%f)\n", pid, x_min, y_min, x_max, y_max);fflush(stdout); */
|
||||
/*printf("child[%d] received bounding box: (%f,%f)(%f,%f)\n", pid, x_min, y_min, x_max, y_max);fflush(stdout); */
|
||||
|
||||
/* check for the end condition */
|
||||
if (x_min == x_max && y_min == y_max) {
|
||||
/*printf("slave[%d] done.\n", pid);fflush(stdout); */
|
||||
/*printf("child[%d] done.\n", pid);fflush(stdout); */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ int main(int argc, char *argv[])
|
||||
y_resolution = (y_max - y_min) / ((double) ipixels_down);
|
||||
|
||||
MPI_Recv(work, 5, MPI_INT, 0, 100, parent, &status);
|
||||
/*printf("slave[%d] received work: %d, (%d,%d)(%d,%d)\n", pid, work[0], work[1], work[2], work[3], work[4]);fflush(stdout); */
|
||||
/*printf("child[%d] received work: %d, (%d,%d)(%d,%d)\n", pid, work[0], work[1], work[2], work[3], work[4]);fflush(stdout); */
|
||||
while (work[0] != 0) {
|
||||
imin = work[1];
|
||||
imax = work[2];
|
||||
@@ -552,20 +552,20 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
/* send the result to the root */
|
||||
/*printf("slave[%d] sending work %d back.\n", pid, work[0]);fflush(stdout); */
|
||||
/*printf("child[%d] sending work %d back.\n", pid, work[0]);fflush(stdout); */
|
||||
MPI_Send(work, 5, MPI_INT, 0, 200, parent);
|
||||
/*printf("slave[%d] sending work %d data.\n", pid, work[0]);fflush(stdout); */
|
||||
/*printf("child[%d] sending work %d data.\n", pid, work[0]);fflush(stdout); */
|
||||
MPI_Send(in_grid_array, (work[2] + 1 - work[1]) * (work[4] + 1 - work[3]), MPI_INT,
|
||||
0, 201, parent);
|
||||
/* get the next piece of work */
|
||||
/*printf("slave[%d] receiving new work.\n", pid);fflush(stdout); */
|
||||
/*printf("child[%d] receiving new work.\n", pid);fflush(stdout); */
|
||||
MPI_Recv(work, 5, MPI_INT, 0, 100, parent, &status);
|
||||
/*printf("slave[%d] received work: %d, (%d,%d)(%d,%d)\n", pid, work[0], work[1], work[2], work[3], work[4]);fflush(stdout); */
|
||||
/*printf("child[%d] received work: %d, (%d,%d)(%d,%d)\n", pid, work[0], work[1], work[2], work[3], work[4]);fflush(stdout); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (master && save_image) {
|
||||
if (parent && save_image) {
|
||||
imax_iterations = 0;
|
||||
for (i = 0; i < ipixels_across * ipixels_down; ++i) {
|
||||
/* look for "brightest" pixel value, for image use */
|
||||
@@ -595,7 +595,7 @@ int main(int argc, char *argv[])
|
||||
file_message, num_colors, colors);
|
||||
}
|
||||
|
||||
if (master) {
|
||||
if (parent) {
|
||||
for (i = 0; i < num_children; i++) {
|
||||
MPI_Comm_disconnect(&child_comm[i]);
|
||||
}
|
||||
@@ -612,7 +612,7 @@ void PrintUsage(void)
|
||||
{
|
||||
printf("usage: mpiexec -n 1 pmandel [options]\n");
|
||||
printf
|
||||
("options:\n -n # slaves\n -xmin # -xmax #\n -ymin # -ymax #\n -depth #\n -xscale # -yscale #\n -out filename\n -i\n");
|
||||
("options:\n -n # children\n -xmin # -xmax #\n -ymin # -ymax #\n -depth #\n -xscale # -yscale #\n -out filename\n -i\n");
|
||||
printf("All options are optional.\n");
|
||||
printf
|
||||
("-i will allow you to input the min/max parameters from stdin and output the resulting image to a ppm file.");
|
||||
@@ -832,7 +832,7 @@ void read_mand_args(int argc, char *argv[], int *o_max_iterations,
|
||||
*o_divergent_limit = INFINITE_LIMIT; /* default total range is assumed
|
||||
* if not explicitly overwritten */
|
||||
|
||||
*num_children = DEFAULT_NUM_SLAVES;
|
||||
*num_children = DEFAULT_NUM_CHILDREN;
|
||||
|
||||
/* We just cycle through all given parameters, matching what we can.
|
||||
* Note that we force casting, because we expect that a nonsensical
|
||||
@@ -976,12 +976,12 @@ void check_mand_params(int *m_max_iterations,
|
||||
}
|
||||
|
||||
if (*m_num_children < 1) {
|
||||
printf("Error, invalid number of slaves (%d), setting to %d\n", *m_num_children,
|
||||
DEFAULT_NUM_SLAVES);
|
||||
*m_num_children = DEFAULT_NUM_SLAVES;
|
||||
printf("Error, invalid number of children (%d), setting to %d\n", *m_num_children,
|
||||
DEFAULT_NUM_CHILDREN);
|
||||
*m_num_children = DEFAULT_NUM_CHILDREN;
|
||||
}
|
||||
if (*m_num_children > 400) {
|
||||
printf("Error, number of slaves (%d) exceeds the maximum, setting to 400.\n",
|
||||
printf("Error, number of children (%d) exceeds the maximum, setting to 400.\n",
|
||||
*m_num_children);
|
||||
*m_num_children = 400;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ my $dep_ns = "MPICH";
|
||||
|
||||
# Default :output source files
|
||||
# NOTE: it's important to use single quote. abs_srcdir may contain sigils
|
||||
# e.g. /var/lib/jenkins-slave/workspace/hzhou-custom@2/config/ch3-sock/label/centos64
|
||||
# e.g. /var/lib/jenkins/workspace/hzhou-custom@2/config/ch3-sock/label/centos64
|
||||
my $header_file = '@abs_srcdir@/../src/include/mpir_cvars.h';
|
||||
my $c_file = '@abs_srcdir@/../src/util/mpir_cvars.c';
|
||||
my $readme_file = '@abs_srcdir@/../README.envvar';
|
||||
|
||||
@@ -530,7 +530,7 @@ sub AddTestCall {
|
||||
# ==========================================================================
|
||||
# Read an errnames file. This allows us to distribute the errnames.txt
|
||||
# files in the relevant modules, rather than making them part of one
|
||||
# single master file.
|
||||
# single main file.
|
||||
# This updates the global hashs longnames and longnamesDefined
|
||||
# ReadErrnamesFile( filename )
|
||||
# ==========================================================================
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
##
|
||||
|
||||
# This hook prevent from pushing a branch that is not rebased on
|
||||
# latest MPICH master.
|
||||
# latest MPICH main branch.
|
||||
#
|
||||
# It fetchs the hash of the latest master from github and compares
|
||||
# It fetchs the hash of the latest main branch from github and compares
|
||||
# the local branch. It returns 1 if either the hash of the latest
|
||||
# master does not exist in the local git repo or the branch needs
|
||||
# main branch does not exist in the local git repo or the branch needs
|
||||
# rebasing.
|
||||
#
|
||||
# To enable this hook, rename this file to "pre-push" and put it
|
||||
@@ -21,11 +21,11 @@ url="$2"
|
||||
z40=0000000000000000000000000000000000000000
|
||||
|
||||
GITHUB_REPO="pmodels/mpich"
|
||||
MASTER_BRANCH="master"
|
||||
MAIN_BRANCH="master"
|
||||
|
||||
# getting the latest master hash from github
|
||||
MASTER_SHA=$(curl -s https://api.github.com/repos/${GITHUB_REPO}/git/ref/heads/${MASTER_BRANCH} | grep sha | sed -e 's/.*: "//g' | sed -e 's/".*//g')
|
||||
if test "$(git cat-file -t $MASTER_SHA)" != "commit" ; then
|
||||
# getting the latest main branch hash from github
|
||||
MAIN_SHA=$(curl -s https://api.github.com/repos/${GITHUB_REPO}/git/ref/heads/${MAIN_BRANCH} | grep sha | sed -e 's/.*: "//g' | sed -e 's/".*//g')
|
||||
if test "$(git cat-file -t $MAIN_SHA)" != "commit" ; then
|
||||
echo "The repo is behind the https://github.com/pmodels/mpich"
|
||||
echo "Run git fetch to update"
|
||||
exit 1
|
||||
@@ -35,10 +35,10 @@ IFS=' '
|
||||
while read local_ref local_sha remote_ref remote_sha
|
||||
do
|
||||
if test "${local_sha}" != $z40 ; then
|
||||
LOCAL_BASE_SHA=$(git merge-base ${MASTER_SHA} ${local_sha})
|
||||
LOCAL_BASE_SHA=$(git merge-base ${MAIN_SHA} ${local_sha})
|
||||
|
||||
if test "${LOCAL_BASE_SHA}" != "${MASTER_SHA}" ; then
|
||||
echo "Your branch need to rebased on latest master before push"
|
||||
if test "${LOCAL_BASE_SHA}" != "${MAIN_SHA}" ; then
|
||||
echo "Your branch need to rebased on latest main branch before push"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
+3
-3
@@ -115,7 +115,7 @@ FULL_PATH_NAMES = YES
|
||||
# If left blank the directory from which doxygen is run is used as the
|
||||
# path to strip.
|
||||
|
||||
STRIP_FROM_PATH = @master_top_srcdir@
|
||||
STRIP_FROM_PATH = @main_top_srcdir@
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
|
||||
# the path mentioned in the documentation of a class, which tells
|
||||
@@ -459,7 +459,7 @@ WARN_LOGFILE =
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = @master_top_srcdir@/src
|
||||
INPUT = @main_top_srcdir@/src
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
@@ -696,7 +696,7 @@ HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
# it should be included in the main .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
|
||||
@@ -1135,7 +1135,7 @@ if ($doFuncspec) {
|
||||
open STAMPFD, '>', 'buildiface-stamp';
|
||||
close STAMPFD;
|
||||
|
||||
# create the master file
|
||||
# create the main file
|
||||
$filename = "mpicxx.h.in";
|
||||
$OUTFD = OUTFILEHANDLE;
|
||||
open ( $OUTFD, ">${filename}.new" ) || die "Could not open ${filename}.new\n";
|
||||
|
||||
@@ -141,7 +141,7 @@ sub ReadAndAnnoteSrcfile {
|
||||
}
|
||||
|
||||
# Summary report
|
||||
# TODO : compare the routines found to a master list of all routines.
|
||||
# TODO : compare the routines found to a main list of all routines.
|
||||
# generate a third list of unseen routines
|
||||
$maxcol = 4;
|
||||
sub CoverageSummary {
|
||||
|
||||
@@ -1051,7 +1051,7 @@ mpi_sources += src/binding/fortran/mpif_h/statusf2c.c src/binding/fortran/mpif_h
|
||||
|
||||
# FIXME does AM_CPPFLAGS need to be included elsewhere somehow in the
|
||||
# target-specific variable?
|
||||
AM_CPPFLAGS += -I\${master_top_srcdir}/src/binding/fortran/mpif_h
|
||||
AM_CPPFLAGS += -I\${main_top_srcdir}/src/binding/fortran/mpif_h
|
||||
|
||||
|
||||
noinst_HEADERS += src/binding/fortran/mpif_h/fproto.h src/binding/fortran/mpif_h/mpi_fortimpl.h
|
||||
|
||||
@@ -641,7 +641,7 @@ if ($make_exists) {
|
||||
print MAKEFD "\tsrc/binding/fortran/use_mpi_f08/wrappers_c/f_sync_reg_c.c \\\n";
|
||||
print MAKEFD "\tsrc/binding/fortran/use_mpi_f08/wrappers_c/utils.c\n\n";
|
||||
print MAKEFD <<EOT;
|
||||
AM_CPPFLAGS += -I\${master_top_srcdir}/src/binding/fortran/use_mpi_f08/wrappers_c
|
||||
AM_CPPFLAGS += -I\${main_top_srcdir}/src/binding/fortran/use_mpi_f08/wrappers_c
|
||||
|
||||
noinst_HEADERS += src/binding/fortran/use_mpi_f08/wrappers_c/cdesc.h
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ typedef struct {
|
||||
/* This is a special case for is_thread_main, which must be
|
||||
* implemented even if MPICH itself is single threaded. */
|
||||
#if MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED
|
||||
MPID_Thread_id_t master_thread; /* Thread that started MPI */
|
||||
MPID_Thread_id_t main_thread; /* Thread that started MPI */
|
||||
#endif
|
||||
|
||||
#if defined MPICH_IS_THREADED
|
||||
|
||||
@@ -138,7 +138,7 @@ int MPII_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val,
|
||||
*flag = 0;
|
||||
} else {
|
||||
/* We call MPID_Get_universe_size only once (see 10.5.1).
|
||||
* Thus, we must put the value into the "master" copy */
|
||||
* Thus, we must put the value into the "main" copy */
|
||||
mpi_errno = MPID_Get_universe_size(&MPIR_Process.attrs.universe);
|
||||
/* --BEGIN ERROR HANDLING-- */
|
||||
if (mpi_errno != MPI_SUCCESS) {
|
||||
|
||||
@@ -87,8 +87,8 @@ int MPIR_Iscan_intra_sched_smp(const void *sendbuf, void *recvbuf, int count, MP
|
||||
|
||||
/* do scan on localfulldata to prefulldata. for example,
|
||||
* prefulldata on rank 4 contains reduce result of ranks
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is master
|
||||
* process of node 3. */
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is the
|
||||
* main process of node 3. */
|
||||
if (roots_comm != NULL) {
|
||||
/* FIXME just use roots_comm->rank instead */
|
||||
int roots_rank = MPIR_Get_internode_rank(comm_ptr, rank);
|
||||
|
||||
@@ -93,8 +93,8 @@ int MPIR_Scan_intra_smp(const void *sendbuf, void *recvbuf, int count,
|
||||
|
||||
/* do scan on localfulldata to prefulldata. for example,
|
||||
* prefulldata on rank 4 contains reduce result of ranks
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is master
|
||||
* process of node 3. */
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is the
|
||||
* main process of node 3. */
|
||||
if (comm_ptr->node_roots_comm != NULL) {
|
||||
mpi_errno = MPIR_Scan(localfulldata, prefulldata, count, datatype,
|
||||
op, comm_ptr->node_roots_comm, errflag);
|
||||
|
||||
@@ -508,7 +508,7 @@ void MPII_CommL_remember(MPIR_Comm * comm_ptr)
|
||||
comm_ptr->comm_next = MPIR_All_communicators.head;
|
||||
MPIR_All_communicators.head = comm_ptr;
|
||||
MPIR_All_communicators.sequence_number++;
|
||||
MPL_DBG_MSG_P(MPIR_DBG_COMM, VERBOSE, "master head is %p", MPIR_All_communicators.head);
|
||||
MPL_DBG_MSG_P(MPIR_DBG_COMM, VERBOSE, "main head is %p", MPIR_All_communicators.head);
|
||||
|
||||
MPID_THREAD_CS_EXIT(VCI, lock);
|
||||
MPID_THREAD_CS_EXIT(POBJ, lock);
|
||||
|
||||
@@ -195,7 +195,7 @@ static int mergesort_lpidarray(MPII_Group_pmap_t maparray[], int n)
|
||||
*
|
||||
* Called by group_compare, group_translate_ranks, group_union
|
||||
*
|
||||
* In the case of a single master thread lock, the lock must
|
||||
* In the case of a single main thread lock, the lock must
|
||||
* be held on entry to this routine. This forces some of the routines
|
||||
* noted above to hold the SINGLE_CS; which would otherwise not be required.
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,7 @@ int MPI_Is_thread_main(int *flag)
|
||||
MPID_Thread_id_t my_thread_id;
|
||||
|
||||
MPID_Thread_self(&my_thread_id);
|
||||
MPID_Thread_same(&MPIR_ThreadInfo.master_thread, &my_thread_id, flag);
|
||||
MPID_Thread_same(&MPIR_ThreadInfo.main_thread, &my_thread_id, flag);
|
||||
}
|
||||
#endif
|
||||
/* ... end of body of routine ... */
|
||||
|
||||
@@ -37,7 +37,7 @@ int MPII_init_local_proc_attrs(int *p_thread_required)
|
||||
|
||||
/* We need this inorder to implement IS_THREAD_MAIN */
|
||||
#if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
|
||||
MPID_Thread_self(&MPIR_ThreadInfo.master_thread);
|
||||
MPID_Thread_self(&MPIR_ThreadInfo.main_thread);
|
||||
#endif
|
||||
#endif /* MPICH_IS_THREADED */
|
||||
|
||||
|
||||
@@ -1440,30 +1440,30 @@ if test -z "$srcdir" -o "$srcdir" = "." ; then srcdir="$ROMIO_HOME" ; fi
|
||||
AC_SUBST(srcdir)
|
||||
|
||||
# preserve these values across a config.status --recheck
|
||||
AC_ARG_VAR([master_top_srcdir],[set by the MPICH configure to indicate the MPICH source root])
|
||||
AC_ARG_VAR([master_top_builddir],[set by the MPICH configure to indicate the MPICH build root])
|
||||
AC_ARG_VAR([main_top_srcdir],[set by the MPICH configure to indicate the MPICH source root])
|
||||
AC_ARG_VAR([main_top_builddir],[set by the MPICH configure to indicate the MPICH build root])
|
||||
|
||||
# The master_top_srcdir is the location of the source for the building
|
||||
# The main_top_srcdir is the location of the source for the building
|
||||
# package. This is used only as part of the MPICH build, including
|
||||
# the documentation targets mandoc, htmldoc, and latexdoc
|
||||
if test -z "$master_top_srcdir" ; then
|
||||
if test -z "$main_top_srcdir" ; then
|
||||
if test "$FROM_MPICH" = yes ; then
|
||||
AC_MSG_WARN([Could not determine master_top_srcdir])
|
||||
AC_MSG_WARN([Could not determine main_top_srcdir])
|
||||
fi
|
||||
fi
|
||||
#
|
||||
# Get the master builddir (which may be imported from above)
|
||||
if test -z "$master_top_builddir" ; then
|
||||
# Get the main builddir (which may be imported from above)
|
||||
if test -z "$main_top_builddir" ; then
|
||||
if test "$FROM_MPICH" = yes ; then
|
||||
# this variable is essential to proper build operation
|
||||
AC_MSG_ERROR([Could not determine master_top_srcdir])
|
||||
AC_MSG_ERROR([Could not determine main_top_srcdir])
|
||||
fi
|
||||
master_top_builddir=`pwd`
|
||||
main_top_builddir=`pwd`
|
||||
fi
|
||||
# Make sure the alternate spelling is used until we clean up all of the code
|
||||
master_topbuild_dir=$master_top_builddir
|
||||
export master_topbuild_dir
|
||||
AC_SUBST(master_topbuild_dir)
|
||||
main_topbuild_dir=$main_top_builddir
|
||||
export main_topbuild_dir
|
||||
AC_SUBST(main_topbuild_dir)
|
||||
|
||||
# The following definitions are needed within adio/common/status_setb.c
|
||||
if test "$FROM_MPICH" = yes ; then
|
||||
@@ -1481,8 +1481,8 @@ if test "$FROM_MPICH" = no ; then
|
||||
else
|
||||
MPILIBNAME=${MPILIBNAME:-mpich}
|
||||
if test -z "$LIBNAME" ; then
|
||||
if test -d "$master_top_builddir/lib" ; then
|
||||
LIBNAME=$master_top_builddir/lib/lib${MPILIBNAME}.a
|
||||
if test -d "$main_top_builddir/lib" ; then
|
||||
LIBNAME=$main_top_builddir/lib/lib${MPILIBNAME}.a
|
||||
else
|
||||
LIBNAME="$ROMIO_HOME/lib${MPILIBNAME}.a"
|
||||
fi
|
||||
@@ -1565,10 +1565,10 @@ elif test $FROM_MPICH = yes ; then
|
||||
# properly set
|
||||
#CC=${top_build_dir}/bin/mpicc
|
||||
#
|
||||
# set the compilers to the ones in MPICH bin directory (master_top_builddir/bin)
|
||||
# set the compilers to the ones in MPICH bin directory (main_top_builddir/bin)
|
||||
TEST_CC='$(bindir)/mpicc'
|
||||
TEST_F77='$(bindir)/mpifort'
|
||||
MPI_H_INCLUDE="-I${master_top_builddir}/src/include"
|
||||
MPI_H_INCLUDE="-I${main_top_builddir}/src/include"
|
||||
ROMIO_INCLUDE=""
|
||||
USER_CFLAGS=""
|
||||
USER_FFLAGS=""
|
||||
|
||||
@@ -14,7 +14,7 @@ SHLIBNAME = @SHLIBNAME@
|
||||
INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../include -I${srcdir}/../../mpi-io -I${srcdir}/../../adio/include -I../../adio/include
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR)
|
||||
|
||||
top_builddir = @master_topbuild_dir@
|
||||
top_builddir = @main_topbuild_dir@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
C_COMPILE_SHL = $(CC_SHL)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ SHLIBNAME = @SHLIBNAME@
|
||||
INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I../../include -I${srcdir}/../../mpi-io -I${srcdir}/../../adio/include -I../../adio/include
|
||||
CFLAGS = -DHAVE_MPI_INFO_SRC @CFLAGS@ $(MPIOPROFILE) $(INCLUDE_DIR)
|
||||
|
||||
top_builddir = @master_topbuild_dir@
|
||||
top_builddir = @main_topbuild_dir@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
C_COMPILE_SHL = $(CC_SHL)
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ MPID_MAX_THREAD_LEVEL=MPI_THREAD_MULTIPLE
|
||||
# $device_name - name of the device
|
||||
# $device_args - contains name of channel select plus an channel args
|
||||
# $channel_name - name of the channel
|
||||
# $master_top_srcdir - top-level source directory
|
||||
# $master_top_builddir - top-level build directory
|
||||
# $main_top_srcdir - top-level source directory
|
||||
# $main_top_builddir - top-level build directory
|
||||
# $ac_configure_args - all arguments passed to configure
|
||||
if test -z "${channel_args}" ; then
|
||||
nemesis_networks="tcp"
|
||||
|
||||
@@ -21,8 +21,8 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
|
||||
# $device_name - name of the device
|
||||
# $device_args - contains name of channel select plus an channel args
|
||||
# $channel_name - name of the channel
|
||||
# $master_top_srcdir - top-level source directory
|
||||
# $master_top_builddir - top-level build directory
|
||||
# $main_top_srcdir - top-level source directory
|
||||
# $main_top_builddir - top-level build directory
|
||||
# $ac_configure_args - all arguments passed to configure
|
||||
#
|
||||
|
||||
@@ -41,7 +41,7 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
|
||||
# run *before* the MPICH device (not the setup directory itself) is
|
||||
# configured, but the actual configuration of the associated directory
|
||||
# needs to be done *after* the device is configured.
|
||||
file=${master_top_srcdir}/src/mpid/common/sock/setup
|
||||
file=${main_top_srcdir}/src/mpid/common/sock/setup
|
||||
if test -f $file ; then
|
||||
echo sourcing $file
|
||||
. $file
|
||||
@@ -52,7 +52,7 @@ AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
|
||||
pathlist="$pathlist src/util/wrappers"
|
||||
## TODO delete this -I junk
|
||||
##for path in $pathlist ; do
|
||||
## CPPFLAGS="$CPPFLAGS -I${master_top_builddir}/${path} -I${master_top_srcdir}/${path}"
|
||||
## CPPFLAGS="$CPPFLAGS -I${main_top_builddir}/${path} -I${main_top_srcdir}/${path}"
|
||||
##done
|
||||
|
||||
# Adding this prevents the pesky "(strerror() not found)" problem, which can be
|
||||
|
||||
@@ -26,7 +26,7 @@ channel_args=`echo ${device_args} | sed -e 's/^[[^:]]*//' -e 's/^://'`
|
||||
#
|
||||
DEVICE="${device_name}:${channel_name}"
|
||||
|
||||
dir=${master_top_srcdir}/src/mpid/${device_name}/channels/${channel_name}
|
||||
dir=${main_top_srcdir}/src/mpid/${device_name}/channels/${channel_name}
|
||||
if test ! -d $dir ; then
|
||||
echo "ERROR: ${dir} does not exist"
|
||||
exit 1
|
||||
|
||||
@@ -299,16 +299,16 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[
|
||||
PAC_RESET_ALL_FLAGS()
|
||||
PAC_CONFIG_SUBDIR_ARGS([modules/libfabric],[$ofi_subdir_args],[],[AC_MSG_ERROR(libfabric configure failed)])
|
||||
PAC_POP_ALL_FLAGS()
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/libfabric/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/libfabric/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/libfabric/include], [CPPFLAGS])
|
||||
|
||||
if test "x$ofi_direct_provider" != "x" ; then
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/libfabric/prov/${ofi_direct_provider}/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/libfabric/prov/${ofi_direct_provider}/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/libfabric/prov/${ofi_direct_provider}/include], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-DFABRIC_DIRECT],[CPPFLAGS])
|
||||
fi
|
||||
|
||||
ofisrcdir="${master_top_builddir}/modules/libfabric"
|
||||
ofisrcdir="${main_top_builddir}/modules/libfabric"
|
||||
ofilib="modules/libfabric/src/libfabric.la"
|
||||
else
|
||||
AC_MSG_NOTICE([CH4 OFI Netmod: Using an external libfabric])
|
||||
@@ -318,7 +318,7 @@ AM_COND_IF([BUILD_CH4_NETMOD_OFI],[
|
||||
# check for libfabric depedence libs
|
||||
pcdir=""
|
||||
if test "${ofi_embedded}" = "yes" ; then
|
||||
pcdir="${master_top_builddir}/modules/libfabric"
|
||||
pcdir="${main_top_builddir}/modules/libfabric"
|
||||
elif test -f ${with_libfabric}/lib/pkgconfig/libfabric.pc ; then
|
||||
pcdir="${with_libfabric}/lib/pkgconfig"
|
||||
fi
|
||||
|
||||
@@ -35,7 +35,7 @@ AM_COND_IF([BUILD_CH4_NETMOD_UCX],[
|
||||
PAC_PUSH_FLAG(CPPFLAGS)
|
||||
PAC_CONFIG_SUBDIR_ARGS([modules/ucx],[--disable-static --enable-embedded],[],[AC_MSG_ERROR(ucx configure failed)])
|
||||
PAC_POP_FLAG(CPPFLAGS)
|
||||
PAC_APPEND_FLAG([-I${master_top_builddir}/modules/ucx/src], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${main_top_builddir}/modules/ucx/src], [CPPFLAGS])
|
||||
PAC_APPEND_FLAG([-I${use_top_srcdir}/modules/ucx/src], [CPPFLAGS])
|
||||
|
||||
ucxdir="modules/ucx"
|
||||
|
||||
@@ -907,7 +907,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Scan_intra_composition_alpha(const void *send
|
||||
}
|
||||
/* do scan on localfulldata to prefulldata. for example,
|
||||
* prefulldata on rank 4 contains reduce result of ranks
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is master
|
||||
* 1,2,3,4,5,6. it will be sent to rank 7 which is the main
|
||||
* process of node 3. */
|
||||
if (comm_ptr->node_roots_comm != NULL) {
|
||||
coll_ret =
|
||||
|
||||
@@ -33,7 +33,7 @@ endif BUILD_PM_GFORKER
|
||||
## TODO convert these simplemake doc commands to the new scheme
|
||||
##doc_sources = mpiexec.txt
|
||||
##DOCDESTDIRS = html:www/www1,man:man/man1,latex:doc/refman
|
||||
##docargs_ADD = ${master_top_srcdir}/doc/mansrc/cmdnotes
|
||||
##docargs_ADD = ${main_top_srcdir}/doc/mansrc/cmdnotes
|
||||
##doc_HTML_SOURCES = ${doc_sources}
|
||||
##doc_MAN_SOURCES = ${doc_sources}
|
||||
##doc_LATEX_SOURCES = ${doc_sources}
|
||||
|
||||
@@ -862,7 +862,7 @@ HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
# it should be included in the main .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
struct HYDT_persist_handle_s HYDT_persist_handle;
|
||||
static struct {
|
||||
enum {
|
||||
MASTER,
|
||||
SLAVE
|
||||
SERVER,
|
||||
CLIENT
|
||||
} type;
|
||||
|
||||
/* master variables */
|
||||
/* server variables */
|
||||
int listen_fd;
|
||||
int slave_pid;
|
||||
int client_pid;
|
||||
|
||||
/* client variables */
|
||||
int client_fd;
|
||||
@@ -151,21 +151,21 @@ static HYD_status listen_cb(int fd, HYD_event_t events, void *userp)
|
||||
HYDU_ERR_POP(status, "accept error\n");
|
||||
|
||||
if (!HYDT_persist_handle.debug) {
|
||||
/* In debug mode, we don't fork a slave process, but the
|
||||
* master takes over the work of the slave. */
|
||||
/* In debug mode, we don't fork a client process, but the
|
||||
* server process takes over the work of the client. */
|
||||
|
||||
/* fork and let the slave process handle this connection */
|
||||
private.slave_pid = fork();
|
||||
HYDU_ERR_CHKANDJUMP(status, private.slave_pid < 0, HYD_INTERNAL_ERROR, "fork failed\n");
|
||||
/* fork and let the client process handle this connection */
|
||||
private.client_pid = fork();
|
||||
HYDU_ERR_CHKANDJUMP(status, private.client_pid < 0, HYD_INTERNAL_ERROR, "fork failed\n");
|
||||
|
||||
if (private.slave_pid > 0) { /* master process */
|
||||
close(private.client_fd); /* the slave process will handle this */
|
||||
if (private.client_pid > 0) { /* server process */
|
||||
close(private.client_fd); /* the worker process will handle this */
|
||||
goto fn_exit;
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the slave process. Close and deregister the listen socket */
|
||||
private.type = SLAVE;
|
||||
/* This is the client process. Close and deregister the listen socket */
|
||||
private.type = CLIENT;
|
||||
status = HYDT_dmx_deregister_fd(private.listen_fd);
|
||||
HYDU_ERR_POP(status, "unable to deregister listen fd\n");
|
||||
close(private.listen_fd);
|
||||
@@ -262,16 +262,16 @@ int main(int argc, char **argv)
|
||||
status = HYDT_dmx_register_fd(1, &private.listen_fd, HYD_POLLIN, NULL, listen_cb);
|
||||
HYDU_ERR_POP(status, "unable to register fd\n");
|
||||
|
||||
/* set type to master; when a slave forks out, it'll reset the
|
||||
* type to slave. */
|
||||
private.type = MASTER;
|
||||
/* set type to server; when a client forks out, it'll reset the
|
||||
* type to client. */
|
||||
private.type = SERVER;
|
||||
|
||||
while (1) {
|
||||
/* Wait for some event to occur */
|
||||
status = HYDT_dmx_wait_for_event(-1);
|
||||
HYDU_ERR_POP(status, "demux engine error waiting for event\n");
|
||||
|
||||
if (private.type == SLAVE) {
|
||||
if (private.type == CLIENT) {
|
||||
/* check if all stdio fd's have been deregistered */
|
||||
|
||||
if (HYDT_dmx_query_fd_registration(private.stdout_fd) ||
|
||||
|
||||
@@ -859,7 +859,7 @@ HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
# it should be included in the master .chm file (NO).
|
||||
# it should be included in the main .chm file (NO).
|
||||
|
||||
GENERATE_CHI = NO
|
||||
|
||||
|
||||
+13
-13
@@ -55,8 +55,8 @@ int snprintf(char *, size_t, const char *, ...);
|
||||
#define PMI_MAX_INFO_KEY 256
|
||||
#define PMI_MAX_INFO_VAL 1025
|
||||
|
||||
/* There is only a single PMI master, so we allocate it here */
|
||||
static PMIMaster pmimaster = { 0, 0, 0 };
|
||||
/* There is only a single PMI main, so we allocate it here */
|
||||
static PMIMain pmimain = { 0, 0, 0 };
|
||||
|
||||
/* Allow the user to register a routine to be used for the PMI spawn
|
||||
command */
|
||||
@@ -264,7 +264,7 @@ int PMISetupNewGroup(int nProcess, PMIKVSpace * kvs)
|
||||
return 1;
|
||||
|
||||
curPMIGroup->nProcess = nProcess;
|
||||
curPMIGroup->groupID = pmimaster.nGroups++;
|
||||
curPMIGroup->groupID = pmimain.nGroups++;
|
||||
curPMIGroup->nInBarrier = 0;
|
||||
curPMIGroup->pmiProcess =
|
||||
(PMIProcess **) MPL_malloc(sizeof(PMIProcess *) * nProcess, MPL_MEM_PM);
|
||||
@@ -273,10 +273,10 @@ int PMISetupNewGroup(int nProcess, PMIKVSpace * kvs)
|
||||
curPMIGroup->nextGroup = 0;
|
||||
curNprocess = 0;
|
||||
|
||||
/* Add to PMIMaster */
|
||||
g = pmimaster.groups;
|
||||
/* Add to PMIMain */
|
||||
g = pmimain.groups;
|
||||
if (!g) {
|
||||
pmimaster.groups = curPMIGroup;
|
||||
pmimain.groups = curPMIGroup;
|
||||
} else {
|
||||
while (g) {
|
||||
if (!g->nextGroup) {
|
||||
@@ -470,8 +470,8 @@ static PMIKVSpace *fPMIKVSAllocate(void)
|
||||
kvs->lastIdx = -1;
|
||||
|
||||
/* Insert into the list of KV spaces */
|
||||
kPrev = &pmimaster.kvSpaces;
|
||||
k = pmimaster.kvSpaces;
|
||||
kPrev = &pmimain.kvSpaces;
|
||||
k = pmimain.kvSpaces;
|
||||
while (k) {
|
||||
rc = strcmp(k->kvsname, kvs->kvsname);
|
||||
if (rc > 0)
|
||||
@@ -560,7 +560,7 @@ static int fPMIKVSAddPair(PMIKVSpace * kvs, const char key[], const char val[])
|
||||
|
||||
static PMIKVSpace *fPMIKVSFindSpace(const char kvsname[])
|
||||
{
|
||||
PMIKVSpace *kvs = pmimaster.kvSpaces;
|
||||
PMIKVSpace *kvs = pmimain.kvSpaces;
|
||||
int rc;
|
||||
|
||||
/* We require the kvs spaces to be stored in a sorted order */
|
||||
@@ -594,9 +594,9 @@ static int PMIKVSFree(PMIKVSpace * kvs)
|
||||
p = pNext;
|
||||
}
|
||||
|
||||
/* Recover the KVS space, and remove it from the master's list */
|
||||
kPrev = &pmimaster.kvSpaces;
|
||||
k = pmimaster.kvSpaces;
|
||||
/* Recover the KVS space, and remove it from the main process's list */
|
||||
kPrev = &pmimain.kvSpaces;
|
||||
k = pmimain.kvSpaces;
|
||||
rc = 1;
|
||||
while (k) {
|
||||
rc = strcmp(k->kvsname, kvs->kvsname);
|
||||
@@ -610,7 +610,7 @@ static int PMIKVSFree(PMIKVSpace * kvs)
|
||||
}
|
||||
|
||||
/* Note that if we did not find the kvs, we have an internal
|
||||
* error, since all kv spaces are maintained within the pmimaster list */
|
||||
* error, since all kv spaces are maintained within the pmimain list */
|
||||
if (rc != 0) {
|
||||
MPL_internal_error_printf("Could not find KV Space %s\n", kvs->kvsname);
|
||||
return 1;
|
||||
|
||||
@@ -78,14 +78,14 @@ typedef struct PMIKVSpace {
|
||||
} PMIKVSpace;
|
||||
|
||||
/*
|
||||
The master PMI structure contains the "shared" objects:
|
||||
The main PMI structure contains the "shared" objects:
|
||||
groups and key-value spaces (kvs)
|
||||
*/
|
||||
typedef struct PMIMaster {
|
||||
typedef struct PMIMain {
|
||||
int nGroups; /* Number of groups allocated (non-decreasing) */
|
||||
PMIGroup *groups; /* Pointer to allocated groups */
|
||||
PMIKVSpace *kvSpaces; /* Pointer to allocated KV spaces */
|
||||
} PMIMaster;
|
||||
} PMIMain;
|
||||
|
||||
typedef struct {
|
||||
int fdpair[2]; /* fd's used to communicate between the
|
||||
|
||||
@@ -78,11 +78,10 @@ D*/
|
||||
error code on failure.
|
||||
. ctx - An anonymous pointer to data that may be used by the read
|
||||
and write members.
|
||||
- isMaster - Indicates which process is the "master"; may have the
|
||||
values 1 (is the master), 0 (is not the master), or -1 (neither is
|
||||
designated as the master). The two processes must agree on which
|
||||
process is the master, or both must select -1 (neither is the
|
||||
master).
|
||||
- isMain - Indicates which process is "main"; may have the values
|
||||
1 (is main), 0 (is not main), or -1 (neither is designated as
|
||||
main). The two processes must agree on which process is main, or
|
||||
both must select -1 (neither is main).
|
||||
|
||||
Notes:
|
||||
A typical implementation of these functions will use the read and
|
||||
@@ -97,7 +96,7 @@ D*/
|
||||
int (*read) (void *buf, int maxlen, void *ctx);
|
||||
int (*write) (const void *buf, int len, void *ctx);
|
||||
void *ctx;
|
||||
int isMaster;
|
||||
int isMain;
|
||||
} PMI2_Connect_comm_t;
|
||||
|
||||
struct MPIR_Info;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
libTraceInput_so_SOURCES = logformat_trace_InputLog.c trace_input.c ../rlogutil.c
|
||||
INCLUDES = -I../../../../include -I${master_top_srcdir}/src/include -I@java_home@/include -I@java_home@/include/@java_arch@
|
||||
INCLUDES = -I../../../../include -I${main_top_srcdir}/src/include -I@java_home@/include -I@java_home@/include/@java_arch@
|
||||
#libTraceInput_so_LDADD = -shared
|
||||
CC_SHL=${CC}
|
||||
C_LINK_SHL=${CC} -shared
|
||||
|
||||
@@ -46,18 +46,18 @@ if test -z "$top_srcdir" ; then
|
||||
else
|
||||
use_top_srcdir=$top_srcdir
|
||||
fi
|
||||
if test -z "$master_top_srcdir" ; then
|
||||
master_top_srcdir=$use_top_srcdir
|
||||
if test -z "$main_top_srcdir" ; then
|
||||
main_top_srcdir=$use_top_srcdir
|
||||
fi
|
||||
AC_SUBST(master_top_srcdir)
|
||||
export master_top_srcdir
|
||||
AC_SUBST(main_top_srcdir)
|
||||
export main_top_srcdir
|
||||
#
|
||||
# Get the master builddir (which may be imported from above)
|
||||
if test -z "$master_top_builddir" ; then
|
||||
master_top_builddir=`pwd`
|
||||
# Get the main builddir (which may be imported from above)
|
||||
if test -z "$main_top_builddir" ; then
|
||||
main_top_builddir=`pwd`
|
||||
fi
|
||||
export master_top_builddir
|
||||
AC_SUBST(master_top_builddir)
|
||||
export main_top_builddir
|
||||
AC_SUBST(main_top_builddir)
|
||||
|
||||
dnl Find a C compiler
|
||||
AC_PROG_CC
|
||||
|
||||
@@ -117,7 +117,7 @@ int MPIR_Find_local(MPIR_Comm * comm, int *local_size_p, int *local_rank_p,
|
||||
|
||||
/* MPIR_Find_external -- from the list of processes in comm,
|
||||
* builds a list of external processes, i.e., one process from each node.
|
||||
* You can think of this as the root or master process for each node.
|
||||
* You can think of this as the root or main process for each node.
|
||||
*
|
||||
* Note that this will not work correctly for spawned or attached
|
||||
* processes.
|
||||
|
||||
@@ -1091,7 +1091,7 @@
|
||||
/manual/segfault
|
||||
/manual/singjoin
|
||||
/manual/spawntest_child
|
||||
/manual/spawntest_master
|
||||
/manual/spawntest_parent
|
||||
/manual/test-port
|
||||
/manual/testconnect
|
||||
/manual/testconnectserial
|
||||
@@ -1371,7 +1371,7 @@
|
||||
/spawn/spawnmanyarg
|
||||
/spawn/spawnminfo1
|
||||
/spawn/spawnmult2
|
||||
/spawn/taskmaster
|
||||
/spawn/taskmanager
|
||||
/spawn/testlist
|
||||
/test.ncb
|
||||
/test.sln
|
||||
@@ -1448,7 +1448,7 @@
|
||||
/threads/spawn/alltoall
|
||||
/threads/spawn/multispawn
|
||||
/threads/spawn/sendselfth
|
||||
/threads/spawn/th_taskmaster
|
||||
/threads/spawn/th_taskmanager
|
||||
/threads/spawn/threaded_sr
|
||||
/threads/testlist
|
||||
/topo/cartcreates
|
||||
|
||||
@@ -64,14 +64,14 @@ if test -z "$mpich_top_srcdir" ; then
|
||||
fi
|
||||
AC_SUBST(mpich_top_srcdir)
|
||||
|
||||
# these (in particular master_top_srcdir) are needed to regenerate
|
||||
# these (in particular main_top_srcdir) are needed to regenerate
|
||||
# the f90 files from the f77 files
|
||||
AC_ARG_VAR([master_top_builddir],[path to the MPICH top-level build directory (if present)])
|
||||
AC_ARG_VAR([master_top_srcdir],[path to the MPICH top-level source directory (if present)])
|
||||
AC_ARG_VAR([main_top_builddir],[path to the MPICH top-level build directory (if present)])
|
||||
AC_ARG_VAR([main_top_srcdir],[path to the MPICH top-level source directory (if present)])
|
||||
|
||||
# Ensure that master_top_srcdir is set if maintainer mode for is set,
|
||||
# Ensure that main_top_srcdir is set if maintainer mode for is set,
|
||||
# since some of the Makefile targets require it.
|
||||
if test "X$master_top_srcdir" = "X" -a "$USE_MAINTAINER_MODE" = "yes" ; then
|
||||
if test "X$main_top_srcdir" = "X" -a "$USE_MAINTAINER_MODE" = "yes" ; then
|
||||
if test -z "$top_srcdir" ; then
|
||||
use_top_srcdir=$srcdir
|
||||
else
|
||||
@@ -86,9 +86,9 @@ if test "X$master_top_srcdir" = "X" -a "$USE_MAINTAINER_MODE" = "yes" ; then
|
||||
esac
|
||||
# Now, see if we can find the f77tof90 routine
|
||||
if test -x $use_top_srcdir/maint/f77tof90 ; then
|
||||
master_top_srcdir=$use_top_srcdir
|
||||
main_top_srcdir=$use_top_srcdir
|
||||
else
|
||||
AC_MSG_ERROR([Unable to find master source file - reconfigure using --disable-maintainer_mode])
|
||||
AC_MSG_ERROR([Unable to find main source file - reconfigure using --disable-maintainer_mode])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
rank = intercomm.Get_rank();
|
||||
|
||||
if (parentcomm == MPI::COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
cout << "Did not create " << np << " processes (got " << rsize << ")\n";
|
||||
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
|
||||
errs++;
|
||||
cout << "Too few arguments to spawned command\n";
|
||||
}
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
intercomm.Ssend(&errs, 1, MPI::INT, 0, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
||||
rank = intercomm.Get_rank();
|
||||
|
||||
if (parentcomm == MPI::COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
cout << "Did not create " << np << " processes (got " << rsize << ")\n";
|
||||
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Update error count */
|
||||
if (isChild) {
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
intercomm.Ssend(&errs, 1, MPI::INT, 0, 1);
|
||||
} else {
|
||||
if (rank == 0) {
|
||||
|
||||
@@ -50,7 +50,7 @@ AC_CHECK_HEADERS([stdlib.h string.h limits.h stdint.h sys/types.h],,
|
||||
[AC_MSG_ERROR([Cannot find headers.])],)
|
||||
|
||||
# Must be able to find mpi.h
|
||||
MPI_H_INCLUDE="-I${master_top_builddir}/src/include"
|
||||
MPI_H_INCLUDE="-I${main_top_builddir}/src/include"
|
||||
AC_SUBST([MPI_H_INCLUDE])
|
||||
|
||||
# check if we need declarations
|
||||
|
||||
@@ -32,7 +32,7 @@ program ring
|
||||
next = mod((rank + 1), size)
|
||||
from = mod((rank + size - 1), size)
|
||||
|
||||
! If we are the "master" process (i.e., MPI_COMM_WORLD rank 0), put
|
||||
! If we are the "main" process (i.e., MPI_COMM_WORLD rank 0), put
|
||||
! the number of times to go around the ring in the message.
|
||||
|
||||
if (rank .eq. 0) then
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got &
|
||||
@@ -110,7 +110,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got &
|
||||
@@ -108,7 +108,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got ", rsize, &
|
||||
@@ -79,7 +79,7 @@
|
||||
print *, "Unexpected rank on child ", rank, "(",i,")"
|
||||
endif
|
||||
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -117,7 +117,7 @@
|
||||
print *, "appnum was not set"
|
||||
endif
|
||||
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -135,7 +135,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -136,7 +136,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ C We now have a valid intercomm
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
C Master
|
||||
C Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got
|
||||
@@ -110,7 +110,7 @@ C We had too few args in the spawned command
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
C Send the errs back to the master process
|
||||
C Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ C We now have a valid intercomm
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
C Master
|
||||
C Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got ", rsize,
|
||||
@@ -80,7 +80,7 @@ C Child
|
||||
print *, "Unexpected rank on child ", rank, "(",i,")"
|
||||
endif
|
||||
|
||||
C Send the errs back to the master process
|
||||
C Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ C We now have a valid intercomm
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
C Master
|
||||
C Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -117,7 +117,7 @@ C My appnum should be my rank in comm world
|
||||
print *, "appnum was not set"
|
||||
endif
|
||||
|
||||
C Send the errs back to the master process
|
||||
C Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ C We now have a valid intercomm
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
C Master
|
||||
C Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -138,7 +138,7 @@ C We had too few args in the spawned command
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
C Send the errs back to the master process
|
||||
C Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np, " processes (got &
|
||||
@@ -110,7 +110,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
call MPI_Comm_rank( intercomm, rank, ierr )
|
||||
|
||||
if (parentcomm .eq. MPI_COMM_NULL) then
|
||||
! Master
|
||||
! Parent
|
||||
if (rsize .ne. np(1) + np(2)) then
|
||||
errs = errs + 1
|
||||
print *, "Did not create ", np(1)+np(2), &
|
||||
@@ -135,7 +135,7 @@
|
||||
errs = errs + 1
|
||||
print *, "Too few arguments to spawned command"
|
||||
endif
|
||||
! Send the errs back to the master process
|
||||
! Send the errs back to the parent process
|
||||
call MPI_Ssend( errs, 1, MPI_INTEGER, 0, 1, intercomm, ierr )
|
||||
endif
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#
|
||||
# Examples:
|
||||
# tcp gnu debug * * sed -i "..."
|
||||
# This will apply the set the XFAIL when the job is "mpich-master-tcp" or
|
||||
# This will apply the set the XFAIL when the job is "mpich-main-tcp" or
|
||||
# "mpich-review-tcp", the compiler is "gnu", and the jenkins_configure is
|
||||
# "debug".
|
||||
#
|
||||
# master-ubuntu * * * ubuntu32 sed -i "..."
|
||||
# This will apply the set the XFAIL when the job is "mpich-master-ubuntu" and
|
||||
# main-ubuntu * * * ubuntu32 sed -i "..."
|
||||
# This will apply the set the XFAIL when the job is "mpich-main-ubuntu" and
|
||||
# the running queue is "ubuntu32".
|
||||
#
|
||||
# Important note:
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(top_srcdir)/Makefile_single.mtest
|
||||
SUBDIRS = mpi_t
|
||||
|
||||
noinst_PROGRAMS = singjoin testconnect testconnectserial dimsbalanced \
|
||||
spawntest_master spawntest_child segfault
|
||||
spawntest_parent spawntest_child segfault
|
||||
|
||||
# testconnectserial would like MPICHLIBSTR to be defined as the installation
|
||||
# directory of the MPI library. This definition is not required.
|
||||
|
||||
@@ -18,14 +18,14 @@ dimsbalanced - A test of MPI_Dims_create; this checks that Dims_create
|
||||
default MPI_Dims_create when there is no underlying
|
||||
network topology.
|
||||
|
||||
spawntest_master, spawntest_child - A test of MPI_Comm_disconnect to ensure
|
||||
spawntest_parent, spawntest_child - A test of MPI_Comm_disconnect to ensure
|
||||
that once processes are disconnected, one can proceed
|
||||
through MPI_Finalize without waiting for the other to
|
||||
also proceed through MPI_Finalize. This test is
|
||||
designed to succeed even if either the child or master
|
||||
designed to succeed even if either the child or parent
|
||||
waits for the other in MPI_Finalize. If MPI_Comm_disconnect
|
||||
works correctly, the spawned children (4 by default),
|
||||
should exit roughly 30 seconds before the master.
|
||||
should exit roughly 30 seconds before the parent.
|
||||
|
||||
segfault - a simple test that intentionally segfaults if its rank is 0,
|
||||
otherwise does nothing. The output from mpiexec should make it clear
|
||||
|
||||
@@ -32,9 +32,9 @@ int main(int argc, char **argv)
|
||||
MPI_Intercomm_merge(parentcomm, 1, &allcomm);
|
||||
|
||||
/* Without the Free of allcomm, the children *must not exit* until the
|
||||
* master calls MPI_Finalize. */
|
||||
* parent calls MPI_Finalize. */
|
||||
MPI_Barrier(allcomm);
|
||||
/* According to 10.5.4, case 1b in MPI2.2, the children and master are
|
||||
/* According to 10.5.4, case 1b in MPI2.2, the children and parent are
|
||||
* still connected unless MPI_Comm_disconnect is used with allcomm.
|
||||
* MPI_Comm_free is not sufficient */
|
||||
MPI_Comm_free(&allcomm);
|
||||
|
||||
@@ -40,9 +40,9 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_size(allcomm, &size);
|
||||
|
||||
/* Without the Free of allcomm, the children *must not exit* until the
|
||||
* master calls MPI_Finalize. */
|
||||
* parent calls MPI_Finalize. */
|
||||
MPI_Barrier(allcomm);
|
||||
/* According to 10.5.4, case 1b in MPI2.2, the children and master are
|
||||
/* According to 10.5.4, case 1b in MPI2.2, the children and parent are
|
||||
* still connected unless MPI_Comm_disconnect is used with allcomm.
|
||||
* MPI_Comm_free is not sufficient */
|
||||
MPI_Comm_free(&allcomm);
|
||||
@@ -16,7 +16,7 @@ static char MTEST_Descrip[] = "One implementation delivered incorrect data when
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int wrank, wsize, master, worker, i, j, idx, count;
|
||||
int wrank, wsize, sender, receiver, i, j, idx, count;
|
||||
int errs = 0;
|
||||
MPI_Request r[MAX_MSGS];
|
||||
int buf[MAX_MSGS][MAX_MSGS];
|
||||
@@ -29,12 +29,12 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &wsize);
|
||||
|
||||
comm = MPI_COMM_WORLD;
|
||||
master = 0;
|
||||
worker = 1;
|
||||
sender = 0;
|
||||
receiver = 1;
|
||||
|
||||
/* The test takes advantage of the ordering rules for messages */
|
||||
|
||||
if (wrank == master) {
|
||||
if (wrank == sender) {
|
||||
/* Initialize the send buffer */
|
||||
for (i = 0; i < MAX_MSGS; i++) {
|
||||
for (j = 0; j < MAX_MSGS; j++) {
|
||||
@@ -43,9 +43,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
for (i = 0; i < MAX_MSGS; i++) {
|
||||
MPI_Send(buf[i], MAX_MSGS - i, MPI_INT, worker, 3, comm);
|
||||
MPI_Send(buf[i], MAX_MSGS - i, MPI_INT, receiver, 3, comm);
|
||||
}
|
||||
} else if (wrank == worker) {
|
||||
} else if (wrank == receiver) {
|
||||
/* Initialize the recv buffer */
|
||||
for (i = 0; i < MAX_MSGS; i++) {
|
||||
for (j = 0; j < MAX_MSGS; j++) {
|
||||
|
||||
@@ -84,7 +84,7 @@ int main(int argc, char **argv)
|
||||
MTestPrintError(mpi_errno);
|
||||
}
|
||||
|
||||
/* Perform probe, hopefully before the master process can
|
||||
/* Perform probe, hopefully before the main process can
|
||||
* send its reply */
|
||||
mpi_errno = MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
|
||||
if (mpi_errno != MPI_SUCCESS && errs++ < 10) {
|
||||
@@ -110,7 +110,7 @@ int main(int argc, char **argv)
|
||||
p_rank, msg_size, incoming_msg_size, msg_cnt);
|
||||
}
|
||||
|
||||
/* Receive the probed message from the master process */
|
||||
/* Receive the probed message from the main process */
|
||||
mpi_errno = MPI_Recv(buf, msg_size, MPI_BYTE, 0, tag, MPI_COMM_WORLD, &status);
|
||||
if (mpi_errno != MPI_SUCCESS && errs++ < 10) {
|
||||
MTestPrintError(mpi_errno);
|
||||
|
||||
@@ -68,10 +68,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
for (i = 0; i < LOOP_COUNT; i++) {
|
||||
if (verbose) {
|
||||
fprintf(pf, "Master : loop %d\n", i);
|
||||
fprintf(pf, "Main : loop %d\n", i);
|
||||
fflush(pf);
|
||||
} else if (loopProgress && (i & PROGRESS_COUNT) == 0) {
|
||||
fprintf(pf, "Master: loop %d\n", i);
|
||||
fprintf(pf, "Main: loop %d\n", i);
|
||||
fflush(pf);
|
||||
}
|
||||
for (j = 1; j < nProc; j++) {
|
||||
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
precv = (int *) calloc(DATA_SIZE, sizeof(int));
|
||||
for (i = 0; i < LOOP_COUNT; i++) {
|
||||
if (verbose) {
|
||||
fprintf(pf, " send to master\n");
|
||||
fprintf(pf, " send to main\n");
|
||||
fflush(pf);
|
||||
}
|
||||
/*
|
||||
@@ -121,15 +121,15 @@ int main(int argc, char *argv[])
|
||||
*/
|
||||
status = MPI_Send(psend, DATA_SIZE - 1, MPI_INT, 0, MP_TAG, MPI_COMM_WORLD);
|
||||
if (verbose) {
|
||||
fprintf(pf, " send to master done, status = %d\n", status);
|
||||
fprintf(pf, " send to main done, status = %d\n", status);
|
||||
fflush(pf);
|
||||
fprintf(pf, " read from master\n");
|
||||
fprintf(pf, " read from main\n");
|
||||
fflush(pf);
|
||||
}
|
||||
status = MPI_Recv(precv, DATA_SIZE, MPI_INT, 0, MP_TAG,
|
||||
MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
if (verbose) {
|
||||
fprintf(pf, " read from master done, status = %d\n", status);
|
||||
fprintf(pf, " read from main done, status = %d\n", status);
|
||||
fflush(pf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ int longcount = 512;
|
||||
int medcount = 127;
|
||||
int mednum = 4;
|
||||
|
||||
void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *getbuf,
|
||||
void RMATest(int i, MPI_Win win, int primary, int *srcbuf, int srcbufsize, int *getbuf,
|
||||
int getbufsize);
|
||||
int RMACheck(int i, int *buf, MPI_Aint bufsize);
|
||||
int RMACheckGet(int i, MPI_Win win, int *getbuf, MPI_Aint getsize);
|
||||
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Win win;
|
||||
int *rmabuffer = 0, *getbuf = 0;
|
||||
MPI_Aint bufsize = 0, getbufsize = 0;
|
||||
int master, partner, next, wrank, wsize, i;
|
||||
int primary, partner, next, wrank, wsize, i;
|
||||
int ntest = LAST_TEST;
|
||||
int *srcbuf;
|
||||
|
||||
@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||
}
|
||||
|
||||
master = 0;
|
||||
primary = 0;
|
||||
partner = 1;
|
||||
next = wrank + 1;
|
||||
if (next == partner)
|
||||
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Create the RMA window */
|
||||
bufsize = 0;
|
||||
if (wrank == master) {
|
||||
if (wrank == primary) {
|
||||
bufsize = RMA_SIZE;
|
||||
MPI_Alloc_mem(bufsize * sizeof(int), MPI_INFO_NULL, &rmabuffer);
|
||||
} else if (wrank == partner) {
|
||||
@@ -128,25 +128,25 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Run a sequence of tests */
|
||||
for (i = 0; i <= ntest; i++) {
|
||||
if (wrank == master) {
|
||||
if (wrank == primary) {
|
||||
MTestPrintfMsg(0, "Test %d\n", i);
|
||||
/* Because this lock is local, it must return only when the
|
||||
* lock is acquired */
|
||||
MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, master, win);
|
||||
MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, primary, win);
|
||||
RMATestInit(i, rmabuffer, bufsize);
|
||||
MPI_Send(MPI_BOTTOM, 0, MPI_INT, partner, i, MPI_COMM_WORLD);
|
||||
MPI_Send(MPI_BOTTOM, 0, MPI_INT, next, i, MPI_COMM_WORLD);
|
||||
MPI_Recv(MPI_BOTTOM, 0, MPI_INT, MPI_ANY_SOURCE, i, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
MPI_Win_unlock(master, win);
|
||||
MPI_Win_unlock(primary, win);
|
||||
MPI_Recv(MPI_BOTTOM, 0, MPI_INT, partner, i, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
errs += RMACheck(i, rmabuffer, bufsize);
|
||||
} else if (wrank == partner) {
|
||||
MPI_Recv(MPI_BOTTOM, 0, MPI_INT, master, i, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, master, win);
|
||||
RMATest(i, win, master, srcbuf, RMA_SIZE, getbuf, getbufsize);
|
||||
MPI_Win_unlock(master, win);
|
||||
MPI_Recv(MPI_BOTTOM, 0, MPI_INT, primary, i, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
MPI_Win_lock(MPI_LOCK_EXCLUSIVE, 0, primary, win);
|
||||
RMATest(i, win, primary, srcbuf, RMA_SIZE, getbuf, getbufsize);
|
||||
MPI_Win_unlock(primary, win);
|
||||
errs += RMACheckGet(i, win, getbuf, getbufsize);
|
||||
MPI_Send(MPI_BOTTOM, 0, MPI_INT, master, i, MPI_COMM_WORLD);
|
||||
MPI_Send(MPI_BOTTOM, 0, MPI_INT, primary, i, MPI_COMM_WORLD);
|
||||
} else {
|
||||
MPI_Recv(MPI_BOTTOM, 0, MPI_INT, MPI_ANY_SOURCE, i, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
|
||||
MPI_Send(MPI_BOTTOM, 0, MPI_INT, next, i, MPI_COMM_WORLD);
|
||||
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
|
||||
*
|
||||
* The srcbuf must be passed in because the buffer must remain valid
|
||||
* until the subsequent unlock call. */
|
||||
void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *getbuf,
|
||||
void RMATest(int i, MPI_Win win, int primary, int *srcbuf, int srcbufsize, int *getbuf,
|
||||
int getbufsize)
|
||||
{
|
||||
int j, k;
|
||||
@@ -184,40 +184,40 @@ void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *g
|
||||
switch (i) {
|
||||
case 0: /* Single short put (1 word at OFFSET_1) */
|
||||
source[0] = PUT_VAL;
|
||||
MPI_Put(source, 1, MPI_INT, master, OFFSET_1, 1, MPI_INT, win);
|
||||
MPI_Put(source, 1, MPI_INT, primary, OFFSET_1, 1, MPI_INT, win);
|
||||
break;
|
||||
case 1: /* Single short accumulate (1 word of value 17 at OFFSET_2) */
|
||||
source[0] = ACC_VAL;
|
||||
MPI_Accumulate(source, 1, MPI_INT, master, OFFSET_2, 1, MPI_INT, MPI_SUM, win);
|
||||
MPI_Accumulate(source, 1, MPI_INT, primary, OFFSET_2, 1, MPI_INT, MPI_SUM, win);
|
||||
break;
|
||||
case 2: /* Single short get (1 word at OFFSET_3) */
|
||||
getbuf[0] = -1;
|
||||
MPI_Get(getbuf, 1, MPI_INT, master, OFFSET_3, 1, MPI_INT, win);
|
||||
MPI_Get(getbuf, 1, MPI_INT, primary, OFFSET_3, 1, MPI_INT, win);
|
||||
break;
|
||||
case 3: /* Datatype single put (strided put) */
|
||||
for (j = 0; j < veccount; j++) {
|
||||
source[j * stride] = PUT_VAL + j;
|
||||
}
|
||||
MPI_Put(source, 1, vectype, master, OFFSET_1, 1, vectype, win);
|
||||
MPI_Put(source, 1, vectype, primary, OFFSET_1, 1, vectype, win);
|
||||
break;
|
||||
case 4: /* Datatype single accumulate (strided acc) */
|
||||
for (j = 0; j < veccount; j++) {
|
||||
source[j * stride] = ACC_VAL + j;
|
||||
}
|
||||
MPI_Accumulate(source, 1, vectype, master, OFFSET_2, 1, vectype, MPI_SUM, win);
|
||||
MPI_Accumulate(source, 1, vectype, primary, OFFSET_2, 1, vectype, MPI_SUM, win);
|
||||
break;
|
||||
case 5: /* Datatype single get (strided get) */
|
||||
for (j = 0; j < veccount; j++) {
|
||||
getbuf[j] = -j;
|
||||
}
|
||||
MPI_Get(getbuf, 1, vectype, master, OFFSET_3, 1, vectype, win);
|
||||
MPI_Get(getbuf, 1, vectype, primary, OFFSET_3, 1, vectype, win);
|
||||
break;
|
||||
case 6: /* a few small puts (like strided put, but 1 word at a time) */
|
||||
for (j = 0; j < veccount; j++) {
|
||||
source[j * stride] = PUT_VAL + j;
|
||||
}
|
||||
for (j = 0; j < veccount; j++) {
|
||||
MPI_Put(source + j * stride, 1, MPI_INT, master,
|
||||
MPI_Put(source + j * stride, 1, MPI_INT, primary,
|
||||
OFFSET_1 + j * stride, 1, MPI_INT, win);
|
||||
}
|
||||
break;
|
||||
@@ -226,7 +226,7 @@ void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *g
|
||||
source[j * stride] = ACC_VAL + j;
|
||||
}
|
||||
for (j = 0; j < veccount; j++) {
|
||||
MPI_Accumulate(source + j * stride, 1, MPI_INT, master,
|
||||
MPI_Accumulate(source + j * stride, 1, MPI_INT, primary,
|
||||
OFFSET_2 + j * stride, 1, MPI_INT, MPI_SUM, win);
|
||||
}
|
||||
break;
|
||||
@@ -235,32 +235,32 @@ void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *g
|
||||
getbuf[j * stride] = -j;
|
||||
}
|
||||
for (j = 0; j < veccount; j++) {
|
||||
MPI_Get(getbuf + j * stride, 1, MPI_INT, master,
|
||||
MPI_Get(getbuf + j * stride, 1, MPI_INT, primary,
|
||||
OFFSET_3 + j * stride, 1, MPI_INT, win);
|
||||
}
|
||||
break;
|
||||
case 9: /* Single long put (OFFSET_1) */
|
||||
for (j = 0; j < longcount; j++)
|
||||
source[j] = j;
|
||||
MPI_Put(source, longcount, MPI_INT, master, OFFSET_1, longcount, MPI_INT, win);
|
||||
MPI_Put(source, longcount, MPI_INT, primary, OFFSET_1, longcount, MPI_INT, win);
|
||||
break;
|
||||
case 10: /* Single long accumulate (OFFSET_2) */
|
||||
for (j = 0; j < longcount; j++)
|
||||
source[j] = j;
|
||||
MPI_Accumulate(source, longcount, MPI_INT, master,
|
||||
MPI_Accumulate(source, longcount, MPI_INT, primary,
|
||||
OFFSET_2, longcount, MPI_INT, MPI_SUM, win);
|
||||
break;
|
||||
case 11: /* Single long get (OFFSET_3) */
|
||||
for (j = 0; j < longcount; j++)
|
||||
getbuf[j] = -j;
|
||||
MPI_Get(getbuf, longcount, MPI_INT, master, OFFSET_3, longcount, MPI_INT, win);
|
||||
MPI_Get(getbuf, longcount, MPI_INT, primary, OFFSET_3, longcount, MPI_INT, win);
|
||||
break;
|
||||
case 12: /* a few long puts (start at OFFSET_1, medcount) */
|
||||
for (j = 0; j < mednum; j++) {
|
||||
for (k = 0; k < medcount; k++) {
|
||||
source[j * medcount + k] = j * 2 * medcount + k;
|
||||
}
|
||||
MPI_Put(source + j * medcount, medcount, MPI_INT, master,
|
||||
MPI_Put(source + j * medcount, medcount, MPI_INT, primary,
|
||||
OFFSET_1 + j * 2 * medcount, medcount, MPI_INT, win);
|
||||
}
|
||||
break;
|
||||
@@ -269,7 +269,7 @@ void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *g
|
||||
for (k = 0; k < medcount; k++) {
|
||||
source[j * medcount + k] = ACC_VAL + j * 2 * medcount + k;
|
||||
}
|
||||
MPI_Accumulate(source + j * medcount, medcount, MPI_INT, master,
|
||||
MPI_Accumulate(source + j * medcount, medcount, MPI_INT, primary,
|
||||
OFFSET_2 + j * 2 * medcount, medcount, MPI_INT, MPI_SUM, win);
|
||||
}
|
||||
break;
|
||||
@@ -278,7 +278,7 @@ void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *g
|
||||
for (k = 0; k < medcount; k++) {
|
||||
getbuf[j * medcount + k] = -(j * medcount + k);
|
||||
}
|
||||
MPI_Get(getbuf + j * medcount, medcount, MPI_INT, master,
|
||||
MPI_Get(getbuf + j * medcount, medcount, MPI_INT, primary,
|
||||
OFFSET_3 + j * 2 * medcount, medcount, MPI_INT, win);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -23,7 +23,7 @@ noinst_PROGRAMS = \
|
||||
spaconacc2 \
|
||||
selfconacc \
|
||||
spawnmult2 \
|
||||
taskmaster \
|
||||
taskmanager \
|
||||
join \
|
||||
disconnect_reconnect \
|
||||
disconnect_reconnect2 \
|
||||
|
||||
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
IF_VERBOSE(("disconnecting communicator\n"));
|
||||
MPI_Comm_disconnect(&intercomm);
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
/* Errors cannot be sent back to the parent because there is no
|
||||
* communicator connected to the parent */
|
||||
/*MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm); */
|
||||
|
||||
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
||||
IF_VERBOSE(("disconnecting communicator\n"));
|
||||
MPI_Comm_disconnect(&intercomm);
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
/* Errors cannot be sent back to the parent because there is no
|
||||
* communicator connected to the parent */
|
||||
/*MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm); */
|
||||
|
||||
@@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
||||
IF_VERBOSE(("disconnecting communicator\n"));
|
||||
MPI_Comm_disconnect(&intercomm);
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
/* Errors cannot be sent back to the parent because there is no
|
||||
* communicator connected to the parent */
|
||||
/*MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm); */
|
||||
|
||||
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_disconnect(&intercomm);
|
||||
}
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
/* Errors cannot be sent back to the parent because there is no
|
||||
* communicator connected to the parent */
|
||||
/*MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm); */
|
||||
|
||||
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_disconnect(&intercomm);
|
||||
}
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
/* Errors cannot be sent back to the parent because there is no
|
||||
* communicator connected to the parent */
|
||||
/*MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm); */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* In this test, processes create an intracommunicator and creation is
|
||||
* collective only on the members of the new communicator, not on the parent
|
||||
* communicator. This is accomplished by building up and merging
|
||||
* intercommunicators using Connect/Accept to merge with a master/controller
|
||||
* intercommunicators using Connect/Accept to merge with a controller
|
||||
* process.
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
||||
errs++;
|
||||
printf("Unexpected rank on child %d (%d)\n", rank, i);
|
||||
}
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
|
||||
errs++;
|
||||
printf("Unexpected rank on child %d (%d)\n", rank, i);
|
||||
}
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm2, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* Derived from mpi4py test case. This test that tries to follow what the MPI
|
||||
* standard says about spawning processes with arguments that should be
|
||||
* relevant only at the root process. See
|
||||
* https://bitbucket.org/mpi4py/mpi4py/issues/19/unit-tests-fail-with-mpich-master#comment-19261971
|
||||
* https://bitbucket.org/mpi4py/mpi4py/issues/19
|
||||
* and
|
||||
* https://trac.mpich.org/projects/mpich/ticket/2282
|
||||
*/
|
||||
@@ -18,22 +18,22 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
char *args[] = { "a", "b", "c", (char *) 0 };
|
||||
int rank;
|
||||
MPI_Comm master, worker;
|
||||
MPI_Comm parent, child;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
MPI_Comm_get_parent(&master);
|
||||
MPI_Comm_get_parent(&parent);
|
||||
|
||||
if (master == MPI_COMM_NULL) {
|
||||
if (parent == MPI_COMM_NULL) {
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_spawn("./spawn_rootargs", args, /*MPI_ARGV_NULL, */
|
||||
5, MPI_INFO_NULL, 0, MPI_COMM_SELF, &worker, MPI_ERRCODES_IGNORE);
|
||||
MPI_Barrier(worker);
|
||||
MPI_Comm_disconnect(&worker);
|
||||
5, MPI_INFO_NULL, 0, MPI_COMM_SELF, &child, MPI_ERRCODES_IGNORE);
|
||||
MPI_Barrier(child);
|
||||
MPI_Comm_disconnect(&child);
|
||||
if (!rank)
|
||||
printf(" No Errors\n");
|
||||
} else {
|
||||
MPI_Barrier(master);
|
||||
MPI_Comm_disconnect(&master);
|
||||
MPI_Barrier(parent);
|
||||
MPI_Comm_disconnect(&parent);
|
||||
}
|
||||
|
||||
MPI_Finalize();
|
||||
|
||||
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
|
||||
errs++;
|
||||
printf("Too few arguments to spawned command\n");
|
||||
}
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
|
||||
/* Send our notion of the current directory to the parent */
|
||||
MPI_Send(curdir, strlen(curdir) + 1, MPI_CHAR, 0, 2, intercomm);
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != np) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np, rsize);
|
||||
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Update error count */
|
||||
if (isChild) {
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
} else {
|
||||
if (rank == 0) {
|
||||
|
||||
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
inargv[narg] = saveArgp;
|
||||
/* We now have a valid intercomm */
|
||||
|
||||
/* Master */
|
||||
/* Parent */
|
||||
MPI_Comm_remote_size(intercomm, &rsize);
|
||||
MPI_Comm_size(intercomm, &size);
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
@@ -173,7 +173,7 @@ int worker(int argc, char *argv[], MPI_Comm intercomm, char *outargv[], int np)
|
||||
/* Restore the argument vector (not necessary in this case, since the
|
||||
* worker will exit) */
|
||||
outargv[narg] = saveoutArgp;
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
|
||||
return errs;
|
||||
|
||||
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* Master */
|
||||
/* Parent */
|
||||
if (rsize != sumnp) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", sumnp, rsize);
|
||||
@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
|
||||
/* Send our notion of the current directory to the parent */
|
||||
MPI_Send(curdir, strlen(curdir) + 1, MPI_CHAR, 0, 2, intercomm);
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
MPI_Comm_rank(intercomm, &rank);
|
||||
|
||||
if (parentcomm == MPI_COMM_NULL) {
|
||||
/* This is the master process */
|
||||
/* This is the parent process */
|
||||
if (rsize != np[0] + np[1]) {
|
||||
errs++;
|
||||
printf("Did not create %d processes (got %d)\n", np[0] + np[1], rsize);
|
||||
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
|
||||
printf("appnum was not set\n");
|
||||
}
|
||||
|
||||
/* Send the errs back to the master process */
|
||||
/* Send the errs back to the parent process */
|
||||
MPI_Ssend(&errs, 1, MPI_INT, 0, 1, intercomm);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ int comm_world_size;
|
||||
void process_spawn(MPI_Comm * comm, int thread_id);
|
||||
void process_spawn(MPI_Comm * comm, int thread_id)
|
||||
{
|
||||
CHECK_SUCCESS(MPI_Comm_spawn((char *) "./taskmaster", (char **) NULL, 1, MPI_INFO_NULL, 0,
|
||||
CHECK_SUCCESS(MPI_Comm_spawn((char *) "./taskmanager", (char **) NULL, 1, MPI_INFO_NULL, 0,
|
||||
MPI_COMM_WORLD, comm, NULL));
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ spaconacc2 1
|
||||
selfconacc 2
|
||||
spaiccreate 2
|
||||
spaiccreate2 2
|
||||
taskmaster 1 timeLimit=600
|
||||
taskmaster 2 timeLimit=600
|
||||
taskmanager 1 timeLimit=600
|
||||
taskmanager 2 timeLimit=600
|
||||
join 2
|
||||
disconnect_reconnect 3
|
||||
disconnect_reconnect2 3
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "mpitest.h"
|
||||
#include "mpithreadtest.h"
|
||||
|
||||
/* This is the master test routine */
|
||||
/* This is the main test routine */
|
||||
#define MAX_CNT 660000
|
||||
#define MAX_LOOP 200
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "mpitest.h"
|
||||
#include "mpithreadtest.h"
|
||||
|
||||
/* This is the master test routine */
|
||||
/* This is the main test routine */
|
||||
#define MAX_CNT 660000
|
||||
/*#define MAX_LOOP 200 */
|
||||
#define MAX_LOOP 10
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "mpitest.h"
|
||||
#include "mpithreadtest.h"
|
||||
|
||||
/* This is the master test routine */
|
||||
/* This is the main test routine */
|
||||
#define MAX_CNT 660000
|
||||
/* #define MAX_LOOP 200 */
|
||||
#define MAX_LOOP 10
|
||||
|
||||
@@ -7,4 +7,4 @@ include $(top_srcdir)/Makefile_threads.mtest
|
||||
|
||||
EXTRA_DIST = testlist
|
||||
|
||||
noinst_PROGRAMS = multispawn th_taskmaster
|
||||
noinst_PROGRAMS = multispawn th_taskmanager
|
||||
|
||||
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* The master thread (this thread) checks the created communicators */
|
||||
/* The parent thread (this thread) checks the created communicators */
|
||||
for (i = 0; i < NTHREADS; i++) {
|
||||
MPI_Bcast(&i, 1, MPI_INT, MPI_ROOT, intercomms[i]);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
multispawn 1
|
||||
th_taskmaster 1 timeLimit=600
|
||||
th_taskmaster 2 timeLimit=600
|
||||
th_taskmanager 1 timeLimit=600
|
||||
th_taskmanager 2 timeLimit=600
|
||||
|
||||
@@ -29,7 +29,7 @@ MPI_Comm th_comms[DEFAULT_TASK_WINDOW];
|
||||
void process_spawn(MPI_Comm * comm, int thread_id);
|
||||
void process_spawn(MPI_Comm * comm, int thread_id)
|
||||
{
|
||||
CHECK_SUCCESS(MPI_Comm_spawn((char *) "./th_taskmaster", (char **) NULL,
|
||||
CHECK_SUCCESS(MPI_Comm_spawn((char *) "./th_taskmanager", (char **) NULL,
|
||||
1, MPI_INFO_NULL, 0, th_comms[thread_id], comm, NULL));
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário