-
Notifications
You must be signed in to change notification settings - Fork 26
Refactor: Create autoconf variables for MPI, to run with other MPI implementations #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm aware of the issue, @gc00. The problem occurs because some of the MPI functions have a slightly different prototype in the two implementations, which is strange. :-) I have had to manually edit the wrapper prototypes in the plugin to make it work so far. Anyway, I will try to create a more general fix to make it work. |
81f0af4 to
39f6064
Compare
|
@gc00: I checked my build of mpich-3.3.2 on a CentOS7 machine. I don't have libxml2 installed. I configured and built mpich with the following options $ ./configure --enable-g=dbg --prefix=/home/rohgarg/swsHere's what the Th next code snippet is from the header file ( /* Define to 1 if you have the `libxml2' library. */
/* #undef HWLOC_HAVE_LIBXML2 */I was looking at the options used by /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --hash-style=gnu -m elf_x86_64 -static -o lh_proxy /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbeginT.o -L/home/rohgarg/sws/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -Ttext-segment 0xE000000 --wrap __munmap --wrap shmat --wrap shmget lh_proxy.o libproxy.a -lmpi -lrt -lpthread -lc libproxy.a -rpath /home/rohgarg/sws/lib --enable-new-dtags -lmpi -lm -lpthread -lrt --start-group -lgcc -lgcc_eh -lc --end-group /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o |
|
@gc00: I looked at mpich's source more carefully. It's the On my CentOS7 system, with no libxml2 installed, it indeed builds without libxml2. /home/rohgarg/sws/mpich-3.3.2/src/hwloc/hwloc $ ls topology-xml*
topology-xml.c topology-xml.lo topology-xml.o topology-xml-libxml.c topology-xml-nolibxml.c topology-xml-nolibxml.lo topology-xml-nolibxml.oNote that only the |
39f6064 to
50aa209
Compare
* But continue to use normal ./configure for Cori, and other known hosts
afd89cd to
16d3c58
Compare
d367c36 to
a2d2087
Compare
3d1f4ef to
2ee5d6d
Compare
d4da85c to
59d8b3f
Compare
cf95513 to
f6dc93c
Compare
f6dc93c to
4edb343
Compare
4edb343 to
6594de3
Compare
820325d to
80ef34a
Compare
11c02c0 to
e1fab96
Compare
fec3dd8 to
437ed38
Compare
c57dfd2 to
197a2cf
Compare
d4a048b to
94a642a
Compare
9fbf45f to
830fb73
Compare
ba3c4c3 to
a208eaf
Compare
There is race between two phase algorithm preSuspendBarrier() and two phase commit commit_begin(). T1 thread mpickpt#1: setCkptPending() T2 thread mpickpt#2: checks isCkptPending() then stop(comm) T3 thread mpickpt#2: stop(comm) sets state to PHASE_1 T4 thread mpickpt#2: while isCkptPending() loop T5 thread mpickpt#1 calls waitForNewStateAfter(PHASE_1) This change adds a timeout when waiting state change. When timeout expires, the barrier sends a response message to the coordinator. The coordinator gives a free phase1 pass to one member if all members are in phase1 so this member can move to IN_CS state and contine two phase commit. Once this member is in IN_CS, the coordinator would unblock other members.
There is race between two phase algorithm preSuspendBarrier() and two phase commit commit_begin(). T1 thread mpickpt#1: setCkptPending() T2 thread mpickpt#2: checks isCkptPending() then stop(comm) T3 thread mpickpt#2: stop(comm) sets state to PHASE_1 T4 thread mpickpt#2: while isCkptPending() loop T5 thread mpickpt#1 calls waitForNewStateAfter(PHASE_1) This change adds a timeout when waiting state change. When timeout expires, the barrier sends a response message to the coordinator. The coordinator gives a free phase1 pass to one member if all members are in phase1 so this member can move to IN_CS state and contine two phase commit. Once this member is in IN_CS, the coordinator would unblock other members.
phase commit commit_begin(). T1 thread mpickpt#1: setCkptPending() T2 thread mpickpt#2: checks isCkptPending() then stop(comm) T3 thread mpickpt#2: stop(comm) sets state to PHASE_1 T4 thread mpickpt#2: while isCkptPending() loop T5 thread mpickpt#1 calls waitForNewStateAfter(PHASE_1) This change adds a timeout when waiting state change. When the preSuspend wait for PHASE_1 state change times out, it would set response to FREE_PASS.
There is race between two phase algorithm preSuspendBarrier() and two phase commit commit_begin(). T1 thread #1: setCkptPending() T2 thread #2: checks isCkptPending() then stop(comm) T3 thread #2: stop(comm) sets state to PHASE_1 T4 thread #2: while isCkptPending() loop T5 thread #1 calls waitForNewStateAfter(PHASE_1) This change adds a timeout when waiting state change. When the preSuspend wait for PHASE_1 state change times out, it would set response to FREE_PASS. Co-authored-by: Dahong Li <root@cori.nersc.gov>
* Fix the race between two phase commit and checkpointing There is race between two phase algorithm preSuspendBarrier() and two phase commit commit_begin(). T1 thread #1: setCkptPending() T2 thread #2: checks isCkptPending() then stop(comm) T3 thread #2: stop(comm) sets state to PHASE_1 T4 thread #2: while isCkptPending() loop T5 thread #1 calls waitForNewStateAfter(PHASE_1) This change adds a timeout when waiting state change. When timeout expires, the barrier sends a response message to the coordinator. The coordinator gives a free phase1 pass to one member if all members are in phase1 so this member can move to IN_CS state and contine two phase commit. Once this member is in IN_CS, the coordinator would unblock other members.
Hi @rohgarg,
This is a first attempt at making MANA portable across different MPI implementations.
Look at
DMTCP_ROOT/configure-manafor an example of how to use it. After configuring, it will then use the Makefile variables found inDMTCP_ROOT/contrib/mpi-proxy-split/Makefile_config.I tested this with MPICH. The
configure-manafile is set for my MPICH build on login (CentOS).Mostly, I can do 'make' in
contrib/mpi-proxy-split. But in lower-half, 'make' fails to compile thelh_proxyexecutable, with the error message:/usr/bin/ld: cannot find -lxml2In my next debugging session, I'll look for why it needs libxml2.a. Apparently,
mpicctranslates-lmpi -lrtinto-lmpi -lm -lxml2 -lpthread -lrt. I'm not sure why. Looking atsh -x mpicc ..., I don't see an-lxml2when compiling simple MPI programs in the test subdirectory.IN THIS UPDATED PR, THE BUG BELOW HAS BEEN FIXED NOW BY THE SECOND COMMIT:
What you'll see is that
contrib/mpi-proxy-split/mpi-wrappers/mpi_dummy.cfails to compile, because the mpi.h supplied by MPICH is incompatible with our assumed mpi.h in that file. Maybe you can diagnose this further, @rohgarg. Feel free to extend this branch and merge it, if you can figure outmpi_dummy.c. Developing on a local machine will be faster than developing on Cori, where 'srun' can take a long time to start up.Also, as a small side note, I saw that
test/autotest_config.pywas placed under git version control. This seems to be a mistake, since we already havetest/autotest_config.py.in. But you know your intentions better than me. Could you also take a look at that?