commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
October 2015
- 1 participants
- 19 discussions
[mpich] MPICH primary repository branch, master, updated. v3.2rc1-10-g61dfbb3
by noreply@mpich.org 17 Oct '15
by noreply@mpich.org 17 Oct '15
17 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 61dfbb3020a8cbf3792077a18dd197640147ce9c (commit)
from c9d0fb481b235dc6e2a5f3974e12f233b03384ed (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/61dfbb3020a8cbf3792077a18dd197640…
commit 61dfbb3020a8cbf3792077a18dd197640147ce9c
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Sat Oct 17 00:22:46 2015 -0500
maint/jenkins: fix tarball build script
Recreate build directory if it does not exist.
No reviewer.
diff --git a/maint/jenkins/test-worker-tarball.sh b/maint/jenkins/test-worker-tarball.sh
index 13fa912..e80d85d 100755
--- a/maint/jenkins/test-worker-tarball.sh
+++ b/maint/jenkins/test-worker-tarball.sh
@@ -11,7 +11,9 @@ export FC=gfortran
cd $WORKSPACE
TMP_WORKSPACE=$(mktemp -d /sandbox/jenkins.tmp.XXXXXXXX)
-mkdir build
+if test ! -d $WORKSPACE/build ; then
+ mkdir -p $WORKSPACE/build
+fi
cp -a $WORKSPACE/* $TMP_WORKSPACE/
pushd $TMP_WORKSPACE
-----------------------------------------------------------------------
Summary of changes:
maint/jenkins/test-worker-tarball.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2rc1-9-gc9d0fb4
by noreply@mpich.org 16 Oct '15
by noreply@mpich.org 16 Oct '15
16 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via c9d0fb481b235dc6e2a5f3974e12f233b03384ed (commit)
via 67e1318ea71b4136a9e3b0eb77d84c7fdde3a7fa (commit)
via e1ddafb8b2b7301b84e77c11918faf89a5b583d4 (commit)
via 729dd94332ba2e360bfba75ab9db2a56aae19e76 (commit)
via 7f1e00c834d6bf85195b587d64855eaca1a48a5e (commit)
via ba0fdd3595b09f0033c849eb7d0a0167f6cf9636 (commit)
via ecbe04f11e73de7505dac9b46db8849431bb5e31 (commit)
from ab86ff374c430a00ee9065e8b1b95df27087f204 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/c9d0fb481b235dc6e2a5f3974e12f233b…
commit c9d0fb481b235dc6e2a5f3974e12f233b03384ed
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Fri Oct 16 11:06:54 2015 -0500
maint/jenkins: add timeout script for multinode jobs
We use this script to calculate the timeout for SLURM jobs based on the
configuration, netmod, etc. This help improve the backfilling on SLURM.
No reviewer.
diff --git a/maint/jenkins/multinode/timeout.conf b/maint/jenkins/multinode/timeout.conf
new file mode 100644
index 0000000..b841c05
--- /dev/null
+++ b/maint/jenkins/multinode/timeout.conf
@@ -0,0 +1,23 @@
+# Contitional Timeout settings
+#
+# Syntax (similar to a cron file):
+# [job_name] [compiler] [jenkins_configure] [netmod] [n_nodes] [ppn] [timeout in min]
+# Other conditions only allows exact matches.
+#
+# Examples:
+# mxm gnu debug * * sed -i "..."
+# This will apply the set the XFAIL when the job is "mpich-master-mxm" or
+# "mpich-review-mxm", 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
+# the running queue is "ubuntu32".
+#
+mpich-master-multinode * * mxm 2 * 60
+mpich-master-multinode * * mxm 4 * 60
+mpich-master-multinode * * mxm 8 * 70
+mpich-master-multinode * * tcp * * 120
+mpich-master-multinode * * ofi * * 150
+mpich-master-multinode * * portals4 * * 90
+* * * * * * 120
diff --git a/maint/jenkins/set-timeout.sh b/maint/jenkins/set-timeout.sh
new file mode 100755
index 0000000..1554632
--- /dev/null
+++ b/maint/jenkins/set-timeout.sh
@@ -0,0 +1,102 @@
+#!/bin/zsh
+
+jobname=""
+compiler=""
+jenkins_configure=""
+n_nodes="1"
+ppn="1"
+netmod=""
+
+TIMEOUT_CONF="maint/jenkins/multinode/timeout.conf"
+
+#####################################################################
+## Initialization
+#####################################################################
+
+while getopts ":f:j:c:o:n:p:m:" opt; do
+ case "$opt" in
+ j)
+ jobname=$OPTARG ;;
+ c)
+ compiler=$OPTARG ;;
+ o)
+ jenkins_configure=$OPTARG ;;
+ n)
+ n_nodes=$OPTARG ;;
+ p)
+ ppn=$OPTARG ;;
+ m)
+ netmod=$OPTARG ;;
+ f)
+ TIMEOUT_CONF=$OPTARG ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ exit 1
+ esac
+done
+
+#####################################################################
+## Main (
+#####################################################################
+
+if test ! -f "$TIMEOUT_CONF" ; then
+ echo "Cannot find $TIMEOUT_CONF. No TIMEOUT will be calculated"
+ exit 0
+fi
+
+TimeoutCond() {
+ local job="$1"
+ local comp="$2"
+ local option="$3"
+ local nmod="$4"
+ local _n_nodes="$5"
+ local _ppn="$6"
+
+ local state=0
+
+ if [[ ! "$job" == "*" ]]; then
+ # clean up jobname and do substring match
+ if [[ ! "${jobname%%,*}" == *$job* ]]; then state=1; fi
+ fi
+
+ if [[ ! "$comp" == "*" ]]; then
+ if [[ ! "$compiler" == "$comp" ]]; then state=1; fi
+ fi
+
+ if [[ ! "$option" == "*" ]]; then
+ if [[ ! "$jenkins_configure" == "$option" ]]; then state=1; fi
+ fi
+
+ if [[ ! "$nmod" == "*" ]]; then
+ if [[ ! "$netmod" == "$nmod" ]]; then state=1; fi
+ fi
+
+ if [[ ! "$_n_nodes" == "*" ]]; then
+ if [[ ! "$n_nodes" == "$_n_nodes" ]]; then state=1; fi
+ fi
+
+ if [[ ! "$_ppn" == "*" ]]; then
+ if [[ ! "$ppn" == "$_ppn" ]]; then state=1; fi
+ fi
+
+ echo "$state"
+}
+
+while read -r line; do
+ #clean leading whitespaces
+ line=$(echo "$line" | sed "s/^ *//g")
+ line=$(echo "$line" | sed "s/ *$//g")
+ # echo $line
+ # skip comment line
+ if test -x "$line" -o "${line:1}" = "#" ; then
+ continue
+ fi
+
+ arr=( $(echo $line) )
+ if [[ "0" == $(TimeoutCond "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[4]}" "${arr[5]}" "${arr[6]}") ]]; then
+ echo "${arr[@]:6}"
+ exit 0
+ fi
+done < "$TIMEOUT_CONF"
+
+exit 0
http://git.mpich.org/mpich.git/commitdiff/67e1318ea71b4136a9e3b0eb77d84c7fd…
commit 67e1318ea71b4136a9e3b0eb77d84c7fdde3a7fa
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Fri Oct 16 11:00:58 2015 -0500
maint/jenkins: xfail test failing on Portals 4 bug
The Portals 4 reference implementation has a bug that makes recv cancel
operations unreliable in threaded cases. We modified to the threaded
alltoall test to consistently reproduce the failure. We have xfailed it
when running with Portals 4 to not dirty the Jenkins results. Now we
apply the same xfail for any job that uses portals4 netmod.
No reviewer.
diff --git a/maint/jenkins/xfail.conf b/maint/jenkins/xfail.conf
index 119f8ae..934685b 100644
--- a/maint/jenkins/xfail.conf
+++ b/maint/jenkins/xfail.conf
@@ -23,4 +23,4 @@
# For each build, all applied XFAILS will be summaried in
# ${SOURCE}/apply-xfail.sh
#
-portals4 * * * * sed -i "s+\(^alltoall .*\)+\1 xfail=ticket0+g" test/mpi/threads/pt2pt/testlist
+* * * portals4 * sed -i "s+\(^alltoall .*\)+\1 xfail=ticket0+g" test/mpi/threads/pt2pt/testlist
http://git.mpich.org/mpich.git/commitdiff/e1ddafb8b2b7301b84e77c11918faf89a…
commit e1ddafb8b2b7301b84e77c11918faf89a5b583d4
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Wed Oct 14 14:31:06 2015 -0500
maint/jenkins: build mpich-tarball on /sandbox
Creating mpich tarball on local disk instead of NFS.
No reviewer.
diff --git a/maint/jenkins/test-worker-tarball.sh b/maint/jenkins/test-worker-tarball.sh
index 300631b..13fa912 100755
--- a/maint/jenkins/test-worker-tarball.sh
+++ b/maint/jenkins/test-worker-tarball.sh
@@ -9,11 +9,25 @@ export CXX=g++
export FC=gfortran
cd $WORKSPACE
-git clean -x -d -f
+TMP_WORKSPACE=$(mktemp -d /sandbox/jenkins.tmp.XXXXXXXX)
mkdir build
-cd build
+
+cp -a $WORKSPACE/* $TMP_WORKSPACE/
+pushd $TMP_WORKSPACE
+
+git clean -x -d -f
+
+pushd build
../maint/release.pl --branch=master --version=master --git-repo=git://git.mpich.org/mpich.git
+popd
+
+cp -a $TMP_WORKSPACE/build/mpich-master.tar.gz $WORKSPACE/build
+
+popd
+
+rm -rf $TMP_WORKSPACE
+
exit 0
http://git.mpich.org/mpich.git/commitdiff/729dd94332ba2e360bfba75ab9db2a56a…
commit 729dd94332ba2e360bfba75ab9db2a56aae19e76
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Tue Oct 6 11:03:27 2015 -0400
maint/jenkins: remove MXM_SHM_KCOPY_MODE=off for testing
This option is no longer needed as KMEM in MXM is already working on all
nodes.
No reviewer.
diff --git a/maint/jenkins/test-worker.sh b/maint/jenkins/test-worker.sh
index fdec609..8309576 100755
--- a/maint/jenkins/test-worker.sh
+++ b/maint/jenkins/test-worker.sh
@@ -503,8 +503,6 @@ case "$netmod" in
"mxm")
MXM_LOG_LEVEL=error
export MXM_LOG_LEVEL
- MXM_SHM_KCOPY_MODE=off
- export MXM_SHM_KCOPY_MODE
;;
"ofi" | "portals4")
MXM_LOG_LEVEL=error
http://git.mpich.org/mpich.git/commitdiff/7f1e00c834d6bf85195b587d64855eaca…
commit 7f1e00c834d6bf85195b587d64855eaca1a48a5e
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Tue Oct 6 10:23:06 2015 -0400
maint/jenkins: remove killing for hydra_pmi_proxy
The killing for remaining hydra_pmi_proxy is no longer needed as the bug
has been fixed.
No reviewer.
diff --git a/maint/jenkins/test-worker.sh b/maint/jenkins/test-worker.sh
index fdf3e9a..fdec609 100755
--- a/maint/jenkins/test-worker.sh
+++ b/maint/jenkins/test-worker.sh
@@ -530,10 +530,6 @@ case "$jenkins_configure" in
;;
esac
-if killall -9 hydra_pmi_proxy; then
- echo "leftover hydra_pmi_proxy processes killed"
-fi
-
#####################################################################
## Copy Test results and Cleanup
#####################################################################
http://git.mpich.org/mpich.git/commitdiff/ba0fdd3595b09f0033c849eb7d0a0167f…
commit ba0fdd3595b09f0033c849eb7d0a0167f6cf9636
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Tue Sep 29 11:17:19 2015 -0500
maint/jenkins: add multi-node test scripts
Two scripts are added for multi-node tests. They are designed to be
submitted as two consecutive jobs.
mn-build.sh builds the MPI library and test binaries on local disk. The
temporary workspace on local disk is packed as a tarball and saved in
the Jenkins workspace. This script should be submitted as a 1-node SLURM
job using `srun`.
mn-run.sh recreates the temporary workspace and extracts the files from
the tarball in the previous step. Then it runs all the tests and
collects the results. This script should be submitted as a 2-node SLURM
job using `srun`.
Notes:
1. These two scripts must use the same temporary workspace location. The
location of temporary workspace is specified using "-t" option.
2. Each of these two scripts should only be ran one time. When submitted
through `srun`, SLURM will try to run these scripts on every allocated
nodes, which is incorrect. These scripts checks the SLURM_NODEID
variable and exit if it is not running on the first allocated node.
3. In order to specify interface for tcp jobs. We hack the
test/mpi/runtests script to include "-iface ib0" with mpiexec.
No reviewer.
diff --git a/maint/jenkins/multinode/mn-build.sh b/maint/jenkins/multinode/mn-build.sh
new file mode 100755
index 0000000..01cb213
--- /dev/null
+++ b/maint/jenkins/multinode/mn-build.sh
@@ -0,0 +1,506 @@
+#!/bin/zsh -xe
+
+# This script only run on the first node. The mpiexec will automatically spawned
+if test ! $SLURM_NODEID -eq 0; then
+ exit 0
+fi
+
+mount | grep autotest
+
+hostname
+
+WORKSPACE=""
+TMP_WORKSPACE=""
+compiler="gnu"
+jenkins_configure="default"
+queue="ib64"
+netmod="default"
+ofi_prov="sockets"
+N_MAKE_JOBS=8
+GIT_BRANCH=""
+BUILD_MODE="per-commit"
+
+#####################################################################
+## Initialization
+#####################################################################
+
+while getopts ":h:c:o:q:m:n:b:t:" opt; do
+ case "$opt" in
+ h)
+ WORKSPACE=$OPTARG ;;
+ c)
+ compiler=$OPTARG ;;
+ o)
+ jenkins_configure=$OPTARG ;;
+ q)
+ queue=$OPTARG ;;
+ m)
+ _netmod=${OPTARG%%,*}
+ if [[ "$_netmod" == "ofi" ]]; then
+ netmod=$_netmod
+ ofi_prov=${OPTARG/$_netmod,}
+ else
+ netmod=$_netmod
+ fi
+ ;;
+ n)
+ N_MAKE_JOBS=$OPTARG ;;
+ b)
+ GIT_BRANCH=$OPTARG ;;
+ t)
+ TMP_WORKSPACE=$OPTARG ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ exit 1
+ esac
+done
+
+cd $WORKSPACE
+
+if test "$GIT_BRANCH" = "" ; then
+ BUILD_MODE="nightly"
+fi
+
+case "$BUILD_MODE" in
+ "nightly")
+ if [[ -x mpich-master/maint/jenkins/skip_test.sh ]]; then
+ ./mpich-master/maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \
+ -s mpich-master/test/mpi/summary.junit.xml
+ if [[ -f mpich-master/test/mpi/summary.junit.xml ]]; then
+ exit 0
+ fi
+ fi
+ ;;
+ "per-commit")
+ if [[ -x maint/jenkins/skip_test.sh ]]; then
+ ./maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \
+ -s test/mpi/summary.junit.xml
+ if [[ -f test/mpi/summary.junit.xml ]]; then
+ exit 0
+ fi
+ fi
+ ;;
+esac
+
+
+if test -d "$TMP_WORKSPACE"; then
+ rm -rf "$TMP_WORKSPACE"
+fi
+mkdir -p "$TMP_WORKSPACE"
+SRC=$WORKSPACE
+TMP_SRC=$TMP_WORKSPACE
+
+# Preparing the source
+case "$BUILD_MODE" in
+ "nightly")
+ SRC=$WORKSPACE/mpich-master
+ TMP_SRC=$TMP_WORKSPACE/mpich-master
+ cp $WORKSPACE/mpich-master.tar.gz $TMP_WORKSPACE/
+ pushd "$TMP_WORKSPACE"
+ tar zxvf mpich-master.tar.gz
+ popd
+ ;;
+ "per-commit")
+ git clean -x -d -f
+ cp -a $WORKSPACE/* $TMP_WORKSPACE/
+ ;;
+ *)
+ echo "Invalid BUILD_MODE $BUILD_MODE. Set by mistake?"
+ exit 1
+esac
+
+
+#####################################################################
+## Functions
+#####################################################################
+
+CollectResults() {
+ # TODO: copy saved test binaries (for failed cases)
+ if [[ "$BUILD_MODE" != "per-commit" ]]; then
+ find . \
+ \( -name "filtered-make.txt" \
+ -o -name "apply-xfail.sh" \
+ -o -name "autogen.log" \
+ -o -name "config.log" \
+ -o -name "c.txt" \
+ -o -name "m.txt" \
+ -o -name "mi.txt" \
+ -o -name "summary.junit.xml" \) \
+ | while read -r line; do
+ mkdir -p "$SRC/$(dirname $line)"
+ done
+ fi
+
+ find . \
+ \( -name "filtered-make.txt" -o \
+ -name "apply-xfail.sh" -o \
+ -name "autogen.log" -o \
+ -name "config.log" -o \
+ -name "c.txt" -o \
+ -name "m.txt" -o \
+ -name "mi.txt" -o \
+ -name "summary.junit.xml" \) \
+ -exec cp {} $SRC/{} \;
+}
+
+#####################################################################
+## Logic to generate random configure options
+#####################################################################
+RandArgs() {
+ # Chosen *without* replacement. If an option is chosen twice,
+ # then there will be fewer options
+ n_choice=$1
+ array=(${(P)${2}})
+ optname=$3
+ negoptname=$4
+ chosen=()
+ args=""
+ ret_args=""
+ array_len=$#array
+ idx=0
+
+ for i in `seq $array_len`; do
+ chosen[$i]=0
+ done
+
+ for i in `seq $n_choice`; do
+ let idx=$[RANDOM % $array_len]+1
+ if [ $chosen[$idx] -eq 1 ]; then continue; fi
+ chosen[$idx]=1
+ args=("${(s/;/)array[$idx]}")
+ name=$args[1]
+ if [ $#args -eq 1 ]; then
+ # Only the name is provided. Choose one of three
+ # choices:
+ # No option (skip this one)
+ # just --$optname-$name
+ # just --$negoptname-$name
+ let idx=$[RANDOM % 3]+1
+ if [ $idx -eq 1 ]; then
+ ret_args="$ret_args --$optname-$name"
+ elif [ $idx -eq 2 ]; then
+ ret_args="$ret_args --$negoptname-$name"
+ fi
+ else
+ let idx=$[RANDOM % ($#args-1)]+2
+ # Special cases
+ if [ "$args[$idx]" = "ch3:sock" ]; then
+ ret_args="$ret_args --disable-ft-tests --disable-comm-overlap-tests"
+ elif [ "$args[$idx]" = "gforker" ]; then
+ if [ $chosen[4] -eq 1 ]; then
+ continue
+ else
+ ret_args="$ret_args --with-namepublisher=file"
+ chosen[4]=1
+ fi
+ elif [ "$name" = "namepublisher" -a "$args[$idx]" = "no" ]; then
+ if [ $chosen[3] -eq 1 ]; then
+ continue
+ fi
+ elif [ "$args[$idx]" = "ndebug" -a "$CC" = "suncc" -a "$label" = "ubuntu32" ]; then
+ # On ubuntu32, suncc has a bug whose workaround is to add -O flag (ticket #2105)
+ CFLAGS="-O1"
+ export CFLAGS
+ fi
+ ret_args="$ret_args --$optname-$name=$args[$idx]"
+ fi
+ done
+ echo $ret_args
+}
+
+RandConfig() {
+ # WARNING: If moving anything in the two following arrays, check the indices in "Special cases" above
+ enable_array=(
+ 'error-checking;no;runtime;all'
+ 'error-messages;all;generic;class;none'
+ 'timer-type;linux86_cycle;clock_gettime;gettimeofday'
+ 'timing;none;all;runtime;log;log_detailed'
+ 'g;none;all;handle;dbg;log;meminit;handlealloc;instr;mem;mutex;mutexnesting'
+ 'fast;O0;O1;O2;O3;ndebug;all;yes;none'
+ 'fortran'
+ 'cxx'
+ 'romio'
+ 'check-compiler-flags'
+ 'strict;c99;posix'
+ 'debuginfo'
+ 'weak-symbols;no;yes'
+ 'threads;single;multiple;runtime'
+ 'thread-cs;global'
+ 'refcount;lock-free;none'
+ 'mutex-timing'
+ 'handle-allocation;tls;mutex'
+ 'multi-aliases'
+ 'predefined-refcount'
+ 'alloca'
+ 'yield;sched_yield;select'
+ 'runtimevalues'
+ )
+ with_array=(
+ 'logging;none'
+ 'pmi;simple'
+ 'pm;gforker'
+ 'namepublisher;no;file'
+ 'device;ch3;ch3:sock'
+ )
+ let n_enable=$#enable_array+1
+ let n_with=$#with_array+1
+ enable_args=$(RandArgs $n_enable "enable_array" "enable" "disable")
+ with_args=$(RandArgs $n_with "with_array" "with" "without")
+ echo "$enable_args $with_args"
+}
+
+PrepareEnv() {
+ case "$queue" in
+ "ubuntu32" | "ubuntu64" )
+ source /software/common/adm/etc/softenv-aliases.sh
+ source /software/common/adm/etc/softenv-load.sh
+ soft add +intel
+ soft add +pgi
+ soft add +absoft
+ soft add +nagfor
+ soft add +solarisstudio-12.4
+ soft add +ekopath
+ ;;
+ "freebsd64" | "freebsd32")
+ PATH=/usr/local/bin:$PATH
+ LD_LIBRARY_PATH=/usr/local/lib/gcc46:$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
+ ;;
+ "solaris")
+ PATH=/usr/gcc/4.3/bin:/usr/gnu/bin:/usr/sbin:$PATH
+ CONFIG_SHELL=/usr/gnu/bin/sh
+ export CONFIG_SHELL
+ ;;
+ esac
+ PATH=$HOME/software/autotools/bin:$PATH
+ export PATH
+ echo "$PATH"
+}
+
+SetCompiler() {
+ case "$compiler" in
+ "gnu")
+ CC=gcc
+ CXX=g++
+ F77=gfortran
+ FC=gfortran
+ ;;
+ "clang")
+ CC=clang
+ CXX=clang++
+ F77=gfortran
+ FC=gfortran
+ ;;
+ "intel")
+ CC=icc
+ CXX=icpc
+ F77=ifort
+ FC=ifort
+ ;;
+ "pgi")
+ CC=pgcc
+ CXX=pgcpp
+ F77=pgf77
+ FC=pgfortran
+ ;;
+ "absoft")
+ CC=gcc
+ CXX=g++
+ F77=af77
+ FC=af90
+ ;;
+ "nag")
+ CC=gcc
+ CXX=g++
+ F77=nagfor
+ FC=nagfor
+ FFLAGS="-mismatch"
+ FCFLAGS="-mismatch"
+ export FFLAGS
+ export FCFLAGS
+ ;;
+ "solstudio")
+ CC=suncc
+ CXX=sunCC
+ F77=sunf77
+ FC=sunf90
+ ;;
+ "sunstudio")
+ CC=cc
+ CXX=CC
+ F77=f77
+ FC=f90
+ ;;
+ "pathscale")
+ CC=pathcc
+ CXX=pathCC
+ F77=pathf95
+ FC=pathf95
+ ;;
+ *)
+ echo "Unknown compiler suite"
+ exit 1
+ esac
+
+ export CC
+ export CXX
+ export F77
+ export FC
+
+ which $CC
+ which $CXX
+ which $F77
+ which $FC
+}
+
+SetNetmod() {
+ netmod_opt="__NULL__"
+ case "$netmod" in
+ "default") # for solaris, may use with sock
+ netmod_opt=
+ ;;
+ "mxm")
+ netmod_opt="--with-device=ch3:nemesis:mxm --with-mxm=$HOME/software/mellanox/mxm --disable-spawn --disable-ft-tests"
+ ;;
+ "ofi")
+ netmod_opt="--with-device=ch3:nemesis:ofi --with-ofi=$HOME/software/libfabric/$ofi_prov --disable-spawn --disable-ft-tests LD_LIBRARY_PATH=$HOME/software/libfabric/lib"
+ ;;
+ "portals4")
+ netmod_opt="--with-device=ch3:nemesis:portals4 --with-portals4=$HOME/software/portals4 --disable-spawn --disable-ft-tests"
+ ;;
+ "sock")
+ netmod_opt="--with-device=ch3:sock --disable-ft-tests --disable-comm-overlap-tests"
+ ;;
+ "tcp")
+ netmod_opt=
+ ;;
+ *)
+ echo "Unknown netmod type"
+ exit 1
+ esac
+ export netmod_opt
+ echo "$netmod_opt"
+}
+
+SetConfigOpt() {
+ config_opt="__TO_BE_FILLED__"
+ case "$jenkins_configure" in
+ "default")
+ config_opt=
+ ;;
+ "strict")
+ config_opt="--enable-strict"
+ ;;
+ "fast")
+ config_opt="--enable-fast=all"
+ ;;
+ "nofast")
+ config_opt="--disable-fast"
+ ;;
+ "noshared")
+ config_opt="--disable-shared"
+ ;;
+ "debug")
+ config_opt="--enable-g=all"
+ ;;
+ "noweak")
+ config_opt="--disable-weak-symbols"
+ ;;
+ "strictnoweak")
+ config_opt="--enable-strict --disable-weak-symbols"
+ ;;
+ "nofortran")
+ config_opt="--disable-fortran"
+ ;;
+ "nocxx")
+ config_opt="--disable-cxx"
+ ;;
+ "multithread")
+ config_opt="--enable-threads=multiple"
+ ;;
+ "debuginfo")
+ config_opt="--enable-debuginfo"
+ ;;
+ "noerrorchecking")
+ config_opt="--disable-error-checking"
+ ;;
+ "sock") # for solaris + sock
+ config_opt="--with-device=ch3:sock --disable-ft-tests --disable-comm-overlap-tests"
+ ;;
+ "mpd")
+ config_opt="--with-pm=mpd --with-namepublisher=file"
+ ;;
+ "gforker")
+ config_opt="--with-pm=gforker --with-namepublisher=file"
+ ;;
+ "shmem")
+ config_opt=
+ ;;
+ "async")
+ config_opt=
+ ;;
+ "random")
+ config_opt=$(RandArgs)
+ ;;
+ *)
+ echo "Bad configure option: $jenkins_configure"
+ exit 1
+ esac
+
+ if test "$queue" = "osx" -a "$FC" = "ifort"; then
+ config_opt="$config_opt lv_cv_ld_force_load=no"
+ fi
+
+ # ROMIO is always disabled on multinode tests
+ config_opt="$config_opt --disable-romio"
+
+ export config_opt
+ echo "$config_opt"
+}
+
+#####################################################################
+## Main() { Setup Environment and Build
+#####################################################################
+# determine if this is a nightly job or a per-commit job
+PrepareEnv
+
+SetCompiler "$compiler"
+
+pushd "$TMP_SRC"
+
+if test "$BUILD_MODE" = "per-commit" ; then
+ ./autogen.sh 2>&1 | tee autogen.log
+fi
+
+if [[ -x maint/jenkins/set-xfail.sh ]]; then
+ ./maint/jenkins/set-xfail.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod
+fi
+
+./configure --prefix="$TMP_SRC/_inst" $(SetNetmod $netmod) $(SetConfigOpt $jenkins_configure) \
+ --disable-perftest \
+ 2>&1 | tee c.txt
+make -j$N_MAKE_JOBS 2>&1 | tee m.txt
+if test "${pipestatus[-2]}" != "0"; then
+ CollectResults
+ exit 1
+fi
+make -j$N_MAKE_JOBS install 2>&1 | tee mi.txt
+if test "${pipestatus[-2]}" != "0"; then
+ CollectResults
+ exit 1
+fi
+cat m.txt mi.txt | ./maint/clmake > filtered-make.txt 2>&1
+
+# Make the binaries of tests before rsync back to NFS
+pushd test/mpi
+make -j$N_MAKE_JOBS
+popd
+
+tar cf $TMP_WORKSPACE/mpich-test-pack.tar *
+cp $TMP_WORKSPACE/mpich-test-pack.tar $WORKSPACE
+rm $TMP_WORKSPACE/mpich-test-pack.tar
+popd
+
+rm -rf $TMP_WORKSPACE
+exit 0
+
diff --git a/maint/jenkins/multinode/mn-run.sh b/maint/jenkins/multinode/mn-run.sh
new file mode 100755
index 0000000..3b6a12b
--- /dev/null
+++ b/maint/jenkins/multinode/mn-run.sh
@@ -0,0 +1,240 @@
+#!/bin/zsh -xe
+
+# This script only run on the first node. The mpiexec will automatically spawned
+if test ! $SLURM_NODEID -eq 0; then
+ exit 0
+fi
+
+hostname
+
+WORKSPACE=""
+TMP_WORKSPACE=""
+compiler="gnu"
+jenkins_configure="default"
+queue="ib64"
+netmod="default"
+ofi_prov="sockets"
+N_MAKE_JOBS=8
+GIT_BRANCH=""
+BUILD_MODE="per-commit"
+
+#####################################################################
+## Initialization
+#####################################################################
+
+while getopts ":h:c:o:q:m:n:b:t:" opt; do
+ case "$opt" in
+ h)
+ WORKSPACE=$OPTARG ;;
+ c)
+ compiler=$OPTARG ;;
+ o)
+ jenkins_configure=$OPTARG ;;
+ q)
+ queue=$OPTARG ;;
+ m)
+ _netmod=${OPTARG%%,*}
+ if [[ "$_netmod" == "ofi" ]]; then
+ netmod=$_netmod
+ ofi_prov=${OPTARG/$_netmod,}
+ else
+ netmod=$_netmod
+ fi
+ ;;
+ n)
+ N_MAKE_JOBS=$OPTARG ;;
+ b)
+ GIT_BRANCH=$OPTARG ;;
+ t)
+ TMP_WORKSPACE=$OPTARG ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ exit 1
+ esac
+done
+
+cd $WORKSPACE
+
+if test "$GIT_BRANCH" = "" ; then
+ BUILD_MODE="nightly"
+fi
+
+case "$BUILD_MODE" in
+ "nightly")
+ if [[ -x mpich-master/maint/jenkins/skip_test.sh ]]; then
+ ./mpich-master/maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \
+ -s mpich-master/test/mpi/summary.junit.xml
+ if [[ -f mpich-master/test/mpi/summary.junit.xml ]]; then
+ exit 0
+ fi
+ fi
+ ;;
+ "per-commit")
+ if [[ -x maint/jenkins/skip_test.sh ]]; then
+ ./maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \
+ -s test/mpi/summary.junit.xml
+ if [[ -f test/mpi/summary.junit.xml ]]; then
+ exit 0
+ fi
+ fi
+ ;;
+esac
+
+
+if test -d "$TMP_WORKSPACE"; then
+ rm -rf "$TMP_WORKSPACE"
+fi
+SRC=$WORKSPACE
+TMP_SRC=$TMP_WORKSPACE
+
+# Preparing the source
+case "$BUILD_MODE" in
+ "nightly")
+ SRC=$WORKSPACE/mpich-master
+ TMP_SRC=$TMP_WORKSPACE/mpich-master
+ ;;
+ "per-commit")
+ ;;
+ *)
+ echo "Invalid BUILD_MODE $BUILD_MODE. Set by mistake?"
+ exit 1
+esac
+
+srun mkdir -p $TMP_SRC
+
+# distribute source and binary
+pushd $WORKSPACE
+srun cp $WORKSPACE/mpich-test-pack.tar $TMP_SRC
+srun tar xf $TMP_SRC/mpich-test-pack.tar -C $TMP_SRC
+popd
+
+
+#####################################################################
+## Functions
+#####################################################################
+
+CollectResults() {
+ # TODO: copy saved test binaries (for failed cases)
+ if [[ "$BUILD_MODE" != "per-commit" ]]; then
+ find . \
+ \( -name "filtered-make.txt" \
+ -o -name "apply-xfail.sh" \
+ -o -name "autogen.log" \
+ -o -name "config.log" \
+ -o -name "c.txt" \
+ -o -name "m.txt" \
+ -o -name "mi.txt" \
+ -o -name "summary.junit.xml" \) \
+ | while read -r line; do
+ mkdir -p "$SRC/$(dirname $line)"
+ done
+ fi
+
+ find . \
+ \( -name "filtered-make.txt" -o \
+ -name "apply-xfail.sh" -o \
+ -name "autogen.log" -o \
+ -name "config.log" -o \
+ -name "c.txt" -o \
+ -name "m.txt" -o \
+ -name "mi.txt" -o \
+ -name "summary.junit.xml" \) \
+ -exec cp {} $SRC/{} \;
+}
+
+PrepareEnv() {
+ case "$queue" in
+ "ubuntu32" | "ubuntu64" )
+ source /software/common/adm/etc/softenv-aliases.sh
+ source /software/common/adm/etc/softenv-load.sh
+ soft add +intel
+ soft add +pgi
+ soft add +absoft
+ soft add +nagfor
+ soft add +solarisstudio-12.4
+ soft add +ekopath
+ ;;
+ "freebsd64" | "freebsd32")
+ PATH=/usr/local/bin:$PATH
+ LD_LIBRARY_PATH=/usr/local/lib/gcc46:$LD_LIBRARY_PATH
+ export LD_LIBRARY_PATH
+ ;;
+ "solaris")
+ PATH=/usr/gcc/4.3/bin:/usr/gnu/bin:/usr/sbin:$PATH
+ CONFIG_SHELL=/usr/gnu/bin/sh
+ export CONFIG_SHELL
+ ;;
+ esac
+ PATH=$HOME/software/autotools/bin:$PATH
+ export PATH
+ echo "$PATH"
+}
+
+
+#####################################################################
+## Main() { Run tests
+## Multi-node tests are running from Jenkins workspace
+#####################################################################
+
+pushd "$TMP_SRC"
+
+# Preparation
+case "$jenkins_configure" in
+ "mpd")
+ $TMP_SRC/_inst/bin/mpd &
+ sleep 1
+ ;;
+ "async")
+ MPIR_CVAR_ASYNC_PROGRESS=1
+ export MPIR_CVAR_ASYNC_PROGRESS
+ ;;
+ "multithread")
+ MPIR_CVAR_DEFAULT_THREAD_LEVEL=MPI_THREAD_MULTIPLE
+ export MPIR_CVAR_DEFAULT_THREAD_LEVEL
+ ;;
+esac
+
+case "$netmod" in
+ "mxm")
+ MXM_LOG_LEVEL=error
+ export MXM_LOG_LEVEL
+ ;;
+ "ofi" | "portals4")
+ MXM_LOG_LEVEL=error
+ export MXM_LOG_LEVEL
+ ;;
+esac
+
+# run only the minimum level of datatype tests when it is per-commit job
+if [[ "$BUILD_MODE" = "per-commit" ]]; then
+ MPITEST_DATATYPE_TEST_LEVEL=min
+ export MPITEST_DATATYPE_TEST_LEVEL
+fi
+
+# hack for passing -iface ib0
+if test "$netmod" = "tcp"; then
+ sed -i 's+/bin/mpiexec+/bin/mpiexec -iface ib0+g' test/mpi/runtests
+fi
+
+make testing
+
+# Cleanup
+case "$jenkins_configure" in
+ "mpd")
+ $TMP_SRC/_inst/bin/mpdallexit
+ ;;
+ "async")
+ unset MPIR_CVAR_ASYNC_PROGRESS
+ ;;
+esac
+
+#####################################################################
+## Copy Test results and Cleanup
+#####################################################################
+
+CollectResults
+
+popd
+srun rm -rf $TMP_WORKSPACE
+exit 0
+
http://git.mpich.org/mpich.git/commitdiff/ecbe04f11e73de7505dac9b46db884943…
commit ecbe04f11e73de7505dac9b46db8849431bb5e31
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Mon Sep 28 13:22:04 2015 -0500
maint/jenkins: print hostname in test worker scripts
The hostname of the node that runs the test is printed at the beginning
of the test job.
No reviewer.
diff --git a/maint/jenkins/test-worker-abi-prolog.sh b/maint/jenkins/test-worker-abi-prolog.sh
index 52dd32f..e9e7146 100755
--- a/maint/jenkins/test-worker-abi-prolog.sh
+++ b/maint/jenkins/test-worker-abi-prolog.sh
@@ -1,5 +1,7 @@
#!/bin/zsh -xe
+hostname
+
WORKSPACE=""
compiler="gnu"
jenkins_configure="default"
diff --git a/maint/jenkins/test-worker-abi.sh b/maint/jenkins/test-worker-abi.sh
index 1722558..4538e90 100755
--- a/maint/jenkins/test-worker-abi.sh
+++ b/maint/jenkins/test-worker-abi.sh
@@ -1,5 +1,7 @@
#!/bin/zsh -x
+hostname
+
WORKSPACE=""
build_mpi="mpich-master"
compiler="gnu"
diff --git a/maint/jenkins/test-worker-armci.sh b/maint/jenkins/test-worker-armci.sh
index d11164c..a073864 100755
--- a/maint/jenkins/test-worker-armci.sh
+++ b/maint/jenkins/test-worker-armci.sh
@@ -1,5 +1,7 @@
#!/bin/zsh -xe
+hostname
+
WORKSPACE=""
GIT_BRANCH=""
BUILD_MODE="per-commit"
diff --git a/maint/jenkins/test-worker-tarball.sh b/maint/jenkins/test-worker-tarball.sh
index ee443a6..300631b 100755
--- a/maint/jenkins/test-worker-tarball.sh
+++ b/maint/jenkins/test-worker-tarball.sh
@@ -1,5 +1,7 @@
#!/bin/zsh -xe
+hostname
+
export PATH=$HOME/software/autotools/bin:$HOME/software/sowing/bin:$PATH
export DOCTEXT_PATH=$HOME/software/sowing/share/doctext
export CC=gcc
diff --git a/maint/jenkins/test-worker.sh b/maint/jenkins/test-worker.sh
index 2a0e115..fdf3e9a 100755
--- a/maint/jenkins/test-worker.sh
+++ b/maint/jenkins/test-worker.sh
@@ -1,5 +1,7 @@
#!/bin/zsh -xe
+hostname
+
WORKSPACE=""
compiler="gnu"
jenkins_configure="default"
-----------------------------------------------------------------------
Summary of changes:
.../{test-worker.sh => multinode/mn-build.sh} | 94 +++------
maint/jenkins/multinode/mn-run.sh | 240 ++++++++++++++++++++
maint/jenkins/multinode/timeout.conf | 23 ++
maint/jenkins/{set-xfail.sh => set-timeout.sh} | 50 ++--
maint/jenkins/test-worker-abi-prolog.sh | 2 +
maint/jenkins/test-worker-abi.sh | 2 +
maint/jenkins/test-worker-armci.sh | 2 +
maint/jenkins/test-worker-tarball.sh | 20 ++-
maint/jenkins/test-worker.sh | 8 +-
maint/jenkins/xfail.conf | 2 +-
10 files changed, 343 insertions(+), 100 deletions(-)
copy maint/jenkins/{test-worker.sh => multinode/mn-build.sh} (88%)
create mode 100755 maint/jenkins/multinode/mn-run.sh
create mode 100644 maint/jenkins/multinode/timeout.conf
copy maint/jenkins/{set-xfail.sh => set-timeout.sh} (66%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2rc1-2-gab86ff3
by noreply@mpich.org 16 Oct '15
by noreply@mpich.org 16 Oct '15
16 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via ab86ff374c430a00ee9065e8b1b95df27087f204 (commit)
from 47d30d22835cfbd93658ddcfa4aff4c5d53a7978 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/ab86ff374c430a00ee9065e8b1b95df27…
commit ab86ff374c430a00ee9065e8b1b95df27087f204
Author: Lena Oden <loden(a)anl.gov>
Date: Fri Oct 16 13:49:22 2015 -0500
netmod/mxm: mask error bits for tags
This patch masks out the error bits for tag matching in the mxm network.
Otherwise, the messages can not be matched if the error flags are set,
which results in a deadlock.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
index 2e9eba5..b717382 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -316,7 +316,7 @@ static inline int _mxm_tag_mxm2mpi(mxm_tag_t mxm_tag)
static inline mxm_tag_t _mxm_tag_mask(int mpi_tag)
{
- return (mpi_tag == MPI_ANY_TAG ? 0x80000000U : 0xffffffffU);
+ return (mpi_tag == MPI_ANY_TAG ? 0x80000000U : ~(MPIR_TAG_PROC_FAILURE_BIT | MPIR_TAG_ERROR_BIT));
}
/*
-----------------------------------------------------------------------
Summary of changes:
.../ch3/channels/nemesis/netmod/mxm/mxm_impl.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2rc1-1-g47d30d2
by noreply@mpich.org 09 Oct '15
by noreply@mpich.org 09 Oct '15
09 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 47d30d22835cfbd93658ddcfa4aff4c5d53a7978 (commit)
from 56166ffbcdfd9a2efe6fefb06317f839f6a6fa7e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/47d30d22835cfbd93658ddcfa4aff4c5d…
commit 47d30d22835cfbd93658ddcfa4aff4c5d53a7978
Author: Halim Amer <aamer(a)anl.gov>
Date: Wed Oct 7 20:59:58 2015 +0000
Fixed the incorrect BLCR linking flag in configure.ac
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/configure.ac b/configure.ac
index 96d56e6..9ac2e21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5473,7 +5473,7 @@ AC_ARG_ENABLE(checkpointing,
PAC_SET_HEADER_LIB_PATH(blcr)
PAC_PUSH_FLAG([LIBS])
PAC_CHECK_HEADER_LIB_FATAL(blcr, libcr.h, cr, cr_init)
- PAC_APPEND_FLAG([-lblcr],[WRAPPER_LIBS])
+ PAC_APPEND_FLAG([-lcr],[WRAPPER_LIBS])
PAC_POP_FLAG([LIBS])
AC_DEFINE(ENABLE_CHECKPOINTING,1,[Application checkpointing enabled])
fi ],
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository annotated tag, v3.2rc1, created. v3.2rc1
by noreply@mpich.org 05 Oct '15
by noreply@mpich.org 05 Oct '15
05 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The annotated tag, v3.2rc1 has been created
at 74d946f3cfba149dfc57a92d1f5d3c1fc6c2438a (tag)
tagging 56166ffbcdfd9a2efe6fefb06317f839f6a6fa7e (commit)
replaces v3.2b4
tagged by Pavan Balaji
on Mon Oct 5 16:21:35 2015 -0500
- Log -----------------------------------------------------------------
Tagging 'v3.2rc1'
Aaron S. Knister (1):
let srun know definitiviely there's no stdin
Charles J Archer (10):
Move fastpath static inline to appropriate location
Code refactoring to clear up naming convention.
Fix ut array compile problem
Generalize GPID structure for devices
Second round of code refactoring
MPIR_ERR_POP routines, remove if branch on error checking
Per-object build fix.
MPIR_THREAD_GLOBAL_MUTEX --> MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX
Removed unused MPIXX_Thread_tls_exit_func_t typedefs
Thread package none compile/link fix
Halim Amer (3):
Refactor some MPI_ macros into MPIU_
Refactor USE_xx to MPIU_xx in mpiu_timer*
Deleted some unused code related to Windows
Huiwei Lu (8):
Fix single-threaded MPIR_Get_contextid_sparse_group
Fixes counters in multithreaded MPIR_Get_contextid_sparse_group
Adds a test for overlapping comm_dup and comm_idup
Mark comm_idup_comm2 as xfail
Revert "Mark comm_idup_comm2 as xfail"
Fixing a copy-paste error in comm_idup_comm2
Deprecate single-threaded MPIR_Get_contextid_sparse_group
Fixing idup error handling
Jeff Squyres (1):
netmod/ofi: specify tx/rx ordering
Jens Hauke (1):
avoid dependency on GPFS if not requested
Jithin Jose (1):
Add fallback option for thread: MPID thread -> MPIDU thread -> MPIU thread
Junchao Zhang (1):
binding/f08: install all f08 module header files
Ken Raffenetti (19):
tsuite: whitespace cleanup
tsuite: add iterations to threaded alltoall test
netmod/portals4: delete unused code
pm/gforker: fix compile errors related to code refactor
pm/gforker: fixup for [c47e0fba0dfd]
netmod/portals4: cleanup business card args
netmod/portals4: fix incorrect sizeof usage
binding/mpif_h: fix memory leak
tsuite: add generated files to .gitignore
netmod/portals4: use large type for message length
tsuite: remove C99
tsuite: check the result of MPI_Get_elements_x
initialize tickval with gettimeofday timer
remove init_wtick from Solaris timer implementation
romio: remove stop statements from fortran tests
maint/jenkins: xfail test failing on Portals 4 bug
binding/f08: fix vpath builds
tsuite: add Fortran attr copy test with large value
binding/mpif_h: promote attribute copy argument types
Lena Oden (16):
Use different mxm_mq_hs for send and recvme in mxm.
Move commit_comm to the end of the comm_idup
Remove old USE_STRICT_MPI macros
Create new test for multithreaded Comm_create_group
Add a new test overlapping comm_idup with comm_create_group
Fix overlapping comm_idup and comm_group_create
Add a new test for comm_idup error handling
Add nonblocking collective error tests
Modify too_many_icomms2 to wait for remaining idups
Orders multiple comm_idups in a list
Fix error handling from comm_idup
Multiple comm_idups in different threads are not supported for socks
Mark error tests for non-blocking collecvites as xfail
Remove a typo from the previous commit (e0dcbdb8)
Add a new test to catch a possible dead/live-lock for comm_idup
New design for the ordering of context_id allocation for communicators
Min Si (11):
Added comment to explain why -flat-namespace is necessary.
Fixed compile warning in mpi rma tests and mtest datatype routine.
Added Duplicate function for MTest datatype objects.
Support multiple dataset in MTest datatype routine.
Added declaration for MTest basic datatype initialization.
Added MTest dataset param for init/check calls in MPI tests.
Revert "Added MTest dataset param for init/check calls in MPI tests"
Revert "Support multiple dataset in MTest datatype routine".
Revert "Added Duplicate function for MTest datatype objects".
Fixed compile warning in MTest datatype.
Removed unused variable in sock win_pkt_orderings_init.
Paul Coffman (1):
assorted fixes to ROMIO Collective IO One-sided
Pavan Balaji (82):
Remove unused old code.
A non-zero exit code is not an error.
White space cleanup.
Remove xfail for idup tests.
Require libtool version 2.4.6.
White space cleanup of the test suite.
Update version number in preparation for the 3.2rc1 release.
Revert overzealous white space cleanup in [b722a2422dbd].
Rename fence request callback and move it to where it's used.
Rename dangling_request_cnt to sync_request_cnt.
Add a callback for PSCW request completions.
Set window to active when receiving Lock ACK.
Update author list for the MPICH user guides.
Added more mailmaps to deal with changed email addresses.
Added a new test for duping many comms with idup.
Minor cleanup for context_id allocation
White space cleanup for the commutil file.
Separate out context ID allocation into a different file.
Remove function namespacing for static functions.
Get rid of the old MPIR_Get_contextid function.
Convert camelcase variables to underscore format.
RMA code Cleanup.
Rename MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD.
Cleanup unnecessary commented out redefinition of MPID_Abort.
Remove commented out content.
Cleanup timer functionality.
Added search/replace script to the maint directory.
White space cleanup.
Remove useless redefinitions of MPIU_Wtime_init.
Remove unused CH3-specific CS functionality.
Use macros instead of direct mutex names to make the code cleaner.
Remove redundant definition of MPIU_Wtick.
unistd.h is needed for some of the timer functionality.
Bug-fix: PGI compiler failure.
Added missing inclusion of mpimem.h, which is needed for MPIU_Calloc.
Use MPIU_Thread_ptr instead of MPIU_Thread.
Bug-fix: Handle icc failures on Darwin with thread local storage.
Simplify the device thread functionality for ch3.
Remove unused macros.
Remove unnecessary and incorrect comment.
Prefix MPICH-defined constants with MPICH.
Remove C99 semantics.
Remove non-error-checking variants of mutex functions.
List FIXME in one place instead of repeating it everywhere.
White space cleanup.
Get rid of unused trylock functionality.
Minor comment fix.
First round of cleanup for ROMIO threading.
Bug-fix: Part of adioi.h code was outside the header macro protection.
Make error checking unlikely.
Consistently add error checking in all threading code.
Initial draft of ROMIO managed thread locks.
Get rid of recursive locks.
Simplify threading code.
Remove mpiu_timer.h.
Remove unused variable.
Handle mutex is only used in the per-object code.
Make memalloc_mutex consistent with the other mutexes.
Separate out thread_storage to be only be available for thread multiple.
Have each threads implementation define what it exposes as functions/macros.
Get rid of the types/funcs separation for each threads implementation.
Remove unused macro.
Rename files for consistency.
Rename MPICH_ThreadInfo_t to MPIR_Thread_info_t.
Remove incorrect redundant structure name.
MPICH_PerThread_t should be MPIU_Per_thread_t.
Remove unnecessary enum.
MPIU_ to MPICH_ conversion for configure-generated macros.
Convert internal MPIU_ variables and macros to MPIUI_.
Rename MPEI functionality to MPIUI.
MPIU_OBJ_PUBLISH_HANDLE should not be used directly.
MPIR_THREAD_GRANULARITY should be MPICH_THREAD_GRANULARITY.
Expose MPIU_THREADPRIV macros through MPID.
Remove unused datatype.
Remove unused declarations of thread private variables.
Replace the direct usage of MPIU_Thread with MPID_Thread.
Remove unused thread-private declarations.
Rename MPIUI_THREAD_CS_*_REAL to MPIUI_THREAD_CS_*_NONRECURSIVE.
Added back the implementation of recursive locks.
Remove unused declarations.
Rename POBJ mutexes to better namespace them.
Move memalloc mutex to an all-granularity mutex.
Rob Latham (17):
test case for "unable to create file"
try to more gracefully handle out of memory conditions
move hint dumping a bit later
hint processing should not open files
do not want generic hints to override this lustre hint
remove bogus double-seek from hint processing fix
Laying foundation for new features for Panasas
configure-time check for newer PanFS features
move flattend resolution to a separate function
sync ROMIO locations that touch global state
fixup: misspelled variable
error pointer left uninitialized in stub case
address "potentially used uninitialized" warnings
clang finds a few shadowed and unused declarations
implement and use MPL_strerror
Revert "Initial draft of ROMIO managed thread locks."
Revert "sync ROMIO locations that touch global state"
Ron Victorelli (1):
Remove RAID0 support and add RAIDN to MPICH
Sangmin Seo (2):
romio: add MPIR_Ext_cs_yield_global.
romio: add matching MPIR_Ext_cs_exit calls.
William Gropp (3):
Fixes for coverage target.
Remove trailing blanks and typo in Makefile
Fix misspelled comment in getcoverage
William Throwe (1):
ROMIO configure looks for lstat in wrong header
Xin Zhao (53):
Add initialization of request_handle in the request object.
Make request completion callback to delete operation and drop GC progress.
Add bracket to protect variable name in the macro.
Simplify function dealing with operation piggybacked with LOCK.
Simplify RMA issuing functions.
Add helper macros to simplify the code.
Delete MPIDI_RMA_Win_list_t struct.
Rename "non_empty_slots" to "num_active_slots".
Bug-fix: mark stream units are all issued when issued count equals to total count.
Rename function adjust_op_piggybacked_with_lock to handle_lock_ack_with_op
Issue UNLOCK/FLUSH message right after lock is granted.
Use sync_request_cnt to count total number of ibarrier requests.
Use num_targets_with_pending_ops instead of num_active_slots.
Add active/inactive window lists.
Modify Fence cb function to activate/de-activate window.
Delete window state switch in RMA progress.
Delete unused function argument.
Delete MPIDI_CH3I_num_active_issued_win and MPIDI_CH3I_num_passive_win.
Register/de-register RMA progress when activate/de-activate window.
Bug-fix when Lock Ack is LOCK_QUEUED_DATA_QUEUED.
Rename variable num_targets_with_pending_ops to num_targets_with_pending_net_ops
Split pending op list into pending_net_ops_list and pending_user_ops_list.
move static function check_and_set_req_completion to header file.
Bug-fix: call check_and_set_req_completion for OP piggybacked with lock.
Delete useless if branch.
Release the request after modifying the attributes of it.
Delete redundant function definitions.
Delete unnecessary condition.
Remove the restriction of FENCE/PSCW_GRANTED state in RMA progress.
Make issue_ops_target not re-entrant.
Delete comment that makes no sense.
Simplify macros for RMA op.
Free RMA op object immediately after it is issued out.
Use counter num_ops_flush_not_issued to control issuing of FLUSH messages.
Make active_req_cnt as a global variable.
Reduce default value of MPIR_CVAR_CH3_RMA_ACTIVE_REQ_THRESHOLD.
Delete redundant function call.
Add an assert to check MPIDI_CH3I_RMA_Active_req_cnt.
Bug-fix on RMA working with asynchronous thread.
Increase time limit of some GACC-based RMA tests to 4 min.
Keep track of how many progress hooks are currently registered.
Add missed optimization for sock and pamid.
Modify Proress_register/deregister_hook to return/pass id argument.
Move RMA progress_register/de-register_hook to Win_init/free.
Add Progress_activate/de-activate_hook routines.
Increase time limit of some GACC-based RMA tests to 4 min.
Revert "Keep track of how many progress hooks are currently registered."
Revert "Add missed optimization for sock and pamid."
Set MAX_PROGRESS_HOOKS to 4 to reduce overhead of progress engine.
Bug-fix on MPIDI_CH3I_Win_find_target.
Wait for outstanding ACKs in ending synchronization calls.
Modify comments.
Code cleanup.
Yanfei Guo (13):
Remove the use of C99 syntax (declarations after statements)
Add the missing return 0 for idup-tests;
Clean up empty lines in comm_idup tests
Add new tests for keyval double freeing
Add build scripts for Jenkins test jobs
Add scripts for setting XFAIL
maint/jenkins: enable full test for nightly jobs
maint/jenkins: add script to skip tests
maint/jenkins: fix a bug in the set-xfail.sh script
maint/jenkins: untar MPICH tarball on local disk
testsuite: comment out new keyval double free tests
maint/jenkins: fix dir creation bug in test-worker.sh
Fix bug in attr double freeing tests and reenable the tests
-----------------------------------------------------------------------
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-245-g56166ff
by noreply@mpich.org 03 Oct '15
by noreply@mpich.org 03 Oct '15
03 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 56166ffbcdfd9a2efe6fefb06317f839f6a6fa7e (commit)
via e28bc461c4749fb013eae9fee05824eddecb6d9b (commit)
from ea020d563d53b0a85437c05db5a378d01d86e439 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/56166ffbcdfd9a2efe6fefb06317f839f…
commit 56166ffbcdfd9a2efe6fefb06317f839f6a6fa7e
Author: Lena Oden <loden(a)anl.gov>
Date: Tue Sep 29 17:57:03 2015 -0500
New design for the ordering of context_id allocation for communicators
This patch changes the ordering-algorithm of the context_id allocation for communicators. Every
context_id allocation is added to a linked list after the first iteration. Only the first element in
this list can own the mask. This first iteration is required to avoid deadlocks. It ensures that
all processes have entered the function before the allocation-operation can be on top of the list.
The allocations are added to the list in order, according the context_id of the parent communicator
and a tag. This tag is user-defined for comm_group_create. For the non-blocking operations
(comm_idup) the scheduling tag is used to determine this tag. This is required to guarantee the
right ordering between different comm_idup operations on the same communicator - even if the
iallreduce operations of the first iteration are not completed in order.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 1914d8f..f06d361 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -288,9 +288,6 @@ static volatile int mask_in_use = 0;
* set to parent context id in sched_cb_gcn_copy_mask and lowest_tag is not
* used.
*/
-#define MPIR_MAXID (1 << 30)
-static volatile int lowest_context_id = MPIR_MAXID;
-static volatile int lowest_tag = -1;
#undef FUNCNAME
#define FUNCNAME MPIR_Get_contextid_sparse
@@ -303,6 +300,59 @@ int MPIR_Get_contextid_sparse(MPID_Comm * comm_ptr, MPIU_Context_id_t * context_
context_id, ignore_id);
}
+struct gcn_state {
+ MPIU_Context_id_t *ctx0;
+ MPIU_Context_id_t *ctx1;
+ int own_mask;
+ int own_eager_mask;
+ int first_iter;
+ uint64_t tag;
+ MPID_Comm *comm_ptr;
+ MPID_Comm *comm_ptr_inter;
+ MPID_Sched_t s;
+ MPID_Comm *new_comm;
+ MPID_Comm_kind_t gcn_cid_kind;
+ uint32_t local_mask[MPIR_MAX_CONTEXT_MASK + 1];
+ struct gcn_state *next;
+};
+struct gcn_state *next_gcn = NULL;
+
+/* All pending context_id allocations are added to a list. The context_id allocations are ordered
+ * according to the context_id of of parrent communicator and the tag, wherby blocking context_id
+ * allocations can have the same tag, while nonblocking operations cannot. In the non-blocking
+ * case, the user is reponsible for the right tags if "comm_create_group" is used */
+#undef FUNCNAME
+#define FUNCNAME add_gcn_to_list
+#undef FCNAME
+#define FCNAME MPL_QUOTE(FUNCNAME)
+static int add_gcn_to_list(struct gcn_state *new_state)
+{
+ int mpi_errno = 0;
+ struct gcn_state *tmp = NULL;
+ if (next_gcn == NULL) {
+ next_gcn = new_state;
+ new_state->next = NULL;
+ }
+ else if (next_gcn->comm_ptr->context_id > new_state->comm_ptr->context_id ||
+ (next_gcn->comm_ptr->context_id == new_state->comm_ptr->context_id &&
+ next_gcn->tag > new_state->tag)) {
+ new_state->next = next_gcn;
+ next_gcn = new_state;
+ }
+ else {
+ for (tmp = next_gcn;
+ tmp->next != NULL &&
+ ((new_state->comm_ptr->context_id > tmp->next->comm_ptr->context_id) ||
+ ((new_state->comm_ptr->context_id == tmp->next->comm_ptr->context_id) &&
+ (new_state->tag >= tmp->next->tag))); tmp = tmp->next);
+
+ new_state->next = tmp->next;
+ tmp->next = new_state;
+
+ }
+ return mpi_errno;
+}
+
/* Allocates a new context ID collectively over the given communicator. This
* routine is "sparse" in the sense that while it is collective, some processes
* may not care about the value selected context ID.
@@ -326,25 +376,26 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
MPIU_Context_id_t * context_id, int ignore_id)
{
int mpi_errno = MPI_SUCCESS;
- uint32_t local_mask[MPIR_MAX_CONTEXT_MASK + 1];
- int own_mask = 0;
- int own_eager_mask = 0;
MPIR_Errflag_t errflag = MPIR_ERR_NONE;
- int first_iter = 1;
-
+ struct gcn_state st;
+ struct gcn_state *tmp;
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_CONTEXTID);
+ st.first_iter = 1;
+ st.comm_ptr = comm_ptr;
+ st.tag = tag;
+ st.own_mask = 0;
+ st.own_eager_mask = 0;
/* Group-collective and ignore_id should never be combined */
MPIU_Assert(!(group_ptr != NULL && ignore_id));
*context_id = 0;
MPIU_DBG_MSG_FMT(COMM, VERBOSE, (MPIU_DBG_FDEST,
- "Entering; shared state is %d:%d:%d, my ctx id is %d, tag=%d",
- mask_in_use, lowest_context_id, lowest_tag,
- comm_ptr->context_id, tag));
+ "Entering; shared state is %d:%d, my ctx id is %d, tag=%d",
+ mask_in_use, eager_in_use, comm_ptr->context_id, tag));
while (*context_id == 0) {
/* We lock only around access to the mask (except in the global locking
@@ -366,8 +417,8 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
if (ignore_id) {
/* We are not participating in the resulting communicator, so our
* context ID space doesn't matter. Set the mask to "all available". */
- memset(local_mask, 0xff, MPIR_MAX_CONTEXT_MASK * sizeof(int));
- own_mask = 0;
+ memset(st.local_mask, 0xff, MPIR_MAX_CONTEXT_MASK * sizeof(int));
+ st.own_mask = 0;
/* don't need to touch mask_in_use/lowest_context_id b/c our thread
* doesn't ever need to "win" the mask */
}
@@ -376,45 +427,45 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
* processes have called this routine. On the first iteration, use the
* "eager" allocation protocol.
*/
- else if (first_iter) {
- memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
- own_eager_mask = 0;
+ else if (st.first_iter) {
+ memset(st.local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
+ st.own_eager_mask = 0;
/* Attempt to reserve the eager mask segment */
if (!eager_in_use && eager_nelem > 0) {
int i;
for (i = 0; i < eager_nelem; i++)
- local_mask[i] = context_mask[i];
+ st.local_mask[i] = context_mask[i];
eager_in_use = 1;
- own_eager_mask = 1;
+ st.own_eager_mask = 1;
}
}
else {
- /* lowest_tag breaks ties when context IDs are the same (happens only
- * in calls to MPI_Comm_create_group. */
- if (comm_ptr->context_id < lowest_context_id ||
- (comm_ptr->context_id == lowest_context_id && tag < lowest_tag)) {
- lowest_context_id = comm_ptr->context_id;
- lowest_tag = tag;
- }
-
- if (mask_in_use || !(comm_ptr->context_id == lowest_context_id && tag == lowest_tag)){
- memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
- own_mask = 0;
- MPIU_DBG_MSG_D(COMM, VERBOSE, "In in-use, set lowest_context_id to %d",
- lowest_context_id);
+ MPIU_Assert(next_gcn != NULL);
+ /*If we are here, at least one element must be in the list, at least myself */
+
+ /* only the first element in the list can own the mask. However, maybe the mask is used
+ * by another thread, which added another allcoation to the list bevore. So we have to check,
+ * if the mask is used and mark, if we own it */
+ if (mask_in_use || &st != next_gcn) {
+ memset(st.local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
+ st.own_mask = 0;
+ MPIU_DBG_MSG_FMT(COMM, VERBOSE, (MPIU_DBG_FDEST,
+ "Mask is in use, my context_id is %d, owner context id is %d",
+ st.comm_ptr->context_id,
+ next_gcn->comm_ptr->context_id));
}
else {
int i;
/* Copy safe mask segment to local_mask */
for (i = 0; i < eager_nelem; i++)
- local_mask[i] = 0;
+ st.local_mask[i] = 0;
for (i = eager_nelem; i < MPIR_MAX_CONTEXT_MASK; i++)
- local_mask[i] = context_mask[i];
+ st.local_mask[i] = context_mask[i];
mask_in_use = 1;
- own_mask = 1;
+ st.own_mask = 1;
MPIU_DBG_MSG(COMM, VERBOSE, "Copied local_mask");
}
}
@@ -424,10 +475,10 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
* context ID allocation algorithm. The additional element is ignored
* by the context ID mask access routines and is used as a flag for
* detecting context ID exhaustion (explained below). */
- if (own_mask || ignore_id)
- local_mask[ALL_OWN_MASK_FLAG] = 1;
+ if (st.own_mask || ignore_id)
+ st.local_mask[ALL_OWN_MASK_FLAG] = 1;
else
- local_mask[ALL_OWN_MASK_FLAG] = 0;
+ st.local_mask[ALL_OWN_MASK_FLAG] = 0;
/* Now, try to get a context id */
MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
@@ -437,12 +488,12 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
*/
if (group_ptr != NULL) {
int coll_tag = tag | MPIR_Process.tagged_coll_mask; /* Shift tag into the tagged coll space */
- mpi_errno = MPIR_Allreduce_group(MPI_IN_PLACE, local_mask, MPIR_MAX_CONTEXT_MASK + 1,
+ mpi_errno = MPIR_Allreduce_group(MPI_IN_PLACE, st.local_mask, MPIR_MAX_CONTEXT_MASK + 1,
MPI_INT, MPI_BAND, comm_ptr, group_ptr, coll_tag,
&errflag);
}
else {
- mpi_errno = MPIR_Allreduce_impl(MPI_IN_PLACE, local_mask, MPIR_MAX_CONTEXT_MASK + 1,
+ mpi_errno = MPIR_Allreduce_impl(MPI_IN_PLACE, st.local_mask, MPIR_MAX_CONTEXT_MASK + 1,
MPI_INT, MPI_BAND, comm_ptr, &errflag);
}
if (mpi_errno)
@@ -455,18 +506,17 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
if (ignore_id) {
/* we don't care what the value was, but make sure that everyone
* who did care agreed on a value */
- *context_id = locate_context_bit(local_mask);
+ *context_id = locate_context_bit(st.local_mask);
/* used later in out-of-context ids check and outer while loop condition */
}
- else if (own_eager_mask) {
+ else if (st.own_eager_mask) {
/* There is a chance that we've found a context id */
/* Find_and_allocate_context_id updates the context_mask if it finds a match */
- *context_id = find_and_allocate_context_id(local_mask);
+ *context_id = find_and_allocate_context_id(st.local_mask);
MPIU_DBG_MSG_D(COMM, VERBOSE, "Context id is now %hd", *context_id);
- own_eager_mask = 0;
+ st.own_eager_mask = 0;
eager_in_use = 0;
-
if (*context_id <= 0) {
/* else we did not find a context id. Give up the mask in case
* there is another thread (with a lower input context id)
@@ -479,26 +529,28 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
}
}
- else if (own_mask) {
+ else if (st.own_mask) {
/* There is a chance that we've found a context id */
/* Find_and_allocate_context_id updates the context_mask if it finds a match */
- *context_id = find_and_allocate_context_id(local_mask);
+ *context_id = find_and_allocate_context_id(st.local_mask);
MPIU_DBG_MSG_D(COMM, VERBOSE, "Context id is now %hd", *context_id);
mask_in_use = 0;
if (*context_id > 0) {
- /* If we were the lowest context id, reset the value to
- * allow the other threads to compete for the mask */
- if (lowest_context_id == comm_ptr->context_id && lowest_tag == tag) {
- lowest_context_id = MPIR_MAXID;
- lowest_tag = -1;
- /* Else leave it alone; there is another thread waiting */
+ /* If we found a new context id, we have to remove the element from the list, so the
+ * next allocation can own the mask */
+ if (next_gcn == &st) {
+ next_gcn = st.next;
+ }
+ else {
+ for (tmp = next_gcn; tmp->next != &st; tmp = tmp->next); /* avoid compiler warnings */
+ tmp->next = st.next;
}
}
else {
/* else we did not find a context id. Give up the mask in case
- * there is another thread (with a lower input context id)
+ * there is another thread in the gcn_next_list
* waiting for it. We need to ensure that any other threads
* have the opportunity to run, hence yielding */
/* FIXME: Do we need to do an GLOBAL yield here?
@@ -523,19 +575,15 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
* ID. This indicates that either some process has no context IDs
* available, or that some are available, but the allocation cannot
* succeed because there is no common context ID. */
- if (*context_id == 0 && local_mask[ALL_OWN_MASK_FLAG] == 1) {
+ if (*context_id == 0 && st.local_mask[ALL_OWN_MASK_FLAG] == 1) {
/* --BEGIN ERROR HANDLING-- */
int nfree = 0;
int ntotal = 0;
int minfree;
- if (own_mask) {
+ if (st.own_mask) {
MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
mask_in_use = 0;
- if (lowest_context_id == comm_ptr->context_id && lowest_tag == tag) {
- lowest_context_id = MPIR_MAXID;
- lowest_tag = -1;
- }
MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
}
@@ -567,8 +615,12 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
}
/* --END ERROR HANDLING-- */
}
-
- first_iter = 0;
+ if (st.first_iter == 1) {
+ st.first_iter = 0;
+ /* to avoid deadlocks, the element is not added to the list bevore the first iteration */
+ if (!ignore_id && *context_id == 0)
+ add_gcn_to_list(&st);
+ }
}
fn_exit:
@@ -581,57 +633,27 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
/* --BEGIN ERROR HANDLING-- */
fn_fail:
/* Release the masks */
- if (own_mask) {
+ if (st.own_mask) {
/* is it safe to access this without holding the CS? */
mask_in_use = 0;
}
+ /*If in list, remove it */
+ if (!st.first_iter && !ignore_id) {
+ if (next_gcn == &st) {
+ next_gcn = st.next;
+ }
+ else {
+ for (tmp = next_gcn; tmp->next != &st; tmp = tmp->next);
+ tmp->next = st.next;
+ }
+ }
+
+
goto fn_exit;
/* --END ERROR HANDLING-- */
}
-struct gcn_state {
- MPIU_Context_id_t *ctx0;
- MPIU_Context_id_t *ctx1;
- int own_mask;
- int own_eager_mask;
- int first_iter;
- int seqnum;
- int tag;
- MPID_Comm *comm_ptr;
- MPID_Comm *comm_ptr_inter;
- MPID_Sched_t s;
- MPID_Comm *new_comm;
- MPID_Comm_kind_t gcn_cid_kind;
- uint32_t local_mask[MPIR_MAX_CONTEXT_MASK+1];
- struct gcn_state* next;
-};
-struct gcn_state *last_idup = NULL;
-/* All pending idups are added to the list of "last_idup" in the increasing
- * order of its parent communicator context id. */
-#undef FUNCNAME
-#define FUNCNAME add_gcn_to_list
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-static int add_gcn_to_list (struct gcn_state *new_state)
-{
- int mpi_errno = 0;
- struct gcn_state *tmp;
- if(last_idup == NULL) {
- last_idup = new_state;
- new_state->next = NULL;
- } else if (last_idup->comm_ptr->context_id > new_state->comm_ptr->context_id) {
- new_state->next = last_idup;
- last_idup = new_state;
- } else {
- for(tmp = last_idup;
- tmp->next!= NULL && new_state->comm_ptr->context_id >= tmp->next->comm_ptr->context_id;
- tmp = tmp->next);
- new_state->next = tmp->next;
- tmp->next = new_state;
- }
- return mpi_errno;
-}
static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state);
static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state);
@@ -732,18 +754,22 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
}
else if (st->own_mask) {
newctxid = find_and_allocate_context_id(st->local_mask);
-
if (st->ctx0)
*st->ctx0 = newctxid;
if (st->ctx1)
*st->ctx1 = newctxid;
- /* reset flags for the next try */
+ /* reset flag for the next try */
mask_in_use = 0;
-
+ /* If we found a ctx, remove element form list */
if (newctxid > 0) {
- if (lowest_context_id == st->comm_ptr->context_id)
- lowest_context_id = MPIR_MAXID;
+ if (next_gcn == st) {
+ next_gcn = st->next;
+ }
+ else {
+ for (tmp = next_gcn; tmp->next != st; tmp = tmp->next);
+ tmp->next = st->next;
+ }
}
}
@@ -761,27 +787,42 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
MPIR_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycommfrag", "**toomanycommfrag %d %d %d",
nfree, ntotal, minfree);
- } else {
+ }
+ else {
MPIR_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
"**toomanycomm", "**toomanycomm %d %d %d",
nfree, ntotal, minfree);
}
/* --END ERROR HANDLING-- */
- } else {
+ }
+ else {
/* do not own mask, try again */
+ if (st->first_iter == 1) {
+ st->first_iter = 0;
+ /* Set the Tag for the idup-operations. We have two problems here:
+ * 1.) The tag should not be used by another (blocking) context_id allocation.
+ * Therefore, we set tag_up as lower bound for the operation. tag_ub is used by
+ * most of the other blocking operations, but tag is always >0, so this
+ * should be fine.
+ * 2.) We need odering between multiple idup operations on the same communicator.
+ * The problem here is that the iallreduce operations of the first iteration
+ * are not necessarily completed in the same order as they are issued, also on the
+ * same communicator. To avoid deadlocks, we cannot add the elements to the
+ * list bevfore the first iallreduce is completed. The "tag" is created for the
+ * scheduling - by calling MPID_Sched_next_tag(comm_ptr, &tag) - and the same
+ * for a idup operation on all processes. So we use it here. */
+ /* FIXME I'm not sure if there can be an overflows for this tag */
+ st->tag = (uint64_t) tag + MPIR_Process.attrs.tag_ub;
+ add_gcn_to_list(st);
+ }
mpi_errno = MPID_Sched_cb(&sched_cb_gcn_copy_mask, st, st->s);
if (mpi_errno)
MPIR_ERR_POP(mpi_errno);
MPID_SCHED_BARRIER(st->s);
}
- } else {
+ }
+ else {
/* Successfully allocated a context id */
- if(last_idup == st){
- last_idup = st->next;
- } else {
- for (tmp = last_idup; tmp->next != st; tmp = tmp->next);
- tmp->next = st->next;
- }
mpi_errno = MPID_Sched_cb(&sched_cb_gcn_bcast, st, st->s);
if (mpi_errno)
MPIR_ERR_POP(mpi_errno);
@@ -791,14 +832,16 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
fn_exit:
return mpi_errno;
fn_fail:
- /* make sure that the pending comm_idups are still scheduled */
- if(last_idup == st){
- last_idup = st->next;
- }
- else {
- for (tmp = last_idup; tmp->next != st; tmp = tmp->next);
- tmp->next = st->next;
- }
+ /* make sure that the pending allocations are scheduled */
+ if (!st->first_iter) {
+ if (next_gcn == st) {
+ next_gcn = st->next;
+ }
+ else {
+ for (tmp = next_gcn; tmp && tmp->next != st; tmp = tmp->next);
+ tmp->next = st->next;
+ }
+ }
/* In the case of failure, the new communicator was half created.
* So we need to clean the memory allocated for it. */
MPIR_Comm_map_free(st->new_comm);
@@ -817,7 +860,7 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
struct gcn_state *st = state;
if (st->first_iter) {
- memset(st->local_mask, 0, (MPIR_MAX_CONTEXT_MASK+1) * sizeof(int));
+ memset(st->local_mask, 0, (MPIR_MAX_CONTEXT_MASK + 1) * sizeof(int));
st->own_eager_mask = 0;
/* Attempt to reserve the eager mask segment */
@@ -829,23 +872,10 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
eager_in_use = 1;
st->own_eager_mask = 1;
}
- st->first_iter = 0;
-
}
else {
- if (st->comm_ptr->context_id < lowest_context_id ) {
- lowest_context_id = st->comm_ptr->context_id;
- lowest_tag = st->tag;
- }
-
- /* If one of the following conditions happens, set local_mask to zero
- * so sched_cb_gcn_allocate_cid can not find a valid id and will retry:
- * 1. mask is used by other threads;
- * 2. the current MPI_COMM_IDUP operation does not has the lowest_context_id;
- * 3. for the case that multiple communicators duplicating from the
- * same communicator at the same time, the sequence number of the
- * current MPI_COMM_IDUP operation is not the smallest. */
- if (mask_in_use || lowest_tag < st->tag || st != last_idup) {
+ /* Same rules as for the blocking case */
+ if (mask_in_use || st != next_gcn) {
memset(st->local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
st->own_mask = 0;
st->local_mask[ALL_OWN_MASK_FLAG] = 0;
@@ -857,7 +887,6 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
st->local_mask[i] = 0;
for (i = eager_nelem; i < MPIR_MAX_CONTEXT_MASK; i++)
st->local_mask[i] = context_mask[i];
-
mask_in_use = 1;
st->own_mask = 1;
st->local_mask[ALL_OWN_MASK_FLAG] = 1;
@@ -937,8 +966,6 @@ static int sched_get_cid_nonblock(MPID_Comm * comm_ptr, MPID_Comm * newcomm,
MPIU_CHKPMEM_MALLOC(st, struct gcn_state *, sizeof(struct gcn_state), mpi_errno, "gcn_state");
st->ctx0 = ctx0;
st->ctx1 = ctx1;
- /* since the tag is only used for odering, it can be higher than tag_ub*/
- st->tag = MPIR_Process.attrs.tag_ub+1;
if (gcn_cid_kind == MPID_INTRACOMM) {
st->comm_ptr = comm_ptr;
st->comm_ptr_inter = NULL;
@@ -961,7 +988,6 @@ static int sched_get_cid_nonblock(MPID_Comm * comm_ptr, MPID_Comm * newcomm,
MPIR_CVAR_CTXID_EAGER_SIZE < MPIR_MAX_CONTEXT_MASK - 1);
eager_nelem = MPIR_CVAR_CTXID_EAGER_SIZE;
}
- add_gcn_to_list(st);
mpi_errno = MPID_Sched_cb(&sched_cb_gcn_copy_mask, st, s);
if (mpi_errno)
MPIR_ERR_POP(mpi_errno);
http://git.mpich.org/mpich.git/commitdiff/e28bc461c4749fb013eae9fee05824edd…
commit e28bc461c4749fb013eae9fee05824eddecb6d9b
Author: Lena Oden <loden(a)anl.gov>
Date: Tue Sep 29 17:50:40 2015 -0500
Add a new test to catch a possible dead/live-lock for comm_idup
This test is designed to catch a possible deadlock situation for comm_idup. The idea of the test is
the following: multiple threads call comm_idup (on different communicators) in parallel. On some
processors, the call of comm_idup is delayed until some other threads finish comm_idup. MPI must
ensure that the context-allocation loop is not entered until all processes have
entered the function
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/threads/comm/Makefile.am b/test/mpi/threads/comm/Makefile.am
index 5d0d916..1c7f6a2 100644
--- a/test/mpi/threads/comm/Makefile.am
+++ b/test/mpi/threads/comm/Makefile.am
@@ -17,6 +17,7 @@ noinst_PROGRAMS = \
comm_create_group_threads \
comm_create_group_threads2 \
comm_idup \
+ idup_deadlock \
ctxidup \
idup_nb \
idup_comm_gen
diff --git a/test/mpi/threads/comm/idup_deadlock.c b/test/mpi/threads/comm/idup_deadlock.c
new file mode 100644
index 0000000..20deb3c
--- /dev/null
+++ b/test/mpi/threads/comm/idup_deadlock.c
@@ -0,0 +1,89 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2012 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include <stdio.h>
+#include <mpi.h>
+#include "mpitest.h"
+#include "mpithreadtest.h"
+
+#define NUM_THREADS 4
+#define NUM_ITER 1
+
+#define check(X_) \
+ do { \
+ if (!(X_)) { \
+ printf("[%s:%d] -- Assertion failed: %s\n", __FILE__, __LINE__, #X_);\
+ MPI_Abort(MPI_COMM_WORLD, 1); \
+ } \
+ } while (0)
+
+MPI_Comm comms[NUM_THREADS];
+MTEST_THREAD_LOCK_TYPE comm_lock;
+int rank, size;
+int verbose = 0;
+volatile int start_idup[NUM_THREADS];
+
+MTEST_THREAD_RETURN_TYPE test_comm_dup(void *arg)
+{
+ int rank;
+ int i, j;
+ int wait;
+ int tid = *(int *) arg;
+ MPI_Comm_rank(comms[*(int *) arg], &rank);
+ MPI_Comm comm;
+ MPI_Request req;
+
+ if (tid % 2 == 0 && rank % 2 == 0) {
+ do {
+ wait = 0;
+ for (i = 0; i < NUM_THREADS; i++)
+ wait += start_idup[i];
+ } while (wait > NUM_THREADS / 2);
+ }
+
+ MPI_Comm_idup(comms[*(int *) arg], &comm, &req);
+ MPI_Wait(&req, MPI_STATUS_IGNORE);
+ start_idup[tid] = 0;
+ MPI_Comm_free(&comm);
+ return (MTEST_THREAD_RETURN_TYPE) 0;
+}
+
+
+int main(int argc, char **argv)
+{
+ int thread_args[NUM_THREADS];
+ int i, provided;
+
+ MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
+
+ check(provided == MPI_THREAD_MULTIPLE);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+ for (i = 0; i < NUM_THREADS; i++) {
+ start_idup[i] = 1;
+ MPI_Comm_dup(MPI_COMM_WORLD, &comms[i]);
+ }
+
+ for (i = 0; i < NUM_THREADS; i++) {
+ thread_args[i] = i;
+ MTest_Start_thread(test_comm_dup, (void *) &thread_args[i]);
+ }
+
+ MTest_Join_threads();
+
+ for (i = 0; i < NUM_THREADS; i++) {
+ MPI_Comm_free(&comms[i]);
+ }
+
+ if (rank == 0)
+ printf(" No Errors\n");
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/threads/comm/testlist.in b/test/mpi/threads/comm/testlist.in
index 506bb75..0f32b35 100644
--- a/test/mpi/threads/comm/testlist.in
+++ b/test/mpi/threads/comm/testlist.in
@@ -4,6 +4,7 @@ comm_dup_deadlock 4
comm_create_threads 4
comm_create_group_threads 4 mpiversion=3.0
comm_create_group_threads2 4 mpiversion=3.0
+@comm_overlap@ idup_deadlock 4 mpiversion=3.0
@comm_overlap@ comm_idup 4 mpiversion=3.0
@comm_overlap@ ctxidup 4 mpiversion=3.0
@comm_overlap@ idup_nb 4 mpiversion=3.0
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/contextid.c | 318 +++++++++++---------
test/mpi/threads/comm/Makefile.am | 1 +
.../{coll/iallred.c => comm/idup_deadlock.c} | 50 ++--
test/mpi/threads/comm/testlist.in | 1 +
4 files changed, 203 insertions(+), 167 deletions(-)
copy test/mpi/threads/{coll/iallred.c => comm/idup_deadlock.c} (61%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-243-gea020d5
by noreply@mpich.org 02 Oct '15
by noreply@mpich.org 02 Oct '15
02 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via ea020d563d53b0a85437c05db5a378d01d86e439 (commit)
via 6b49892b67d4244fc09bd1d89e00f8cba77fb574 (commit)
via d77d8d622e355f6995ddb6852d0d0be1f0711c20 (commit)
from fe2991e0ce3fb0f789b745161e6f9a571aceabe7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/ea020d563d53b0a85437c05db5a378d01…
commit ea020d563d53b0a85437c05db5a378d01d86e439
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Fri Oct 2 17:04:10 2015 -0500
Code cleanup.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 89b83ef..9973d89 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -1282,8 +1282,7 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
sreq->dev.segment_size = get_pkt->count * type_size;
mpi_errno = target_lock_entry->vc->sendNoncontig_fn(target_lock_entry->vc, sreq,
- iov[0].MPL_IOV_BUF,
- iov[0].MPL_IOV_LEN);
+ iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN);
MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
}
diff --git a/src/mpid/ch3/src/mpidi_printf.c b/src/mpid/ch3/src/mpidi_printf.c
index 83be2dc..031bef9 100644
--- a/src/mpid/ch3/src/mpidi_printf.c
+++ b/src/mpid/ch3/src/mpidi_printf.c
@@ -238,74 +238,74 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
switch (pkt->type) {
case MPIDI_CH3_PKT_EAGER_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
- pkt->eager_send.match.parts.context_id,
- (int) pkt->eager_send.match.parts.tag,
- pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
+ "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+ pkt->eager_send.match.parts.context_id,
+ (int) pkt->eager_send.match.parts.tag,
+ pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
break;
case MPIDI_CH3_PKT_EAGER_SYNC_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
- pkt->eager_sync_send.match.parts.context_id,
- (int) pkt->eager_sync_send.match.parts.tag,
- pkt->eager_sync_send.match.parts.rank,
- pkt->eager_sync_send.data_sz, pkt->eager_sync_send.sender_req_id);
+ "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+ pkt->eager_sync_send.match.parts.context_id,
+ (int) pkt->eager_sync_send.match.parts.tag,
+ pkt->eager_sync_send.match.parts.rank,
+ pkt->eager_sync_send.data_sz, pkt->eager_sync_send.sender_req_id);
break;
case MPIDI_CH3_PKT_EAGER_SYNC_ACK:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "EAGER_SYNC_ACK - req=%d", pkt->eager_sync_ack.sender_req_id);
+ "EAGER_SYNC_ACK - req=%d", pkt->eager_sync_ack.sender_req_id);
break;
case MPIDI_CH3_PKT_READY_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
- pkt->ready_send.match.parts.context_id,
- (int) pkt->ready_send.match.parts.tag,
- pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
+ "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+ pkt->ready_send.match.parts.context_id,
+ (int) pkt->ready_send.match.parts.tag,
+ pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
break;
case MPIDI_CH3_PKT_RNDV_REQ_TO_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
- pkt->rndv_req_to_send.match.parts.context_id,
- (int) pkt->rndv_req_to_send.match.parts.tag,
- pkt->rndv_req_to_send.match.parts.rank,
- pkt->rndv_req_to_send.data_sz, pkt->rndv_req_to_send.sender_req_id);
+ "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+ pkt->rndv_req_to_send.match.parts.context_id,
+ (int) pkt->rndv_req_to_send.match.parts.tag,
+ pkt->rndv_req_to_send.match.parts.rank,
+ pkt->rndv_req_to_send.data_sz, pkt->rndv_req_to_send.sender_req_id);
break;
case MPIDI_CH3_PKT_RNDV_CLR_TO_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "RNDV_CLRTO_SEND - req=%d, recv req=%d",
- pkt->rndv_clr_to_send.sender_req_id, pkt->rndv_clr_to_send.receiver_req_id);
+ "RNDV_CLRTO_SEND - req=%d, recv req=%d",
+ pkt->rndv_clr_to_send.sender_req_id, pkt->rndv_clr_to_send.receiver_req_id);
break;
case MPIDI_CH3_PKT_RNDV_SEND:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "RNDV_SEND - recv req=%d", pkt->rndv_send.receiver_req_id);
+ "RNDV_SEND - recv req=%d", pkt->rndv_send.receiver_req_id);
break;
case MPIDI_CH3_PKT_CANCEL_SEND_REQ:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "CANCEL_SEND_REQ - req=%d", pkt->cancel_send_req.sender_req_id);
+ "CANCEL_SEND_REQ - req=%d", pkt->cancel_send_req.sender_req_id);
break;
case MPIDI_CH3_PKT_CANCEL_SEND_RESP:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "CANCEL_SEND_RESP - req=%d ack=%d",
- pkt->cancel_send_resp.sender_req_id, pkt->cancel_send_resp.ack);
+ "CANCEL_SEND_RESP - req=%d ack=%d",
+ pkt->cancel_send_resp.sender_req_id, pkt->cancel_send_resp.ack);
break;
case MPIDI_CH3_PKT_PUT:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "PUT - (%p,%d,0x%08X)",
- pkt->put.addr, pkt->put.count, pkt->put.target_win_handle);
+ "PUT - (%p,%d,0x%08X)",
+ pkt->put.addr, pkt->put.count, pkt->put.target_win_handle);
break;
case MPIDI_CH3_PKT_GET:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "GET - (%p,%d,0x%08X) req=%d",
- pkt->get.addr,
- pkt->get.count, pkt->get.target_win_handle, pkt->get.request_handle);
+ "GET - (%p,%d,0x%08X) req=%d",
+ pkt->get.addr,
+ pkt->get.count, pkt->get.target_win_handle, pkt->get.request_handle);
break;
case MPIDI_CH3_PKT_GET_RESP:
MPL_snprintf(pktmsg, sizeof(pktmsg), "GET_RESP - req=%d", pkt->get_resp.request_handle);
break;
case MPIDI_CH3_PKT_ACCUMULATE:
MPL_snprintf(pktmsg, sizeof(pktmsg),
- "ACCUMULATE - (%p,%d,0x%08X)",
- pkt->accum.addr, pkt->accum.count, pkt->accum.target_win_handle);
+ "ACCUMULATE - (%p,%d,0x%08X)",
+ pkt->accum.addr, pkt->accum.count, pkt->accum.target_win_handle);
break;
case MPIDI_CH3_PKT_LOCK:
MPL_snprintf(pktmsg, sizeof(pktmsg), "LOCK - %d", pkt->lock.target_win_handle);
http://git.mpich.org/mpich.git/commitdiff/6b49892b67d4244fc09bd1d89e00f8cba…
commit 6b49892b67d4244fc09bd1d89e00f8cba77fb574
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Fri Sep 18 09:57:16 2015 -0500
Modify comments.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 267524c..6d0c5b5 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -356,8 +356,7 @@ static inline int flush_local_all(MPID_Win * win_ptr)
if (mpi_errno != MPI_SUCCESS)
MPIR_ERR_POP(mpi_errno);
- /* wait for remote completion for those targets that disable flush_local,
- * and wait for local completion for other targets */
+ /* Wait for local completion */
do {
MPIDI_CH3I_RMA_ops_win_local_completion(win_ptr, local_completed);
http://git.mpich.org/mpich.git/commitdiff/d77d8d622e355f6995ddb6852d0d0be1f…
commit d77d8d622e355f6995ddb6852d0d0be1f0711c20
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Fri Oct 2 13:57:16 2015 -0500
Wait for outstanding ACKs in ending synchronization calls.
When ordering of AM-based operations is not provided by network,
the runtime needs to add an ACK_REQ when issuing each operation,
so that any future internal FLUSH is guaranteed to be correct
(for example, when the runtime tries to reclaim resource). In the
ending synchronization, the runtime should wait for all ACKs to
come back before exit, no matter whether that synchronization is
waiting for local completion or remote completion.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 360b017..9a25b58 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -354,6 +354,8 @@ typedef struct MPIDI_Win_basic_info {
int active; /* specify if this window is active or not */ \
struct MPID_Win *prev; \
struct MPID_Win *next; \
+ int outstanding_acks; /* keep track of # of outstanding ACKs window \
+ wide. */ \
extern struct MPID_Win *MPIDI_RMA_Win_active_list_head, *MPIDI_RMA_Win_inactive_list_head;
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 1bdd393..1b1f64f 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -871,6 +871,9 @@ static inline int MPIDI_CH3I_RMA_Handle_ack(MPID_Win * win_ptr, int target_rank)
t->sync.outstanding_acks--;
MPIU_Assert(t->sync.outstanding_acks >= 0);
+ win_ptr->outstanding_acks--;
+ MPIU_Assert(win_ptr->outstanding_acks >= 0);
+
fn_exit:
return mpi_errno;
fn_fail:
diff --git a/src/mpid/ch3/src/ch3u_rma_progress.c b/src/mpid/ch3/src/ch3u_rma_progress.c
index e5b20ed..e781e64 100644
--- a/src/mpid/ch3/src/ch3u_rma_progress.c
+++ b/src/mpid/ch3/src/ch3u_rma_progress.c
@@ -152,6 +152,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
if (target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH &&
target->num_ops_flush_not_issued > 0) {
flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
+ win_ptr->outstanding_acks++;
target->sync.outstanding_acks++;
target->num_ops_flush_not_issued = 0;
}
@@ -171,6 +172,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
if (target->target_rank != rank) {
if (target->num_ops_flush_not_issued > 0) {
+ win_ptr->outstanding_acks++;
target->sync.outstanding_acks++;
target->num_ops_flush_not_issued = 0;
@@ -199,6 +201,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
flag = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK;
}
else {
+ win_ptr->outstanding_acks++;
target->sync.outstanding_acks++;
target->num_ops_flush_not_issued = 0;
}
@@ -315,6 +318,7 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
* but without LOCK piggyback. */
if (((flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH)
|| (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) {
+ win_ptr->outstanding_acks++;
target->sync.outstanding_acks++;
target->num_ops_flush_not_issued = 0;
}
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 24a8bce..267524c 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -608,6 +608,13 @@ int MPID_Win_fence(int assert, MPID_Win * win_ptr)
MPIR_ERR_POP(mpi_errno);
}
+ /* waiting for all outstanding ACKs */
+ while (win_ptr->outstanding_acks > 0) {
+ mpi_errno = wait_progress_engine();
+ if (mpi_errno != MPI_SUCCESS)
+ MPIR_ERR_POP(mpi_errno);
+ }
+
/* Cleanup all targets on window. */
mpi_errno = MPIDI_CH3I_RMA_Cleanup_targets_win(win_ptr);
if (mpi_errno != MPI_SUCCESS)
@@ -1007,6 +1014,13 @@ int MPID_Win_complete(MPID_Win * win_ptr)
if (mpi_errno != MPI_SUCCESS)
MPIR_ERR_POP(mpi_errno);
+ /* waiting for all outstanding ACKs */
+ while (win_ptr->outstanding_acks > 0) {
+ mpi_errno = wait_progress_engine();
+ if (mpi_errno != MPI_SUCCESS)
+ MPIR_ERR_POP(mpi_errno);
+ }
+
/* Cleanup all targets on this window. */
mpi_errno = MPIDI_CH3I_RMA_Cleanup_targets_win(win_ptr);
if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 24e451f..6c570d4 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -306,6 +306,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
(*win_ptr)->active = FALSE;
(*win_ptr)->next = NULL;
(*win_ptr)->prev = NULL;
+ (*win_ptr)->outstanding_acks = 0;
/* Initialize the info flags */
(*win_ptr)->info_args.no_locks = 0;
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/include/mpidpre.h | 2 +
src/mpid/ch3/include/mpidrma.h | 3 +
src/mpid/ch3/src/ch3u_handle_recv_req.c | 3 +-
src/mpid/ch3/src/ch3u_rma_progress.c | 4 ++
src/mpid/ch3/src/ch3u_rma_sync.c | 17 +++++++-
src/mpid/ch3/src/mpid_rma.c | 1 +
src/mpid/ch3/src/mpidi_printf.c | 64 +++++++++++++++---------------
7 files changed, 58 insertions(+), 36 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-240-gfe2991e
by noreply@mpich.org 02 Oct '15
by noreply@mpich.org 02 Oct '15
02 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via fe2991e0ce3fb0f789b745161e6f9a571aceabe7 (commit)
from 05f42d10602b88f37993a24bdf31dc4d2a7bb08d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/fe2991e0ce3fb0f789b745161e6f9a571…
commit fe2991e0ce3fb0f789b745161e6f9a571aceabe7
Author: Yanfei Guo <yguo(a)anl.gov>
Date: Fri Sep 18 13:10:18 2015 -0500
Fix bug in attr double freeing tests and reenable the tests
Added the additional type/win to make sure that the keyval is not
deallocated before test is finished.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/attr/keyval_double_free_type.c b/test/mpi/attr/keyval_double_free_type.c
index 10ffc2a..406d7e8 100644
--- a/test/mpi/attr/keyval_double_free_type.c
+++ b/test/mpi/attr/keyval_double_free_type.c
@@ -21,20 +21,24 @@ int delete_fn(MPI_Comm comm, int keyval, void *attr, void *extra)
int main(int argc, char **argv)
{
MPI_Datatype type;
+ MPI_Datatype type_dup;
int keyval = MPI_KEYVAL_INVALID;
int keyval_copy = MPI_KEYVAL_INVALID;
int errs = 0;
MTest_Init(&argc, &argv);
MPI_Type_dup(MPI_INT, &type);
+ MPI_Type_dup(MPI_INT, &type_dup);
MPI_Type_create_keyval(MPI_NULL_COPY_FN, delete_fn, &keyval, NULL);
keyval_copy = keyval;
MPI_Type_set_attr(type, keyval, NULL);
+ MPI_Type_set_attr(type_dup, keyval, NULL);
MPI_Type_free(&type); /* first MPI_Type_free_keyval */
MPI_Type_free_keyval(&keyval); /* second MPI_Type_free_keyval */
MPI_Type_free_keyval(&keyval_copy); /* third MPI_Type_free_keyval */
+ MPI_Type_free(&type_dup); /* fourth MPI_Type_free_keyval */
MTest_Finalize(errs);
MPI_Finalize();
return 0;
diff --git a/test/mpi/attr/keyval_double_free_win.c b/test/mpi/attr/keyval_double_free_win.c
index 24d4b38..a954da6 100644
--- a/test/mpi/attr/keyval_double_free_win.c
+++ b/test/mpi/attr/keyval_double_free_win.c
@@ -9,6 +9,9 @@
#include <stdio.h>
#include "mpitest.h"
+#define NUM_WIN 2
+#define DATA_SZ sizeof(int)
+
/* tests multiple invocations of MPI_Win_free_keyval on the same keyval */
int delete_fn(MPI_Comm comm, int keyval, void *attr, void *extra);
@@ -20,24 +23,30 @@ int delete_fn(MPI_Comm comm, int keyval, void *attr, void *extra)
int main(int argc, char **argv)
{
- void *base_ptr = NULL;
- MPI_Win window;
+ void *base_ptr[NUM_WIN];
+ MPI_Win windows[NUM_WIN];
int keyval = MPI_KEYVAL_INVALID;
int keyval_copy = MPI_KEYVAL_INVALID;
int errs = 0;
MTest_Init(&argc, &argv);
- MPI_Alloc_mem(sizeof(int), MPI_INFO_NULL, &base_ptr);
- MPI_Win_create(base_ptr, sizeof(int), 1, MPI_INFO_NULL, MPI_COMM_WORLD, &window);
+ MPI_Alloc_mem(DATA_SZ, MPI_INFO_NULL, &base_ptr[0]);
+ MPI_Win_create(base_ptr[0], DATA_SZ, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &windows[0]);
+ MPI_Alloc_mem(DATA_SZ, MPI_INFO_NULL, &base_ptr[1]);
+ MPI_Win_create(base_ptr[1], DATA_SZ, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &windows[1]);
MPI_Win_create_keyval(MPI_NULL_COPY_FN, delete_fn, &keyval, NULL);
keyval_copy = keyval;
- MPI_Win_set_attr(window, keyval, NULL);
- MPI_Win_free(&window); /* first MPI_Win_free_keyval */
- MPI_Free_mem(base_ptr);
+ MPI_Win_set_attr(windows[0], keyval, NULL);
+ MPI_Win_set_attr(windows[1], keyval, NULL);
+
+ MPI_Win_free(&windows[0]); /* first MPI_Win_free_keyval */
+ MPI_Free_mem(base_ptr[0]);
MPI_Win_free_keyval(&keyval); /* second MPI_Win_free_keyval */
MPI_Win_free_keyval(&keyval_copy); /* third MPI_Win_free_keyval */
+ MPI_Win_free(&windows[1]); /* fourth MPI_Win_free_keyval */
+ MPI_Free_mem(base_ptr[1]);
MTest_Finalize(errs);
MPI_Finalize();
return 0;
diff --git a/test/mpi/attr/testlist b/test/mpi/attr/testlist
index 9f2d8a1..07868d1 100644
--- a/test/mpi/attr/testlist
+++ b/test/mpi/attr/testlist
@@ -18,6 +18,6 @@ fkeyval 1
fkeyvalcomm 1
fkeyvaltype 1
keyval_double_free 1
-#keyval_double_free_comm
-#keyval_double_free_type
-#keyval_double_free_win
+keyval_double_free_comm 1
+keyval_double_free_type 1
+keyval_double_free_win 1
-----------------------------------------------------------------------
Summary of changes:
test/mpi/attr/keyval_double_free_type.c | 4 ++++
test/mpi/attr/keyval_double_free_win.c | 23 ++++++++++++++++-------
test/mpi/attr/testlist | 6 +++---
3 files changed, 23 insertions(+), 10 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-239-g05f42d1
by noreply@mpich.org 02 Oct '15
by noreply@mpich.org 02 Oct '15
02 Oct '15
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 05f42d10602b88f37993a24bdf31dc4d2a7bb08d (commit)
via 98b772c7292852f9f67b8e45fdddd93a5f40b8de (commit)
from 6dd87a93860d292800dd7edec1c9a04838802492 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/05f42d10602b88f37993a24bdf31dc4d2…
commit 05f42d10602b88f37993a24bdf31dc4d2a7bb08d
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Sep 30 17:08:21 2015 -0500
binding/mpif_h: promote attribute copy argument types
MPI-2.1 added new attribute functions that changed the type of the
value and extra state arguments to be of MPI_ADDRESS_KIND in Fortran.
The mpif_h bindings, however, would truncate these values by casting
them as default Fortran integers when calling the underlying copy
functions. We address the issue by substituting MPI_Aint in place
of MPI_Fint for temporary variables in the binding code.
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index cd47698..9eebc69 100755
--- a/src/binding/fortran/mpif_h/buildiface
+++ b/src/binding/fortran/mpif_h/buildiface
@@ -4397,7 +4397,7 @@ sub build_specials {
print $OUTFD "
/* The F77 attr copy function prototype and calling convention */
-typedef void (FORT_CALL F77_CopyFunction) (MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *,MPI_Fint *, MPI_Fint *, MPI_Fint *);
+typedef void (FORT_CALL F77_CopyFunction) (MPI_Fint *, MPI_Fint *, MPI_Aint *, MPI_Aint *, MPI_Aint *, MPI_Fint *, MPI_Fint *);
/* Helper proxy function to thunk the attr copy function call into F77 calling convention */
static
@@ -4416,9 +4416,9 @@ MPIR_Comm_copy_attr_f77_proxy(
MPI_Fint ierr = 0;
MPI_Fint fhandle = (MPI_Fint)comm;
MPI_Fint fkeyval = (MPI_Fint)keyval;
- MPI_Fint fvalue = (MPI_Fint) MPIU_VOID_PTR_CAST_TO_MPI_AINT (value);
- MPI_Fint* fextra = (MPI_Fint*)extra_state;
- MPI_Fint fnew = 0;
+ MPI_Aint fvalue = MPIU_VOID_PTR_CAST_TO_MPI_AINT (value);
+ MPI_Aint *fextra = (MPI_Aint *)extra_state;
+ MPI_Aint fnew = 0;
MPI_Fint fflag = 0;
((F77_CopyFunction*)user_function)( &fhandle, &fkeyval, fextra, &fvalue, &fnew, &fflag, &ierr );
@@ -4430,7 +4430,7 @@ MPIR_Comm_copy_attr_f77_proxy(
/* The F77 attr delete function prototype and calling convention */
-typedef void (FORT_CALL F77_DeleteFunction) (MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *);
+typedef void (FORT_CALL F77_DeleteFunction) (MPI_Fint *, MPI_Fint *, MPI_Aint *, MPI_Aint *, MPI_Fint *);
/* Helper proxy function to thunk the attr delete function call into F77 calling convention */
static
@@ -4447,8 +4447,8 @@ MPIR_Comm_delete_attr_f77_proxy(
MPI_Fint ierr = 0;
MPI_Fint fhandle = (MPI_Fint)comm;
MPI_Fint fkeyval = (MPI_Fint)keyval;
- MPI_Fint fvalue = (MPI_Fint) MPIU_VOID_PTR_CAST_TO_MPI_AINT (value);
- MPI_Fint* fextra = (MPI_Fint*)extra_state;
+ MPI_Aint fvalue = MPIU_VOID_PTR_CAST_TO_MPI_AINT (value);
+ MPI_Aint *fextra = (MPI_Aint *)extra_state;
((F77_DeleteFunction*)user_function)( &fhandle, &fkeyval, &fvalue, fextra, &ierr );
return (int)ierr;
http://git.mpich.org/mpich.git/commitdiff/98b772c7292852f9f67b8e45fdddd93a5…
commit 98b772c7292852f9f67b8e45fdddd93a5f40b8de
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Sep 30 09:46:00 2015 -0500
tsuite: add Fortran attr copy test with large value
The MPI provided attribute copy functions in MPICH do not handle
the potentially larger integer values defined in MPI-2.1. This test
illustrates the problem.
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 08ce6e6..aa8caa4 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -784,6 +784,7 @@
/f77/attr/baseattrf
/f77/attr/commattr2f
/f77/attr/commattr3f
+/f77/attr/commattr4f
/f77/attr/commattrf
/f77/attr/typeattr2f
/f77/attr/typeattr3f
@@ -859,6 +860,7 @@
/f90/attr/baseattrf90
/f90/attr/commattr2f90
/f90/attr/commattr3f90
+/f90/attr/commattr4f90
/f90/attr/commattrf90
/f90/attr/fandcattrf90
/f90/attr/typeattr2f90
diff --git a/test/mpi/f77/attr/Makefile.am b/test/mpi/f77/attr/Makefile.am
index 0d9b503..cd54053 100644
--- a/test/mpi/f77/attr/Makefile.am
+++ b/test/mpi/f77/attr/Makefile.am
@@ -15,7 +15,8 @@ AM_DEFAULT_SOURCE_EXT = .f
noinst_PROGRAMS = \
attrmpi1f \
baseattrf baseattr2f \
- commattrf commattr2f commattr3f \
+ commattrf commattr2f \
+ commattr3f commattr4f \
typeattrf typeattr2f typeattr3f
## attraints.h will be distributed because it's listed in AC_CONFIG_FILES/AC_OUTPUT
diff --git a/test/mpi/f77/attr/commattr4f.f b/test/mpi/f77/attr/commattr4f.f
new file mode 100644
index 0000000..ddce319
--- /dev/null
+++ b/test/mpi/f77/attr/commattr4f.f
@@ -0,0 +1,90 @@
+C
+ program main
+C
+ include 'mpif.h'
+
+ integer ierr
+ integer errs
+ logical found
+ integer comm2
+ integer key
+ include 'attraints.h'
+
+ errs = 0
+C
+C initialize the mpi environment
+C
+ call mpi_init(ierr)
+
+ call mpi_comm_create_keyval(MPI_COMM_DUP_FN,
+ $ MPI_NULL_DELETE_FN,
+ $ key,
+ $ extrastate,
+ $ ierr)
+C
+C set a value for the attribute
+C
+ valin = huge(valin)
+C
+C set attr in comm_world
+C
+ call mpi_comm_set_attr(MPI_COMM_WORLD,
+ $ key,
+ $ valin,
+ $ ierr)
+ call mpi_comm_get_attr(MPI_COMM_WORLD,
+ $ key,
+ $ valout,
+ $ found,
+ $ ierr)
+ if (found .neqv. .true.) then
+ print *, "mpi_comm_set_attr reported key, but not found on ",
+ $ "mpi_comm_world"
+ errs = errs + 1
+ else if (valout .ne. valin) then
+ print *, "key found, but valin does not match valout"
+ print *, valout, " != ", valin
+ errs = errs + 1
+ end if
+C
+C dup the communicator, attribute should follow
+C
+ call mpi_comm_dup(MPI_COMM_WORLD,
+ $ comm2,
+ $ ierr)
+C
+C get the value for the attribute
+C
+ call mpi_comm_get_attr(comm2,
+ $ key,
+ $ valout,
+ $ found,
+ $ ierr)
+ if (found .neqv. .true.) then
+ print *, "mpi_comm_set_attr reported key, but not found on ",
+ $ "duped comm"
+ errs = errs + 1
+ else if (valout .ne. valin) then
+ print *, "key found, but value does not match that on ",
+ $ "mpi_comm_world"
+ print *, valout, " != ", valin
+ errs = errs + 1
+ end if
+C
+C free the duped communicator
+C
+ call mpi_comm_free(comm2, ierr)
+C
+C free keyval
+C
+ call mpi_comm_delete_attr(MPI_COMM_WORLD,
+ $ key, ierr)
+ call mpi_comm_free_keyval(key,
+ $ ierr)
+ call mpi_finalize(ierr)
+
+ if (errs .eq. 0) then
+ print *, " No Errors"
+ end if
+
+ end
diff --git a/test/mpi/f77/attr/testlist b/test/mpi/f77/attr/testlist
index 27d9d59..8558ec7 100644
--- a/test/mpi/f77/attr/testlist
+++ b/test/mpi/f77/attr/testlist
@@ -4,6 +4,7 @@ baseattr2f 1
commattrf 1
commattr2f 1
commattr3f 1
+commattr4f 1
typeattrf 1
typeattr2f 1
typeattr3f 1
-----------------------------------------------------------------------
Summary of changes:
src/binding/fortran/mpif_h/buildiface | 14 +++---
test/mpi/.gitignore | 2 +
test/mpi/f77/attr/Makefile.am | 3 +-
test/mpi/f77/attr/commattr4f.f | 90 +++++++++++++++++++++++++++++++++
test/mpi/f77/attr/testlist | 1 +
5 files changed, 102 insertions(+), 8 deletions(-)
create mode 100644 test/mpi/f77/attr/commattr4f.f
hooks/post-receive
--
MPICH primary repository
1
0