diff -rc4 /home/MPI/mpich/current/mpich/Makefile.in mpich/Makefile.in *** /home/MPI/mpich/current/mpich/Makefile.in Sat Jul 27 08:47:11 1996 --- mpich/Makefile.in Thu Oct 17 14:37:44 1996 *************** *** 133,143 **** (cd $$dir; \ $(MAKE) default_all ; if [ $$? != 0 ] ; then \ echo "Exit status from make was $$?" ; exit 1 ; fi ;) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libmpi.a ! @if test -w lib/$(LARCH)/$(COMM)/libmpi++.a ; then \ ! @RANLIB@ lib/$(LARCH)/$(COMM)/libmpi++.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi --- 133,143 ---- (cd $$dir; \ $(MAKE) default_all ; if [ $$? != 0 ] ; then \ echo "Exit status from make was $$?" ; exit 1 ; fi ;) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@.a ! @if test -w lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@++.a ; then \ ! @RANLIB@ lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@++.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi *************** *** 149,157 **** echo making mpir in directory $$dir ;\ (cd $$dir; \ $(MAKE) wrapperlib ) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libfmpi.a # # This target is used to remove the libraries for this configuration; this # can lead to better performance when rebuilding. --- 149,157 ---- echo making mpir in directory $$dir ;\ (cd $$dir; \ $(MAKE) wrapperlib ) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libf@MPILIBNAME@.a # # This target is used to remove the libraries for this configuration; this # can lead to better performance when rebuilding. *************** *** 190,201 **** $(MAKE) default_all MPIPROFILE="-DMPIR_DEBUG_MEM" ) ;\ (cd $$dir ; $(MAKE) clean ; \ $(MAKE) profile_all MPIPROFILE="-DMPIR_DEBUG_MEM -DMPI_BUILD_PROFILING");\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libmpi.a ! @RANLIB@ lib/$(LARCH)/$(COMM)/libpmpi.a ! @if test -w lib/$(LARCH)/$(COMM)/libmpi++.a ; then \ ! @RANLIB@ lib/$(LARCH)/$(COMM)/libmpi++.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi --- 190,201 ---- $(MAKE) default_all MPIPROFILE="-DMPIR_DEBUG_MEM" ) ;\ (cd $$dir ; $(MAKE) clean ; \ $(MAKE) profile_all MPIPROFILE="-DMPIR_DEBUG_MEM -DMPI_BUILD_PROFILING");\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@.a ! @RANLIB@ lib/$(LARCH)/$(COMM)/libp@MPILIBNAME@.a ! @if test -w lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@++.a ; then \ ! @RANLIB@ lib/$(LARCH)/$(COMM)/lib@MPILIBNAME@++.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe.a ; fi @if test -w lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; then \ @RANLIB@ lib/$(LARCH)/$(COMM)/libmpe_nompi.a ; fi *************** *** 208,216 **** echo making mpir in directory $$dir ;\ (cd $$dir; \ $(MAKE) profile_all MPIPROFILE="-DMPI_BUILD_PROFILING" ) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libpmpi.a # # Make mpirun from mpirun.*.in # --- 208,216 ---- echo making mpir in directory $$dir ;\ (cd $$dir; \ $(MAKE) profile_all MPIPROFILE="-DMPI_BUILD_PROFILING" ) ;\ done ! @RANLIB@ lib/$(LARCH)/$(COMM)/libp@MPILIBNAME@.a # # Make mpirun from mpirun.*.in # *************** *** 321,329 **** @-if [ -d tsuite ] ; then \ (cd tsuite ; $(MAKE) clean ) ; fi @-if [ -d bugs -a -s bugs/Makefile ] ; then \ (cd bugs ; $(MAKE) clean ) ; fi ! @-for dir in $(DIRS) ;\ do \ echo cleaning $$dir ;\ (cd $$dir; if [ -s Makefile ] ; then $(MAKE) clean ; fi ) ;\ done --- 321,329 ---- @-if [ -d tsuite ] ; then \ (cd tsuite ; $(MAKE) clean ) ; fi @-if [ -d bugs -a -s bugs/Makefile ] ; then \ (cd bugs ; $(MAKE) clean ) ; fi ! @-for dir in $(DIRS) util ;\ do \ echo cleaning $$dir ;\ (cd $$dir; if [ -s Makefile ] ; then $(MAKE) clean ; fi ) ;\ done *************** *** 471,485 **** # # The install target really needs to use some for of 'install' program that # will create directories, set modes and owners, etc. Alas, such a function # is not standard. ! # Note that clean removes mpirun (!) so we need to make sure that it is ! # around before doing the instal install: mpirun util/mpiinstall ! util/mpiinstall -prefix=$(PREFIX) installlib: mpirun util/mpiinstall ! util/mpiinstall -prefix-$(PREFIX) -libonly # # Install adds ALL of the examples to the installation area # This is an initial version. --- 471,487 ---- # # The install target really needs to use some for of 'install' program that # will create directories, set modes and owners, etc. Alas, such a function # is not standard. ! # Note that clean removes mpirun (!) and mpiinstall (!) so we need to make ! # sure that it is around before doing the install ! util/mpiinstall: util/mpireconfig ! (cd util ; ./mpireconfig mpiinstall ; chmod a+x mpiinstall ) install: mpirun util/mpiinstall ! ./util/mpiinstall -prefix=$(PREFIX) installlib: mpirun util/mpiinstall ! ./util/mpiinstall -prefix=$(PREFIX) -libonly -device=$(DEVICE) # # Install adds ALL of the examples to the installation area # This is an initial version. diff -rc4 /home/MPI/mpich/current/mpich/README mpich/README *** /home/MPI/mpich/current/mpich/README Fri Jul 26 09:09:30 1996 --- mpich/README Mon Oct 7 21:26:18 1996 *************** *** 1,8 **** --- 1,24 ---- Portable MPI Model Implementation + Version 1.1 ? + + Major Changes + + All (?) of the MPI constants are now constants in the language, not just + unchanging between MPI_Init and MPI_Finalize as in MPI 1.0. + + Minor Changes + + On IBM SPx systems, the program spxcp is provided to copy the exectuable + using the high performance switch. This can significantly shorten startup + time when using large numbers of processes. It may also eliminate "Cannot + configure system calls" errors that users quite properly are perplexed about + (these come from the IBM runtime system, not MPICH). Currently, only + mpirun.anlspx makes use of this feature. + Version 1.0.13 (July 26, 1996) This is a joint-effort project between Argonne (Bill Gropp and Rusty Lusk) and Mississippi State (Tony Skjellum and Nathan Doss). Of course the hardest work *************** *** 120,127 **** --- 136,147 ---- will involve a fairly significant re-arangement of the code. You should be able to work around this by sending 0 length messages to all of the processes that you will be communicating with before doing anything else. + + Fortran LOGICAL data is not handled correctly on some HETEROGENEOUS + systems (basically, there is no XDR type for Fortran LOGICAL, and the + current code doesn't convert to/from a standard representation). Don't forget to check the on-line buglist at MPICH home page http://www.mcs.anl.gov/mpi/mpich/index.html diff -rc4 /home/MPI/mpich/current/mpich/aclocal.m4 mpich/aclocal.m4 *** /home/MPI/mpich/current/mpich/aclocal.m4 Mon Jul 22 10:05:12 1996 --- mpich/aclocal.m4 Tue Sep 17 13:29:04 1996 *************** *** 195,202 **** --- 195,208 ---- for dir in $PATH ; do if test -x $dir/wish ; then wishloc=$dir/wish break + elif test -x $dir/tcl7.3-tk3.6/bin/wish ; then + wishloc=$dir/tcl7.3-tk3.6/bin/wish + break + elif test -x $dir/tcl7.4-tk4.0/bin/wish ; then + wishloc=$dir/tcl7.4-tk4.0/bin/wish + break fi done IFS="$saveifs" # Look for wish elsewhere *************** *** 1233,1241 **** # # Check that the Fortran compiler is actually available: HAS_F77= if test -n "$F77" ; then ! PAC_PROGRAM_CHECK(HAS_F77,$F77,1,0) fi ])dnl dnl dnl Fortran runtime for Fortran/C linking --- 1239,1252 ---- # # Check that the Fortran compiler is actually available: HAS_F77= if test -n "$F77" ; then ! PAC_PROGRAM_CHECK(HAS_F77,$F77,1,0,F77FULL) ! # if test -n "$F77FULL" ; then ! # Really should replace with full path.... ! # but would need to capture arguments as well... ! dnl F77=$F77FULL ! # fi fi ])dnl dnl dnl Fortran runtime for Fortran/C linking diff -rc4 /home/MPI/mpich/current/mpich/configure mpich/configure *** /home/MPI/mpich/current/mpich/configure Sat Jul 27 08:34:45 1996 --- mpich/configure Wed Oct 16 23:13:33 1996 *************** *** 25,35 **** Usage: ${progname} -arch=ARCH_TYPE -comm=COMM_TYPE -device=DEVICE [-prefix=INSTALL_DIR] [-c++[=C++_COMPILER]] [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] [-mpe] [-nompe] [-nof77] [-f90nag] [-opt=OPTFLAGS] [-make=MAKEPGM] ! [-cflags=CFLAGS] [-fflags=FFLAGS] [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] [-lib=LIBRARY] [-mpilibname=MPINAME] [-no_mpegraphics] [-no_short_longs] [-memdebug] [-x11_lib=X11LIB] [-x11_inc=X11INC] --- 25,36 ---- Usage: ${progname} -arch=ARCH_TYPE -comm=COMM_TYPE -device=DEVICE [-prefix=INSTALL_DIR] [-c++[=C++_COMPILER]] [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] + [-c++linker=CC_LINKER] [-mpe] [-nompe] [-nof77] [-f90nag] [-opt=OPTFLAGS] [-make=MAKEPGM] ! [-cflags=CFLAGS] [-fflags=FFLAGS] [-c++flags=CCFLAGS] [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] [-lib=LIBRARY] [-mpilibname=MPINAME] [-no_mpegraphics] [-no_short_longs] [-memdebug] [-x11_lib=X11LIB] [-x11_inc=X11INC] *************** *** 231,238 **** --- 232,241 ---- rs6000 (AIX for IBM RS6000) sgi (Silicon Graphics IRIX 4.x, 5.x or 6.x) sgi5 (Silicon Graphics IRIX 5.x on R4400's, for the MESHINE) IRIX (synonym for sgi) + IRIX32 (IRIX with 32bit objects -32) + IRIXN32 (IRIX with -n32) IRIX64 (IRIX with 64bit objects) alpha (DEC alpha) intelnx (Intel i860 or Intel Delta) paragon (Intel Paragon) *************** *** 577,584 **** --- 580,592 ---- CLINKER=`echo $arg|sed 's/-*clinker=//'` USERCLINKER=1 ;; + -c++linker=* | --c++linker=*) + CCLINKER=`echo $arg|sed 's/-*c++linker=//'` + USERCCLINKER=1 + ;; + -flinker=* | --flinker=*) FLINKER=`echo $arg|sed 's/-*flinker=//'` USERFLINKER=1 ;; *************** *** 611,618 **** --- 619,631 ---- package="`echo $arg|sed 's/-*cflags=//'`" USER_CFLAGS="$package" CFLAGS="$CFLAGS $package" ;; + -c++flags=* | --c++flags=*) + package="`echo $arg|sed 's/-*c++flags=//'`" + USER_CCFLAGS="$package" + CCFLAGS="$CCFLAGS $package" ;; + -fflags=* | --fflags=*) package="`echo $arg|sed 's/-*fflags=//'`" FFLAGS="$package" ;; *************** *** 1784,1792 **** print_error "handle a routine prototype." exit 1 fi # Need a way to find where Nexus is located. ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. --- 1797,1806 ---- print_error "handle a routine prototype." exit 1 fi # Need a way to find where Nexus is located. ! if test -z "$NEXUS_INCLUDE_DIR" ; then ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. *************** *** 1852,1866 **** fi fi ! if test -n "$pac_inc_dir" ; then ! NEXUS_INCLUDE_PATH=-I$pac_inc_dir else ! print_error "Could not find NEXUS include files" ! exit 1 fi ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. --- 1866,1884 ---- fi fi ! if test -n "$pac_inc_dir" ; then ! NEXUS_INCLUDE_PATH=-I$pac_inc_dir ! else ! print_error "Could not find NEXUS include files" ! exit 1 ! fi else ! NEXUS_INCLUDE_PATH=-I$NEXUS_INCLUDE_DIR fi ! if test -z "$NEXUS_LIB_DIR" ; then ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. *************** *** 1935,1947 **** fi fi ! if test -n "$pac_lib_dir" ; then ! NEXUS_LIB_PATH="-L$pac_lib_dir" else ! print_error "Could not find NEXUS library" ! exit 1 fi # # Need a way to find which Nexus to use. (i.e., Lite vs. Full) # Lite is assumed currently --- 1953,1968 ---- fi fi ! if test -n "$pac_lib_dir" ; then ! NEXUS_LIB_PATH="-L$pac_lib_dir" ! else ! print_error "Could not find NEXUS library" ! exit 1 ! fi else ! NEXUS_LIB_PATH="-L$NEXUS_LIB_DIR" fi # # Need a way to find which Nexus to use. (i.e., Lite vs. Full) # Lite is assumed currently *************** *** 3130,3138 **** echo "$ac_t""found $ac_prog_where ($HAS_F77)" else echo "$ac_t""found $ac_prog_where ($HAS_F77)" 1>&1 fi ! else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" else --- 3151,3159 ---- echo "$ac_t""found $ac_prog_where ($HAS_F77)" else echo "$ac_t""found $ac_prog_where ($HAS_F77)" 1>&1 fi ! F77FULL=$ac_prog_where else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" else *************** *** 3139,3146 **** --- 3160,3171 ---- echo "$ac_t""no" 1>&1 fi fi + # if test -n "$F77FULL" ; then + # Really should replace with full path.... + # but would need to capture arguments as well... + # fi fi else HAS_F77=0 *************** *** 3173,3180 **** --- 3198,3206 ---- DEFAULT_MACHINE=$DEVICE # if test -n "$device_nx"; then DEFAULT_MACHINE="paragon" + is_adi1=1 # Check for fast collective routines if test -r /usr/lib/libjmc.a; then CFLAGS="$CFLAGS -DICCLIB" ICCLIB="iCClib" *************** *** 3601,3612 **** fi rm -f conftest* done ! for func in msem_init ! do ! trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then --- 3627,3635 ---- fi rm -f conftest* done ! if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then *************** *** 3626,3636 **** fi fi if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo $ac_n "checking for ${func}""... $ac_c" else ! echo $ac_n "checking for ${func}""... $ac_c" 1>&1 fi if test ! -f confdefs.h ; then if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t"""!! SHELL ERROR !!"" --- 3649,3659 ---- fi fi if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo $ac_n "checking for msem_init""... $ac_c" else ! echo $ac_n "checking for msem_init""... $ac_c" 1>&1 fi if test ! -f confdefs.h ; then if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t"""!! SHELL ERROR !!"" *************** *** 3650,3662 **** int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_${func}) || defined (__stub___${func}) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ ! extern char ${func}(); ${func}(); #endif } EOF if eval $compile; then --- 3673,3685 ---- int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ ! #if defined (__stub_msem_init) || defined (__stub___msem_init) choke me #else /* Override any gcc2 internal prototype to avoid an error. */ ! extern char msem_init(); msem_init(); #endif } EOF if eval $compile; then *************** *** 3667,3689 **** fi rm -rf conftest* { test -n "$verbose" && \ ! echo " defining ${trfunc}" ! echo "#define" ${trfunc} 1 >> confdefs.h ! DEFS="$DEFS -D${trfunc}=1" } - else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" else echo "$ac_t""no" 1>&1 fi fi rm -f conftest* - done for func in mutex_init do trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` if test -z "$ac_echo_n" ; then --- 3690,3806 ---- fi rm -rf conftest* { test -n "$verbose" && \ ! echo " defining HAVE_MSEM_INIT" ! echo "#define" HAVE_MSEM_INIT 1 >> confdefs.h ! DEFS="$DEFS -DHAVE_MSEM_INIT=1" } + have_msem_init=1 else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" else echo "$ac_t""no" 1>&1 fi fi rm -f conftest* + if test "$have_msem_init" = 1 ; then + # If have msem_init, we need to see if we need struct msemaphore or just + # msemaphore. + true + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for Is msemaphore a typedef or struct name?""... $ac_c" + else + echo $ac_n "checking for Is msemaphore a typedef or struct name?""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + #include + int main() { exit(0); } + int t() { + typedef struct msemaphore MPID_Msemaphore; + typedef struct { MPID_Msemaphor lock; int a; } Msem; + Msem sem; + } + EOF + if eval $compile; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + rm -rf conftest* + is_struct=1 + + else + rm -rf conftest* + is_struct=0 + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + + if test $is_struct = 1 ; then + + { + test -n "$verbose" && \ + echo " defining MSEMAPHORE_IS_STRUCT" + echo "#define" MSEMAPHORE_IS_STRUCT 1 >> confdefs.h + DEFS="$DEFS -DMSEMAPHORE_IS_STRUCT=1" + } + + echo struct + else + echo typedef + fi + fi + # + # Here's a horrible "feature". Solaris include null stubs for + # mutex_init in libc (!), so that users can build threaded code that + # doesn't work (rather than putting this null stubs in -lnothread, + # where they belong). Thus, if mutex_init IS found, we need to + # check for -lthread. (Which we should have done above) + # for func in mutex_init do trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` if test -z "$ac_echo_n" ; then *************** *** 5130,5138 **** CC="$CC -64 -mips4" F77="$F77 -64 -mips4" CLINKER="$CC -64 -mips4" FLINKER="$F77 -64 -mips4" ! elif test -n $arch_IRIXN32 ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" --- 5247,5255 ---- CC="$CC -64 -mips4" F77="$F77 -64 -mips4" CLINKER="$CC -64 -mips4" FLINKER="$F77 -64 -mips4" ! elif test -n "$arch_IRIXN32" ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" *************** *** 5147,5155 **** CC="$CC -64 -mips3" F77="$F77 -64 -mips3" CLINKER="$CC -64 -mips3" # -non_shared" FLINKER="$F77 -64 -mips3" # -non_shared" ! elif test -n $arch_IRIXN32 ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" --- 5264,5272 ---- CC="$CC -64 -mips3" F77="$F77 -64 -mips3" CLINKER="$CC -64 -mips3" # -non_shared" FLINKER="$F77 -64 -mips3" # -non_shared" ! elif test -n "$arch_IRIXN32" ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" *************** *** 5268,5283 **** print_error "Using default cp for copy; install may fail if -r and -p" print_error "switches are not supported." fi # ASMFILES_O="shmem_stack.o get_stack.o" ! # Some users needed /mpp/bin/asm ! if test -s /mpp/bin/cam ; then ! ASM="/mpp/bin/cam" ! elif test -s /mpp/bin/asm ; then ! ASM="/mpp/bin/asm" ! else print_error Cannot find assembler needed to build MPICH ! print_error Neither /mpp/bin/cam nor /mpp/bin/asm is available exit 1 fi # # This is needed for the Fortran interfaces (also for the triton CRAY TS) --- 5385,5403 ---- print_error "Using default cp for copy; install may fail if -r and -p" print_error "switches are not supported." fi # ASMFILES_O="shmem_stack.o get_stack.o" ! # Some users needed /mpp/bin/asm, others /opt/ctl/bin/cam ! for asm in /mpp/bin/cam /opt/ctl/bin/cam /mpp/bin/asm ; do ! if test -s $asm ; then ! ASM=$asm ! break ! fi ! done ! if test -z "$ASM" ; then print_error Cannot find assembler needed to build MPICH ! print_error Neither /mpp/bin/cam, /opt/ctl/bin/cam, nor ! print_error /mpp/bin/asm is available exit 1 fi # # This is needed for the Fortran interfaces (also for the triton CRAY TS) *************** *** 6235,6243 **** # Check for the functions that may be needed by the ADI to implement # Processor_name. Save these defines in a special place. SAVEDEFS="$DEFS" DEFS="" ! for func in gethostname sysinfo uname do trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` if test -z "$ac_echo_n" ; then ac_echo_n=yes --- 6355,6519 ---- # Check for the functions that may be needed by the ADI to implement # Processor_name. Save these defines in a special place. SAVEDEFS="$DEFS" DEFS="" ! if test -z "$ac_echo_n" ; then ! ac_echo_n=yes ! if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ! # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. ! if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ! ac_n= ac_c=' ! ' ac_t=' ' ! else ! ac_n=-n ac_c= ac_t= ! fi ! else ! ac_n= ac_c='\c' ac_t= ! fi ! ac_echo_test=`echo foo 1>&1` ! if test -z "$ac_echo_test" ; then ! print_error "Your sh shell does not handle the output redirection" ! print_error "1>&1 correctly. Configure will work around this problem," ! print_error "but you should report the problem to your vendor." ! fi ! ! fi ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo $ac_n "checking for uname""... $ac_c" ! else ! echo $ac_n "checking for uname""... $ac_c" 1>&1 ! fi ! if test ! -f confdefs.h ; then ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t"""!! SHELL ERROR !!"" ! else ! echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 ! fi ! echo "The file confdefs.h created by configure has been removed" ! echo "This may be a problem with your shell; some versions of LINUX" ! echo "have this problem. See the Installation guide for more" ! echo "information." ! exit 1 ! fi ! cat > conftest.c < ! int main() { exit(0); } ! int t() { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_uname) || defined (__stub___uname) ! choke me ! #else ! /* Override any gcc2 internal prototype to avoid an error. */ ! extern char uname(); uname(); ! #endif ! } ! EOF ! if eval $compile; then ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t""yes" ! else ! echo "$ac_t""yes" 1>&1 ! fi ! rm -rf conftest* ! { ! test -n "$verbose" && \ ! echo " defining HAVE_UNAME" ! echo "#define" HAVE_UNAME 1 >> confdefs.h ! DEFS="$DEFS -DHAVE_UNAME=1" ! } ! haveuname=1 ! ! else if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t""no" ! else ! echo "$ac_t""no" 1>&1 ! fi ! fi ! rm -f conftest* ! ! if test -z "$ac_echo_n" ; then ! ac_echo_n=yes ! if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ! # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. ! if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ! ac_n= ac_c=' ! ' ac_t=' ' ! else ! ac_n=-n ac_c= ac_t= ! fi ! else ! ac_n= ac_c='\c' ac_t= ! fi ! ac_echo_test=`echo foo 1>&1` ! if test -z "$ac_echo_test" ; then ! print_error "Your sh shell does not handle the output redirection" ! print_error "1>&1 correctly. Configure will work around this problem," ! print_error "but you should report the problem to your vendor." ! fi ! ! fi ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo $ac_n "checking for gethostbyname""... $ac_c" ! else ! echo $ac_n "checking for gethostbyname""... $ac_c" 1>&1 ! fi ! if test ! -f confdefs.h ; then ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t"""!! SHELL ERROR !!"" ! else ! echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 ! fi ! echo "The file confdefs.h created by configure has been removed" ! echo "This may be a problem with your shell; some versions of LINUX" ! echo "have this problem. See the Installation guide for more" ! echo "information." ! exit 1 ! fi ! cat > conftest.c < ! int main() { exit(0); } ! int t() { ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) ! choke me ! #else ! /* Override any gcc2 internal prototype to avoid an error. */ ! extern char gethostbyname(); gethostbyname(); ! #endif ! } ! EOF ! if eval $compile; then ! if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t""yes" ! else ! echo "$ac_t""yes" 1>&1 ! fi ! rm -rf conftest* ! { ! test -n "$verbose" && \ ! echo " defining HAVE_GETHOSTBYNAME" ! echo "#define" HAVE_GETHOSTBYNAME 1 >> confdefs.h ! DEFS="$DEFS -DHAVE_GETHOSTBYNAME=1" ! } ! havegethostbyname=1 ! ! else if test -z "$ac_echo_test" -a 1 = 1 ; then ! echo "$ac_t""no" ! else ! echo "$ac_t""no" 1>&1 ! fi ! fi ! rm -f conftest* ! ! # If we have uname and gethostbyname, we can skip getdomainname ... ! if test "$haveuname" != 1 -o "$havegethostbyname" != 1 ; then ! for func in gethostname sysinfo do trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` if test -z "$ac_echo_n" ; then ac_echo_n=yes *************** *** 6316,6326 **** fi rm -f conftest* done ! # ! # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing ! # indeed - stuff like this is why Windows95/NT WILL WIN). if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. --- 6592,6604 ---- fi rm -f conftest* done ! # ! # systeminfo is needed for sysinfo ! for ac_hdr in sys/systeminfo.h ! do ! ac_safe=`echo "$ac_hdr" | tr '[a-z]./' '[A-Z]__'` if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. *************** *** 6341,6348 **** --- 6619,6709 ---- fi fi if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_hdr""... $ac_c" + else + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { main(); } + EOF + if eval $compile; then + + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + + else + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + + fi + rm -f conftest* + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` + + { + test -n "$verbose" && \ + echo " defining $ac_tr_hdr" + echo "#define" $ac_tr_hdr 1 >> confdefs.h + DEFS="$DEFS -D$ac_tr_hdr=1" + } + + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + done + + # + # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing + # indeed - stuff like this is why Windows95/NT WILL WIN). + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then echo $ac_n "checking for getdomainname""... $ac_c" else echo $ac_n "checking for getdomainname""... $ac_c" 1>&1 fi *************** *** 6391,6400 **** fi has_getdomainname=0 fi ! if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then ! # Extract the first word of "domainname", so it can be a program name with args. set dummy domainname; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then --- 6752,6761 ---- fi has_getdomainname=0 fi ! if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then ! # Extract the first word of "domainname", so it can be a program name with args. set dummy domainname; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then *************** *** 6457,6465 **** echo "$ac_t""no" 1>&1 fi fi ! # Extract the first word of "hostname", so it can be a program name with args. set dummy hostname; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then --- 6818,6826 ---- echo "$ac_t""no" 1>&1 fi fi ! # Extract the first word of "hostname", so it can be a program name with args. set dummy hostname; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then *************** *** 6522,6530 **** echo "$ac_t""no" 1>&1 fi fi ! # Extract the first word of "rup", so it can be a program name with args. set dummy rup; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then --- 6883,6891 ---- echo "$ac_t""no" 1>&1 fi fi ! # Extract the first word of "rup", so it can be a program name with args. set dummy rup; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then *************** *** 6587,6708 **** echo "$ac_t""no" 1>&1 fi fi ! # Form hostname.domainname, do rup to it ! # rup may not be enabled, but short of running a program to lookup the ! # local host, there does not seem to be a better alternative. ! # ! if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then ! fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` ! # echo $fullhost ! fullhost="${fullhost}.`$d_domainname`" ! response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` ! # echo $fullhost ! if test -n "$response" ; then print_error "The getdomainname system routine has been rendered USELESS" print_error "on your system. This is not a bug and will not affect" print_error "MPICH. Some MPE routines (particularly those that" print_error "interact with X Windows) may not work." ! else ! { test -n "$verbose" && \ echo " defining HAVE_GETDOMAINNAME" echo "#define" HAVE_GETDOMAINNAME 1 >> confdefs.h DEFS="$DEFS -DHAVE_GETDOMAINNAME=1" } fi fi fi - # - # systeminfo is needed for sysinfo - for ac_hdr in sys/systeminfo.h - do - ac_safe=`echo "$ac_hdr" | tr '[a-z]./' '[A-Z]__'` - if test -z "$ac_echo_n" ; then - ac_echo_n=yes - if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' - ' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi - else - ac_n= ac_c='\c' ac_t= - fi - ac_echo_test=`echo foo 1>&1` - if test -z "$ac_echo_test" ; then - print_error "Your sh shell does not handle the output redirection" - print_error "1>&1 correctly. Configure will work around this problem," - print_error "but you should report the problem to your vendor." - fi - - fi - if test -z "$ac_echo_test" -a 1 = 1 ; then - echo $ac_n "checking for $ac_hdr""... $ac_c" - else - echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&1 - fi - if test ! -f confdefs.h ; then - if test -z "$ac_echo_test" -a 1 = 1 ; then - echo "$ac_t"""!! SHELL ERROR !!"" - else - echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 - fi - echo "The file confdefs.h created by configure has been removed" - echo "This may be a problem with your shell; some versions of LINUX" - echo "have this problem. See the Installation guide for more" - echo "information." - exit 1 - fi - cat > conftest.c < - int main() { exit(0); } - int t() { main(); } - EOF - if eval $compile; then - - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" - - else - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" - - fi - rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - if test -z "$ac_echo_test" -a 1 = 1 ; then - echo "$ac_t""yes" - else - echo "$ac_t""yes" 1>&1 - fi - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` - - { - test -n "$verbose" && \ - echo " defining $ac_tr_hdr" - echo "#define" $ac_tr_hdr 1 >> confdefs.h - DEFS="$DEFS -D$ac_tr_hdr=1" - } - - else - if test -z "$ac_echo_test" -a 1 = 1 ; then - echo "$ac_t""no" - else - echo "$ac_t""no" 1>&1 - fi - fi - done - GETNAME_DEFS="$DEFS" DEFS="$SAVEDEFS" # # Check for message archive routines (to be used for internationalization) --- 6948,6985 ---- echo "$ac_t""no" 1>&1 fi fi ! # Form hostname.domainname, do rup to it ! # rup may not be enabled, but short of running a program to lookup the ! # local host, there does not seem to be a better alternative. ! # ! if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then ! fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` ! # echo $fullhost ! fullhost="${fullhost}.`$d_domainname`" ! response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` ! # echo $fullhost ! if test -n "$response" ; then print_error "The getdomainname system routine has been rendered USELESS" print_error "on your system. This is not a bug and will not affect" print_error "MPICH. Some MPE routines (particularly those that" print_error "interact with X Windows) may not work." ! else ! { test -n "$verbose" && \ echo " defining HAVE_GETDOMAINNAME" echo "#define" HAVE_GETDOMAINNAME 1 >> confdefs.h DEFS="$DEFS -DHAVE_GETDOMAINNAME=1" } + fi fi fi fi GETNAME_DEFS="$DEFS" DEFS="$SAVEDEFS" # # Check for message archive routines (to be used for internationalization) *************** *** 6794,6802 **** rm -f conftest* done # Will need to generate binary form of file ! # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then --- 7071,7093 ---- rm -f conftest* done # Will need to generate binary form of file ! # !!! We have a report that on Cray, gencat is a completely different command ! # (parallel fscks?). We're supposed to use ! # caterr -c cat_file msg_file. Instead, we'll skip it ! if test -n "$device_td3" ; then ! # May try caterr -c cat_file msg_file ! print_error "Configure needs the gencat program to generate message catalogs" ! print_error "Some (all?) Cray T3D systems have a program named gencat" ! print_error "that performs file system checks instead. For this reason," ! print_error "message catalogs will not be created for the T3D device." ! print_error "You may be able to use the caterr command instead." ! print_error "MPICH will work without the message catalogs (though the" ! print_error "ability to generate error messages in languages other than" ! print_error "US English will be lost)." ! else ! # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 if test -z "$ac_echo_n" ; then ac_echo_n=yes if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then *************** *** 6859,6867 **** echo "$ac_t""no" 1>&1 fi fi ! if test $has_gencat = 1 ; then { test -n "$verbose" && \ echo " defining HAVE_GENCAT" --- 7150,7158 ---- echo "$ac_t""no" 1>&1 fi fi ! if test $has_gencat = 1 ; then { test -n "$verbose" && \ echo " defining HAVE_GENCAT" *************** *** 7010,7017 **** --- 7301,7309 ---- else echo "$ac_t"""Could not create catalog; US English messages will be used"" 1>&1 fi fi + fi fi DEFS="$SAVEDEFS" # echo checking for ANSI C header files *************** *** 7643,7657 **** rm -f conftest* done # # Turn off F77 # One problem with this is that some part of the ar will fail. Lets hope # it isn't fatal. We've tried to fix this by defining MPI_FOBJECTS # as the object files created from Fortran. if test $NOF77 = 1 ; then ! F77=true ! FLINKER=true fi # # # Check for erroneous C compilers --- 7935,8034 ---- rm -f conftest* done # + # Look for headers that might have memset().... + for ac_hdr in memory.h string.h + do + ac_safe=`echo "$ac_hdr" | tr '[a-z]./' '[A-Z]__'` + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_hdr""... $ac_c" + else + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { main(); } + EOF + if eval $compile; then + + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + + else + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + + fi + rm -f conftest* + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` + + { + test -n "$verbose" && \ + echo " defining $ac_tr_hdr" + echo "#define" $ac_tr_hdr 1 >> confdefs.h + DEFS="$DEFS -D$ac_tr_hdr=1" + } + + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + done + + # # Turn off F77 # One problem with this is that some part of the ar will fail. Lets hope # it isn't fatal. We've tried to fix this by defining MPI_FOBJECTS # as the object files created from Fortran. if test $NOF77 = 1 ; then ! F77="echo no Fortran compiler" ! FLINKER="$F77" fi # # # Check for erroneous C compilers *************** *** 7806,7815 **** cat conftest.out fi NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77=true ! FLINKER=true MPI_FOBJECTS="" elif test ! -s conftest.o ; then if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" --- 8183,8192 ---- cat conftest.out fi NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77="echo no Fortran compiler" ! FLINKER="$F77" MPI_FOBJECTS="" elif test ! -s conftest.o ; then if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""no" *************** *** 7822,7831 **** cat conftest.out fi NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77=true ! FLINKER=true MPI_FOBJECTS="" else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""yes" --- 8199,8208 ---- cat conftest.out fi NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77="echo no Fortran compiler" ! FLINKER="$F77" MPI_FOBJECTS="" else if test -z "$ac_echo_test" -a 1 = 1 ; then echo "$ac_t""yes" *************** *** 9039,9046 **** --- 9416,9429 ---- for dir in $PATH ; do if test -x $dir/wish ; then wishloc=$dir/wish break + elif test -x $dir/tcl7.3-tk3.6/bin/wish ; then + wishloc=$dir/tcl7.3-tk3.6/bin/wish + break + elif test -x $dir/tcl7.4-tk4.0/bin/wish ; then + wishloc=$dir/tcl7.4-tk4.0/bin/wish + break fi done IFS="$saveifs" # Look for wish elsewhere *************** *** 9897,9904 **** --- 10280,10288 ---- # in Makefiles that should not be MPICH dependent MPICC=$MPIR_HOME/lib/$ARCH/$COMM/mpicc MPIF77=$MPIR_HOME/lib/$ARCH/$COMM/mpif77 MPICPLUSPLUS=$MPIR_HOME/lib/$ARCH/$COMM/mpiCC + LIB_DIR=$MPIR_HOME/lib/$ARCH/$COMM # # # Substitute variables # Variables used in scripts only *************** *** 9951,9959 **** *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done ! trap 'rm -f Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile ; exit 1' 1 3 15 CC='$CC' RANLIB='$RANLIB' CPP='$CPP' CCval='$CCval' --- 10335,10343 ---- *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done ! trap 'rm -f Makefile util/Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile ; exit 1' 1 3 15 CC='$CC' RANLIB='$RANLIB' CPP='$CPP' CCval='$CCval' *************** *** 9985,9993 **** BASE_LIB_LIST='$BASE_LIB_LIST' BOPT='$BOPT' CFLAGS='$CFLAGS' CLINKER='$CLINKER' - CCC='$CCC' CCFLAGS='$CCFLAGS' CCLINKER='$CCLINKER' COMM='$COMM' CPP_COMPILER='$CPP_COMPILER' --- 10369,10376 ---- *************** *** 10011,10018 **** --- 10394,10402 ---- ICCLIB='$ICCLIB' INCLUDE_PATH='$INCLUDE_PATH' LIB_LIST='$LIB_LIST' LIB_PATH='$LIB_PATH' + LIB_DIR='$LIB_DIR' MAKE='$MAKE' MPEGRAPHICS_FOBJS='$MPEGRAPHICS_FOBJS' MPEGRAPHICS_FSOURCE='$MPEGRAPHICS_FSOURCE' MPEGRAPHICS_OBJS='$MPEGRAPHICS_OBJS' *************** *** 10058,10066 **** cat >> config.status <<\EOF top_srcdir=$srcdir ! CONFIG_FILES=${CONFIG_FILES-"Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile "} for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` --- 10442,10450 ---- cat >> config.status <<\EOF top_srcdir=$srcdir ! CONFIG_FILES=${CONFIG_FILES-"Makefile util/Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile "} for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` *************** *** 10106,10114 **** s%@BASE_LIB_LIST@%$BASE_LIB_LIST%g s%@BOPT@%$BOPT%g s%@CFLAGS@%$CFLAGS%g s%@CLINKER@%$CLINKER%g - s%@CCC@%$CCC%g s%@CCFLAGS@%$CCFLAGS%g s%@CCLINKER@%$CCLINKER%g s%@COMM@%$COMM%g s%@CPP_COMPILER@%$CPP_COMPILER%g --- 10490,10497 ---- *************** *** 10132,10139 **** --- 10515,10523 ---- s%@ICCLIB@%$ICCLIB%g s%@INCLUDE_PATH@%$INCLUDE_PATH%g s%@LIB_LIST@%$LIB_LIST%g s%@LIB_PATH@%$LIB_PATH%g + s%@LIB_DIR@%$LIB_DIR%g s%@MAKE@%$MAKE%g s%@MPEGRAPHICS_FOBJS@%$MPEGRAPHICS_FOBJS%g s%@MPEGRAPHICS_FSOURCE@%$MPEGRAPHICS_FSOURCE%g s%@MPEGRAPHICS_OBJS@%$MPEGRAPHICS_OBJS%g *************** *** 10222,10230 **** CONFIG_FILES="" # # The programs that run on the front end need a different compiler if test $cross_compiling != 1 ; then ! CONFIG_FILES="profiling/wrappergen/Makefile profiling/nupshot/Makefile" export CONFIG_FILES ./config.status CONFIG_FILES="" else --- 10606,10616 ---- CONFIG_FILES="" # # The programs that run on the front end need a different compiler if test $cross_compiling != 1 ; then ! CONFIG_FILES="profiling/wrappergen/Makefile" ! # nupshot is handled with its own configure file ! # "profiling/nupshot/Makefile" export CONFIG_FILES ./config.status CONFIG_FILES="" else diff -rc4 /home/MPI/mpich/current/mpich/configure.in mpich/configure.in *** /home/MPI/mpich/current/mpich/configure.in Tue Jul 23 14:14:32 1996 --- mpich/configure.in Wed Oct 16 14:11:02 1996 *************** *** 33,43 **** Usage: ${progname} -arch=ARCH_TYPE -comm=COMM_TYPE -device=DEVICE [-prefix=INSTALL_DIR] [-c++[=C++_COMPILER]] [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] [-mpe] [-nompe] [-nof77] [-f90nag] [-opt=OPTFLAGS] [-make=MAKEPGM] ! [-cflags=CFLAGS] [-fflags=FFLAGS] [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] [-lib=LIBRARY] [-mpilibname=MPINAME] [-no_mpegraphics] [-no_short_longs] [-memdebug] [-x11_lib=X11LIB] [-x11_inc=X11INC] --- 33,44 ---- Usage: ${progname} -arch=ARCH_TYPE -comm=COMM_TYPE -device=DEVICE [-prefix=INSTALL_DIR] [-c++[=C++_COMPILER]] [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] + [-c++linker=CC_LINKER] [-mpe] [-nompe] [-nof77] [-f90nag] [-opt=OPTFLAGS] [-make=MAKEPGM] ! [-cflags=CFLAGS] [-fflags=FFLAGS] [-c++flags=CCFLAGS] [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] [-lib=LIBRARY] [-mpilibname=MPINAME] [-no_mpegraphics] [-no_short_longs] [-memdebug] [-x11_lib=X11LIB] [-x11_inc=X11INC] *************** *** 239,246 **** --- 240,249 ---- rs6000 (AIX for IBM RS6000) sgi (Silicon Graphics IRIX 4.x, 5.x or 6.x) sgi5 (Silicon Graphics IRIX 5.x on R4400's, for the MESHINE) IRIX (synonym for sgi) + IRIX32 (IRIX with 32bit objects -32) + IRIXN32 (IRIX with -n32) IRIX64 (IRIX with 64bit objects) alpha (DEC alpha) intelnx (Intel i860 or Intel Delta) paragon (Intel Paragon) *************** *** 585,592 **** --- 588,600 ---- CLINKER=`echo $arg|sed 's/-*clinker=//'` USERCLINKER=1 ;; + -c++linker=* | --c++linker=*) + CCLINKER=`echo $arg|sed 's/-*c++linker=//'` + USERCCLINKER=1 + ;; + -flinker=* | --flinker=*) FLINKER=`echo $arg|sed 's/-*flinker=//'` USERFLINKER=1 ;; *************** *** 619,626 **** --- 627,639 ---- package="`echo $arg|sed 's/-*cflags=//'`" USER_CFLAGS="$package" CFLAGS="$CFLAGS $package" ;; + -c++flags=* | --c++flags=*) + package="`echo $arg|sed 's/-*c++flags=//'`" + USER_CCFLAGS="$package" + CCFLAGS="$CCFLAGS $package" ;; + -fflags=* | --fflags=*) package="`echo $arg|sed 's/-*fflags=//'`" FFLAGS="$package" ;; *************** *** 1037,1057 **** print_error "handle a routine prototype." exit 1 fi # Need a way to find where Nexus is located. ! PAC_FIND_USER_INCLUDE(nexus,/usr/local/nexus/include /usr/local/iway/app/nexus/include /usr/local/iway/app/nexus/nexus/include) ! if test -n "$pac_inc_dir" ; then ! NEXUS_INCLUDE_PATH=-I$pac_inc_dir else ! print_error "Could not find NEXUS include files" ! exit 1 fi ! PAC_FIND_USER_LIB(nexuslite_opt,/usr/local/nexus /usr/local/iway/app/nexus/lib /usr/local/iway/app/nexus/nexus/lib) ! if test -n "$pac_lib_dir" ; then ! NEXUS_LIB_PATH="-L$pac_lib_dir" else ! print_error "Could not find NEXUS library" ! exit 1 fi # # Need a way to find which Nexus to use. (i.e., Lite vs. Full) # Lite is assumed currently --- 1050,1078 ---- print_error "handle a routine prototype." exit 1 fi # Need a way to find where Nexus is located. ! if test -z "$NEXUS_INCLUDE_DIR" ; then ! PAC_FIND_USER_INCLUDE(nexus,/usr/local/nexus/include /usr/local/iway/app/nexus/include /usr/local/iway/app/nexus/nexus/include) ! if test -n "$pac_inc_dir" ; then ! NEXUS_INCLUDE_PATH=-I$pac_inc_dir ! else ! print_error "Could not find NEXUS include files" ! exit 1 ! fi else ! NEXUS_INCLUDE_PATH=-I$NEXUS_INCLUDE_DIR fi ! if test -z "$NEXUS_LIB_DIR" ; then ! PAC_FIND_USER_LIB(nexuslite_opt,/usr/local/nexus /usr/local/iway/app/nexus/lib /usr/local/iway/app/nexus/nexus/lib) ! if test -n "$pac_lib_dir" ; then ! NEXUS_LIB_PATH="-L$pac_lib_dir" ! else ! print_error "Could not find NEXUS library" ! exit 1 ! fi else ! NEXUS_LIB_PATH="-L$NEXUS_LIB_DIR" fi # # Need a way to find which Nexus to use. (i.e., Lite vs. Full) # Lite is assumed currently *************** *** 1106,1113 **** --- 1127,1135 ---- DEFAULT_MACHINE=$DEVICE # if test -n "$device_nx"; then DEFAULT_MACHINE="paragon" + is_adi1=1 # Check for fast collective routines if test -r /usr/lib/libjmc.a; then CFLAGS="$CFLAGS -DICCLIB" ICCLIB="iCClib" *************** *** 1188,1196 **** SAVEDEFS="$DEFS" DEFS="" # mmap doesn't help if it does not have MAP_ANONYMOUS AC_HAVE_FUNCS(mmap) ! AC_HAVE_FUNCS(msem_init) AC_HAVE_FUNCS(mutex_init) AC_HAVE_FUNCS(shmat) AC_HAVE_FUNCS(semop) PAC_HAVE_VOLATILE --- 1210,1244 ---- SAVEDEFS="$DEFS" DEFS="" # mmap doesn't help if it does not have MAP_ANONYMOUS AC_HAVE_FUNCS(mmap) ! dnl A C _ HAVE_FUNCS(msem_init) ! AC_FUNC_CHECK(msem_init,AC_DEFINE(HAVE_MSEM_INIT)have_msem_init=1) ! if test "$have_msem_init" = 1 ; then ! # If have msem_init, we need to see if we need struct msemaphore or just ! # msemaphore. ! true ! AC_COMPILE_CHECK(Is msemaphore a typedef or struct name?,[ ! #include ! #include ],[ ! typedef struct msemaphore MPID_Msemaphore; ! typedef struct { MPID_Msemaphor lock; int a; } Msem; ! Msem sem; ! ],is_struct=1,is_struct=0) ! if test $is_struct = 1 ; then ! AC_DEFINE(MSEMAPHORE_IS_STRUCT) ! echo struct ! else ! echo typedef ! fi ! fi ! # ! # Here's a horrible "feature". Solaris include null stubs for ! # mutex_init in libc (!), so that users can build threaded code that ! # doesn't work (rather than putting this null stubs in -lnothread, ! # where they belong). Thus, if mutex_init IS found, we need to ! # check for -lthread. (Which we should have done above) ! # AC_HAVE_FUNCS(mutex_init) AC_HAVE_FUNCS(shmat) AC_HAVE_FUNCS(semop) PAC_HAVE_VOLATILE *************** *** 1419,1427 **** CC="$CC -64 -mips4" F77="$F77 -64 -mips4" CLINKER="$CC -64 -mips4" FLINKER="$F77 -64 -mips4" ! elif test -n $arch_IRIXN32 ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" --- 1467,1475 ---- CC="$CC -64 -mips4" F77="$F77 -64 -mips4" CLINKER="$CC -64 -mips4" FLINKER="$F77 -64 -mips4" ! elif test -n "$arch_IRIXN32" ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" *************** *** 1436,1444 **** CC="$CC -64 -mips3" F77="$F77 -64 -mips3" CLINKER="$CC -64 -mips3" # -non_shared" FLINKER="$F77 -64 -mips3" # -non_shared" ! elif test -n $arch_IRIXN32 ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" --- 1484,1492 ---- CC="$CC -64 -mips3" F77="$F77 -64 -mips3" CLINKER="$CC -64 -mips3" # -non_shared" FLINKER="$F77 -64 -mips3" # -non_shared" ! elif test -n "$arch_IRIXN32" ; then CC="$CC -n32" F77="$F77 -n32" CLINKER="$CC -n32" FLINKER="$F77 -n32" *************** *** 1544,1559 **** print_error "Using default cp for copy; install may fail if -r and -p" print_error "switches are not supported." fi # ASMFILES_O="shmem_stack.o get_stack.o" ! # Some users needed /mpp/bin/asm ! if test -s /mpp/bin/cam ; then ! ASM="/mpp/bin/cam" ! elif test -s /mpp/bin/asm ; then ! ASM="/mpp/bin/asm" ! else print_error Cannot find assembler needed to build MPICH ! print_error Neither /mpp/bin/cam nor /mpp/bin/asm is available exit 1 fi # # This is needed for the Fortran interfaces (also for the triton CRAY TS) --- 1592,1610 ---- print_error "Using default cp for copy; install may fail if -r and -p" print_error "switches are not supported." fi # ASMFILES_O="shmem_stack.o get_stack.o" ! # Some users needed /mpp/bin/asm, others /opt/ctl/bin/cam ! for asm in /mpp/bin/cam /opt/ctl/bin/cam /mpp/bin/asm ; do ! if test -s $asm ; then ! ASM=$asm ! break ! fi ! done ! if test -z "$ASM" ; then print_error Cannot find assembler needed to build MPICH ! print_error Neither /mpp/bin/cam, /opt/ctl/bin/cam, nor ! print_error /mpp/bin/asm is available exit 1 fi # # This is needed for the Fortran interfaces (also for the triton CRAY TS) *************** *** 1778,1819 **** # Check for the functions that may be needed by the ADI to implement # Processor_name. Save these defines in a special place. SAVEDEFS="$DEFS" DEFS="" ! AC_HAVE_FUNCS(gethostname sysinfo uname) ! # ! # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing ! # indeed - stuff like this is why Windows95/NT WILL WIN). ! AC_CHECK_FUNC(getdomainname,has_getdomainname=1,has_getdomainname=0) ! if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then ! PAC_PROGRAM_CHECK(has_domainname,domainname,1,0,d_domainname) ! PAC_PROGRAM_CHECK(has_hostname,hostname,1,0,d_hostname) ! PAC_PROGRAM_CHECK(has_rup,rup,1,0,d_rup) ! # Form hostname.domainname, do rup to it ! # rup may not be enabled, but short of running a program to lookup the ! # local host, there does not seem to be a better alternative. # ! if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then changequote(,) ! fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` changequote([,]) ! # echo $fullhost ! fullhost="${fullhost}.`$d_domainname`" ! response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` ! # echo $fullhost ! if test -n "$response" ; then print_error "The getdomainname system routine has been rendered USELESS" print_error "on your system. This is not a bug and will not affect" print_error "MPICH. Some MPE routines (particularly those that" print_error "interact with X Windows) may not work." ! else ! AC_DEFINE(HAVE_GETDOMAINNAME) fi fi fi - # - # systeminfo is needed for sysinfo - PAC_CHECK_HEADERS(sys/systeminfo.h) GETNAME_DEFS="$DEFS" DEFS="$SAVEDEFS" # # Check for message archive routines (to be used for internationalization) --- 1829,1876 ---- # Check for the functions that may be needed by the ADI to implement # Processor_name. Save these defines in a special place. SAVEDEFS="$DEFS" DEFS="" ! AC_FUNC_CHECK(uname,AC_DEFINE(HAVE_UNAME)haveuname=1) ! AC_FUNC_CHECK(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME)havegethostbyname=1) ! dnl AC_HAVE_FUNCS(uname gethostbyname) ! # If we have uname and gethostbyname, we can skip getdomainname ... ! if test "$haveuname" != 1 -o "$havegethostbyname" != 1 ; then ! AC_HAVE_FUNCS(gethostname sysinfo) # ! # systeminfo is needed for sysinfo ! PAC_CHECK_HEADERS(sys/systeminfo.h) ! # ! # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing ! # indeed - stuff like this is why Windows95/NT WILL WIN). ! AC_CHECK_FUNC(getdomainname,has_getdomainname=1,has_getdomainname=0) ! if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then ! PAC_PROGRAM_CHECK(has_domainname,domainname,1,0,d_domainname) ! PAC_PROGRAM_CHECK(has_hostname,hostname,1,0,d_hostname) ! PAC_PROGRAM_CHECK(has_rup,rup,1,0,d_rup) ! # Form hostname.domainname, do rup to it ! # rup may not be enabled, but short of running a program to lookup the ! # local host, there does not seem to be a better alternative. ! # ! if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then changequote(,) ! fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` changequote([,]) ! # echo $fullhost ! fullhost="${fullhost}.`$d_domainname`" ! response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` ! # echo $fullhost ! if test -n "$response" ; then print_error "The getdomainname system routine has been rendered USELESS" print_error "on your system. This is not a bug and will not affect" print_error "MPICH. Some MPE routines (particularly those that" print_error "interact with X Windows) may not work." ! else ! AC_DEFINE(HAVE_GETDOMAINNAME) ! fi fi fi fi GETNAME_DEFS="$DEFS" DEFS="$SAVEDEFS" # # Check for message archive routines (to be used for internationalization) *************** *** 1825,1834 **** # The includes (for nl_types) might be in /usr/xpg2include # This hasn't been handled yet. AC_HAVE_FUNCS(catopen catclose catgets) # Will need to generate binary form of file ! PAC_PROGRAM_CHECK(has_gencat,gencat,1,0,d_gencat) ! if test $has_gencat = 1 ; then AC_DEFINE(HAVE_GENCAT) PAC_CHECK_HEADERS(nl_types.h) NLS_DEFS="$DEFS" # Generate the cataloge --- 1882,1905 ---- # The includes (for nl_types) might be in /usr/xpg2include # This hasn't been handled yet. AC_HAVE_FUNCS(catopen catclose catgets) # Will need to generate binary form of file ! # !!! We have a report that on Cray, gencat is a completely different command ! # (parallel fscks?). We're supposed to use ! # caterr -c cat_file msg_file. Instead, we'll skip it ! if test -n "$device_td3" ; then ! # May try caterr -c cat_file msg_file ! print_error "Configure needs the gencat program to generate message catalogs" ! print_error "Some (all?) Cray T3D systems have a program named gencat" ! print_error "that performs file system checks instead. For this reason," ! print_error "message catalogs will not be created for the T3D device." ! print_error "You may be able to use the caterr command instead." ! print_error "MPICH will work without the message catalogs (though the" ! print_error "ability to generate error messages in languages other than" ! print_error "US English will be lost)." ! else ! PAC_PROGRAM_CHECK(has_gencat,gencat,1,0,d_gencat) ! if test $has_gencat = 1 ; then AC_DEFINE(HAVE_GENCAT) PAC_CHECK_HEADERS(nl_types.h) NLS_DEFS="$DEFS" # Generate the cataloge *************** *** 1855,1862 **** --- 1926,1934 ---- AC_MSG_RESULT("done") else AC_MSG_RESULT("Could not create catalog; US English messages will be used") fi + fi fi DEFS="$SAVEDEFS" # AC_STDC_HEADERS *************** *** 1901,1915 **** # # Nice is used only in env/init.c AC_HAVE_FUNCS(nice) # # Turn off F77 # One problem with this is that some part of the ar will fail. Lets hope # it isn't fatal. We've tried to fix this by defining MPI_FOBJECTS # as the object files created from Fortran. if test $NOF77 = 1 ; then ! F77=true ! FLINKER=true fi # # # Check for erroneous C compilers --- 1973,1990 ---- # # Nice is used only in env/init.c AC_HAVE_FUNCS(nice) # + # Look for headers that might have memset().... + PAC_CHECK_HEADERS(memory.h string.h) + # # Turn off F77 # One problem with this is that some part of the ar will fail. Lets hope # it isn't fatal. We've tried to fix this by defining MPI_FOBJECTS # as the object files created from Fortran. if test $NOF77 = 1 ; then ! F77="echo no Fortran compiler" ! FLINKER="$F77" fi # # # Check for erroneous C compilers *************** *** 1940,1949 **** fi if test $NOF77 = 0 ; then PAC_CHECK_F77_COMPILER_OK(,NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77=true ! FLINKER=true MPI_FOBJECTS="") # # This test will allow us to make MPI_BOTTOM a 0 pointer on # some (many?) systems. Currently here just for testing. --- 2015,2024 ---- fi if test $NOF77 = 0 ; then PAC_CHECK_F77_COMPILER_OK(,NOF77=1;HAS_FORTRAN=0;HAS_F77=0; CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" ! F77="echo no Fortran compiler" ! FLINKER="$F77" MPI_FOBJECTS="") # # This test will allow us to make MPI_BOTTOM a 0 pointer on # some (many?) systems. Currently here just for testing. *************** *** 2122,2129 **** --- 2197,2205 ---- # in Makefiles that should not be MPICH dependent MPICC=$MPIR_HOME/lib/$ARCH/$COMM/mpicc MPIF77=$MPIR_HOME/lib/$ARCH/$COMM/mpif77 MPICPLUSPLUS=$MPIR_HOME/lib/$ARCH/$COMM/mpiCC + LIB_DIR=$MPIR_HOME/lib/$ARCH/$COMM # # # Substitute variables # Variables used in scripts only *************** *** 2162,2170 **** AC_SUBST(BOPT)dnl AC_SUBST(CC)dnl AC_SUBST(CFLAGS)dnl AC_SUBST(CLINKER)dnl - AC_SUBST(CCC)dnl AC_SUBST(CCFLAGS)dnl AC_SUBST(CCLINKER)dnl AC_SUBST(COMM)dnl AC_SUBST(CPP_COMPILER)dnl --- 2238,2245 ---- *************** *** 2188,2195 **** --- 2263,2271 ---- AC_SUBST(ICCLIB)dnl Used by -device=nx AC_SUBST(INCLUDE_PATH)dnl AC_SUBST(LIB_LIST)dnl AC_SUBST(LIB_PATH)dnl + AC_SUBST(LIB_DIR)dnl AC_SUBST(MAKE)dnl AC_SUBST(MPEGRAPHICS_FOBJS)dnl AC_SUBST(MPEGRAPHICS_FSOURCE)dnl AC_SUBST(MPEGRAPHICS_OBJS)dnl *************** *** 2229,2237 **** AC_SUBST(F77IARGC)dnl AC_SUBST(F77GETARG)dnl AC_SUBST(F90UNIX)dnl # End configuration file ! AC_OUTPUT(Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile ) PAC_OUTPUT_EXEC(examples/test/pt2pt/runtests examples/test/coll/runtests examples/test/topol/runtests examples/test/context/runtests examples/test/env/runtests examples/test/profile/runtests util/mpicc util/mpiCC util/mpif77 util/mpiinstall,a+x ) PAC_OUTPUT_EXEC(src/env/farg.f) # # Configure JUST the correct device file --- 2305,2313 ---- AC_SUBST(F77IARGC)dnl AC_SUBST(F77GETARG)dnl AC_SUBST(F90UNIX)dnl # End configuration file ! AC_OUTPUT(Makefile util/Makefile examples/Makefile examples/test/Makefile examples/test/pt2pt/Makefile examples/test/coll/Makefile examples/test/topol/Makefile examples/test/context/Makefile examples/test/env/Makefile examples/test/profile/Makefile examples/test/lederman/Makefile examples/contrib/Makefile examples/contrib/usingmpi/Makefile examples/contrib/life/Makefile examples/contrib/nuclei/Makefile examples/contrib/C++/Makefile examples/contrib/mandel-pvm/Makefile examples/perftest/Makefile src/pt2pt/Makefile src/coll/Makefile src/context/Makefile src/dmpi/Makefile src/env/Makefile src/topol/Makefile src/profile/Makefile src/util/Makefile src/c++/Makefile mpe/Makefile mpe/Makefile_nompi examples/basic/Makefile profiling/examples/Makefile profiling/lib/Makefile mpe/contrib/mandel/Makefile mpe/contrib/mastermind/Makefile mpe/contrib/life/Makefile mpe/test/Makefile ) PAC_OUTPUT_EXEC(examples/test/pt2pt/runtests examples/test/coll/runtests examples/test/topol/runtests examples/test/context/runtests examples/test/env/runtests examples/test/profile/runtests util/mpicc util/mpiCC util/mpif77 util/mpiinstall,a+x ) PAC_OUTPUT_EXEC(src/env/farg.f) # # Configure JUST the correct device file *************** *** 2249,2257 **** CONFIG_FILES="" # # The programs that run on the front end need a different compiler if test $cross_compiling != 1 ; then ! CONFIG_FILES="profiling/wrappergen/Makefile profiling/nupshot/Makefile" export CONFIG_FILES ./config.status CONFIG_FILES="" else --- 2325,2335 ---- CONFIG_FILES="" # # The programs that run on the front end need a different compiler if test $cross_compiling != 1 ; then ! CONFIG_FILES="profiling/wrappergen/Makefile" ! # nupshot is handled with its own configure file ! # "profiling/nupshot/Makefile" export CONFIG_FILES ./config.status CONFIG_FILES="" else Binary files /home/MPI/mpich/current/mpich/doc/guide.ps.Z and mpich/doc/guide.ps.Z differ Binary files /home/MPI/mpich/current/mpich/doc/install.ps.Z and mpich/doc/install.ps.Z differ diff -rc4 /home/MPI/mpich/current/mpich/examples/contrib/usingmpi/matmult.f mpich/examples/contrib/usingmpi/matmult.f *** /home/MPI/mpich/current/mpich/examples/contrib/usingmpi/matmult.f Thu Feb 15 10:13:12 1996 --- mpich/examples/contrib/usingmpi/matmult.f Mon Sep 2 16:21:56 1996 *************** *** 18,26 **** call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) if (numprocs .lt. 2) then print *, "Must have at least 2 processes!" ! call MPI_ABORT( MPI_COMM_WORLD, 1 ) stop endif print *, "Process ", myid, " of ", numprocs, " is alive" --- 18,26 ---- call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) if (numprocs .lt. 2) then print *, "Must have at least 2 processes!" ! call MPI_ABORT( MPI_COMM_WORLD, 1, ierr) stop endif print *, "Process ", myid, " of ", numprocs, " is alive" diff -rc4 /home/MPI/mpich/current/mpich/examples/test/coll/Makefile.in mpich/examples/test/coll/Makefile.in *** /home/MPI/mpich/current/mpich/examples/test/coll/Makefile.in Thu May 23 13:21:04 1996 --- mpich/examples/test/coll/Makefile.in Fri Sep 27 08:02:40 1996 *************** *** 23,31 **** # Use FLIBS to add any special libraries for Fortran programs FLIBS = EXECS = coll1 coll2 coll3 coll4 coll5 coll6 coll7 coll8 coll9 \ coll10 coll11 coll12 coll13 bcastbug bcastbug2 grouptest redtst \ ! barrier bcast allred scatterv allredf redscat alltoallv assocf default: $(EXECS) # --- 23,32 ---- # Use FLIBS to add any special libraries for Fortran programs FLIBS = EXECS = coll1 coll2 coll3 coll4 coll5 coll6 coll7 coll8 coll9 \ coll10 coll11 coll12 coll13 bcastbug bcastbug2 grouptest redtst \ ! barrier bcast allred scatterv allredf redscat alltoallv assocf \ ! allredmany default: $(EXECS) # *************** *** 64,71 **** --- 65,74 ---- coll12: coll12.o test.o $(CLINKER) $(OPTFLAGS) -o coll12 coll12.o test.o $(LIBS) coll13: coll13.o $(CLINKER) $(OPTFLAGS) -o coll13 coll13.o $(LIBS) + allredmany: allredmany.o + $(CLINKER) $(OPTFLAGS) -o allredmany allredmany.o $(LIBS) bcastbug2: bcastbug2.o test.o $(CLINKER) $(OPTFLAGS) -o bcastbug2 bcastbug2.o test.o $(LIBS) bcastbug: bcastbug.o test.o $(CLINKER) $(OPTFLAGS) -o bcastbug bcastbug.o test.o $(LIBS) diff -rc4 /home/MPI/mpich/current/mpich/examples/test/coll/alltoallv.c mpich/examples/test/coll/alltoallv.c *** /home/MPI/mpich/current/mpich/examples/test/coll/alltoallv.c Thu Apr 4 09:00:06 1996 --- mpich/examples/test/coll/alltoallv.c Thu Sep 19 13:13:53 1996 *************** *** 1,6 **** #include "mpi.h" ! #include #include /* This program tests MPI_Alltoallv by having processor i send different --- 1,6 ---- #include "mpi.h" ! #include #include /* This program tests MPI_Alltoallv by having processor i send different diff -rc4 /home/MPI/mpich/current/mpich/examples/test/coll/redscat.c mpich/examples/test/coll/redscat.c *** /home/MPI/mpich/current/mpich/examples/test/coll/redscat.c Mon Jan 8 13:14:40 1996 --- mpich/examples/test/coll/redscat.c Thu Sep 19 13:13:51 1996 *************** *** 8,16 **** */ #include "mpi.h" #include ! #include int main( argc, argv ) int argc; char **argv; --- 8,16 ---- */ #include "mpi.h" #include ! #include int main( argc, argv ) int argc; char **argv; diff -rc4 /home/MPI/mpich/current/mpich/examples/test/coll/runtests mpich/examples/test/coll/runtests *** /home/MPI/mpich/current/mpich/examples/test/coll/runtests Sat Jul 27 08:37:29 1996 --- mpich/examples/test/coll/runtests Thu Oct 17 09:40:46 1996 *************** *** 215,222 **** --- 215,237 ---- $mpirun -np 4 $args coll13 >> coll13.out 2>&1 echo '*** coll13 ***' >> coll13.out CleanExe coll13 + testfiles="$testfiles allredmany.out" + /bin/rm -f allredmany.out + MakeExe allredmany + echo '**** allredmany ****' + echo '*** allredmany ***' >> allredmany.out + cnt=0 + # Run several times to try and catch timing/race conditions in managing + # the flood of one-way messages. + while [ $cnt -lt 20 ] ; do + $mpirun -np 2 $args allredmany >> allredmany.out 2>&1 + cnt=`expr $cnt + 1` + done + echo '*** allredmany ***' >> allredmany.out + CleanExe allredmany + testfiles="$testfiles grouptest.out" /bin/rm -f grouptest.out MakeExe grouptest echo '*** Grouptest ***' diff -rc4 /home/MPI/mpich/current/mpich/examples/test/coll/runtests.in mpich/examples/test/coll/runtests.in *** /home/MPI/mpich/current/mpich/examples/test/coll/runtests.in Mon Jul 1 08:52:01 1996 --- mpich/examples/test/coll/runtests.in Fri Sep 27 08:20:09 1996 *************** *** 215,222 **** --- 215,237 ---- $mpirun -np 4 $args coll13 >> coll13.out 2>&1 echo '*** coll13 ***' >> coll13.out CleanExe coll13 + testfiles="$testfiles allredmany.out" + /bin/rm -f allredmany.out + MakeExe allredmany + echo '**** allredmany ****' + echo '*** allredmany ***' >> allredmany.out + cnt=0 + # Run several times to try and catch timing/race conditions in managing + # the flood of one-way messages. + while [ $cnt -lt 20 ] ; do + $mpirun -np 2 $args allredmany >> allredmany.out 2>&1 + cnt=`expr $cnt + 1` + done + echo '*** allredmany ***' >> allredmany.out + CleanExe allredmany + testfiles="$testfiles grouptest.out" /bin/rm -f grouptest.out MakeExe grouptest echo '*** Grouptest ***' diff -rc4 /home/MPI/mpich/current/mpich/examples/test/context/grouptest.c mpich/examples/test/context/grouptest.c *** /home/MPI/mpich/current/mpich/examples/test/context/grouptest.c Wed Jun 26 13:54:58 1996 --- mpich/examples/test/context/grouptest.c Thu Sep 19 13:44:38 1996 *************** *** 13,159 **** */ #include "mpi.h" #include - #include /* stdlib.h Needed for malloc declaration */ #include int main( argc, argv ) int argc; char **argv; { ! int errs=0, toterr; ! MPI_Group basegroup; ! MPI_Group g1, g2, g3, g4, g5, g6, g7, g8, g9; ! MPI_Comm comm, newcomm, splitcomm, dupcomm; ! int i, grp_rank, rank, grp_size, size, result; ! int nranks, *ranks, *ranks_out; ! int range[1][3]; ! int worldrank; ! MPI_Init( &argc, &argv ); ! MPI_Comm_rank( MPI_COMM_WORLD, &worldrank ); ! comm = MPI_COMM_WORLD; ! MPI_Comm_group( comm, &basegroup ); /* Get the basic information on this group */ ! MPI_Group_rank( basegroup, &grp_rank ); ! MPI_Comm_rank( comm, &rank ); ! if (grp_rank != rank) { ! errs++; ! fprintf( stdout, "group rank %d != comm rank %d\n", grp_rank, rank ); } ! MPI_Group_size( basegroup, &grp_size ); ! MPI_Comm_size( comm, &size ); ! if (grp_size != size) { ! errs++; ! fprintf( stdout, "group size %d != comm size %d\n", grp_size, size ); } /* Form a new communicator with inverted ranking */ ! MPI_Comm_split( comm, 0, size - rank, &newcomm ); ! MPI_Comm_group( newcomm, &g1 ); ! ranks = (int *)malloc( size * sizeof(int) ); ! ranks_out = (int *)malloc( size * sizeof(int) ); ! for (i=0; i /* stdlib.h Needed for malloc declaration */ #include int main( argc, argv ) int argc; char **argv; { ! int errs=0, toterr; ! MPI_Group basegroup; ! MPI_Group g1, g2, g3, g4, g5, g6, g7, g8, g9; ! MPI_Comm comm, newcomm, splitcomm, dupcomm; ! int i, grp_rank, rank, grp_size, size, result; ! int nranks, *ranks, *ranks_out; ! int range[1][3]; ! int worldrank; ! MPI_Init( &argc, &argv ); ! MPI_Comm_rank( MPI_COMM_WORLD, &worldrank ); ! comm = MPI_COMM_WORLD; ! MPI_Comm_group( comm, &basegroup ); /* Get the basic information on this group */ ! MPI_Group_rank( basegroup, &grp_rank ); ! MPI_Comm_rank( comm, &rank ); ! if (grp_rank != rank) { ! errs++; ! fprintf( stdout, "group rank %d != comm rank %d\n", grp_rank, rank ); } ! MPI_Group_size( basegroup, &grp_size ); ! MPI_Comm_size( comm, &size ); ! if (grp_size != size) { ! errs++; ! fprintf( stdout, "group size %d != comm size %d\n", grp_size, size ); } /* Form a new communicator with inverted ranking */ ! MPI_Comm_split( comm, 0, size - rank, &newcomm ); ! MPI_Comm_group( newcomm, &g1 ); ! ranks = (int *)malloc( size * sizeof(int) ); ! ranks_out = (int *)malloc( size * sizeof(int) ); ! for (i=0; i /* stdlib.h needed for malloc declaration */ #include - #include /* * This file tests MPI_Type_hindexed by describing parts of a triangular * matrix, stored in a square matrix, and sending sending it. --- 1,8 ---- diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/irsend.c mpich/examples/test/pt2pt/irsend.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/irsend.c Mon Mar 25 20:34:48 1996 --- mpich/examples/test/pt2pt/irsend.c Thu Sep 19 10:14:47 1996 *************** *** 1,7 **** #include "mpi.h" #include ! #include #include "dtypes.h" /* Nonblocking ready sends --- 1,7 ---- #include "mpi.h" #include ! #include #include "dtypes.h" /* Nonblocking ready sends diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/irsendinit.c mpich/examples/test/pt2pt/irsendinit.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/irsendinit.c Fri Apr 5 10:56:57 1996 --- mpich/examples/test/pt2pt/irsendinit.c Thu Sep 19 10:14:45 1996 *************** *** 1,7 **** #include "mpi.h" #include ! #include #include "dtypes.h" /* Nonblocking ready persistent sends --- 1,7 ---- #include "mpi.h" #include ! #include #include "dtypes.h" /* Nonblocking ready persistent sends diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/isndrcv.c mpich/examples/test/pt2pt/isndrcv.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/isndrcv.c Mon Jul 1 12:45:55 1996 --- mpich/examples/test/pt2pt/isndrcv.c Sun Sep 29 17:33:03 1996 *************** *** 367,375 **** void ReceiverTest3() { int buffer[20]; ! MPI_Datatype bogus_type = NULL; MPI_Request Req; #if 0 MPI_Status Stat; int err_code; --- 367,375 ---- void ReceiverTest3() { int buffer[20]; ! MPI_Datatype bogus_type = MPI_DATATYPE_NULL; MPI_Request Req; #if 0 MPI_Status Stat; int err_code; diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/overtake.c mpich/examples/test/pt2pt/overtake.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/overtake.c Sat Mar 16 17:08:08 1996 --- mpich/examples/test/pt2pt/overtake.c Thu Sep 19 13:35:25 1996 *************** *** 196,204 **** Async_Test_Send(buffer, SIZE); Async_Test_Send(buffer, SIZE); #endif Test_Waitforall( ); - MPI_Finalize(); } else if (rank == dest) { Test_Init("overtake", rank); /* Test 1 */ --- 196,203 ---- *************** *** 260,279 **** Test_Passed(Current_Test); #endif Test_Waitforall( ); - MPI_Finalize(); { int rval = Summarize_Test_Results(); /* Returns number of tests; that failed */ Test_Finalize(); return rval; } } else { fprintf(stderr, "*** This program uses exactly 2 processes! ***\n"); exit(-1); } return 0; } --- 259,279 ---- Test_Passed(Current_Test); #endif Test_Waitforall( ); { int rval = Summarize_Test_Results(); /* Returns number of tests; that failed */ Test_Finalize(); + MPI_Finalize(); return rval; } } else { fprintf(stderr, "*** This program uses exactly 2 processes! ***\n"); exit(-1); } + MPI_Finalize(); return 0; } diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/self.c mpich/examples/test/pt2pt/self.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/self.c Sat Mar 16 17:31:48 1996 --- mpich/examples/test/pt2pt/self.c Mon Sep 30 09:17:04 1996 *************** *** 1,6 **** --- 1,14 ---- #include "mpi.h" #include + #include + + /* + * This needs to test long messages as well as short ones. + * The most likely failure mode for this program is that it will + * hang. Sorry about that.... + * + */ int main( argc, argv ) int argc; char **argv; { *************** *** 9,16 **** --- 17,25 ---- int recvbuf[10]; int recvcount = 10; int source = 0, recvtag = 2; int dest = 0, sendtag = 2; + int i, *longsend, *longrecv; int mpi_errno = MPI_SUCCESS; MPI_Status status_array[2]; MPI_Request req[2]; *************** *** 25,32 **** --- 34,61 ---- fprintf( stdout, "[%d] Starting waitall\n", 0 ); mpi_errno = MPI_Waitall ( 2, req, status_array ); fprintf( stdout, "[%d] Ending waitall\n", 0 ); + + for (i=16; i<257000; i *= 2) { + longsend = (int *)malloc( i * sizeof(int) ); + longrecv = (int *)malloc( i * sizeof(int) ); + if (!longsend || !longrecv) { + } + if ((mpi_errno = MPI_Irecv ( longrecv, i, MPI_INT, source, recvtag, + MPI_COMM_WORLD, &req[1] ))) + return mpi_errno; + if ((mpi_errno = MPI_Isend ( longsend, i, MPI_INT, dest, sendtag, + MPI_COMM_WORLD, &req[0] ))) + return mpi_errno; + + fprintf( stdout, "[%d] Starting waitall (%d)\n", 0, i ); + mpi_errno = MPI_Waitall ( 2, req, status_array ); + fprintf( stdout, "[%d] Ending waitall\n", 0 ); + + free( longsend ); + free( longrecv ); + } MPI_Finalize(); return (mpi_errno); } diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/self.std mpich/examples/test/pt2pt/self.std *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/self.std Fri May 12 10:49:15 1995 --- mpich/examples/test/pt2pt/self.std Mon Sep 30 09:19:32 1996 *************** *** 1,4 **** --- 1,32 ---- *** Testing send to self *** [0] Starting waitall [0] Ending waitall + [0] Starting waitall (16) + [0] Ending waitall + [0] Starting waitall (32) + [0] Ending waitall + [0] Starting waitall (64) + [0] Ending waitall + [0] Starting waitall (128) + [0] Ending waitall + [0] Starting waitall (256) + [0] Ending waitall + [0] Starting waitall (512) + [0] Ending waitall + [0] Starting waitall (1024) + [0] Ending waitall + [0] Starting waitall (2048) + [0] Ending waitall + [0] Starting waitall (4096) + [0] Ending waitall + [0] Starting waitall (8192) + [0] Ending waitall + [0] Starting waitall (16384) + [0] Ending waitall + [0] Starting waitall (32768) + [0] Ending waitall + [0] Starting waitall (65536) + [0] Ending waitall + [0] Starting waitall (131072) + [0] Ending waitall *** Testing send to self *** diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/sendrecv.c mpich/examples/test/pt2pt/sendrecv.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/sendrecv.c Wed Jul 17 11:18:12 1996 --- mpich/examples/test/pt2pt/sendrecv.c Mon Sep 30 10:22:47 1996 *************** *** 23,31 **** static int do_test2 = 1; static int do_test3 = 1; #define MAX_TYPES 12 ! #if defined(__STDC__) static int ntypes = 12; #else static int ntypes = 11; #endif --- 23,31 ---- static int do_test2 = 1; static int do_test3 = 1; #define MAX_TYPES 12 ! #if defined(HAVE_LONG_DOUBLE) static int ntypes = 12; #else static int ntypes = 11; #endif *************** *** 62,71 **** else if (buffertypes[i] == MPI_FLOAT) bufferspace[i] = malloc(bufferlen * sizeof(float)); else if (buffertypes[i] == MPI_DOUBLE) bufferspace[i] = malloc(bufferlen * sizeof(double)); ! #if defined(__STDC__) ! else if (MPI_LONG_DOUBLE && buffertypes[i] == MPI_LONG_DOUBLE) { int dlen; MPI_Type_size( MPI_LONG_DOUBLE, &dlen ); bufferspace[i] = malloc(bufferlen * dlen); } --- 62,71 ---- else if (buffertypes[i] == MPI_FLOAT) bufferspace[i] = malloc(bufferlen * sizeof(float)); else if (buffertypes[i] == MPI_DOUBLE) bufferspace[i] = malloc(bufferlen * sizeof(double)); ! #if defined(HAVE_LONG_DOUBLE) ! else if (buffertypes[i] == MPI_LONG_DOUBLE) { int dlen; MPI_Type_size( MPI_LONG_DOUBLE, &dlen ); bufferspace[i] = malloc(bufferlen * dlen); } *************** *** 114,123 **** else if (buffertypes[i] == MPI_FLOAT) ((float *)bufferspace[i])[j] = (float)j; else if (buffertypes[i] == MPI_DOUBLE) ((double *)bufferspace[i])[j] = (double)j; ! #if defined(__STDC__) ! else if (MPI_LONG_DOUBLE && buffertypes[i] == MPI_LONG_DOUBLE) ((long double *)bufferspace[i])[j] = (long double)j; #endif else if (buffertypes[i] == MPI_BYTE) ((unsigned char *)bufferspace[i])[j] = (unsigned char)j; --- 114,123 ---- else if (buffertypes[i] == MPI_FLOAT) ((float *)bufferspace[i])[j] = (float)j; else if (buffertypes[i] == MPI_DOUBLE) ((double *)bufferspace[i])[j] = (double)j; ! #if defined(HAVE_LONG_DOUBLE) ! else if (buffertypes[i] == MPI_LONG_DOUBLE) ((long double *)bufferspace[i])[j] = (long double)j; #endif else if (buffertypes[i] == MPI_BYTE) ((unsigned char *)bufferspace[i])[j] = (unsigned char)j; *************** *** 180,189 **** } else if (buffertype == MPI_DOUBLE) { if (((double *)bufferspace)[j] != (double)j) { break; } ! #if defined(__STDC__) ! } else if (MPI_LONG_DOUBLE && buffertype == MPI_LONG_DOUBLE) { if (((long double *)bufferspace)[j] != (long double)j) { break; } #endif --- 180,189 ---- } else if (buffertype == MPI_DOUBLE) { if (((double *)bufferspace)[j] != (double)j) { break; } ! #if defined(HAVE_LONG_DOUBLE) ! } else if (buffertype == MPI_LONG_DOUBLE) { if (((long double *)bufferspace)[j] != (long double)j) { break; } #endif *************** *** 206,213 **** --- 206,214 ---- void SetupBasicTypes() { + int l; BasicTypes[0] = MPI_CHAR; BasicNames[0] = "MPI_CHAR" ; BasicTypes[1] = MPI_SHORT; BasicNames[1] = "MPI_SHORT"; BasicTypes[2] = MPI_INT; BasicNames[2] = "MPI_INT" ; BasicTypes[3] = MPI_LONG; BasicNames[3] = "MPI_LONG" ; *************** *** 219,228 **** BasicTypes[9] = MPI_DOUBLE; BasicNames[9] = "MPI_DOUBLE"; BasicTypes[10] = MPI_BYTE; BasicNames[10] = "MPI_BYTE"; /* By making the BYTE type LAST, we make it easier to handle heterogeneous systems that may not support all of the types */ ! #if defined (__STDC__) ! if (MPI_LONG_DOUBLE) { BasicTypes[11] = MPI_LONG_DOUBLE; BasicNames[11] = "MPI_LONG_DOUBLE"; } else { ntypes = 11; --- 220,232 ---- BasicTypes[9] = MPI_DOUBLE; BasicNames[9] = "MPI_DOUBLE"; BasicTypes[10] = MPI_BYTE; BasicNames[10] = "MPI_BYTE"; /* By making the BYTE type LAST, we make it easier to handle heterogeneous systems that may not support all of the types */ ! #if defined (HAVE_LONG_DOUBLE) ! /* This test allows us to use MPI_LONG_DOUBLE, but rely on size > 0 ! for "actually implemented" */ ! MPI_Type_size( MPI_LONG_DOUBLE, &l ); ! if (l > 0) { BasicTypes[11] = MPI_LONG_DOUBLE; BasicNames[11] = "MPI_LONG_DOUBLE"; } else { ntypes = 11; diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/structf.f mpich/examples/test/pt2pt/structf.f *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/structf.f Wed Jan 31 09:54:28 1996 --- mpich/examples/test/pt2pt/structf.f Mon Sep 30 09:37:51 1996 *************** *** 23,32 **** parameter (bufsize=100) character buf(bufsize) character name*(10) integer status(MPI_STATUS_SIZE) ! integer*4 i ! real*8 x C Enroll in MPI call mpi_init(ierr) --- 23,33 ---- parameter (bufsize=100) character buf(bufsize) character name*(10) integer status(MPI_STATUS_SIZE) ! integer i ! double precision x ! integer src, dest C Enroll in MPI call mpi_init(ierr) *************** *** 33,42 **** C get my rank call mpi_comm_rank(MPI_COMM_WORLD, me, ierr) comm = MPI_COMM_WORLD ! if(me.eq.0) then i=5 x=5.1234d0 name="hello" --- 34,45 ---- C get my rank call mpi_comm_rank(MPI_COMM_WORLD, me, ierr) comm = MPI_COMM_WORLD + src = 0 + dest = 1 ! if(me.eq.src) then i=5 x=5.1234d0 name="hello" *************** *** 49,65 **** call mpi_address(x,disp(2),ierr) call mpi_type_struct(2,length,disp,type,newtype,ierr) call mpi_type_commit(newtype,ierr) ! call mpi_send(MPI_BOTTOM,1,newtype,1,1,comm,ierr) call mpi_type_free(newtype,ierr) C write(*,*) "Sent ",name(1:5),x ! else if (me.eq.1) then position=0 name = " " x = 0.0d0 ! call mpi_recv(buf,bufsize,MPI_PACKED, 0, . 1, comm, status, ierr) call mpi_unpack(buf,bufsize,position, . name,5,MPI_CHARACTER, comm,ierr) --- 52,68 ---- call mpi_address(x,disp(2),ierr) call mpi_type_struct(2,length,disp,type,newtype,ierr) call mpi_type_commit(newtype,ierr) ! call mpi_send(MPI_BOTTOM,1,newtype,dest,1,comm,ierr) call mpi_type_free(newtype,ierr) C write(*,*) "Sent ",name(1:5),x ! else if (me.eq.dest) then position=0 name = " " x = 0.0d0 ! call mpi_recv(buf,bufsize,MPI_PACKED, src, . 1, comm, status, ierr) call mpi_unpack(buf,bufsize,position, . name,5,MPI_CHARACTER, comm,ierr) diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/testall.c mpich/examples/test/pt2pt/testall.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/testall.c Mon Mar 25 20:52:42 1996 --- mpich/examples/test/pt2pt/testall.c Thu Sep 19 13:16:51 1996 *************** *** 1,7 **** #include "mpi.h" #include ! #include #include "dtypes.h" /* Multiple completions --- 1,7 ---- #include "mpi.h" #include ! #include #include "dtypes.h" /* Multiple completions *************** *** 80,88 **** if (flag) { err++; fprintf( stderr, "MPI_Testall returned flag == true!\n" ); } ! if (!requests[1]) { err++; fprintf( stderr, "MPI_Testall freed a request\n" ); } MPI_Sendrecv( MPI_BOTTOM, 0, MPI_INT, partner, ncomm+i, --- 80,88 ---- if (flag) { err++; fprintf( stderr, "MPI_Testall returned flag == true!\n" ); } ! if (requests[1] == MPI_REQUEST_NULL) { err++; fprintf( stderr, "MPI_Testall freed a request\n" ); } MPI_Sendrecv( MPI_BOTTOM, 0, MPI_INT, partner, ncomm+i, *************** *** 100,108 **** if (!flag) { err++; fprintf( stderr, "MPI_Testall returned flag == false!\n" ); } ! if (requests[0] || requests[1]) { err++; fprintf( stderr, "MPI_Testall failed to free requests\n" ); } /* Check the received data */ --- 100,109 ---- if (!flag) { err++; fprintf( stderr, "MPI_Testall returned flag == false!\n" ); } ! if (requests[0] != MPI_REQUEST_NULL || ! requests[1] != MPI_REQUEST_NULL) { err++; fprintf( stderr, "MPI_Testall failed to free requests\n" ); } /* Check the received data */ diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/testsome.c mpich/examples/test/pt2pt/testsome.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/testsome.c Mon Mar 18 11:06:44 1996 --- mpich/examples/test/pt2pt/testsome.c Thu Sep 19 09:26:11 1996 *************** *** 1,7 **** #include "mpi.h" #include ! #include #include "dtypes.h" /* Multiple completions --- 1,7 ---- #include "mpi.h" #include ! #include #include "dtypes.h" /* Multiple completions diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/trunc.c mpich/examples/test/pt2pt/trunc.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/trunc.c Tue Jul 16 15:56:35 1996 --- mpich/examples/test/pt2pt/trunc.c Thu Sep 19 09:26:07 1996 *************** *** 4,12 **** */ #include "mpi.h" #include ! #include int main( argc, argv ) int argc; --- 4,12 ---- */ #include "mpi.h" #include ! #include int main( argc, argv ) int argc; diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/typebasef.f mpich/examples/test/pt2pt/typebasef.f *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/typebasef.f Thu Jun 27 08:54:15 1996 --- mpich/examples/test/pt2pt/typebasef.f Thu Sep 26 13:17:42 1996 *************** *** 37,50 **** call mpi_init(ierr) C call SetupBasicTypes( basictypes, basicnames ) C ! errcnt = 0; do 10 i=1,8 ! call MPI_Type_size( BasicTypes(i), size, ierr ); ! call MPI_Type_extent( BasicTypes(i), extent, ierr ); ! call MPI_Type_lb( BasicTypes(i), lb, ierr ); ! call MPI_Type_ub( BasicTypes(i), ub, ierr ); if (size .ne. extent) then errcnt = errcnt + 1 print *, "size (", size, ") != extent (", extent, * ") for basic type ", basicnames(i) --- 37,50 ---- call mpi_init(ierr) C call SetupBasicTypes( basictypes, basicnames ) C ! errcnt = 0 do 10 i=1,8 ! call MPI_Type_size( BasicTypes(i), size, ierr ) ! call MPI_Type_extent( BasicTypes(i), extent, ierr ) ! call MPI_Type_lb( BasicTypes(i), lb, ierr ) ! call MPI_Type_ub( BasicTypes(i), ub, ierr ) if (size .ne. extent) then errcnt = errcnt + 1 print *, "size (", size, ") != extent (", extent, * ") for basic type ", basicnames(i) diff -rc4 /home/MPI/mpich/current/mpich/examples/test/pt2pt/typetest.c mpich/examples/test/pt2pt/typetest.c *** /home/MPI/mpich/current/mpich/examples/test/pt2pt/typetest.c Sat Mar 16 17:12:37 1996 --- mpich/examples/test/pt2pt/typetest.c Thu Sep 19 14:21:38 1996 *************** *** 4,18 **** * Modified by William Gropp */ #include #include "test.h" #include "mpi.h" #include /* CM5 users need to comment out the next include (memory.h) because of an error in the CM5 include file (memory.h is inconsistent with string.h) */ ! #include struct struct1 { double d1; char c1[8]; --- 4,19 ---- * Modified by William Gropp */ #include + #include #include "test.h" #include "mpi.h" #include /* CM5 users need to comment out the next include (memory.h) because of an error in the CM5 include file (memory.h is inconsistent with string.h) */ ! /* #include */ struct struct1 { double d1; char c1[8]; diff -rc4 /home/MPI/mpich/current/mpich/examples/test/topol/Makefile.in mpich/examples/test/topol/Makefile.in *** /home/MPI/mpich/current/mpich/examples/test/topol/Makefile.in Thu May 23 13:25:41 1996 --- mpich/examples/test/topol/Makefile.in Mon Sep 30 14:04:53 1996 *************** *** 72,80 **** /bin/rm -f mpif.h ; \ ln -s $(MPIR_HOME)/include/mpif.h . ; \ fi clean: ! /bin/rm -f *.o *~ core PI* $(EXECS) cartf twod cart1f cart2f topol.diff .c.o: $(CC) $(CFLAGS) -c $*.c .f.o: --- 72,81 ---- /bin/rm -f mpif.h ; \ ln -s $(MPIR_HOME)/include/mpif.h . ; \ fi clean: ! /bin/rm -f *.o *~ core PI* $(EXECS) cartf twod cart1f cart2f \ ! *.out topol.diff .c.o: $(CC) $(CFLAGS) -c $*.c .f.o: diff -rc4 /home/MPI/mpich/current/mpich/examples/test/topol/cartmap.c mpich/examples/test/topol/cartmap.c *** /home/MPI/mpich/current/mpich/examples/test/topol/cartmap.c Wed Jun 26 13:41:51 1996 --- mpich/examples/test/topol/cartmap.c Thu Sep 19 13:56:06 1996 *************** *** 1,7 **** #include "mpi.h" #include - #include /* stdlib.h Needed for malloc declaration */ #include #define NUM_DIMS 2 --- 1,6 ---- diff -rc4 /home/MPI/mpich/current/mpich/examples/test/topol/graphtest.c mpich/examples/test/topol/graphtest.c *** /home/MPI/mpich/current/mpich/examples/test/topol/graphtest.c Mon May 13 11:06:59 1996 --- mpich/examples/test/topol/graphtest.c Thu Sep 19 13:56:09 1996 *************** *** 12,20 **** #include "mpi.h" #include - #include /* stdlib.h Needed for malloc declaration */ #include void NumberEdges(); --- 12,19 ---- diff -rc4 /home/MPI/mpich/current/mpich/include/binding.h mpich/include/binding.h *** /home/MPI/mpich/current/mpich/include/binding.h Fri Feb 23 12:46:46 1996 --- mpich/include/binding.h Thu Sep 19 21:30:23 1996 *************** *** 3,147 **** #include "mpi.h" #if defined(__STDC__) || defined(__cplusplus) ! int MPI_Send(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int MPI_Recv(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Status *status); ! int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count); ! int MPI_Bsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int MPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int MPI_Rsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int MPI_Buffer_attach( void* buffer, int size); ! int MPI_Buffer_detach( void* buffer, int* size); ! int MPI_Isend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm, MPI_Request *request); ! int MPI_Ibsend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Issend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Irsend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Irecv(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Wait(MPI_Request *request, MPI_Status *status); ! int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); ! int MPI_Request_free(MPI_Request *request); int MPI_Waitany(int, MPI_Request *, int *, MPI_Status *); int MPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *); ! int MPI_Waitall(int count, MPI_Request *array_of_requests, ! MPI_Status *array_of_statuses); ! int MPI_Testall(int count, MPI_Request *array_of_requests, int *flag, ! MPI_Status *array_of_statuses); ! int MPI_Waitsome(int incount, MPI_Request *array_of_requests, int *outcount, ! int *array_of_indices, MPI_Status *array_of_statuses); ! int MPI_Testsome(int incount, MPI_Request *array_of_requests, int *outcount, ! int *array_of_indices, MPI_Status *array_of_statuses); ! int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, ! MPI_Status *status); ! int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); ! int MPI_Cancel(MPI_Request *request); ! int MPI_Test_cancelled(MPI_Status *status, int *flag); ! int MPI_Send_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Bsend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Ssend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Rsend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Recv_init(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Request *request); ! int MPI_Start(MPI_Request *request); ! int MPI_Startall(int count, MPI_Request *array_of_requests); ! int MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, ! int dest, int sendtag, void *recvbuf, int recvcount, ! MPI_Datatype recvtype, int source, int recvtag, ! MPI_Comm comm, MPI_Status *status); ! int MPI_Sendrecv_replace(void* buf, int count, MPI_Datatype datatype, ! int dest, int sendtag, int source, int recvtag, ! MPI_Comm comm, MPI_Status *status); ! int MPI_Type_contiguous(int count, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int MPI_Type_vector(int count, int blocklength, int stride, ! MPI_Datatype oldtype, MPI_Datatype *newtype); ! int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, ! MPI_Datatype oldtype, MPI_Datatype *newtype); ! int MPI_Type_indexed(int count, int *array_of_blocklengths, ! int *array_of_displacements, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int MPI_Type_hindexed(int count, int *array_of_blocklengths, ! MPI_Aint *array_of_displacements, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int MPI_Type_struct(int count, int *array_of_blocklengths, ! MPI_Aint *array_of_displacements, ! MPI_Datatype *array_of_types, MPI_Datatype *newtype); ! int MPI_Address(void* location, MPI_Aint *address); ! int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); /* See the 1.1 version of the Standard; I think that the standard is in error; however, it is the standard */ ! /* int MPI_Type_size(MPI_Datatype datatype, MPI_Aint *size); */ ! int MPI_Type_size(MPI_Datatype datatype, int *size); ! int MPI_Type_count(MPI_Datatype datatype, int *count); ! int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint* displacement); ! int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint* displacement); ! int MPI_Type_commit(MPI_Datatype *datatype); ! int MPI_Type_free(MPI_Datatype *datatype); ! int MPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count); ! int MPI_Pack(void* inbuf, int incount, MPI_Datatype datatype, void *outbuf, ! int outsize, int *position, MPI_Comm comm); int MPI_Unpack(void* inbuf, int insize, int *position, void *outbuf, ! int outcount, MPI_Datatype datatype, MPI_Comm comm); ! int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, ! int *size); ! int MPI_Barrier(MPI_Comm comm ); ! int MPI_Bcast(void* buffer, int count, MPI_Datatype datatype, int root, ! MPI_Comm comm ); ! int MPI_Gather(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! int root, MPI_Comm comm); ! int MPI_Gatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int *recvcounts, int *displs, ! MPI_Datatype recvtype, int root, MPI_Comm comm); ! int MPI_Scatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! int root, MPI_Comm comm); ! int MPI_Scatterv(void* sendbuf, int *sendcounts, int *displs, ! MPI_Datatype sendtype, void* recvbuf, int recvcount, ! MPI_Datatype recvtype, int root, MPI_Comm comm); ! int MPI_Allgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! MPI_Comm comm); ! int MPI_Allgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int *recvcounts, int *displs, ! MPI_Datatype recvtype, MPI_Comm comm); ! int MPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! MPI_Comm comm); ! int MPI_Alltoallv(void* sendbuf, int *sendcounts, int *sdispls, ! MPI_Datatype sendtype, void* recvbuf, int *recvcounts, ! int *rdispls, MPI_Datatype recvtype, MPI_Comm comm); ! int MPI_Reduce(void* sendbuf, void* recvbuf, int count, ! MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm); int MPI_Op_create(MPI_User_function *, int, MPI_Op *); int MPI_Op_free( MPI_Op *); ! int MPI_Allreduce(void* sendbuf, void* recvbuf, int count, ! MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); ! int MPI_Reduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts, ! MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); ! int MPI_Scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, ! MPI_Op op, MPI_Comm comm ); ! int MPI_Group_size(MPI_Group group, int *size); int MPI_Group_rank(MPI_Group group, int *rank); int MPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2); int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); ! int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_difference(MPI_Group group1, MPI_Group group2, --- 3,115 ---- #include "mpi.h" #if defined(__STDC__) || defined(__cplusplus) ! int MPI_Send(void*, int, MPI_Datatype, int, int, MPI_Comm); ! int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *); ! int MPI_Get_count(MPI_Status *, MPI_Datatype, int *); ! int MPI_Bsend(void*, int, MPI_Datatype, int, int, MPI_Comm); ! int MPI_Ssend(void*, int, MPI_Datatype, int, int, MPI_Comm); ! int MPI_Rsend(void*, int, MPI_Datatype, int, int, MPI_Comm); ! int MPI_Buffer_attach( void*, int); ! int MPI_Buffer_detach( void*, int*); ! int MPI_Isend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Ibsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Issend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Irsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Wait(MPI_Request *, MPI_Status *); ! int MPI_Test(MPI_Request *, int *, MPI_Status *); ! int MPI_Request_free(MPI_Request *); int MPI_Waitany(int, MPI_Request *, int *, MPI_Status *); int MPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *); ! int MPI_Waitall(int, MPI_Request *, MPI_Status *); ! int MPI_Testall(int, MPI_Request *, int *, MPI_Status *); ! int MPI_Waitsome(int, MPI_Request *, int *, int *, MPI_Status *); ! int MPI_Testsome(int, MPI_Request *, int *, int *, MPI_Status *); ! int MPI_Iprobe(int, int, MPI_Comm, int *flag, MPI_Status *); ! int MPI_Probe(int, int, MPI_Comm, MPI_Status *); ! int MPI_Cancel(MPI_Request *); ! int MPI_Test_cancelled(MPI_Status *, int *flag); ! int MPI_Send_init(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request *); ! int MPI_Bsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *); ! int MPI_Ssend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *); ! int MPI_Rsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *); ! int MPI_Recv_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request *); ! int MPI_Start(MPI_Request *); ! int MPI_Startall(int, MPI_Request *); ! int MPI_Sendrecv(void *, int, MPI_Datatype,int, int, void *, int, ! MPI_Datatype, int, int, MPI_Comm, MPI_Status *); ! int MPI_Sendrecv_replace(void*, int, MPI_Datatype, ! int, int, int, int, MPI_Comm, MPI_Status *); ! int MPI_Type_contiguous(int, MPI_Datatype, MPI_Datatype *); ! int MPI_Type_vector(int, int, int, MPI_Datatype, MPI_Datatype *); ! int MPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype *); ! int MPI_Type_indexed(int, int *, int *, MPI_Datatype, MPI_Datatype *); ! int MPI_Type_hindexed(int, int *, MPI_Aint *, MPI_Datatype, MPI_Datatype *); ! int MPI_Type_struct(int, int *, MPI_Aint *, MPI_Datatype *, MPI_Datatype *); ! int MPI_Address(void*, MPI_Aint *); ! int MPI_Type_extent(MPI_Datatype, MPI_Aint *); /* See the 1.1 version of the Standard; I think that the standard is in error; however, it is the standard */ ! /* int MPI_Type_size(MPI_Datatype, MPI_Aint *size); */ ! int MPI_Type_size(MPI_Datatype, int *); ! int MPI_Type_count(MPI_Datatype, int *); ! int MPI_Type_lb(MPI_Datatype, MPI_Aint*); ! int MPI_Type_ub(MPI_Datatype, MPI_Aint*); ! int MPI_Type_commit(MPI_Datatype *); ! int MPI_Type_free(MPI_Datatype *); ! int MPI_Get_elements(MPI_Status *, MPI_Datatype, int *); ! int MPI_Pack(void* inbuf, int, MPI_Datatype, void *outbuf, ! int outsize, int *position, MPI_Comm); int MPI_Unpack(void* inbuf, int insize, int *position, void *outbuf, ! int , MPI_Datatype, MPI_Comm); ! int MPI_Pack_size(int, MPI_Datatype, MPI_Comm, ! int *); ! int MPI_Barrier(MPI_Comm ); ! int MPI_Bcast(void*fer, int, MPI_Datatype, int root, ! MPI_Comm ); ! int MPI_Gather(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! int root, MPI_Comm); ! int MPI_Gatherv(void* , int, MPI_Datatype, ! void*, int *recvcounts, int *displs, ! MPI_Datatype, int root, MPI_Comm); ! int MPI_Scatter(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! int root, MPI_Comm); ! int MPI_Scatterv(void* , int *sendcounts, int *displs, ! MPI_Datatype, void*, int, ! MPI_Datatype, int root, MPI_Comm); ! int MPI_Allgather(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! MPI_Comm); ! int MPI_Allgatherv(void* , int, MPI_Datatype, ! void*, int *recvcounts, int *displs, ! MPI_Datatype, MPI_Comm); ! int MPI_Alltoall(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! MPI_Comm); ! int MPI_Alltoallv(void* , int *sendcounts, int *sdispls, ! MPI_Datatype, void*, int *recvcounts, ! int *rdispls, MPI_Datatype, MPI_Comm); ! int MPI_Reduce(void* , void*, int, ! MPI_Datatype, MPI_Op op, int root, MPI_Comm); int MPI_Op_create(MPI_User_function *, int, MPI_Op *); int MPI_Op_free( MPI_Op *); ! int MPI_Allreduce(void* , void*, int, ! MPI_Datatype, MPI_Op op, MPI_Comm); ! int MPI_Reduce_scatter(void* , void*, int *recvcounts, ! MPI_Datatype, MPI_Op op, MPI_Comm); ! int MPI_Scan(void* , void*, int, MPI_Datatype, ! MPI_Op op, MPI_Comm ); ! int MPI_Group_size(MPI_Group group, int *); int MPI_Group_rank(MPI_Group group, int *rank); int MPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2); int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); ! int MPI_Comm_group(MPI_Comm, MPI_Group *); int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_difference(MPI_Group group1, MPI_Group group2, *************** *** 151,206 **** int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); ! int MPI_Group_free(MPI_Group *group); ! int MPI_Comm_size(MPI_Comm comm, int *size); ! int MPI_Comm_rank(MPI_Comm comm, int *rank); ! int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); ! int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); ! int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); ! int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int MPI_Comm_free(MPI_Comm *comm); ! int MPI_Comm_test_inter(MPI_Comm comm, int *flag); ! int MPI_Comm_remote_size(MPI_Comm comm, int *size); ! int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, ! int tag, MPI_Comm *newintercomm); int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void* extra_state); int MPI_Keyval_free(int *keyval); ! int MPI_Attr_put(MPI_Comm comm, int keyval, void* attribute_val); ! int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); ! int MPI_Attr_delete(MPI_Comm comm, int keyval); ! int MPI_Topo_test(MPI_Comm comm, int *status); int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart); int MPI_Dims_create(int nnodes, int ndims, int *dims); int MPI_Graph_create(MPI_Comm, int, int *, int *, int, MPI_Comm *); ! int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int MPI_Graph_get(MPI_Comm, int, int, int *, int *); ! int MPI_Cartdim_get(MPI_Comm comm, int *ndims); ! int MPI_Cart_get(MPI_Comm comm, int maxdims, int *dims, int *periods, int *coords); ! int MPI_Cart_rank(MPI_Comm comm, int *coords, int *rank); ! int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int *coords); ! int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); ! int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int *neighbors); ! int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); ! int MPI_Cart_sub(MPI_Comm comm, int *remain_dims, MPI_Comm *newcomm); ! int MPI_Cart_map(MPI_Comm comm, int ndims, int *dims, int *periods, int *newrank); int MPI_Graph_map(MPI_Comm, int, int *, int *, int *); int MPI_Get_processor_name(char *name, int *result_len); int MPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); ! int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); ! int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int MPI_Errhandler_free(MPI_Errhandler *errhandler); int MPI_Error_string(int errorcode, char *string, int *result_len); int MPI_Error_class(int errorcode, int *errorclass); double MPI_Wtime(void); --- 119,174 ---- int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); ! int MPI_Group_free(MPI_Group *); ! int MPI_Comm_size(MPI_Comm, int *); ! int MPI_Comm_rank(MPI_Comm, int *rank); ! int MPI_Comm_compare(MPI_Comm, MPI_Comm, int *result); ! int MPI_Comm_dup(MPI_Comm, MPI_Comm *newcomm); ! int MPI_Comm_create(MPI_Comm, MPI_Group group, MPI_Comm *newcomm); ! int MPI_Comm_split(MPI_Comm, int color, int key, MPI_Comm *newcomm); int MPI_Comm_free(MPI_Comm *comm); ! int MPI_Comm_test_inter(MPI_Comm, int *flag); ! int MPI_Comm_remote_size(MPI_Comm, int *); ! int MPI_Comm_remote_group(MPI_Comm, MPI_Group *); int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, ! int, MPI_Comm *newintercomm); int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void* extra_state); int MPI_Keyval_free(int *keyval); ! int MPI_Attr_put(MPI_Comm, int keyval, void* attribute_val); ! int MPI_Attr_get(MPI_Comm, int keyval, void *attribute_val, int *flag); ! int MPI_Attr_delete(MPI_Comm, int keyval); ! int MPI_Topo_test(MPI_Comm, int *); int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart); int MPI_Dims_create(int nnodes, int ndims, int *dims); int MPI_Graph_create(MPI_Comm, int, int *, int *, int, MPI_Comm *); ! int MPI_Graphdims_get(MPI_Comm, int *nnodes, int *nedges); int MPI_Graph_get(MPI_Comm, int, int, int *, int *); ! int MPI_Cartdim_get(MPI_Comm, int *ndims); ! int MPI_Cart_get(MPI_Comm, int maxdims, int *dims, int *periods, int *coords); ! int MPI_Cart_rank(MPI_Comm, int *coords, int *rank); ! int MPI_Cart_coords(MPI_Comm, int rank, int maxdims, int *coords); ! int MPI_Graph_neighbors_count(MPI_Comm, int rank, int *nneighbors); ! int MPI_Graph_neighbors(MPI_Comm, int rank, int maxneighbors, int *neighbors); ! int MPI_Cart_shift(MPI_Comm, int direction, int disp, int *rank_source, int *rank_dest); ! int MPI_Cart_sub(MPI_Comm, int *remain_dims, MPI_Comm *newcomm); ! int MPI_Cart_map(MPI_Comm, int ndims, int *dims, int *periods, int *newrank); int MPI_Graph_map(MPI_Comm, int, int *, int *, int *); int MPI_Get_processor_name(char *name, int *result_len); int MPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); ! int MPI_Errhandler_set(MPI_Comm, MPI_Errhandler errhandler); ! int MPI_Errhandler_get(MPI_Comm, MPI_Errhandler *errhandler); int MPI_Errhandler_free(MPI_Errhandler *errhandler); int MPI_Error_string(int errorcode, char *string, int *result_len); int MPI_Error_class(int errorcode, int *errorclass); double MPI_Wtime(void); *************** *** 211,367 **** #endif int MPI_Init(int *argc, char ***argv); int MPI_Finalize(void); int MPI_Initialized(int *flag); ! int MPI_Abort(MPI_Comm comm, int errorcode); int MPI_Pcontrol(const int level, ...); int MPI_NULL_COPY_FN ( MPI_Comm oldcomm, int keyval, void *extra_state, void *attr_in, void *attr_out, int *flag ); ! int MPI_NULL_DELETE_FN ( MPI_Comm comm, int keyval, void *attr, void *extra_state ); ! int MPI_DUP_FN ( MPI_Comm comm, int keyval, void *extra_state, void *attr_in, void *attr_out, int *flag ); /* Here are the bindings of the profiling routines */ #if !defined(MPI_BUILD_PROFILING) ! int PMPI_Send(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int PMPI_Recv(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Status *status); ! int PMPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count); ! int PMPI_Bsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); ! int PMPI_Rsend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm); int PMPI_Buffer_attach( void* buffer, int size); int PMPI_Buffer_detach( void* buffer, int* size); ! int PMPI_Isend(void* buf, int count, MPI_Datatype datatype, int dest, int tag, ! MPI_Comm comm, MPI_Request *request); ! int PMPI_Ibsend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Issend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Irsend(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Irecv(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Wait(MPI_Request *request, MPI_Status *status); ! int PMPI_Test(MPI_Request *request, int *flag, MPI_Status *status); ! int PMPI_Request_free(MPI_Request *request); int PMPI_Waitany(int, MPI_Request *, int *, MPI_Status *); int PMPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *); ! int PMPI_Waitall(int count, MPI_Request *array_of_requests, ! MPI_Status *array_of_statuses); ! int PMPI_Testall(int count, MPI_Request *array_of_requests, int *flag, ! MPI_Status *array_of_statuses); ! int PMPI_Waitsome(int incount, MPI_Request *array_of_requests, int *outcount, ! int *array_of_indices, MPI_Status *array_of_statuses); ! int PMPI_Testsome(int incount, MPI_Request *array_of_requests, int *outcount, ! int *array_of_indices, MPI_Status *array_of_statuses); ! int PMPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, ! MPI_Status *status); ! int PMPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); ! int PMPI_Cancel(MPI_Request *request); ! int PMPI_Test_cancelled(MPI_Status *status, int *flag); ! int PMPI_Send_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Bsend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Ssend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Rsend_init(void* buf, int count, MPI_Datatype datatype, int dest, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Recv_init(void* buf, int count, MPI_Datatype datatype, int source, ! int tag, MPI_Comm comm, MPI_Request *request); ! int PMPI_Start(MPI_Request *request); ! int PMPI_Startall(int count, MPI_Request *array_of_requests); ! int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, ! int dest, int sendtag, void *recvbuf, int recvcount, ! MPI_Datatype recvtype, int source, int recvtag, ! MPI_Comm comm, MPI_Status *status); ! int PMPI_Sendrecv_replace(void* buf, int count, MPI_Datatype datatype, ! int dest, int sendtag, int source, int recvtag, ! MPI_Comm comm, MPI_Status *status); ! int PMPI_Type_contiguous(int count, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int PMPI_Type_vector(int count, int blocklength, int stride, ! MPI_Datatype oldtype, MPI_Datatype *newtype); ! int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride, ! MPI_Datatype oldtype, MPI_Datatype *newtype); ! int PMPI_Type_indexed(int count, int *array_of_blocklengths, ! int *array_of_displacements, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int PMPI_Type_hindexed(int count, int *array_of_blocklengths, ! MPI_Aint *array_of_displacements, MPI_Datatype oldtype, ! MPI_Datatype *newtype); ! int PMPI_Type_struct(int count, int *array_of_blocklengths, ! MPI_Aint *array_of_displacements, ! MPI_Datatype *array_of_types, MPI_Datatype *newtype); ! int PMPI_Address(void* location, MPI_Aint *address); ! int PMPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); /* See the 1.1 version of the Standard; I think that the standard is in error; however, it is the standard */ ! /* int PMPI_Type_size(MPI_Datatype datatype, MPI_Aint *size); */ ! int PMPI_Type_size(MPI_Datatype datatype, int *size); ! int PMPI_Type_count(MPI_Datatype datatype, int *count); ! int PMPI_Type_lb(MPI_Datatype datatype, MPI_Aint* displacement); ! int PMPI_Type_ub(MPI_Datatype datatype, MPI_Aint* displacement); ! int PMPI_Type_commit(MPI_Datatype *datatype); ! int PMPI_Type_free(MPI_Datatype *datatype); ! int PMPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count); ! int PMPI_Pack(void* inbuf, int incount, MPI_Datatype datatype, void *outbuf, ! int outsize, int *position, MPI_Comm comm); ! int PMPI_Unpack(void* inbuf, int insize, int *position, void *outbuf, ! int outcount, MPI_Datatype datatype, MPI_Comm comm); ! int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, ! int *size); ! int PMPI_Barrier(MPI_Comm comm ); ! int PMPI_Bcast(void* buffer, int count, MPI_Datatype datatype, int root, ! MPI_Comm comm ); ! int PMPI_Gather(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! int root, MPI_Comm comm); ! int PMPI_Gatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int *recvcounts, int *displs, ! MPI_Datatype recvtype, int root, MPI_Comm comm); ! int PMPI_Scatter(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! int root, MPI_Comm comm); ! int PMPI_Scatterv(void* sendbuf, int *sendcounts, int *displs, ! MPI_Datatype sendtype, void* recvbuf, int recvcount, ! MPI_Datatype recvtype, int root, MPI_Comm comm); ! int PMPI_Allgather(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! MPI_Comm comm); ! int PMPI_Allgatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int *recvcounts, int *displs, ! MPI_Datatype recvtype, MPI_Comm comm); ! int PMPI_Alltoall(void* sendbuf, int sendcount, MPI_Datatype sendtype, ! void* recvbuf, int recvcount, MPI_Datatype recvtype, ! MPI_Comm comm); ! int PMPI_Alltoallv(void* sendbuf, int *sendcounts, int *sdispls, ! MPI_Datatype sendtype, void* recvbuf, int *recvcounts, ! int *rdispls, MPI_Datatype recvtype, MPI_Comm comm); ! int PMPI_Reduce(void* sendbuf, void* recvbuf, int count, ! MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm); int PMPI_Op_create(MPI_User_function *, int, MPI_Op *); int PMPI_Op_free( MPI_Op *); ! int PMPI_Allreduce(void* sendbuf, void* recvbuf, int count, ! MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); ! int PMPI_Reduce_scatter(void* sendbuf, void* recvbuf, int *recvcounts, ! MPI_Datatype datatype, MPI_Op op, MPI_Comm comm); ! int PMPI_Scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, ! MPI_Op op, MPI_Comm comm ); ! int PMPI_Group_size(MPI_Group group, int *size); int PMPI_Group_rank(MPI_Group group, int *rank); int PMPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2); int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); ! int PMPI_Comm_group(MPI_Comm comm, MPI_Group *group); int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_difference(MPI_Group group1, MPI_Group group2, --- 179,335 ---- #endif int MPI_Init(int *argc, char ***argv); int MPI_Finalize(void); int MPI_Initialized(int *flag); ! int MPI_Abort(MPI_Comm, int errorcode); int MPI_Pcontrol(const int level, ...); int MPI_NULL_COPY_FN ( MPI_Comm oldcomm, int keyval, void *extra_state, void *attr_in, void *attr_out, int *flag ); ! int MPI_NULL_DELETE_FN ( MPI_Comm, int keyval, void *attr, void *extra_state ); ! int MPI_DUP_FN ( MPI_Comm, int keyval, void *extra_state, void *attr_in, void *attr_out, int *flag ); /* Here are the bindings of the profiling routines */ #if !defined(MPI_BUILD_PROFILING) ! int PMPI_Send(void*, int, MPI_Datatype, int, int, ! MPI_Comm); ! int PMPI_Recv(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Status *); ! int PMPI_Get_count(MPI_Status *, MPI_Datatype, int *); ! int PMPI_Bsend(void*, int, MPI_Datatype, int, int, ! MPI_Comm); ! int PMPI_Ssend(void*, int, MPI_Datatype, int, int, ! MPI_Comm); ! int PMPI_Rsend(void*, int, MPI_Datatype, int, int, ! MPI_Comm); int PMPI_Buffer_attach( void* buffer, int size); int PMPI_Buffer_detach( void* buffer, int* size); ! int PMPI_Isend(void*, int, MPI_Datatype, int, int, ! MPI_Comm, MPI_Request *); ! int PMPI_Ibsend(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Issend(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Irsend(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Irecv(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Wait(MPI_Request *, MPI_Status *); ! int PMPI_Test(MPI_Request *, int *flag, MPI_Status *); ! int PMPI_Request_free(MPI_Request *); int PMPI_Waitany(int, MPI_Request *, int *, MPI_Status *); int PMPI_Testany(int, MPI_Request *, int *, int *, MPI_Status *); ! int PMPI_Waitall(int, MPI_Request *, ! MPI_Status *); ! int PMPI_Testall(int, MPI_Request *, int *flag, ! MPI_Status *); ! int PMPI_Waitsome(int, MPI_Request *, int *, ! int *, MPI_Status *); ! int PMPI_Testsome(int, MPI_Request *, int *, ! int *, MPI_Status *); ! int PMPI_Iprobe(int, int, MPI_Comm, int *flag, ! MPI_Status *); ! int PMPI_Probe(int, int, MPI_Comm, MPI_Status *); ! int PMPI_Cancel(MPI_Request *); ! int PMPI_Test_cancelled(MPI_Status *, int *flag); ! int PMPI_Send_init(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Bsend_init(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Ssend_init(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Rsend_init(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Recv_init(void*, int, MPI_Datatype, int, ! int, MPI_Comm, MPI_Request *); ! int PMPI_Start(MPI_Request *); ! int PMPI_Startall(int, MPI_Request *); ! int PMPI_Sendrecv(void *, int, MPI_Datatype, ! int, int, void *, int, ! MPI_Datatype, int, int, ! MPI_Comm, MPI_Status *); ! int PMPI_Sendrecv_replace(void*, int, MPI_Datatype, ! int, int, int, int, ! MPI_Comm, MPI_Status *); ! int PMPI_Type_contiguous(int, MPI_Datatype, ! MPI_Datatype *); ! int PMPI_Type_vector(int, int, int, ! MPI_Datatype, MPI_Datatype *); ! int PMPI_Type_hvector(int, int, MPI_Aint, ! MPI_Datatype, MPI_Datatype *); ! int PMPI_Type_indexed(int, int *, ! int *, MPI_Datatype, ! MPI_Datatype *); ! int PMPI_Type_hindexed(int, int *, ! MPI_Aint *, MPI_Datatype, ! MPI_Datatype *); ! int PMPI_Type_struct(int, int *, ! MPI_Aint *, ! MPI_Datatype *, MPI_Datatype *); ! int PMPI_Address(void*, MPI_Aint *); ! int PMPI_Type_extent(MPI_Datatype, MPI_Aint *); /* See the 1.1 version of the Standard; I think that the standard is in error; however, it is the standard */ ! /* int PMPI_Type_size(MPI_Datatype, MPI_Aint *); */ ! int PMPI_Type_size(MPI_Datatype, int *); ! int PMPI_Type_count(MPI_Datatype, int *); ! int PMPI_Type_lb(MPI_Datatype, MPI_Aint*); ! int PMPI_Type_ub(MPI_Datatype, MPI_Aint*); ! int PMPI_Type_commit(MPI_Datatype *); ! int PMPI_Type_free(MPI_Datatype *); ! int PMPI_Get_elements(MPI_Status *, MPI_Datatype, int *); ! int PMPI_Pack(void* inbuf, int, MPI_Datatype, void *outbuf, ! int outsize, int *position, MPI_Comm); ! int PMPI_Unpack(void*, int, int *, void *, ! int, MPI_Datatype, MPI_Comm); ! int PMPI_Pack_size(int, MPI_Datatype, MPI_Comm, ! int *); ! int PMPI_Barrier(MPI_Comm ); ! int PMPI_Bcast(void* buffer, int, MPI_Datatype, int root, ! MPI_Comm ); ! int PMPI_Gather(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! int root, MPI_Comm); ! int PMPI_Gatherv(void* , int, MPI_Datatype, ! void*, int *recvcounts, int *displs, ! MPI_Datatype, int root, MPI_Comm); ! int PMPI_Scatter(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! int root, MPI_Comm); ! int PMPI_Scatterv(void* , int *sendcounts, int *displs, ! MPI_Datatype, void*, int, ! MPI_Datatype, int root, MPI_Comm); ! int PMPI_Allgather(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! MPI_Comm); ! int PMPI_Allgatherv(void* , int, MPI_Datatype, ! void*, int *recvcounts, int *displs, ! MPI_Datatype, MPI_Comm); ! int PMPI_Alltoall(void* , int, MPI_Datatype, ! void*, int, MPI_Datatype, ! MPI_Comm); ! int PMPI_Alltoallv(void* , int *sendcounts, int *sdispls, ! MPI_Datatype, void*, int *recvcounts, ! int *rdispls, MPI_Datatype, MPI_Comm); ! int PMPI_Reduce(void* , void*, int, ! MPI_Datatype, MPI_Op op, int root, MPI_Comm); int PMPI_Op_create(MPI_User_function *, int, MPI_Op *); int PMPI_Op_free( MPI_Op *); ! int PMPI_Allreduce(void* , void*, int, ! MPI_Datatype, MPI_Op op, MPI_Comm); ! int PMPI_Reduce_scatter(void* , void*, int *recvcounts, ! MPI_Datatype, MPI_Op op, MPI_Comm); ! int PMPI_Scan(void* , void*, int, MPI_Datatype, ! MPI_Op op, MPI_Comm ); ! int PMPI_Group_size(MPI_Group group, int *); int PMPI_Group_rank(MPI_Group group, int *rank); int PMPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2); int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); ! int PMPI_Comm_group(MPI_Comm, MPI_Group *); int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_difference(MPI_Group group1, MPI_Group group2, *************** *** 371,434 **** int PMPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); ! int PMPI_Group_free(MPI_Group *group); ! int PMPI_Comm_size(MPI_Comm comm, int *size); ! int PMPI_Comm_rank(MPI_Comm comm, int *rank); int PMPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); ! int PMPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); ! int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); ! int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int PMPI_Comm_free(MPI_Comm *comm); ! int PMPI_Comm_test_inter(MPI_Comm comm, int *flag); ! int PMPI_Comm_remote_size(MPI_Comm comm, int *size); ! int PMPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int PMPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, ! int tag, MPI_Comm *newintercomm); int PMPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int PMPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void* extra_state); int PMPI_Keyval_free(int *keyval); ! int PMPI_Attr_put(MPI_Comm comm, int keyval, void* attribute_val); ! int PMPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); ! int PMPI_Attr_delete(MPI_Comm comm, int keyval); ! int PMPI_Topo_test(MPI_Comm comm, int *status); int PMPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart); int PMPI_Dims_create(int nnodes, int ndims, int *dims); int PMPI_Graph_create(MPI_Comm, int, int *, int *, int, MPI_Comm *); ! int PMPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int PMPI_Graph_get(MPI_Comm, int, int, int *, int *); ! int PMPI_Cartdim_get(MPI_Comm comm, int *ndims); ! int PMPI_Cart_get(MPI_Comm comm, int maxdims, int *dims, int *periods, int *coords); ! int PMPI_Cart_rank(MPI_Comm comm, int *coords, int *rank); ! int PMPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int *coords); ! int PMPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); ! int PMPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int *neighbors); ! int PMPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); ! int PMPI_Cart_sub(MPI_Comm comm, int *remain_dims, MPI_Comm *newcomm); ! int PMPI_Cart_map(MPI_Comm comm, int ndims, int *dims, int *periods, int *newrank); int PMPI_Graph_map(MPI_Comm, int, int *, int *, int *); int PMPI_Get_processor_name(char *name, int *result_len); int PMPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); ! int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); ! int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int PMPI_Errhandler_free(MPI_Errhandler *errhandler); int PMPI_Error_string(int errorcode, char *string, int *result_len); int PMPI_Error_class(int errorcode, int *errorclass); /* Wtime done above */ int PMPI_Init(int *argc, char ***argv); int PMPI_Finalize(void); int PMPI_Initialized(int *flag); ! int PMPI_Abort(MPI_Comm comm, int errorcode); int PMPI_Pcontrol(const int level, ...); #endif /* MPI_BUILD_PROFILING */ #else --- 339,402 ---- int PMPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); ! int PMPI_Group_free(MPI_Group *); ! int PMPI_Comm_size(MPI_Comm, int *); ! int PMPI_Comm_rank(MPI_Comm, int *rank); int PMPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); ! int PMPI_Comm_dup(MPI_Comm, MPI_Comm *newcomm); ! int PMPI_Comm_create(MPI_Comm, MPI_Group group, MPI_Comm *newcomm); ! int PMPI_Comm_split(MPI_Comm, int color, int key, MPI_Comm *newcomm); int PMPI_Comm_free(MPI_Comm *comm); ! int PMPI_Comm_test_inter(MPI_Comm, int *flag); ! int PMPI_Comm_remote_size(MPI_Comm, int *); ! int PMPI_Comm_remote_group(MPI_Comm, MPI_Group *); int PMPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, ! int, MPI_Comm *newintercomm); int PMPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int PMPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void* extra_state); int PMPI_Keyval_free(int *keyval); ! int PMPI_Attr_put(MPI_Comm, int keyval, void* attribute_val); ! int PMPI_Attr_get(MPI_Comm, int keyval, void *attribute_val, int *flag); ! int PMPI_Attr_delete(MPI_Comm, int keyval); ! int PMPI_Topo_test(MPI_Comm, int *); int PMPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart); int PMPI_Dims_create(int nnodes, int ndims, int *dims); int PMPI_Graph_create(MPI_Comm, int, int *, int *, int, MPI_Comm *); ! int PMPI_Graphdims_get(MPI_Comm, int *nnodes, int *nedges); int PMPI_Graph_get(MPI_Comm, int, int, int *, int *); ! int PMPI_Cartdim_get(MPI_Comm, int *ndims); ! int PMPI_Cart_get(MPI_Comm, int maxdims, int *dims, int *periods, int *coords); ! int PMPI_Cart_rank(MPI_Comm, int *coords, int *rank); ! int PMPI_Cart_coords(MPI_Comm, int rank, int maxdims, int *coords); ! int PMPI_Graph_neighbors_count(MPI_Comm, int rank, int *nneighbors); ! int PMPI_Graph_neighbors(MPI_Comm, int rank, int maxneighbors, int *neighbors); ! int PMPI_Cart_shift(MPI_Comm, int direction, int disp, int *rank_source, int *rank_dest); ! int PMPI_Cart_sub(MPI_Comm, int *remain_dims, MPI_Comm *newcomm); ! int PMPI_Cart_map(MPI_Comm, int ndims, int *dims, int *periods, int *newrank); int PMPI_Graph_map(MPI_Comm, int, int *, int *, int *); int PMPI_Get_processor_name(char *name, int *result_len); int PMPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); ! int PMPI_Errhandler_set(MPI_Comm, MPI_Errhandler errhandler); ! int PMPI_Errhandler_get(MPI_Comm, MPI_Errhandler *errhandler); int PMPI_Errhandler_free(MPI_Errhandler *errhandler); int PMPI_Error_string(int errorcode, char *string, int *result_len); int PMPI_Error_class(int errorcode, int *errorclass); /* Wtime done above */ int PMPI_Init(int *argc, char ***argv); int PMPI_Finalize(void); int PMPI_Initialized(int *flag); ! int PMPI_Abort(MPI_Comm, int); int PMPI_Pcontrol(const int level, ...); #endif /* MPI_BUILD_PROFILING */ #else diff -rc4 /home/MPI/mpich/current/mpich/include/dmpiatom.h mpich/include/dmpiatom.h *** /home/MPI/mpich/current/mpich/include/dmpiatom.h Fri Jul 5 10:36:33 1996 --- mpich/include/dmpiatom.h Mon Oct 14 15:30:15 1996 *************** *** 1,6 **** /* ! * $Id: dmpiatom.h,v 1.44 1996/07/05 15:36:32 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: dmpiatom.h,v 1.44 1996/07/05 15:36:32 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 183,191 **** --- 183,195 ---- MPIR_HBT attr_cache; /* Hook for attribute cache */ int use_return_handler; /* Allows us to override error_handler when the MPI implementation calls MPI routines */ + #ifdef NEW_POINTERS + MPI_Errhandler error_handler; /* Error handler structure */ + #else struct MPIR_Errhandler *error_handler; /* Error handler structure */ + #endif int permanent; /* Is this a permanent object? */ void *mutex; /* Local for threaded versions */ /*** BEGIN HETEROGENEOUS ONLY ***/ *************** *** 238,245 **** --- 242,250 ---- MPIR_NO = 0, MPIR_YES } MPIR_BOOL; #endif + #ifdef FOO /* MPIR_FORT_INT is a special integer type for systems where sizeof(int) != sizeof(Fortran REAL). See the Fortran standard for why this is required. *************** *** 254,261 **** --- 259,267 ---- MPIR_HINDEXED, MPIR_STRUCT, MPIR_DOUBLE_COMPLEX, MPIR_PACKED, MPIR_UB, MPIR_LB, MPIR_LONGDOUBLE, MPIR_LONGLONGINT, MPIR_LOGICAL, MPIR_FORT_INT } MPIR_NODETYPE; + #endif /* These are used by some of the datatype routines */ #ifdef FOO #ifndef MPIR_TRUE diff -rc4 /home/MPI/mpich/current/mpich/include/mpi.h mpich/include/mpi.h *** /home/MPI/mpich/current/mpich/include/mpi.h Fri Jul 5 10:36:34 1996 --- mpich/include/mpi.h Thu Sep 26 13:20:03 1996 *************** *** 1,6 **** /* ! * $Id: mpi.h,v 1.51 1996/07/05 15:36:32 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: mpi.h,v 1.51 1996/07/05 15:36:32 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 9,21 **** --- 9,35 ---- #ifndef _MPI_INCLUDE #define _MPI_INCLUDE + /* + NEW_POINTERS enables using ints for the MPI objects instead of addresses. + This is required by MPI 1.1, particularly for Fortran (also for C, + since you can now have "constant" values for things like MPI_INT, and + they are stronger than "constant between MPI_INIT and MPI_FINALIZE". + For example, we might want to allow MPI_INT as a case label. + */ + #define NEW_POINTERS + /* Keep C++ compilers from getting confused */ #if defined(__cplusplus) extern "C" { #endif + #if defined(__STDC__) || defined(__cplusplus) || defined(HAVE_PROTOTYPES) + #define MPIR_ARGS(a) a + #else + #define MPIR_ARGS(a) () + #endif /* Results of the compare operations */ /* These should stay ordered */ #define MPI_IDENT 0 *************** *** 23,30 **** --- 37,86 ---- #define MPI_SIMILAR 2 #define MPI_UNEQUAL 3 /* Data types */ + #ifdef NEW_POINTERS + typedef int MPI_Datatype; + #define MPI_CHAR ((MPI_Datatype)1) + #define MPI_UNSIGNED_CHAR ((MPI_Datatype)2) + #define MPI_BYTE ((MPI_Datatype)3) + #define MPI_SHORT ((MPI_Datatype)4) + #define MPI_UNSIGNED_SHORT ((MPI_Datatype)5) + #define MPI_INT ((MPI_Datatype)6) + #define MPI_UNSIGNED ((MPI_Datatype)7) + #define MPI_LONG ((MPI_Datatype)8) + #define MPI_UNSIGNED_LONG ((MPI_Datatype)9) + #define MPI_FLOAT ((MPI_Datatype)10) + #define MPI_DOUBLE ((MPI_Datatype)11) + #define MPI_LONG_DOUBLE ((MPI_Datatype)12) + #define MPI_LONG_LONG_INT ((MPI_Datatype)13) + + #define MPI_PACKED ((MPI_Datatype)14) + #define MPI_LB ((MPI_Datatype)15) + #define MPI_UB ((MPI_Datatype)16) + + #define MPI_FLOAT_INT ((MPI_Datatype)17) + #define MPI_DOUBLE_INT ((MPI_Datatype)18) + #define MPI_LONG_INT ((MPI_Datatype)19) + #define MPI_SHORT_INT ((MPI_Datatype)20) + #define MPI_2INT ((MPI_Datatype)21) + #define MPI_LONG_DOUBLE_INT ((MPI_Datatype)22) + + /* Fortran types */ + #define MPI_COMPLEX ((MPI_Datatype)23) + #define MPI_DOUBLE_COMPLEX ((MPI_Datatype)24) + #define MPI_LOGICAL ((MPI_Datatype)25) + #define MPI_REAL ((MPI_Datatype)26) + #define MPI_DOUBLE_PRECISION ((MPI_Datatype)27) + #define MPI_INTEGER ((MPI_Datatype)28) + #define MPI_2INTEGER ((MPI_Datatype)29) + #define MPI_2COMPLEX ((MPI_Datatype)30) + #define MPI_2DOUBLE_COMPLEX ((MPI_Datatype)31) + #define MPI_2REAL ((MPI_Datatype)32) + #define MPI_2DOUBLE_PRECISION ((MPI_Datatype)33) + #define MPI_CHARACTER ((MPI_Datatype)1) + + #else typedef struct MPIR_DATATYPE *MPI_Datatype; #ifndef FOO /* These "magic" values are typical for 4-byte-word machines; these *************** *** 49,57 **** #define MPI_FLOAT ((MPI_Datatype)0x53) #define MPI_DOUBLE ((MPI_Datatype)0x17) #define MPI_LONG_DOUBLE ((MPI_Datatype)0x1f) #define MPI_LONG_LONG_INT ((MPI_Datatype)0x2f) - #endif /* To allow compile-time use of MPI 'constants', they are declared in static storage. This is incomplete at present. --- 105,112 ---- *************** *** 121,128 **** --- 176,185 ---- int loc; } This is documented in the man pages on the various datatypes. */ + #endif + #endif /* Communicators */ typedef struct MPIR_COMMUNICATOR *MPI_Comm; extern MPI_Comm MPI_COMM_WORLD, MPI_COMM_SELF; *************** *** 160,168 **** #define MPI_OP_NULL ((MPI_Op)0) #define MPI_GROUP_NULL ((MPI_Group)0) #define MPI_DATATYPE_NULL ((MPI_Datatype)0) #define MPI_REQUEST_NULL ((MPI_Request)0) ! #define MPI_ERRHANDLER_NULL 0 /* These are only guesses; make sure you change them in mpif.h as well */ #define MPI_MAX_PROCESSOR_NAME 256 #define MPI_MAX_ERROR_STRING 256 --- 217,225 ---- #define MPI_OP_NULL ((MPI_Op)0) #define MPI_GROUP_NULL ((MPI_Group)0) #define MPI_DATATYPE_NULL ((MPI_Datatype)0) #define MPI_REQUEST_NULL ((MPI_Request)0) ! #define MPI_ERRHANDLER_NULL ((MPI_Errhandler )0) /* These are only guesses; make sure you change them in mpif.h as well */ #define MPI_MAX_PROCESSOR_NAME 256 #define MPI_MAX_ERROR_STRING 256 *************** *** 205,221 **** #else typedef long MPI_Aint; #endif ! #if (defined(__STDC__) || defined(__cplusplus)) ! typedef void (MPI_Handler_function)( MPI_Comm *, int *, ... ); ! #else ! typedef void (MPI_Handler_function)(); ! #endif typedef struct MPIR_Errhandler *MPI_Errhandler; extern MPI_Errhandler MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN, MPIR_ERRORS_WARN; /* Make the C names for the null functions all upper-case. Note that this is required for systems that use all uppercase names for Fortran externals. */ #define MPI_NULL_COPY_FN MPIR_null_copy_fn --- 262,282 ---- #else typedef long MPI_Aint; #endif ! /* MPI Error handlers */ ! typedef void (MPI_Handler_function) MPIR_ARGS(( MPI_Comm *, int *, ... )); + #ifdef NEW_POINTERS + #define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)119) + #define MPI_ERRORS_RETURN ((MPI_Errhandler)120) + #define MPIR_ERRORS_WARN ((MPI_Errhandler)121) + typedef int MPI_Errhandler; + #else typedef struct MPIR_Errhandler *MPI_Errhandler; extern MPI_Errhandler MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN, MPIR_ERRORS_WARN; + #endif /* Make the C names for the null functions all upper-case. Note that this is required for systems that use all uppercase names for Fortran externals. */ #define MPI_NULL_COPY_FN MPIR_null_copy_fn *************** *** 225,251 **** /* MPI request opjects */ typedef union MPIR_HANDLE *MPI_Request; /* User combination function */ ! #if defined(__STDC__) || defined(__cplusplus) ! typedef void (MPI_User_function)( void *invec, void *inoutvec, int *len, ! MPI_Datatype *datatype); ! #else ! typedef void (MPI_User_function)(); ! #endif /* MPI Attribute copy and delete functions */ ! #if defined(__STDC__) || defined(__cplusplus) ! typedef int (MPI_Copy_function)( MPI_Comm oldcomm, int keyval, ! void *extra_state, ! void *attr_in, void *attr_out, int *flag); ! typedef int (MPI_Delete_function)( MPI_Comm comm, int keyval, void *attr_val, ! void *extra_state ); ! #else ! typedef int (MPI_Copy_function)( ); ! typedef int (MPI_Delete_function)( ); ! #endif /* MPI's error classes */ #include "mpi_errno.h" /* Bindings of the MPI routines */ --- 286,317 ---- /* MPI request opjects */ typedef union MPIR_HANDLE *MPI_Request; /* User combination function */ ! typedef void (MPI_User_function) MPIR_ARGS(( void *, void *, int *, ! MPI_Datatype *)); /* MPI Attribute copy and delete functions */ ! typedef int (MPI_Copy_function) MPIR_ARGS(( MPI_Comm, int, void *, ! void *, void *, int *)); ! typedef int (MPI_Delete_function) MPIR_ARGS(( MPI_Comm, int, void *, void * )); + /********************** MPI-2 FEATURES BEGIN HERE ***************************/ + #define MPICH_HAS_HANDLE2INT + + /* Handle conversion types/functions */ + typedef void *MPI_Handle_type; + /* Note: this may need to be typedef long MPI_Fint; instead */ + typedef int MPI_Fint; + typedef enum { MPI_DATATYPE_HANDLE, MPI_REQUEST_HANDLE, MPI_COMM_HANDLE, + MPI_GROUP_HANDLE, MPI_ERRHANDLE_HANDLE, MPI_OP_HANDLE } + MPI_Handle_enum; + + MPI_Handle_type MPI_Int2handle MPIR_ARGS(( MPI_Fint, MPI_Handle_enum )); + MPI_Fint MPI_Handle2int MPIR_ARGS(( MPI_Handle_type, MPI_Handle_enum )); + + /********************** MPI-2 FEATURES END HERE ***************************/ + /* MPI's error classes */ #include "mpi_errno.h" /* Bindings of the MPI routines */ *************** *** 255,262 **** } #endif #endif - - - - --- 321,324 ---- diff -rc4 /home/MPI/mpich/current/mpich/include/mpi_error.h mpich/include/mpi_error.h *** /home/MPI/mpich/current/mpich/include/mpi_error.h Wed Jun 26 09:42:46 1996 --- mpich/include/mpi_error.h Wed Sep 25 15:22:08 1996 *************** *** 284,298 **** --- 284,306 ---- #define MPIR_TEST_IS_DATATYPE(comm,datatype) \ ( (!(datatype) ) && (mpi_errno = MPI_ERR_TYPE )) #endif #define MPIR_TEST_DATATYPE(comm,datatype) \ + (!(datatype) && (mpi_errno = MPI_ERR_TYPE)) + #ifdef FOO + #define MPIR_TEST_DATATYPE(comm,datatype) \ (MPIR_TEST_IS_DATATYPE(comm,datatype) || \ (!MPIR_TEST_PREDEF_DATATYPE(datatype) && !(datatype)->committed && \ (mpi_errno = (MPI_ERR_TYPE | MPIR_ERR_UNCOMMITTED)))) + #endif + #ifdef NEW_POINTERS + #define MPIR_TEST_ERRHANDLER(comm,errhandler) 0 + #else #define MPIR_TEST_ERRHANDLER(comm,errhandler) \ ( ( (!(errhandler) MPIR_TEST_COOKIE(errhandler,MPIR_ERRHANDLER_COOKIE)) \ && (mpi_errno = MPI_ERR_ARG ))) + #endif #define MPIR_TEST_HBT_NODE(comm,node) \ ( ( !(node) MPIR_TEST_COOKIE(node,MPIR_HBT_NODE_COOKIE)) \ && (mpi_errno = MPI_ERR_INTERN)) #define MPIR_TEST_HBT(comm,hbt) \ diff -rc4 /home/MPI/mpich/current/mpich/include/mpidmpi.h mpich/include/mpidmpi.h *** /home/MPI/mpich/current/mpich/include/mpidmpi.h Tue Jul 16 08:35:44 1996 --- mpich/include/mpidmpi.h Tue Oct 15 09:10:48 1996 *************** *** 30,42 **** void MPID_BSwap_long_double_copy ANSI_ARGS(( unsigned char *, unsigned char *, int )); int MPID_Type_swap_copy ANSI_ARGS(( unsigned char *, unsigned char *, ! MPI_Datatype, int, void * )); ! void MPID_Type_swap_inplace ANSI_ARGS(( unsigned char *, MPI_Datatype, int )); int MPID_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, ! MPI_Datatype, int, void * )); ! int MPID_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void * )); int MPID_Type_convert_copy ANSI_ARGS(( MPI_Comm, void *, int, void *, MPI_Datatype, int, int, int * )); --- 30,44 ---- void MPID_BSwap_long_double_copy ANSI_ARGS(( unsigned char *, unsigned char *, int )); int MPID_Type_swap_copy ANSI_ARGS(( unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void * )); ! void MPID_Type_swap_inplace ANSI_ARGS(( unsigned char *, ! struct MPIR_DATATYPE *, int )); int MPID_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void * )); ! int MPID_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, ! struct MPIR_DATATYPE *, int, unsigned char *, int, int *, int *, void * )); int MPID_Type_convert_copy ANSI_ARGS(( MPI_Comm, void *, int, void *, MPI_Datatype, int, int, int * )); *************** *** 67,79 **** void MPIR_BSwap_long_double_copy ANSI_ARGS(( unsigned char *, unsigned char *, int )); int MPIR_Type_swap_copy ANSI_ARGS(( unsigned char *, unsigned char *, ! MPI_Datatype, int, void * )); ! void MPIR_Type_swap_inplace ANSI_ARGS(( unsigned char *, MPI_Datatype, int )); int MPIR_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, MPI_Datatype, int, void * )); ! int MPIR_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void * )); int MPIR_Type_convert_copy ANSI_ARGS(( MPI_Comm, void *, int, void *, MPI_Datatype, int, int, int * )); --- 69,83 ---- void MPIR_BSwap_long_double_copy ANSI_ARGS(( unsigned char *, unsigned char *, int )); int MPIR_Type_swap_copy ANSI_ARGS(( unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void * )); ! void MPIR_Type_swap_inplace ANSI_ARGS(( unsigned char *, ! struct MPIR_DATATYPE *, int )); int MPIR_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, MPI_Datatype, int, void * )); ! int MPIR_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, ! struct MPIR_DATATYPE*, int, unsigned char *, int, int *, int *, void * )); int MPIR_Type_convert_copy ANSI_ARGS(( MPI_Comm, void *, int, void *, MPI_Datatype, int, int, int * )); *************** *** 82,93 **** #endif int MPIR_Comm_needs_conversion ANSI_ARGS(( MPI_Comm )); int MPIR_Dest_needs_converstion ANSI_ARGS(( int )); ! void MPIR_Pack_Hvector ANSI_ARGS(( MPI_Comm, char *, int, MPI_Datatype, ! int, char * )); ! void MPIR_UnPack_Hvector ANSI_ARGS(( char *, int, MPI_Datatype, int, char * )); ! int MPIR_HvectorLen ANSI_ARGS(( int, MPI_Datatype )); int MPIR_PackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, int, MPI_Request )); int MPIR_EndPackMessage ANSI_ARGS(( MPI_Request )); int MPIR_SetupUnPackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, --- 86,98 ---- #endif int MPIR_Comm_needs_conversion ANSI_ARGS(( MPI_Comm )); int MPIR_Dest_needs_converstion ANSI_ARGS(( int )); ! void MPIR_Pack_Hvector ANSI_ARGS(( MPI_Comm, char *, int, ! struct MPIR_DATATYPE*, int, char * )); ! void MPIR_UnPack_Hvector ANSI_ARGS(( char *, int, struct MPIR_DATATYPE*, ! int, char * )); ! int MPIR_HvectorLen ANSI_ARGS(( int, struct MPIR_DATATYPE * )); int MPIR_PackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, int, MPI_Request )); int MPIR_EndPackMessage ANSI_ARGS(( MPI_Request )); int MPIR_SetupUnPackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, *************** *** 95,104 **** int MPIR_Receive_setup ANSI_ARGS(( MPI_Request * )); int MPIR_Send_setup ANSI_ARGS(( MPI_Request * )); int MPIR_SendBufferFree ANSI_ARGS(( MPI_Request )); ! int MPIR_Elementcnt ANSI_ARGS(( unsigned char *, int, MPI_Datatype, int, ! unsigned char *, int, int *, int *, void * )); void DMPI_msg_arrived ANSI_ARGS(( int, int, MPIR_CONTEXT, MPIR_RHANDLE **, int * )); void DMPI_free_unexpected ANSI_ARGS(( MPIR_RHANDLE * )); --- 100,109 ---- int MPIR_Receive_setup ANSI_ARGS(( MPI_Request * )); int MPIR_Send_setup ANSI_ARGS(( MPI_Request * )); int MPIR_SendBufferFree ANSI_ARGS(( MPI_Request )); ! int MPIR_Elementcnt ANSI_ARGS(( unsigned char *, int, struct MPIR_DATATYPE*, ! int, unsigned char *, int, int *, int *, void * )); void DMPI_msg_arrived ANSI_ARGS(( int, int, MPIR_CONTEXT, MPIR_RHANDLE **, int * )); void DMPI_free_unexpected ANSI_ARGS(( MPIR_RHANDLE * )); *************** *** 106,119 **** int MPIR_Pack ANSI_ARGS(( MPI_Comm, int, void *, int, MPI_Datatype, void *, int, int * )); int MPIR_Pack_size ANSI_ARGS(( int, MPI_Datatype, MPI_Comm, int, int * )); */ ! int MPIR_Pack2 ANSI_ARGS(( char *, int, MPI_Datatype, int (*) (unsigned char *, unsigned char *, ! MPI_Datatype, int, void *), void *, char *, int *, int * )); ! int MPIR_Unpack2 ANSI_ARGS(( char *, int, MPI_Datatype, ! int (*)(unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void *), void *, char *, int, int *, int * )); #ifdef MPI_ADI2 int MPIR_Unpack ANSI_ARGS(( MPI_Comm, void *, int, int, MPI_Datatype, --- 111,124 ---- int MPIR_Pack ANSI_ARGS(( MPI_Comm, int, void *, int, MPI_Datatype, void *, int, int * )); int MPIR_Pack_size ANSI_ARGS(( int, MPI_Datatype, MPI_Comm, int, int * )); */ ! int MPIR_Pack2 ANSI_ARGS(( char *, int, struct MPIR_DATATYPE *, int (*) (unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void *), void *, char *, int *, int * )); ! int MPIR_Unpack2 ANSI_ARGS(( char *, int, struct MPIR_DATATYPE*, ! int (*)(unsigned char *, int, struct MPIR_DATATYPE*, int, unsigned char *, int, int *, int *, void *), void *, char *, int, int *, int * )); #ifdef MPI_ADI2 int MPIR_Unpack ANSI_ARGS(( MPI_Comm, void *, int, int, MPI_Datatype, *************** *** 124,135 **** void *, int *, int * )); #endif int MPIR_Printcontig ANSI_ARGS(( unsigned char *, unsigned char *, ! MPI_Datatype, int, void *)); ! int MPIR_Printcontig2 ANSI_ARGS(( char *, int, MPI_Datatype, int, char *, ! void * )); ! int MPIR_Printcontig2a ANSI_ARGS(( unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void * )); #ifdef MPID_INCLUDE_STDIO int MPIR_PrintDatatypePack ANSI_ARGS(( FILE *, int, MPI_Datatype, int, int )); --- 129,141 ---- void *, int *, int * )); #endif int MPIR_Printcontig ANSI_ARGS(( unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void *)); ! int MPIR_Printcontig2 ANSI_ARGS(( char *, int, struct MPIR_DATATYPE*, ! int, char *, void * )); ! int MPIR_Printcontig2a ANSI_ARGS(( unsigned char *, int, ! struct MPIR_DATATYPE*, int, unsigned char *, int, int *, int *, void * )); #ifdef MPID_INCLUDE_STDIO int MPIR_PrintDatatypePack ANSI_ARGS(( FILE *, int, MPI_Datatype, int, int )); diff -rc4 /home/MPI/mpich/current/mpich/include/mpif.h mpich/include/mpif.h *** /home/MPI/mpich/current/mpich/include/mpif.h Tue Apr 23 16:55:43 1996 --- mpich/include/mpif.h Mon Sep 30 09:32:55 1996 *************** *** 88,110 **** integer MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND, $ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC, $ MPI_OP_NULL integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN ! common /mpipriv/ MPI_BOTTOM, MPI_INTEGER, MPI_REAL, ! $ MPI_DOUBLE_PRECISION, ! $ MPI_COMPLEX, MPI_DOUBLE_COMPLEX, ! $ MPI_LOGICAL, MPI_CHARACTER, MPI_BYTE, ! $ MPI_2INTEGER, MPI_2REAL, MPI_2DOUBLE_PRECISION, ! $ MPI_2COMPLEX, MPI_2DOUBLE_COMPLEX, $ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4, $ MPI_REAL2, MPI_REAL4, MPI_REAL8, - $ MPI_UB, MPI_LB, $ MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY, $ MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND, $ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC, $ MPI_OP_NULL, ! $ MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_ERRORS_ARE_FATAL, ! $ MPI_ERRORS_RETURN, MPI_PACKED, MPI_WTIME_IS_GLOBAL C C Without this save, some Fortran implementations may make the common C dynamic! C --- 88,112 ---- integer MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND, $ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC, $ MPI_OP_NULL integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN ! C ! parameter (MPI_ERRORS_ARE_FATAL=119) ! parameter (MPI_ERRORS_RETURN=120) ! C ! parameter (MPI_COMPLEX=23,MPI_DOUBLE_COMPLEX=24,MPI_LOGICAL=25) ! parameter (MPI_REAL=26,MPI_DOUBLE_PRECISION=27,MPI_INTEGER=28) ! parameter (MPI_2INTEGER=29,MPI_2COMPLEX=30,MPI_2DOUBLE_COMPLEX=31) ! parameter (MPI_2REAL=32,MPI_2DOUBLE_PRECISION=33,MPI_CHARACTER=1) ! parameter (MPI_BYTE=3,MPI_UB=16,MPI_LB=15,MPI_PACKED=14) ! common /mpipriv/ MPI_BOTTOM, $ MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4, $ MPI_REAL2, MPI_REAL4, MPI_REAL8, $ MPI_COMM_WORLD, MPI_COMM_SELF, MPI_GROUP_EMPTY, $ MPI_SUM, MPI_MAX, MPI_MIN, MPI_PROD, MPI_LAND, MPI_BAND, $ MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR, MPI_MINLOC, MPI_MAXLOC, $ MPI_OP_NULL, ! $ MPI_TAG_UB, MPI_HOST, MPI_IO, MPI_WTIME_IS_GLOBAL C C Without this save, some Fortran implementations may make the common C dynamic! C *************** *** 115,122 **** --- 117,127 ---- integer MPI_ANY_TAG parameter (MPI_ANY_TAG = (-1)) C C All other MPI routines are subroutines + C This may cause some Fortran compilers to complain about defined and + C not used. Such compilers should be improved. + C double precision MPI_WTIME, MPI_WTICK external MPI_WTIME, MPI_WTICK C C The attribute copy/delete functions are symbols that can be passed diff -rc4 /home/MPI/mpich/current/mpich/include/mpiimpl.h mpich/include/mpiimpl.h *** /home/MPI/mpich/current/mpich/include/mpiimpl.h Wed Jul 17 13:06:08 1996 --- mpich/include/mpiimpl.h Wed Sep 25 09:31:17 1996 *************** *** 1,6 **** /* ! * $Id: mpiimpl.h,v 1.28 1996/07/17 18:06:07 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: mpiimpl.h,v 1.29 1996/09/08 15:39:44 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 71,91 **** the ones that need them. */ #include #else #include "dmpiatom.h" #include "mpi_bc.h" #include "dmpi.h" #include "mpir.h" #include "mpi_ad.h" #include "mpid.h" ! #endif /* This handles the case of sizeof(int) < sizeof(void*). */ ! #if defined(INT_LT_POINTER) && !defined(MPI_ADI2) ! extern void *MPIR_ToPointer ANSI_ARGS(()); ! extern int MPIR_FromPointer ANSI_ARGS(()); ! extern void MPIR_RmPointer ANSI_ARGS(()); #endif /* mpiprof contains the renamings for the profiling interface. For it to be loaded, the symbol MPI_BUILD_PROFILING must be defined. This --- 71,92 ---- the ones that need them. */ #include #else + /* NOT ADI2 */ #include "dmpiatom.h" #include "mpi_bc.h" #include "dmpi.h" #include "mpir.h" #include "mpi_ad.h" #include "mpid.h" ! #endif /* If MPI_ADI2 */ /* This handles the case of sizeof(int) < sizeof(void*). */ ! #if (defined(INT_LT_POINTER) && !defined(MPI_ADI2)) ! extern void *MPIR_ToPointer ANSI_ARGS(( void *)); ! extern int MPIR_FromPointer ANSI_ARGS(( int )); ! extern void MPIR_RmPointer ANSI_ARGS(( int )); #endif /* mpiprof contains the renamings for the profiling interface. For it to be loaded, the symbol MPI_BUILD_PROFILING must be defined. This *************** *** 125,135 **** * functions for use inside the implementation. This should remove * a fair amount of overhead, given that we had already checked the * communicator on entering the outermost MPI function. */ ! #define MPIR_Group_dup(s,r) ((*(r) = (s)), \ ! (((s) == MPI_GROUP_NULL) || (s)->ref_count++), \ ! MPI_SUCCESS) #define MPIR_Comm_size(comm, size) ((*(size) = (comm)->local_group->np),MPI_SUCCESS) #define MPIR_Comm_rank(comm, size) ((*(size) = (comm)->local_rank),MPI_SUCCESS) #else /* If you are really paranoid you may want the additional checking provided --- 126,136 ---- * functions for use inside the implementation. This should remove * a fair amount of overhead, given that we had already checked the * communicator on entering the outermost MPI function. */ ! #define MPIR_Group_dup(s,r) {(*(r) = (s)); \ ! if ((s) != MPI_GROUP_NULL) (s)->ref_count++; } ! #define MPIR_Comm_size(comm, size) ((*(size) = (comm)->local_group->np),MPI_SUCCESS) #define MPIR_Comm_rank(comm, size) ((*(size) = (comm)->local_rank),MPI_SUCCESS) #else /* If you are really paranoid you may want the additional checking provided *************** *** 197,209 **** int MPIR_Sort_split_table ANSI_ARGS( ( int, int, int *, int *, int * ) ); int MPIR_Context_alloc ANSI_ARGS( ( MPI_Comm, int, MPIR_CONTEXT * ) ); int MPIR_Context_dealloc ANSI_ARGS( ( MPI_Comm, int, MPIR_CONTEXT ) ); int MPIR_dup_fn ANSI_ARGS( ( MPI_Comm, int, void *, void *, void *, int * ) ); ! int MPIR_Comm_init ANSI_ARGS( ( MPI_Comm, MPI_Comm, MPIR_COMM_TYPE ) ); /* pt2pt */ #ifndef MPI_ADI2 #include "mpipt2pt.h" #endif /* dmpi */ #ifndef MPI_ADI2 --- 198,216 ---- int MPIR_Sort_split_table ANSI_ARGS( ( int, int, int *, int *, int * ) ); int MPIR_Context_alloc ANSI_ARGS( ( MPI_Comm, int, MPIR_CONTEXT * ) ); int MPIR_Context_dealloc ANSI_ARGS( ( MPI_Comm, int, MPIR_CONTEXT ) ); int MPIR_dup_fn ANSI_ARGS( ( MPI_Comm, int, void *, void *, void *, int * ) ); ! void MPIR_Comm_init ANSI_ARGS( ( MPI_Comm, MPI_Comm, MPIR_COMM_TYPE ) ); /* pt2pt */ #ifndef MPI_ADI2 #include "mpipt2pt.h" + #else + void MPIR_Sendq_init ANSI_ARGS(( void )); + void MPIR_Sendq_finalize ANSI_ARGS(( void )); + void MPIR_Remember_send ANSI_ARGS(( MPIR_SHANDLE *, void *, int, MPI_Datatype, + int, int, MPI_Comm )); + void MPIR_Forget_send ANSI_ARGS(( MPIR_SHANDLE * )); #endif /* dmpi */ #ifndef MPI_ADI2 *************** *** 217,227 **** --- 224,243 ---- int MPIR_GetErrorMessage ANSI_ARGS(( int, char *, char ** )); void MPIR_Init_dtes ANSI_ARGS(( void )); void MPIR_Free_dtes ANSI_ARGS(( void )); + #ifdef NEW_POINTERS + int MPIR_Errhandler_create ANSI_ARGS(( MPI_Handler_function *, + MPI_Errhandler )); + void MPIR_Errhandler_mark ANSI_ARGS(( MPI_Errhandler, int )); + + #endif + /* topol */ void MPIR_Topology_Init ANSI_ARGS((void)); void MPIR_Topology_Free ANSI_ARGS((void)); + void MPIR_Topology_init ANSI_ARGS((void)); + void MPIR_Topology_finalize ANSI_ARGS((void)); /* util */ /* void *MPIR_SBalloc ANSI_ARGS( ( void * ) ); *************** *** 285,294 **** ANSI_ARGS forms */ void *MPIR_ToPointer ANSI_ARGS(( int )); int MPIR_FromPointer ANSI_ARGS((void *)); void MPIR_RmPointer ANSI_ARGS(( int )); ! int MPIR_UsePointer ANSI_ARGS((FILE *)); void MPIR_PointerPerm ANSI_ARGS(( int )); void MPIR_Comm_collops_init ANSI_ARGS(( MPI_Comm, MPIR_COMM_TYPE )); #endif --- 301,313 ---- ANSI_ARGS forms */ void *MPIR_ToPointer ANSI_ARGS(( int )); int MPIR_FromPointer ANSI_ARGS((void *)); void MPIR_RmPointer ANSI_ARGS(( int )); ! int MPIR_UsePointer ANSI_ARGS((FILE *)); ! void MPIR_RegPointerIdx ANSI_ARGS(( int, void * )); void MPIR_PointerPerm ANSI_ARGS(( int )); + + /* Collective setup */ void MPIR_Comm_collops_init ANSI_ARGS(( MPI_Comm, MPIR_COMM_TYPE )); #endif diff -rc4 /home/MPI/mpich/current/mpich/include/mpipt2pt.h mpich/include/mpipt2pt.h *** /home/MPI/mpich/current/mpich/include/mpipt2pt.h Mon Jul 15 15:52:19 1996 --- mpich/include/mpipt2pt.h Tue Sep 24 10:40:07 1996 *************** *** 25,35 **** int, void *, int *, int * )); #endif int MPIR_UnPackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, MPI_Request, int * )); int MPIR_Type_free ANSI_ARGS(( MPI_Datatype * )); void MPIR_Type_free_struct ANSI_ARGS(( MPI_Datatype )); ! MPI_Datatype MPIR_Type_dup ANSI_ARGS(( MPI_Datatype )); int MPIR_Type_permanent ANSI_ARGS(( MPI_Datatype )); void MPIR_Free_perm_type ANSI_ARGS(( MPI_Datatype * )); void MPIR_Type_get_limits ANSI_ARGS(( MPI_Datatype, MPI_Aint *, MPI_Aint *)); #ifndef MPI_ADI2 --- 25,48 ---- int, void *, int *, int * )); #endif int MPIR_UnPackMessage ANSI_ARGS(( char *, int, MPI_Datatype, int, MPI_Request, int * )); + + /* These are used in the debugging-enabled version */ + #ifdef MPI_ADI2 + void MPIR_Sendq_init ANSI_ARGS(( void )); + void MPIR_Sendq_finalize ANSI_ARGS(( void )); + void MPIR_Remember_send ANSI_ARGS(( MPIR_SHANDLE *, void *, int, MPI_Datatype, + int, int, MPI_Comm )); + void MPIR_Forget_send ANSI_ARGS(( MPIR_SHANDLE * )); + #endif + + /* Datatype service routines */ int MPIR_Type_free ANSI_ARGS(( MPI_Datatype * )); + #ifdef FOO void MPIR_Type_free_struct ANSI_ARGS(( MPI_Datatype )); ! #endif ! struct MPIR_DATATYPE *MPIR_Type_dup ANSI_ARGS(( struct MPIR_DATATYPE * )); int MPIR_Type_permanent ANSI_ARGS(( MPI_Datatype )); void MPIR_Free_perm_type ANSI_ARGS(( MPI_Datatype * )); void MPIR_Type_get_limits ANSI_ARGS(( MPI_Datatype, MPI_Aint *, MPI_Aint *)); #ifndef MPI_ADI2 diff -rc4 /home/MPI/mpich/current/mpich/include/mpir.h mpich/include/mpir.h *** /home/MPI/mpich/current/mpich/include/mpir.h Wed Jun 26 14:28:40 1996 --- mpich/include/mpir.h Mon Oct 14 15:29:31 1996 *************** *** 1,6 **** /* ! * $Id: mpir.h,v 1.53 1996/06/26 19:28:38 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: mpir.h,v 1.53 1996/06/26 19:28:38 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 40,47 **** --- 40,49 ---- /* Datatypes. The contiguous, predefined datatypes are handled separately */ /* to demonstrate that the added functionality has low cost */ /*****************************************************************************/ + #include "../mpid/ch2/datatype.h" + #ifdef FOO #define MPIR_DATATYPE_COOKIE 0xea31beaf struct MPIR_DATATYPE { MPIR_NODETYPE dte_type; /* type of datatype element this is */ MPIR_COOKIE /* Cookie to help detect valid item */ *************** *** 83,90 **** --- 85,93 ---- (MPIR_TEST_PREDEF_DATATYPE(a) || (a)->is_contig) /* For ONLY the predefined datatypes, the size MAY be encoded in the value of the datatype */ #define MPIR_DATATYPE_SIZE(a) (1 + ( (MPI_Aint)(a)&0xf ) ) + #endif /*****************************************************************************/ /* Requests come in many flavors */ /*****************************************************************************/ diff -rc4 /home/MPI/mpich/current/mpich/include/mpisys.h mpich/include/mpisys.h *** /home/MPI/mpich/current/mpich/include/mpisys.h Sat Jul 27 08:37:35 1996 --- mpich/include/mpisys.h Thu Oct 17 09:40:55 1996 *************** *** 1,4 **** --- 1,5 ---- + #define MPIR_MEMDEBUG /* * $Id: mpisys.h.in,v 1.1 1994/11/29 20:32:27 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. diff -rc4 /home/MPI/mpich/current/mpich/include/patchlevel.h mpich/include/patchlevel.h *** /home/MPI/mpich/current/mpich/include/patchlevel.h Fri Feb 2 09:45:58 1996 --- mpich/include/patchlevel.h Mon Jul 29 10:23:52 1996 *************** *** 1,3 **** #define PATCHLEVEL 1.0 #define PATCHLEVEL_MINOR 0 ! #define PATCHLEVEL_SUBMINOR 13 --- 1,3 ---- #define PATCHLEVEL 1.0 #define PATCHLEVEL_MINOR 0 ! #define PATCHLEVEL_SUBMINOR 14 diff -rc4 /home/MPI/mpich/current/mpich/installtest/cpilog.c mpich/installtest/cpilog.c *** /home/MPI/mpich/current/mpich/installtest/cpilog.c Mon Apr 15 21:35:30 1996 --- mpich/installtest/cpilog.c Mon Sep 23 16:09:59 1996 *************** *** 12,28 **** int main(argc,argv) int argc; char *argv[]; { ! int done = 0, n, myid, numprocs, i, rc, repeat; double PI25DT = 3.141592653589793238462643; double mypi, pi, h, sum, x, a; double startwtime, endwtime; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); MPE_Init_log(); if (myid == 0) { MPE_Describe_state(1, 2, "Broadcast", "red:vlines3"); MPE_Describe_state(3, 4, "Compute", "blue:gray3"); --- 12,33 ---- int main(argc,argv) int argc; char *argv[]; { ! int n, myid, numprocs, i, j, rc, repeat; double PI25DT = 3.141592653589793238462643; double mypi, pi, h, sum, x, a; double startwtime, endwtime; + int namelen; + char processor_name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&numprocs); MPI_Comm_rank(MPI_COMM_WORLD,&myid); + MPI_Get_processor_name(processor_name,&namelen); + fprintf(stderr,"Process %d running on %s\n", myid, processor_name); + MPE_Init_log(); if (myid == 0) { MPE_Describe_state(1, 2, "Broadcast", "red:vlines3"); MPE_Describe_state(3, 4, "Compute", "blue:gray3"); *************** *** 29,85 **** MPE_Describe_state(5, 6, "Reduce", "green:light_gray"); MPE_Describe_state(7, 8, "Sync", "yellow:gray"); } ! while (!done) { ! if (myid == 0) ! { ! n = 1000000; ! startwtime = MPI_Wtime(); ! } ! MPI_Barrier(MPI_COMM_WORLD); ! MPE_Start_log(); MPE_Log_event(1, 0, "start broadcast"); MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD); MPE_Log_event(2, 0, "end broadcast"); ! if (n == 0) ! done = 1; ! else { ! for (repeat=5; repeat; repeat--) ! { ! MPE_Log_event(7,0,"Start Sync"); ! MPI_Barrier(MPI_COMM_WORLD); ! MPE_Log_event(8,0,"End Sync"); ! MPE_Log_event(3, 0, "start compute"); ! h = 1.0 / (double) n; ! sum = 0.0; ! for (i = myid + 1; i <= n; i += numprocs) ! { ! x = h * ((double)i - 0.5); ! sum += f(x); ! } ! mypi = h * sum; ! MPE_Log_event(4, 0, "end compute"); ! fprintf( stderr, "[%d] mypi = %lf\n", myid, mypi ); ! MPE_Log_event(5, 0, "start reduce"); ! MPI_Reduce(&mypi, &pi, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); ! MPE_Log_event(6, 0, "end reduce"); ! if (myid == 0) ! { ! printf("pi is approximately %.16f, Error is %.16f\n", ! pi, fabs(pi - PI25DT)); ! endwtime = MPI_Wtime(); ! printf("wall clock time = %f\n", endwtime-startwtime); ! } ! } ! n = 0; ! } ! MPE_Stop_log(); } MPE_Finish_log("cpilog.log"); MPI_Finalize(); } --- 34,82 ---- MPE_Describe_state(5, 6, "Reduce", "green:light_gray"); MPE_Describe_state(7, 8, "Sync", "yellow:gray"); } ! if (myid == 0) { ! n = 1000000; ! startwtime = MPI_Wtime(); ! } ! MPI_Barrier(MPI_COMM_WORLD); ! MPE_Start_log(); + for (j = 0; j < 5; j++) + { MPE_Log_event(1, 0, "start broadcast"); MPI_Bcast(&n, 1, MPI_INT, 0, MPI_COMM_WORLD); MPE_Log_event(2, 0, "end broadcast"); ! MPE_Log_event(7,0,"Start Sync"); ! MPI_Barrier(MPI_COMM_WORLD); ! MPE_Log_event(8,0,"End Sync"); ! ! MPE_Log_event(3, 0, "start compute"); ! h = 1.0 / (double) n; ! sum = 0.0; ! for (i = myid + 1; i <= n; i += numprocs) { ! x = h * ((double)i - 0.5); ! sum += f(x); ! } ! mypi = h * sum; ! MPE_Log_event(4, 0, "end compute"); ! MPE_Log_event(5, 0, "start reduce"); ! MPI_Reduce(&mypi, &pi, 1, MPI_DOUBLE, MPI_SUM, 0, MPI_COMM_WORLD); ! MPE_Log_event(6, 0, "end reduce"); } + MPE_Stop_log(); MPE_Finish_log("cpilog.log"); + + if (myid == 0) + { + endwtime = MPI_Wtime(); + printf("pi is approximately %.16f, Error is %.16f\n", + pi, fabs(pi - PI25DT)); + printf("wall clock time = %f\n", endwtime-startwtime); + } MPI_Finalize(); } diff -rc4 /home/MPI/mpich/current/mpich/mpe/Makefile.in mpich/mpe/Makefile.in *** /home/MPI/mpich/current/mpich/mpe/Makefile.in Fri Jul 26 15:02:55 1996 --- mpich/mpe/Makefile.in Wed Oct 16 14:11:00 1996 *************** *** 7,17 **** ARCH = @ARCH@ MAKE = @MAKE@ COMM = @COMM@ MPIR_HOME = @MPIR_HOME@ ! CC = @MPIR_HOME@/lib/@ARCH@/@COMM@/mpicc CLINKER = $(CC) ! F77 = @MPIR_HOME@/lib/@ARCH@/@COMM@/mpif77 FLINKER = $(F77) AR = @AR@ RANLIB = @RANLIB@ INCLUDE_DIR = @X_INC@ --- 7,17 ---- ARCH = @ARCH@ MAKE = @MAKE@ COMM = @COMM@ MPIR_HOME = @MPIR_HOME@ ! CC = @MPICC@ CLINKER = $(CC) ! F77 = @MPIF77@ FLINKER = $(F77) AR = @AR@ RANLIB = @RANLIB@ INCLUDE_DIR = @X_INC@ *************** *** 18,25 **** --- 18,26 ---- OPTFLAGS = MPE_GRAPH = @MPE_GRAPHICS@ LIB_PATH = @X_LIB@ LIB_LIST = + LIB_DIR = @LIB_DIR@ MPEGRAPHICS_SOURCE = @MPEGRAPHICS_SOURCE@ MPEGRAPHICS_OBJS = @MPEGRAPHICS_OBJS@ MPEGRAPHICS_FSOURCE = @MPEGRAPHICS_FSOURCE@ *************** *** 54,68 **** default_all: default profile_all: ! default: $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe_nompi.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/mpe_prof.o \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/mpe_proff.o \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libtmpi.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/liblmpi.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libampi.a profile: wrappers: $(MPIR_HOME)/util/bfort -ferr -mpi -mnative -mapptr -ptrprefix MPIR_ \ --- 55,69 ---- default_all: default profile_all: ! default: $(LIB_DIR)/libmpe.a \ ! $(LIB_DIR)/libmpe_nompi.a \ ! $(LIB_DIR)/mpe_prof.o \ ! $(LIB_DIR)/mpe_proff.o \ ! $(LIB_DIR)/libtmpi.a \ ! $(LIB_DIR)/liblmpi.a \ ! $(LIB_DIR)/libampi.a profile: wrappers: $(MPIR_HOME)/util/bfort -ferr -mpi -mnative -mapptr -ptrprefix MPIR_ \ *************** *** 72,85 **** # It is tempting here to use ... libmpe.a($(MPE_OBJECTS)) as the dependency, # but this would require that all makes properly handle library dependencies. # Since makes that DO are the exception rather than the rule, we don't # use this form ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a: $(MPE_OBJECTS) $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe_nompi.a: $(MPEGRAPHICS_SOURCE) @if [ "$(MPEGRAPHICS_SOURCE)" != "" ] ; then \ $(MAKE) clean ; \ $(MAKE) -f Makefile_nompi $@ ; \ fi --- 73,86 ---- # It is tempting here to use ... libmpe.a($(MPE_OBJECTS)) as the dependency, # but this would require that all makes properly handle library dependencies. # Since makes that DO are the exception rather than the rule, we don't # use this form ! $(LIB_DIR)/libmpe.a: $(MPE_OBJECTS) $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? ! $(LIB_DIR)/libmpe_nompi.a: $(MPEGRAPHICS_SOURCE) @if [ "$(MPEGRAPHICS_SOURCE)" != "" ] ; then \ $(MAKE) clean ; \ $(MAKE) -f Makefile_nompi $@ ; \ fi *************** *** 86,102 **** manpages: $(MPIR_HOME)/util/doctext -mpath $(MPIR_HOME)/man/man4 \ -ext 4 -I pubinc -index $(MPIR_HOME)/www.mpe.index \ -jumpfile $(MPIR_HOME)/jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/man" -heading MPE \ $(MPE_CSOURCES) $(MPIR_HOME)/util/doc2lt $(MPE_CSOURCES) >> $(MPIR_HOME)/rsummpe.tmp wwwpages: ../util/doctext -html -mpath ../www/www4 -ext html -I pubinc \ -index ../www.index -jumpfile ../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/man" -heading MPE \ -quotefmt ../util/fortnotes ../util/errnotes \ $(MPE_CSOURCES) --- 87,103 ---- manpages: $(MPIR_HOME)/util/doctext -mpath $(MPIR_HOME)/man/man4 \ -ext 4 -I pubinc -index $(MPIR_HOME)/www.mpe.index \ -jumpfile $(MPIR_HOME)/jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/man" -heading MPE \ $(MPE_CSOURCES) $(MPIR_HOME)/util/doc2lt $(MPE_CSOURCES) >> $(MPIR_HOME)/rsummpe.tmp wwwpages: ../util/doctext -html -mpath ../www/www4 -ext html -I pubinc \ -index ../www.index -jumpfile ../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/man" -heading MPE \ -quotefmt ../util/fortnotes ../util/errnotes \ $(MPE_CSOURCES) *************** *** 106,119 **** mpe_log_merge.c mpe_log_adjusttime.c $(CC) $(CFLAGS) -c -DUSE_PMPI mpe_log.c /bin/mv mpe_log.o mpe_plog.o ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libtmpi.a: trc_wrappers.o $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/liblmpi.a: log_wrap.o mpe_plog.o $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? --- 107,120 ---- mpe_log_merge.c mpe_log_adjusttime.c $(CC) $(CFLAGS) -c -DUSE_PMPI mpe_log.c /bin/mv mpe_log.o mpe_plog.o ! $(LIB_DIR)/libtmpi.a: trc_wrappers.o $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? ! $(LIB_DIR)/liblmpi.a: log_wrap.o mpe_plog.o $(AR) $@ $? $(RANLIB) $@ # -/bin/rm -f $? *************** *** 122,130 **** #log1_wrappers.o: log_wrap.c # $(CC) $(CFLAGS) -c -DFIRST_HALF log_wrap.c # /bin/mv log_wrap.o log1_wrap.o ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libampi.a: visual_mess.c if [ -n "@MPE_GRAPHICS@" ] ; then \ $(CC) $(CFLAGS) -c visual_mess.c ; \ $(AR) $@ visual_mess.o ; \ $(RANLIB) $@ ; fi --- 123,131 ---- #log1_wrappers.o: log_wrap.c # $(CC) $(CFLAGS) -c -DFIRST_HALF log_wrap.c # /bin/mv log_wrap.o log1_wrap.o ! $(LIB_DIR)/libampi.a: visual_mess.c if [ -n "@MPE_GRAPHICS@" ] ; then \ $(CC) $(CFLAGS) -c visual_mess.c ; \ $(AR) $@ visual_mess.o ; \ $(RANLIB) $@ ; fi *************** *** 135,160 **** .c.a: $(CC) $(CFLAGS) -c $*.c ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/mpe_prof.o: mpe_prof.c $(CC) $(CFLAGS) -c mpe_prof.c ! /bin/cp mpe_prof.o $(MPIR_HOME)/lib/$(ARCH)/$(COMM) ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/mpe_proff.o: mpe_proff.c $(CC) $(CFLAGS) -c mpe_proff.c ! /bin/cp mpe_proff.o $(MPIR_HOME)/lib/$(ARCH)/$(COMM) ! dbxtest: dbxtest.o $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a $(CLINKER) -o dbxtest dbxtest.o \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpi.a \ $(LIB_PATH) $(LIB_LIST) ! dbxtest2: dbxtest2.o $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a $(CLINKER) -o dbxtest2 dbxtest2.o \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe.a \ ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpi.a \ $(LIB_PATH) $(LIB_LIST) clean: -/bin/rm -f *.o *~ $(EXECS) -(cd contrib/mandel ; $(MAKE) clean) --- 136,161 ---- .c.a: $(CC) $(CFLAGS) -c $*.c ! $(LIB_DIR)/mpe_prof.o: mpe_prof.c $(CC) $(CFLAGS) -c mpe_prof.c ! /bin/cp mpe_prof.o $(LIB_DIR) ! $(LIB_DIR)/mpe_proff.o: mpe_proff.c $(CC) $(CFLAGS) -c mpe_proff.c ! /bin/cp mpe_proff.o $(LIB_DIR) ! dbxtest: dbxtest.o $(LIB_DIR)/libmpe.a $(CLINKER) -o dbxtest dbxtest.o \ ! $(LIB_DIR)/libmpe.a \ ! $(LIB_DIR)/libmpi.a \ $(LIB_PATH) $(LIB_LIST) ! dbxtest2: dbxtest2.o $(LIB_DIR)/libmpe.a $(CLINKER) -o dbxtest2 dbxtest2.o \ ! $(LIB_DIR)/libmpe.a \ ! $(LIB_DIR)/libmpi.a \ $(LIB_PATH) $(LIB_LIST) clean: -/bin/rm -f *.o *~ $(EXECS) -(cd contrib/mandel ; $(MAKE) clean) diff -rc4 /home/MPI/mpich/current/mpich/mpe/Makefile_nompi.in mpich/mpe/Makefile_nompi.in *** /home/MPI/mpich/current/mpich/mpe/Makefile_nompi.in Wed Jul 17 11:13:45 1996 --- mpich/mpe/Makefile_nompi.in Wed Oct 16 14:35:19 1996 *************** *** 19,26 **** --- 19,27 ---- MPE_GRAPH = @MPE_GRAPHICS@ LIB_PATH = @LIB_PATH@ @X_LIB@ # On the meiko, you need to add -lsocket to LIB_LIST LIB_LIST = @LIB_LIST@ + LIB_DIR = @LIB_DIR@ MPEGRAPHICS_SOURCE = @MPEGRAPHICS_SOURCE@ MPEGRAPHICS_OBJS = @MPEGRAPHICS_OBJS@ MPEGRAPHICS_FSOURCE = @MPEGRAPHICS_FSOURCE@ *************** *** 47,55 **** # It is tempting here to use ... libmpe.a($(MPE_OBJECTS)) as the dependency, # but this would require that all makes properly handle library dependencies. # Since makes that DO are the exception rather than the rule, we don't # use this form ! $(MPIR_HOME)/lib/$(ARCH)/$(COMM)/libmpe_nompi.a: $(MPEGRAPHICS_OBJS) mpehname.o $(AR) $@ $? $(RANLIB) $@ -/bin/rm -f $? --- 48,56 ---- # It is tempting here to use ... libmpe.a($(MPE_OBJECTS)) as the dependency, # but this would require that all makes properly handle library dependencies. # Since makes that DO are the exception rather than the rule, we don't # use this form ! $(LIB_DIR)/libmpe_nompi.a: $(MPEGRAPHICS_OBJS) mpehname.o $(AR) $@ $? $(RANLIB) $@ -/bin/rm -f $? diff -rc4 /home/MPI/mpich/current/mpich/mpe/README mpich/mpe/README *** /home/MPI/mpich/current/mpich/mpe/README Sun Jan 30 18:31:03 1994 --- mpich/mpe/README Wed Oct 16 14:02:18 1996 *************** *** 5,8 **** --- 5,16 ---- timing routines logging routines real-time graphics routines parallel I/O routines + + + The command 'configure' may be used to create the Makefiles needed + + Useful configure commands are: + + Cray T3D with native MPI + configure -cc="/mpp/bin/cc -Tcray-t3d" -nof77 diff -rc4 /home/MPI/mpich/current/mpich/mpe/log_wrap.c mpich/mpe/log_wrap.c *** /home/MPI/mpich/current/mpich/mpe/log_wrap.c Wed Jul 3 10:06:23 1996 --- mpich/mpe/log_wrap.c Tue Oct 15 15:30:28 1996 *************** *** 1,11 **** --- 1,18 ---- #ifdef MPI_BUILD_PROFILING #undef MPI_BUILD_PROFILING #endif #include + /* Really should include */ #include "mpi.h" #include "mpe.h" + /* Enable memory tracing. This requires MPICH's mpid/util/tr2.c codes */ + #if defined(MPIR_MEMDEBUG) || 1 + #define malloc(a) MPID_trmalloc((unsigned)(a),__LINE__,__FILE__) + #define free(a) MPID_trfree(a,__LINE__,__FILE__) + #endif + /* This is a large file and may exceed some compilers ability to handle. In that case, compile without optimization. */ *************** *** 212,227 **** #define MPE_CART_SUB_ID 125 #include "requests.h" ! static request_list *requests_head_0, *requests_tail_0; static int procid_0; static char logFileName_0[256]; /* This is used for the multiple-completion test/wait functions */ #define MPE_MAX_REQUESTS 16 static MPI_Request req[MPE_MAX_REQUESTS]; /* Temporary MPE log definitions (eventually will replace with more permanent changes) Note that these include a communicator as well as the state (pointer --- 219,244 ---- #define MPE_CART_SUB_ID 125 #include "requests.h" ! static request_list *requests_head_0, *requests_tail_0, *requests_avail_0=0; static int procid_0; static char logFileName_0[256]; /* This is used for the multiple-completion test/wait functions */ #define MPE_MAX_REQUESTS 16 static MPI_Request req[MPE_MAX_REQUESTS]; + /* Function prototypes */ + void MPE_Add_send_req ANSI_ARGS(( int, MPI_Datatype, int, int, + MPI_Request, int )); + void MPE_Add_recv_req ANSI_ARGS(( int, MPI_Datatype, int, int, + MPI_Request, int )); + void MPE_Cancel_req ANSI_ARGS(( MPI_Request )); + void MPE_Remove_req ANSI_ARGS(( MPI_Request )); + void MPE_Start_req ANSI_ARGS(( MPI_Request )); + void MPE_ProcessWaitTest ANSI_ARGS(( MPI_Request, MPI_Status *, char * )); + /* Temporary MPE log definitions (eventually will replace with more permanent changes) Note that these include a communicator as well as the state (pointer *************** *** 252,292 **** /* Service routines for managing requests .... */ /* If there are large numbers of requests, we should probably use a better search structure, such as a hash table or tree */ ! void MPE_Add_send_req( count, datatype, dest, tag, request ) ! int count, dest, tag; MPI_Datatype datatype; MPI_Request request; { request_list *newrq; int typesize; ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { PMPI_Type_size( datatype, &typesize ); ! newrq->request = request; ! newrq->status = RQ_SEND; ! newrq->size = count * typesize; ! newrq->tag = tag; ! newrq->otherParty = dest; ! newrq->next = 0; rq_add( requests_head_0, requests_tail_0, newrq ); } } ! void MPE_Add_recv_req( count, datatype, source, tag, request ) ! int count, source, tag; MPI_Datatype datatype; MPI_Request request; { request_list *newrq; /* We could pre-allocate request_list members, or allocate in blocks. Do this is we see this is a bottleneck */ ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! newrq->request = request; ! newrq->status = RQ_RECV; ! newrq->next = 0; rq_add( requests_head_0, requests_tail_0, newrq ); } } --- 269,313 ---- /* Service routines for managing requests .... */ /* If there are large numbers of requests, we should probably use a better search structure, such as a hash table or tree */ ! void MPE_Add_send_req( count, datatype, dest, tag, request, is_persistent ) ! int count, dest, tag, is_persistent; MPI_Datatype datatype; MPI_Request request; { request_list *newrq; int typesize; ! rq_alloc(requests_avail_0,newrq); ! if (newrq) { PMPI_Type_size( datatype, &typesize ); ! newrq->request = request; ! newrq->status = RQ_SEND; ! newrq->size = count * typesize; ! newrq->tag = tag; ! newrq->otherParty = dest; ! newrq->next = 0; ! newrq->is_persistent = is_persistent; rq_add( requests_head_0, requests_tail_0, newrq ); } } ! void MPE_Add_recv_req( count, datatype, source, tag, request, is_persistent ) ! int count, source, tag, is_persistent; MPI_Datatype datatype; MPI_Request request; { request_list *newrq; /* We could pre-allocate request_list members, or allocate in blocks. Do this is we see this is a bottleneck */ ! rq_alloc( requests_avail_0, newrq ); ! if (newrq) { ! newrq->request = request; ! newrq->status = RQ_RECV; ! newrq->next = 0; ! newrq->is_persistent = is_persistent; rq_add( requests_head_0, requests_tail_0, newrq ); } } *************** *** 300,322 **** void MPE_Remove_req( request ) MPI_Request request; { ! rq_remove( requests_head_0, request ); } /* Persistent sends and receives are handled with this routine (called by start or startall) */ void MPE_Start_req( request ) MPI_Request request; { ! request_list *rq, *last; /* look for request */ rq = requests_head_0; - last = 0; while (rq && (rq->request != request)) { - last = rq; rq = rq->next; } if (!rq) { --- 321,341 ---- void MPE_Remove_req( request ) MPI_Request request; { ! rq_remove( requests_head_0, requests_tail_0, requests_avail_0, request ); } /* Persistent sends and receives are handled with this routine (called by start or startall) */ void MPE_Start_req( request ) MPI_Request request; { ! request_list *rq; /* look for request */ rq = requests_head_0; while (rq && (rq->request != request)) { rq = rq->next; } if (!rq) { *************** *** 325,333 **** #endif return; /* request not found */ } ! if (rq->status & RQ_SEND) { MPE_Log_send( rq->otherParty, rq->tag, rq->size ); } } --- 344,352 ---- #endif return; /* request not found */ } ! if ((rq->status & RQ_SEND) && rq->otherParty != MPI_PROC_NULL) { MPE_Log_send( rq->otherParty, rq->tag, rq->size ); } } *************** *** 354,362 **** #endif return; /* request not found */ } - if (status->MPI_TAG != MPI_ANY_TAG || (rq->status & RQ_SEND) ) { /* if the request was not invalid */ if (rq->status & RQ_CANCEL) { --- 373,380 ---- *************** *** 365,383 **** } /* Receives conclude at the END (wait/test); sends start at the beginning */ ! if (rq->status & RQ_RECV) { PMPI_Get_count( status, MPI_BYTE, &size ); MPE_Log_receive( status->MPI_SOURCE, status->MPI_TAG, size ); } } ! if (!last) { ! requests_head_0 = rq->next; ! } else { ! last->next = rq->next; } - free( rq ); } /* --- 383,402 ---- } /* Receives conclude at the END (wait/test); sends start at the beginning */ ! if ((rq->status & RQ_RECV) && (status->MPI_SOURCE != MPI_PROC_NULL)) { PMPI_Get_count( status, MPI_BYTE, &size ); MPE_Log_receive( status->MPI_SOURCE, status->MPI_TAG, size ); } } ! ! /* Since we already have found the request, removing it is relatively ! easy */ ! if (!rq->is_persistent) { ! rq_remove_at( requests_head_0, requests_tail_0, requests_avail_0, ! rq, last ); } } /* *************** *** 1610,1617 **** --- 1629,1639 ---- MPE_Finish_log( logFileName_0 ); if (procid_0 == 0) fprintf( stderr, "Finished writing logfile.\n"); + /* Recover all of the allocated requests */ + rq_end( requests_avail_0 ); + returnVal = PMPI_Finalize( ); return returnVal; } *************** *** 2206,2214 **** /* Enable the basic states */ for (i=0; i #endif #endif *************** *** 54,67 **** #include "mpe_log.h" #include "mpe_log_genproc.h" #include "mpe_log_genproc.c" #include "mpe_log_adjusttime.c" #include "mpe_log_merge.c" /*@ ! MPE_Initlog - Initialize for logging @*/ int MPE_Init_log() { #if DEBUG --- 61,89 ---- #include "mpe_log.h" #include "mpe_log_genproc.h" + static int MPE_Log_message _ANSI_ARGS_ (( int, int, int, int )); + #include "mpe_log_genproc.c" #include "mpe_log_adjusttime.c" #include "mpe_log_merge.c" + /* This is a variable used to allow users to dynamically assign event numbers + so as to avoid collisions with other parts of the code. + It starts at 250 for the various existing codes with predefined values + */ + + static int MPE_Log_max_event_in_use = 250; + /*@ ! MPE_Init_log - Initialize for logging ! ! Notes: ! Initializes the MPE logging package. This must be called before any of ! the other MPE logging routines. ! ! .seealso: MPE_Finish_log @*/ int MPE_Init_log() { #if DEBUG *************** *** 123,130 **** --- 145,154 ---- Notes: Adds string containing a state def to the logfile. The format of the def is (LOG_STATE_DEF) 0 sevent eevent 0 0 "color" "name". + + .seealso: MPE_Log_get_event_number @*/ int MPE_Describe_state( start, end, name, color ) int start, end; char *name, *color; *************** *** 158,173 **** #if DEBUG fprintf( debug_file, "add state %s, record length %d, buffer size %d\n", name, b->len, MPE_Log_i); #endif ! return MPE_Log_OK; } /*@ MPE_Describe_event - Create log record describing an event type @*/ int MPE_Describe_event( event, name ) int event; char *name; --- 182,208 ---- #if DEBUG fprintf( debug_file, "add state %s, record length %d, buffer size %d\n", name, b->len, MPE_Log_i); #endif ! ! /* Update events in use */ ! if (start > MPE_Log_max_event_in_use) MPE_Log_max_event_in_use = start; ! if (end > MPE_Log_max_event_in_use) MPE_Log_max_event_in_use = end; ! ! MPID_trvalid( "Describe state" ); return MPE_Log_OK; } /*@ MPE_Describe_event - Create log record describing an event type + + Input Parameters: + . event - Event number + . name - String describing the event. + + .seealso: MPE_Log_get_event_number @*/ int MPE_Describe_event( event, name ) int event; char *name; *************** *** 177,191 **** --- 212,253 ---- fprintf( debug_file, "Event :%s: %d defined.\n", name, event ); fflush( debug_file ); #endif MPE_Log_def (event, name); + + /* Update events in use */ + if (event > MPE_Log_max_event_in_use) MPE_Log_max_event_in_use = event; + + MPID_trvalid( "Describe event" ); return MPE_Log_OK; } + /*@ + MPE_Log_get_event_number - Gets an unused event number + Returns: + A value that can be provided to MPE_Describe_event or MPE_Describe_state + which will define an event or state not used before. + Notes: + This routine is provided to allow packages to ensure that they are + using unique event numbers. It relies on all packages using this + routine. + @*/ + int MPE_Log_get_event_number( ) + { + return ++MPE_Log_max_event_in_use; + } + /*@ MPE_Log_message - log the sending or receiving of a message + + Input Parameters: + . type - Message type (state) + . otherParty - Partner (destination of send or source of receive) + . tag - Message tag + . size - Length of message in bytes + @*/ static int MPE_Log_message( type, otherParty, tag, size ) int type, otherParty, tag, size; { *************** *** 220,227 **** --- 282,290 ---- MPE_Log_i); fflush( debug_file ); #endif + MPID_trvalid( "Log message" ); return MPE_Log_OK; } *************** *** 231,238 **** --- 294,302 ---- int MPE_Log_send( otherParty, tag, size ) int otherParty, tag, size; { MPE_Log_message( LOG_MESG_SEND, otherParty, tag, size ); + MPID_trvalid( "Log send" ); return MPE_Log_OK; } *************** *** 243,257 **** --- 307,327 ---- int MPE_Log_receive( otherParty, tag, size ) int otherParty, tag, size; { MPE_Log_message( LOG_MESG_RECV, otherParty, tag, size ); + MPID_trvalid( "Log recv" ); return MPE_Log_OK; } /*@ MPE_Log_event - Logs an event + + Input Parameters: + . event - Event number + . data - Integer data value + . string - Optional string describing event @*/ int MPE_Log_event(event,data,string) int event, data; char *string; *************** *** 273,280 **** --- 343,355 ---- str_len = strlen(string); str_store = str_len / sizeof(int) + 1; } + /* + * DANGER - I found a storage overwrite in here, and I tried to work around + * it by making the tests one int more generous. This should be fixed + * by looking more closely at what is really going on + */ #if DEBUG_LINKS PrintBlockLinks( debug_file ); fflush( debug_file ); #endif *************** *** 284,293 **** MPI_Wtime() ); fflush( debug_file ); #endif /* header (w/event) data string */ if (MPE_Log_i + MPE_Log_HEADERSIZE + MPE_Log_VFIELDSIZE(1) + ! MPE_Log_VFIELDSIZE(str_store) > MPE_Log_size) { /* fprintf(stderr,"allocate more memory\n"); */ if (!MPE_Log_Flush()) return MPE_Log_NO_MEMORY; /* cannot allocate more memory */ } --- 359,369 ---- MPI_Wtime() ); fflush( debug_file ); #endif /* header (w/event) data string */ + /* added the = to > */ if (MPE_Log_i + MPE_Log_HEADERSIZE + MPE_Log_VFIELDSIZE(1) + ! MPE_Log_VFIELDSIZE(str_store) >= MPE_Log_size) { /* fprintf(stderr,"allocate more memory\n"); */ if (!MPE_Log_Flush()) return MPE_Log_NO_MEMORY; /* cannot allocate more memory */ } *************** *** 294,304 **** MPE_Log_ADDHEADER (b, event); MPE_Log_ADDINTS (b, v, 1, &data); /* add one int to the definition */ ! if (MPE_Log_i + MPE_Log_VFIELDSIZE(str_store) > MPE_Log_size) { ! ! /* fprintf(stderr,"long string cut, %d %d %d ints used for headers\n", MPE_Log_HEADERSIZE, MPE_Log_VFIELDSIZE(1), MPE_Log_VFIELDSIZE(0)); */ v = (MPE_Log_VFIELD *)((int *)(MPE_Log_thisBlock+1) + MPE_Log_i); --- 370,380 ---- MPE_Log_ADDHEADER (b, event); MPE_Log_ADDINTS (b, v, 1, &data); /* add one int to the definition */ ! /* added the = to > */ ! if (MPE_Log_i + MPE_Log_VFIELDSIZE(str_store) >= MPE_Log_size) { ! /* fprintf(stderr,"long string cut, %d %d %d ints used for headers\n", MPE_Log_HEADERSIZE, MPE_Log_VFIELDSIZE(1), MPE_Log_VFIELDSIZE(0)); */ v = (MPE_Log_VFIELD *)((int *)(MPE_Log_thisBlock+1) + MPE_Log_i); *************** *** 322,329 **** --- 398,411 ---- fprintf( debug_file, "add event, record length %d, buffer size %d\n", b->len, MPE_Log_i); fflush( debug_file ); #endif + MPID_trvalid( "Log event" ); + /* + if (MPID_trvalid( "Log event" )) { + fprintf( stderr, "bug found for %d,%d,%s\n", event, data, string ); + } + */ return MPE_Log_OK; } *************** *** 338,345 **** --- 420,428 ---- { int returnStatus; int *is_globalp, flag; + MPID_trvalid( "finish log" ); if (!MPE_Log_hasBeenInit) return MPE_Log_NOT_INITIALIZED; if (!MPE_Log_hasBeenClosed) { MPE_Log_isLockedOut = 1; MPI_Barrier(MPI_COMM_WORLD ); diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_log.h mpich/mpe/mpe_log.h *** /home/MPI/mpich/current/mpich/mpe/mpe_log.h Fri Feb 23 12:39:26 1996 --- mpich/mpe/mpe_log.h Wed Sep 18 15:45:06 1996 *************** *** 50,57 **** --- 50,59 ---- int MPE_Describe_event _ANSI_ARGS_(( int event, char *name)); /* create event description lines */ + int MPE_Log_get_event_number _ANSI_ARGS_(( void )); + /* Get a new event number */ int MPE_Start_log _ANSI_ARGS_((void)); /* set timer to 0 */ int MPE_Log_event _ANSI_ARGS_(( int event, int data, char *string )); diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_log_adjusttime.c mpich/mpe/mpe_log_adjusttime.c *** /home/MPI/mpich/current/mpich/mpe/mpe_log_adjusttime.c Thu Jun 6 11:59:07 1996 --- mpich/mpe/mpe_log_adjusttime.c Wed Sep 18 15:39:43 1996 *************** *** 9,16 **** --- 9,19 ---- * * * * All work funded by Argonne National Laboratory \**/ + /* Forward refs for this file */ + void MPE_Log_adjtime2 _ANSI_ARGS_ ((void)); + /* Convert the times to an offset from the starting time */ void MPE_Log_adjtime1() { int xx_i, *bp, n; diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_log_genproc.c mpich/mpe/mpe_log_genproc.c *** /home/MPI/mpich/current/mpich/mpe/mpe_log_genproc.c Thu Jun 6 11:57:10 1996 --- mpich/mpe/mpe_log_genproc.c Tue Oct 15 16:34:55 1996 *************** *** 136,143 **** --- 136,145 ---- MPE_Log_ADDSTRING(b,v,str); MPE_Log_ADDHEADER(b,-10); MPE_Log_ZEROTIME(b); MPE_Log_ADDINTS(b,v,1,&event); + + MPID_trvalid( "Log_def" ); } diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_log_genproc.h mpich/mpe/mpe_log_genproc.h *** /home/MPI/mpich/current/mpich/mpe/mpe_log_genproc.h Thu Jun 6 11:47:41 1996 --- mpich/mpe/mpe_log_genproc.h Wed Sep 18 15:40:56 1996 *************** *** 181,184 **** --- 181,192 ---- static MPE_Log_ParallelMerge _ANSI_ARGS_(( char *filename )); static void MPE_Log_GetStatistics _ANSI_ARGS_(( int *nevents, int *ne_types, double *startTime, double *endTime )); + + MPE_Log_BLOCK *MPE_Log_GetBuf _ANSI_ARGS_(( void )); + MPE_Log_BLOCK *MPE_Log_Flush _ANSI_ARGS_(( void )); + int MPE_Log_FreeLogMem _ANSI_ARGS_ ((MPE_Log_BLOCK * )); + int MPE_Log_init_clock _ANSI_ARGS_ (( void )); + void MPE_Log_def _ANSI_ARGS_ (( int, char * )); + /* void MPE_Log_FlushOutput _ANSI_ARGS_(()); */ + diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_log_merge.c mpich/mpe/mpe_log_merge.c *** /home/MPI/mpich/current/mpich/mpe/mpe_log_merge.c Tue May 28 12:44:30 1996 --- mpich/mpe/mpe_log_merge.c Wed Sep 18 15:40:54 1996 *************** *** 432,440 **** { int srcs, lchild, rchild, parent, np, mtype, am_left; MPE_Log_MBuf *ba, *bb, *bc, *bout; FILE *fp; ! void MPE_Log_FlushOutput(); MPI_Comm_size(MPI_COMM_WORLD,&np); --- 432,440 ---- { int srcs, lchild, rchild, parent, np, mtype, am_left; MPE_Log_MBuf *ba, *bb, *bc, *bout; FILE *fp; ! /* void MPE_Log_FlushOutput(); */ MPI_Comm_size(MPI_COMM_WORLD,&np); diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpe_logf.c mpich/mpe/mpe_logf.c *** /home/MPI/mpich/current/mpich/mpe/mpe_logf.c Fri Nov 10 11:01:34 1995 --- mpich/mpe/mpe_logf.c Wed Oct 16 14:19:17 1996 *************** *** 7,14 **** --- 7,19 ---- #include #include "mpe.h" extern char *malloc(); + /* This is needed to process Cray - style character data */ + #ifdef _CRAY + #include + #endif + #ifdef POINTER_64_BITS extern void *MPIR_ToPointer(); extern int MPIR_FromPointer(); extern void MPIR_RmPointer(); *************** *** 53,125 **** static char *mpe_tmp_cpy( s, d ) char *s; int d; { ! char *p; ! p = (char *)malloc( d + 1 ); ! if (!p) ; ! strncpy( p, s, d ); ! p[d] = 0; ! return p; } ! int mpe_init_log_() { ! return MPE_Init_log(); } ! int mpe_start_log_() { ! return MPE_Start_log(); } ! int mpe_stop_log_() { ! return MPE_Stop_log(); } ! int mpe_describe_state_( start, end, name, color, d1, d2 ) int *start, *end; ! char *name, *color; ! int d1, d2; { ! char *c1, *c2; ! int err; ! c1 = mpe_tmp_cpy( name, d1 ); ! c2 = mpe_tmp_cpy( color, d2 ); ! err = MPE_Describe_state(*start,*end,c1, c2); ! free( c1 ); ! free( c2 ); ! return err; } ! int mpe_describe_event_( event, name, d1) int *event; char *name; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( name, d1 ); ! err = MPE_Describe_event(*event,c1); ! free( c1 ); ! return err; } ! int mpe_log_event_(event,data,string, d1) int *event, *data; char *string; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( string, d1 ); ! err = MPE_Log_event(*event,*data,c1); ! free( c1 ); ! return err; } ! int mpe_finish_log_( filename, d1) char *filename; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( filename, d1 ); ! err = MPE_Finish_log(c1); ! free( c1 ); ! return err; } --- 58,189 ---- static char *mpe_tmp_cpy( s, d ) char *s; int d; { ! char *p; ! p = (char *)malloc( d + 1 ); ! if (!p) ; ! strncpy( p, s, d ); ! p[d] = 0; ! return p; } ! int mpe_init_log_() { ! return MPE_Init_log(); } ! int mpe_start_log_() { ! return MPE_Start_log(); } ! int mpe_stop_log_() { ! return MPE_Stop_log(); } ! ! #ifdef _CRAY ! int mpe_describe_state_( start, end, name, color ) int *start, *end; ! _fcd name, color; { ! char *c1, *c2; ! int err; ! c1 = mpe_tmp_cpy( _fcdtocp( name ), _fcdlen( name ) ); ! c2 = mpe_tmp_cpy( _fcdtocp( color ), _fcdlen( color ) ); ! err = MPE_Describe_state(*start,*end,c1, c2); ! free( c1 ); ! free( c2 ); ! return err; } ! #else ! int mpe_describe_state_( start, end, name, color, d1, d2 ) ! int *start, *end; ! { ! char *c1, *c2; ! int err; ! c1 = mpe_tmp_cpy( name, d1 ); ! c2 = mpe_tmp_cpy( color, d2 ); ! err = MPE_Describe_state(*start,*end,c1, c2); ! free( c1 ); ! free( c2 ); ! return err; ! } ! #endif ! ! #ifdef _CRAY ! int mpe_describe_event_( event, name ) int *event; + _fcd name; + { + char *c1; + int err; + c1 = mpe_tmp_cpy( _fcdtocp( name ), _fcdlen( name ) ); + err = MPE_Describe_event(*event,c1); + free( c1 ); + return err; + } + #else + int mpe_describe_event_( event, name, d1) + int *event; char *name; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( name, d1 ); ! err = MPE_Describe_event(*event,c1); ! free( c1 ); ! return err; } ! #endif ! ! #ifdef _CRAY ! int mpe_log_event_(event,data,string) int *event, *data; + _fcd string; + { + char *c1; + int err; + c1 = mpe_tmp_cpy( _fcdtocp( string ), _fcdtocp( string ) ); + err = MPE_Log_event(*event,*data,c1); + free( c1 ); + return err; + } + #else + int mpe_log_event_(event,data,string, d1) + int *event, *data; char *string; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( string, d1 ); ! err = MPE_Log_event(*event,*data,c1); ! free( c1 ); ! return err; } ! #endif ! ! #ifdef _CRAY ! int mpe_finish_log_( filename) ! _fcd filename; ! { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( _fcdtocp( filename ), _fcdtocp( filename ) ); ! err = MPE_Finish_log(c1); ! free( c1 ); ! return err; ! } ! #else ! int mpe_finish_log_( filename, d1) char *filename; int d1; { ! char *c1; ! int err; ! c1 = mpe_tmp_cpy( filename, d1 ); ! err = MPE_Finish_log(c1); ! free( c1 ); ! return err; } + #endif diff -rc4 /home/MPI/mpich/current/mpich/mpe/mpehname.c mpich/mpe/mpehname.c *** /home/MPI/mpich/current/mpich/mpe/mpehname.c Tue May 28 12:38:18 1996 --- mpich/mpe/mpehname.c Sun Sep 8 10:17:14 1996 *************** *** 2,30 **** #if defined(HAVE_UNAME) #include #endif #if defined(HAVE_SYS_SYSTEMINFO) #include #endif void MPE_GetHostName( name, nlen ) int nlen; char *name; { #if defined(HAVE_UNAME) ! struct utsname utname; ! uname(&utname); ! strncpy( name, utname.nodename, nlen); #elif defined(HAVE_GETHOSTNAME) ! gethostname( name, nlen ); #elif defined(HAVE_SYSINFO) ! sysinfo(SI_HOSTNAME, name, nlen); #else ! strncpy( name, "Unknown!", nlen ); #endif /* See if this name includes the domain */ ! if (!strchr(name,'.')) { int l; l = strlen(name); name[l++] = '.'; name[l] = 0; /* In case we have neither SYSINFO or GETDOMAINNAME */ --- 2,71 ---- #if defined(HAVE_UNAME) #include #endif + #if defined(HAVE_GETHOSTBYNAME) + #include + #endif + #if defined(HAVE_SYSINFO) #if defined(HAVE_SYS_SYSTEMINFO) #include + #else + #ifdef HAVE_SYSINFO + #undef HAVE_SYSINFO #endif + #endif + #endif void MPE_GetHostName( name, nlen ) int nlen; char *name; { + /* This is the perfered form, IF IT WORKS. */ + #if defined(HAVE_UNAME) && defined(HAVE_GETHOSTBYNAME) + struct utsname utname; + struct hostent *he; + uname( &utname ); + he = gethostbyname( utname.nodename ); + /* We must NOT use strncpy because it will null pad to the full length + (nlen). If the user has not allocated MPI_MAX_PROCESSOR_NAME chars, + then this will unnecessarily overwrite storage. + */ + /* strncpy(name,he->h_name,nlen); */ + { + char *p_out = name; + char *p_in = he->h_name; + int i; + for (i=0; irequest = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 387,397 ---- returnVal = PMPI_Bsend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 419,427 **** int returnVal; /* The request may have completed, may have not. */ /* We'll assume it didn't. */ ! rq_remove( requests_head_1, *request ); returnVal = PMPI_Request_free( request ); --- 427,435 ---- int returnVal; /* The request may have completed, may have not. */ /* We'll assume it didn't. */ ! rq_remove( requests_head_1, requests_tail_1, requests_avail_1, *request ); returnVal = PMPI_Request_free( request ); *************** *** 475,484 **** returnVal = PMPI_Send_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 483,493 ---- returnVal = PMPI_Send_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 510,519 **** returnVal = PMPI_Ibsend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 519,529 ---- returnVal = PMPI_Ibsend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 542,550 **** returnVal = PMPI_Irecv( buf, count, datatype, source, tag, comm, request ); if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { ! if ((newrq1 = (request_list*) malloc(sizeof( request_list )))) { newrq1->request = *request; newrq1->status = RQ_RECV; newrq1->next = 0; rq_add( requests_head_1, requests_tail_1, newrq1 ); --- 552,561 ---- returnVal = PMPI_Irecv( buf, count, datatype, source, tag, comm, request ); if (source != MPI_PROC_NULL && returnVal == MPI_SUCCESS) { ! rq_alloc( requests_avail_1, newrq1 ); ! if (newrq1) { newrq1->request = *request; newrq1->status = RQ_RECV; newrq1->next = 0; rq_add( requests_head_1, requests_tail_1, newrq1 ); *************** *** 573,582 **** returnVal = PMPI_Irsend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 584,594 ---- returnVal = PMPI_Irsend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 608,617 **** returnVal = PMPI_Isend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 620,630 ---- returnVal = PMPI_Isend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 643,652 **** returnVal = PMPI_Issend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 656,666 ---- returnVal = PMPI_Issend( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 727,736 **** returnVal = PMPI_Rsend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 741,751 ---- returnVal = PMPI_Rsend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; *************** *** 875,884 **** returnVal = PMPI_Ssend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! if ((newrq = (request_list*) malloc(sizeof( request_list )))) { ! MPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; --- 890,900 ---- returnVal = PMPI_Ssend_init( buf, count, datatype, dest, tag, comm, request ); if (dest != MPI_PROC_NULL) { ! rq_alloc( requests_avail_1, newrq ); ! if (newrq) { ! PMPI_Type_size( datatype, &typesize3 ); newrq->request = *request; newrq->status = RQ_SEND; newrq->size = count * typesize3; newrq->tag = tag; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/adi2hrecv.c mpich/mpid/ch2/adi2hrecv.c *** /home/MPI/mpich/current/mpich/mpid/ch2/adi2hrecv.c Wed Jul 17 13:04:59 1996 --- mpich/mpid/ch2/adi2hrecv.c Tue Sep 24 09:16:28 1996 *************** *** 1,6 **** /* ! * $Id: adi2hrecv.c,v 1.3 1996/07/17 18:04:59 gropp Exp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: adi2hrecv.c,v 1.3 1996/07/17 18:04:59 gropp Exp gropp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 48,68 **** { MPIR_RHANDLE *dmpi_unexpected, *rhandle = &request->rhandle; int len; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; ! MPID_Msg_pack_t msgact = MPID_MSG_OK; void *mybuf; int contig_size; MPID_DO_HETERO(int src_grank); DEBUG_PRINT_ARGS("R starting IrecvDatatype"); /* Just in case; make sure that finish is 0 */ rhandle->finish = 0; ! MPIR_GET_REAL_DATATYPE(datatype); /* See if this is really contiguous */ ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); MPID_DO_HETERO(src_grank = (src_lrank >= 0) ? comm->lrank_to_grank[src_lrank] : src_lrank); MPID_DO_HETERO(MPID_Msg_rep( comm, src_grank, datatype, &msgrep, &msgact )); --- 48,70 ---- { MPIR_RHANDLE *dmpi_unexpected, *rhandle = &request->rhandle; int len; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; ! MPID_DO_HETERO(MPID_Msg_pack_t msgact = MPID_MSG_OK;) void *mybuf; int contig_size; + struct MPIR_DATATYPE *dtype_ptr; MPID_DO_HETERO(int src_grank); DEBUG_PRINT_ARGS("R starting IrecvDatatype"); /* Just in case; make sure that finish is 0 */ rhandle->finish = 0; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); /* See if this is really contiguous */ ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); ! MPID_DO_HETERO(src_grank = (src_lrank >= 0) ? comm->lrank_to_grank[src_lrank] : src_lrank); MPID_DO_HETERO(MPID_Msg_rep( comm, src_grank, datatype, &msgrep, &msgact )); *************** *** 103,111 **** rhandle->buf = mybuf; rhandle->start = buf; rhandle->count = count; rhandle->datatype = datatype; ! datatype->ref_count++; rhandle->is_complete = 0; rhandle->wait = 0; rhandle->test = 0; rhandle->finish = MPID_UnpackMessageComplete; --- 105,113 ---- rhandle->buf = mybuf; rhandle->start = buf; rhandle->count = count; rhandle->datatype = datatype; ! dtype_ptr->ref_count++; rhandle->is_complete = 0; rhandle->wait = 0; rhandle->test = 0; rhandle->finish = MPID_UnpackMessageComplete; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/adi2hsend.c mpich/mpid/ch2/adi2hsend.c *** /home/MPI/mpich/current/mpich/mpid/ch2/adi2hsend.c Wed Jul 17 13:05:00 1996 --- mpich/mpid/ch2/adi2hsend.c Tue Sep 24 08:56:21 1996 *************** *** 1,6 **** /* ! * $Id: adi2hsend.c,v 1.4 1996/07/17 18:04:59 gropp Exp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: adi2hsend.c,v 1.4 1996/07/17 18:04:59 gropp Exp gropp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 27,34 **** --- 27,35 ---- int len, contig_size; void *mybuf; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; MPID_Msg_pack_t msgact = MPID_MSG_OK; + struct MPIR_DATATYPE *dtype_ptr; /* * Alogrithm: * First, see if we can just send the data (contiguous or, for *************** *** 36,46 **** * Otherwise, * Create a local buffer, use SendContig, and then free the buffer. */ ! /* Must put get_size first, incase the datatype is not "real" datatype ! (needed by MPID_Msg_rep, which needs real datatype) */ ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 --- 37,47 ---- * Otherwise, * Create a local buffer, use SendContig, and then free the buffer. */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); ! MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 *************** *** 50,58 **** communicator. */ len = contig_size * count; MPID_SendContig( comm, buf, len, src_lrank, tag, context_id, ! dest_grank, msgrep, error_code ); return; } mybuf = 0; --- 51,59 ---- communicator. */ len = contig_size * count; MPID_SendContig( comm, buf, len, src_lrank, tag, context_id, ! dest_grank, msgrep, error_code ); return; } mybuf = 0; *************** *** 85,92 **** --- 86,94 ---- int len, contig_size; char *mybuf; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; MPID_Msg_pack_t msgact = MPID_MSG_OK; + struct MPIR_DATATYPE *dtype_ptr; /* * Alogrithm: * First, see if we can just send the data (contiguous or, for *************** *** 97,105 **** /* Just in case; make sure that finish is 0 */ request->shandle.finish = 0; ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 MPID_DO_HETERO(&& msgact == MPID_MSG_OK)) { --- 99,108 ---- /* Just in case; make sure that finish is 0 */ request->shandle.finish = 0; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 MPID_DO_HETERO(&& msgact == MPID_MSG_OK)) { diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/adi2hssend.c mpich/mpid/ch2/adi2hssend.c *** /home/MPI/mpich/current/mpich/mpid/ch2/adi2hssend.c Wed Jul 17 13:05:00 1996 --- mpich/mpid/ch2/adi2hssend.c Wed Sep 25 17:07:12 1996 *************** *** 1,6 **** /* ! * $Id: adi2hssend.c,v 1.2 1996/07/17 18:04:59 gropp Exp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: adi2hssend.c,v 1.2 1996/07/17 18:04:59 gropp Exp gropp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 27,34 **** --- 27,35 ---- int len, contig_size; void *mybuf; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; MPID_Msg_pack_t msgact = MPID_MSG_OK; + struct MPIR_DATATYPE *dtype_ptr; /* * Alogrithm: * First, see if we can just send the data (contiguous or, for *************** *** 36,44 **** * Otherwise, * Create a local buffer, use SendContig, and then free the buffer. */ ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 --- 37,46 ---- * Otherwise, * Create a local buffer, use SendContig, and then free the buffer. */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); if (contig_size > 0 *************** *** 83,91 **** int len, contig_size; char *mybuf; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; MPID_Msg_pack_t msgact = MPID_MSG_OK; ! /* * Alogrithm: * First, see if we can just send the data (contiguous or, for * heterogeneous, packed). --- 85,93 ---- int len, contig_size; char *mybuf; MPID_Msgrep_t msgrep = MPID_MSGREP_RECEIVER; MPID_Msg_pack_t msgact = MPID_MSG_OK; ! struct MPIR_DATATYPE *dtype_ptr; /* * Alogrithm: * First, see if we can just send the data (contiguous or, for * heterogeneous, packed). *************** *** 94,102 **** */ MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); if (contig_size > 0 MPID_DO_HETERO(&& msgact == MPID_MSG_OK)) { /* Just drop through into the contiguous send routine For packed data, the representation format is that in the --- 96,105 ---- */ MPID_DO_HETERO(MPID_Msg_rep( comm, dest_grank, datatype, &msgrep, &msgact )); ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); if (contig_size > 0 MPID_DO_HETERO(&& msgact == MPID_MSG_OK)) { /* Just drop through into the contiguous send routine For packed data, the representation format is that in the diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/adi2pack.c mpich/mpid/ch2/adi2pack.c *** /home/MPI/mpich/current/mpich/mpid/ch2/adi2pack.c Tue Jul 23 15:20:39 1996 --- mpich/mpid/ch2/adi2pack.c Wed Sep 25 10:41:06 1996 *************** *** 1,6 **** /* ! * $Id: adi2pack.c,v 1.3 1996/07/17 18:04:59 gropp Exp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: adi2pack.c,v 1.3 1996/07/17 18:04:59 gropp Exp gropp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 28,35 **** --- 28,36 ---- MPI_Datatype datatype; MPID_Msgrep_t *msgrep; MPID_Msg_pack_t *msgact; { + struct MPIR_DATATYPE *dtype_ptr; #ifndef MPID_HAS_HETERO *msgrep = MPID_MSGREP_RECEIVER; *msgact = MPID_MSG_OK; #else *************** *** 38,48 **** *msgrep = MPID_MSGREP_RECEIVER; *msgact = MPID_MSG_OK; return; } /* Packed data is a special case (data already in correct form) */ ! if (datatype->dte_type == MPIR_PACKED) { switch (comm->msgform) { case MPID_MSG_OK: *msgrep = MPID_MSGREP_RECEIVER; break; case MPID_MSG_SWAP: *msgrep = MPID_MSGREP_SENDER; break; case MPID_MSG_XDR: *msgrep = MPID_MSGREP_XDR; break; --- 39,50 ---- *msgrep = MPID_MSGREP_RECEIVER; *msgact = MPID_MSG_OK; return; } + dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); /* Packed data is a special case (data already in correct form) */ ! if (dtype_ptr->dte_type == MPIR_PACKED) { switch (comm->msgform) { case MPID_MSG_OK: *msgrep = MPID_MSGREP_RECEIVER; break; case MPID_MSG_SWAP: *msgrep = MPID_MSGREP_SENDER; break; case MPID_MSG_XDR: *msgrep = MPID_MSGREP_XDR; break; *************** *** 113,136 **** MPI_Datatype datatype; MPID_Msg_pack_t msgact; { int contig_size; #if defined(MPID_HAS_HETERO) && defined(HAS_XDR) /* Only XDR has a different length */ if (msgact == MPID_MSG_XDR) { - MPIR_GET_REAL_DATATYPE(datatype); *size = MPID_Mem_XDR_Len( datatype, count ); } else #endif { ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); if (contig_size > 0) *size = contig_size * count; else { /* Our pack routine is "tight" */ ! MPIR_GET_REAL_DATATYPE(datatype); ! *size = datatype->size * count; } } } --- 115,139 ---- MPI_Datatype datatype; MPID_Msg_pack_t msgact; { int contig_size; + struct MPIR_DATATYPE *dtype_ptr; + + dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); #if defined(MPID_HAS_HETERO) && defined(HAS_XDR) /* Only XDR has a different length */ if (msgact == MPID_MSG_XDR) { *size = MPID_Mem_XDR_Len( datatype, count ); } else #endif { ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); if (contig_size > 0) *size = contig_size * count; else { /* Our pack routine is "tight" */ ! *size = dtype_ptr->size * count; } } } *************** *** 142,158 **** MPI_Datatype datatype; MPI_Comm comm; MPID_Msg_pack_t msgact; { ! int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, MPI_Datatype, int, void * )) = 0; void *packctx = 0; int outlen; #ifdef HAS_XDR XDR xdr_ctx; #endif ! MPIR_GET_REAL_DATATYPE(datatype); #ifdef MPID_HAS_HETERO switch (msgact) { #ifdef HAS_XDR --- 145,163 ---- MPI_Datatype datatype; MPI_Comm comm; MPID_Msg_pack_t msgact; { ! int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void * )) = 0; + struct MPIR_DATATYPE *dtype_ptr; void *packctx = 0; int outlen; #ifdef HAS_XDR XDR xdr_ctx; #endif ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); #ifdef MPID_HAS_HETERO switch (msgact) { #ifdef HAS_XDR *************** *** 170,178 **** break; } #endif outlen = 0; ! *error_code = MPIR_Pack2( src, count, datatype, packcontig, packctx, dest, &outlen, position ); #if HAS_XDR if (packcontig == MPID_Type_XDR_encode) MPID_Mem_XDR_Free( &xdr_ctx ); --- 175,183 ---- break; } #endif outlen = 0; ! *error_code = MPIR_Pack2( src, count, dtype_ptr, packcontig, packctx, dest, &outlen, position ); #if HAS_XDR if (packcontig == MPID_Type_XDR_encode) MPID_Mem_XDR_Free( &xdr_ctx ); *************** *** 190,199 **** MPID_Msgrep_t msgrep; { int act_len = 0; int dest_len = 0; ! MPIR_GET_REAL_DATATYPE(datatype); *error_code = MPIR_Unpack( comm, (char *)src + *in_position, maxcount - *in_position, count, datatype, msgrep, dest, &act_len, &dest_len ); *in_position += act_len; --- 195,205 ---- MPID_Msgrep_t msgrep; { int act_len = 0; int dest_len = 0; + /* struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR( datatype ); */ *error_code = MPIR_Unpack( comm, (char *)src + *in_position, maxcount - *in_position, count, datatype, msgrep, dest, &act_len, &dest_len ); *in_position += act_len; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/bswap2.c mpich/mpid/ch2/bswap2.c *** /home/MPI/mpich/current/mpich/mpid/ch2/bswap2.c Tue Jul 16 16:22:34 1996 --- mpich/mpid/ch2/bswap2.c Thu Oct 17 09:35:53 1996 *************** *** 45,61 **** } int MPID_Type_swap_copy(d, s, t, N, ctx) unsigned char *d, *s; ! MPI_Datatype t; int N; void *ctx; { ! int len = t->size * N; ! /* There are some 0-sized basic types which we can just ignore */ ! if (len == 0) return MPI_SUCCESS; /* Some compilers issue warnings for using sizeof(...) as an int (!) */ switch (t->dte_type) { case MPIR_CHAR: case MPIR_UCHAR: --- 45,63 ---- } int MPID_Type_swap_copy(d, s, t, N, ctx) unsigned char *d, *s; ! struct MPIR_DATATYPE *t; int N; void *ctx; { ! int len; ! len = t->size * N; + /* There are some 0-sized basic types which we can just ignore */ + if (len == 0) return MPI_SUCCESS; + /* Some compilers issue warnings for using sizeof(...) as an int (!) */ switch (t->dte_type) { case MPIR_CHAR: case MPIR_UCHAR: *************** *** 98,114 **** "Tried to swap unsupported type"); memcpy(d, s, len); break; } ! return len; } void MPID_Type_swap_inplace(b, t, N) unsigned char *b; ! MPI_Datatype t; int N; { ! switch (t->dte_type) { case MPIR_CHAR: case MPIR_UCHAR: case MPIR_BYTE: case MPIR_PACKED: --- 100,117 ---- "Tried to swap unsupported type"); memcpy(d, s, len); break; } ! return len; } void MPID_Type_swap_inplace(b, t, N) unsigned char *b; ! struct MPIR_DATATYPE *t; int N; { ! ! switch (t->dte_type) { case MPIR_CHAR: case MPIR_UCHAR: case MPIR_BYTE: case MPIR_PACKED: *************** *** 146,167 **** default: MPIR_ERROR(MPI_COMM_WORLD, MPI_ERR_INTERN, "Tried to convert unsupported type"); break; ! } } int MPID_Mem_convert_len( dest_type, datatype, count ) MPID_Msgrep_t dest_type; int count; MPI_Datatype datatype; { #ifdef HAS_XDR ! if (dest_type == MPID_MSGREP_XDR) ! return MPID_Mem_XDR_Len( datatype, count ); #endif /* This works for both no conversion and for byte-swap/extend */ ! return datatype->size * count; } #ifdef HAS_XDR /* XXXX- Both of these routines need a way of returning the true size --- 149,172 ---- default: MPIR_ERROR(MPI_COMM_WORLD, MPI_ERR_INTERN, "Tried to convert unsupported type"); break; ! } } int MPID_Mem_convert_len( dest_type, datatype, count ) MPID_Msgrep_t dest_type; int count; MPI_Datatype datatype; { + struct MPIR_DATATYPE *dtype_ptr; #ifdef HAS_XDR ! if (dest_type == MPID_MSGREP_XDR) ! return MPID_Mem_XDR_Len( datatype, count ); #endif /* This works for both no conversion and for byte-swap/extend */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! return dtype_ptr->size * count; } #ifdef HAS_XDR /* XXXX- Both of these routines need a way of returning the true size *************** *** 181,196 **** int MPID_Mem_XDR_Len( datatype, count ) MPI_Datatype datatype; int count; { /* XDR buffer must be a multiple of 4 in size! */ /* This is a very, very pessimistic value. It assumes that the data consists entirely of MPI_CHAR or MPI_BYTE. Eventually, we must run through the data and get the correct xdr size (or store it in the datatype structure for heterogeneous systems). 4 is basically the maximum expansion size... */ ! return (4) * count * datatype->size; } /* initialize an xdr buffer */ void MPID_Mem_XDR_Init( buf, size, xdr_dir, xdr_ctx ) --- 186,203 ---- int MPID_Mem_XDR_Len( datatype, count ) MPI_Datatype datatype; int count; { + struct MPIR_DATATYPE *dtype_ptr; /* XDR buffer must be a multiple of 4 in size! */ /* This is a very, very pessimistic value. It assumes that the data consists entirely of MPI_CHAR or MPI_BYTE. Eventually, we must run through the data and get the correct xdr size (or store it in the datatype structure for heterogeneous systems). 4 is basically the maximum expansion size... */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! return (4) * count * dtype_ptr->size; } /* initialize an xdr buffer */ void MPID_Mem_XDR_Init( buf, size, xdr_dir, xdr_ctx ) *************** *** 345,353 **** int MPID_Type_XDR_encode(d, s, t, N, ctx) unsigned char *d, *s; ! MPI_Datatype t; int N; void *ctx; { int len; --- 352,360 ---- int MPID_Type_XDR_encode(d, s, t, N, ctx) unsigned char *d, *s; ! struct MPIR_DATATYPE *t; int N; void *ctx; { int len; *************** *** 436,447 **** Needs to return the other as well. */ int MPID_Type_XDR_decode(s, N, t, elm_size, d, srclen, srcreadlen, destlen, ctx ) ! unsigned char *d, *s; ! MPI_Datatype t; ! int N, elm_size, srclen, *srcreadlen, *destlen; ! void *ctx; { int act_size; int mpi_errno = MPI_SUCCESS; XDR *xdr_ctx = (XDR *)ctx; --- 443,454 ---- Needs to return the other as well. */ int MPID_Type_XDR_decode(s, N, t, elm_size, d, srclen, srcreadlen, destlen, ctx ) ! unsigned char *d, *s; ! struct MPIR_DATATYPE *t; ! int N, elm_size, srclen, *srcreadlen, *destlen; ! void *ctx; { int act_size; int mpi_errno = MPI_SUCCESS; XDR *xdr_ctx = (XDR *)ctx; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/chdebug.c mpich/mpid/ch2/chdebug.c *** /home/MPI/mpich/current/mpich/mpid/ch2/chdebug.c Tue Jul 23 15:20:44 1996 --- mpich/mpid/ch2/chdebug.c Thu Sep 19 08:38:12 1996 *************** *** 1,6 **** /* ! * $Id: chdebug.c,v 1.5 1996/07/23 20:20:44 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: chdebug.c,v 1.5 1996/07/23 20:20:44 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 9,17 **** #include "mpid.h" #include "mpiddev.h" #include ! FILE *MPID_DEBUG_FILE = stderr; FILE *MPID_TRACE_FILE = 0; int MPID_DebugFlag = 0; void MPID_Get_print_pkt ANSI_ARGS(( FILE *, MPID_PKT_T *)); --- 9,23 ---- #include "mpid.h" #include "mpiddev.h" #include ! /* ! Unfortunately, stderr is not a guarenteed to be a compile-time ! constant in ANSI C, so we can't initialize MPID_DEBUG_FILE with ! stderr. Instead, we set it to null, and check for null. Note ! that stdout is used in chinit.c ! */ ! FILE *MPID_DEBUG_FILE = 0; FILE *MPID_TRACE_FILE = 0; int MPID_DebugFlag = 0; void MPID_Get_print_pkt ANSI_ARGS(( FILE *, MPID_PKT_T *)); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/chhetero.h mpich/mpid/ch2/chhetero.h *** /home/MPI/mpich/current/mpich/mpid/ch2/chhetero.h Wed Jul 17 10:18:50 1996 --- mpich/mpid/ch2/chhetero.h Thu Sep 26 11:07:19 1996 *************** *** 59,67 **** int MPID_Mem_XDR_ByteDecode ANSI_ARGS(( unsigned char *, unsigned char *, int, int, int *, int *, XDR * )); #endif int MPID_Type_XDR_encode ANSI_ARGS((unsigned char *, unsigned char *, ! MPI_Datatype, int, void * )); int MPID_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! MPI_Datatype, int, void * )); #endif /* MPID_DEVICE_CODE */ #endif --- 59,67 ---- int MPID_Mem_XDR_ByteDecode ANSI_ARGS(( unsigned char *, unsigned char *, int, int, int *, int *, XDR * )); #endif int MPID_Type_XDR_encode ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void * )); int MPID_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void * )); #endif /* MPID_DEVICE_CODE */ #endif diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/chneager.c mpich/mpid/ch2/chneager.c *** /home/MPI/mpich/current/mpich/mpid/ch2/chneager.c Tue Jul 16 08:12:07 1996 --- mpich/mpid/ch2/chneager.c Sat Sep 21 16:50:51 1996 *************** *** 14,22 **** nonblocking sends. */ /* Prototype definitions */ ! int MPID_CH_Eagern_isend ANSI_ARGS(( void *, int, int, int, int, int, int, MPIR_SHANDLE * )); int MPID_CH_Eagern_cancel_send ANSI_ARGS(( MPIR_SHANDLE * )); int MPID_CH_Eagern_wait_send ANSI_ARGS(( MPIR_SHANDLE * )); int MPID_CH_Eagern_test_send ANSI_ARGS(( MPIR_SHANDLE * )); --- 14,23 ---- nonblocking sends. */ /* Prototype definitions */ ! int MPID_CH_Eagern_isend ANSI_ARGS(( void *, int, int, int, int, int, ! MPID_Msgrep_t, MPIR_SHANDLE * )); int MPID_CH_Eagern_cancel_send ANSI_ARGS(( MPIR_SHANDLE * )); int MPID_CH_Eagern_wait_send ANSI_ARGS(( MPIR_SHANDLE * )); int MPID_CH_Eagern_test_send ANSI_ARGS(( MPIR_SHANDLE * )); *************** *** 25,33 **** /* * Blocking operations come from chbeager.c */ extern int MPID_CH_Eagerb_send ANSI_ARGS(( void *, int, int, int, int, ! int, int )); extern int MPID_CH_Eagerb_recv ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_irecv ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_save ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_unxrecv_start ANSI_ARGS(( MPIR_RHANDLE *, void * )); --- 26,34 ---- /* * Blocking operations come from chbeager.c */ extern int MPID_CH_Eagerb_send ANSI_ARGS(( void *, int, int, int, int, ! int, MPID_Msgrep_t )); extern int MPID_CH_Eagerb_recv ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_irecv ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_save ANSI_ARGS(( MPIR_RHANDLE *, int, void * )); extern int MPID_CH_Eagerb_unxrecv_start ANSI_ARGS(( MPIR_RHANDLE *, void * )); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/chnodename.c mpich/mpid/ch2/chnodename.c *** /home/MPI/mpich/current/mpich/mpid/ch2/chnodename.c Fri May 17 14:50:30 1996 --- mpich/mpid/ch2/chnodename.c Sun Sep 8 10:17:15 1996 *************** *** 8,15 **** --- 8,18 ---- #if defined(HAVE_UNAME) #include #endif + #if defined(HAVE_GETHOSTBYNAME) + #include + #endif #if defined(HAVE_SYSINFO) #if defined(HAVE_SYSTEMINFO_H) #include #else *************** *** 24,31 **** --- 27,54 ---- void MPID_Node_name( name, nlen ) char *name; int nlen; { + /* This is the perfered form, IF IT WORKS. */ + #if defined(HAVE_UNAME) && defined(HAVE_GETHOSTBYNAME) + struct utsname utname; + struct hostent *he; + uname( &utname ); + he = gethostbyname( utname.nodename ); + /* We must NOT use strncpy because it will null pad to the full length + (nlen). If the user has not allocated MPI_MAX_PROCESSOR_NAME chars, + then this will unnecessarily overwrite storage. + */ + /* strncpy(name,he->h_name,nlen); */ + { + char *p_out = name; + char *p_in = he->h_name; + int i; + for (i=0; inull requires no special test */ ! extern MPI_Datatype MPIR_datatypes[MPIR_MAX_DATATYPE_ARRAY]; ! /* Used to allocate elements */ extern void *MPIR_dtes; /* sbcnst datatype elements */ /* Translate between index and datatype pointer */ #define MPIR_GET_REAL_DATATYPE(a) \ {if(MPIR_TEST_PREDEF_DATATYPE(a)) a = MPIR_datatypes[(MPI_Aint)(a)];} /* Need to cast int to MPI_Aint to suppress silly compiler warnings */ --- 43,75 ---- MPI_Aint stride; /* stride, for VECTOR and HVECTOR types */ MPI_Aint *indices; /* array of indices, for (H)INDEXED, STRUCT */ int blocklen; /* blocklen, for VECTOR and HVECTOR types */ int *blocklens; /* array of blocklens for (H)INDEXED, STRUCT */ + struct MPIR_DATATYPE *old_type, + **old_types, + *flattened; + MPI_Datatype self; /* Index for this structure */ + #ifdef FOO MPI_Datatype old_type; /* type this type is built of, if 1 */ MPI_Datatype *old_types;/* array of types, for STRUCT */ MPI_Datatype flattened; /* Flattened version, if available */ + #endif }; ! #define MPIR_GET_DTYPE_PTR(idx) \ ! (struct MPIR_DATATYPE *)MPIR_ToPointer( idx ) ! #define MPIR_GET_DTYPE_SIZE(idx,ptr) \ ! ((ptr)->is_contig) ? (ptr)->size : 0 ! #define MPIR_TEST_DTYPE(idx,ptr,comm,routine_name) \ ! if ((!(ptr) && (mpi_errno = (MPI_ERR_TYPE))) || \ ! (((ptr)->cookie != MPIR_DATATYPE_COOKIE) && (mpi_errno = MPI_ERR_TYPE)) ){\ ! return MPIR_ERROR(comm,mpi_errno,routine_name);} ! /* Used to allocate elements */ extern void *MPIR_dtes; /* sbcnst datatype elements */ + #ifdef NEW_POINTERS + #else /* Translate between index and datatype pointer */ #define MPIR_GET_REAL_DATATYPE(a) \ {if(MPIR_TEST_PREDEF_DATATYPE(a)) a = MPIR_datatypes[(MPI_Aint)(a)];} /* Need to cast int to MPI_Aint to suppress silly compiler warnings */ *************** *** 73,77 **** --- 91,97 ---- if (MPIR_TEST_PREDEF_DATATYPE(a)) contig_size=MPIR_DATATYPE_SIZE(a); \ else {MPIR_GET_REAL_DATATYPE(a);\ if ((a)->is_contig) contig_size = (a)->size; else contig_size = 0;} #endif + + #endif /* new pointers */ #endif diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/flow.h mpich/mpid/ch2/flow.h *** /home/MPI/mpich/current/mpich/mpid/ch2/flow.h Wed Jun 5 16:49:05 1996 --- mpich/mpid/ch2/flow.h Sun Sep 8 09:33:46 1996 *************** *** 162,166 **** --- 162,167 ---- extern void MPID_RecvFlowPacket ANSI_ARGS((MPID_PKT_T *, int)); extern void MPID_FlowSetup ANSI_ARGS((void)); extern void MPID_FlowDelete ANSI_ARGS((void)); extern void MPID_FlowDump ANSI_ARGS((FILE *)); + extern void MPID_FlowDebug ANSI_ARGS((int)); #endif diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/mpid.h mpich/mpid/ch2/mpid.h *** /home/MPI/mpich/current/mpich/mpid/ch2/mpid.h Tue Jul 16 14:07:10 1996 --- mpich/mpid/ch2/mpid.h Mon Sep 23 16:57:20 1996 *************** *** 186,196 **** extern int fprintf(FILE*,const char*,...); extern int printf(const char*,...); extern int fflush(FILE *); extern int fclose(FILE *); ! extern int fscanf(FILE *,char *,...); extern int fputs(const char *,FILE *); ! extern int sscanf(char *, char *, ... ); #include extern void *memset(void *, int, size_t); #endif --- 186,196 ---- extern int fprintf(FILE*,const char*,...); extern int printf(const char*,...); extern int fflush(FILE *); extern int fclose(FILE *); ! extern int fscanf(FILE *,const char *,...); extern int fputs(const char *,FILE *); ! extern int sscanf(const char *, const char *, ... ); #include extern void *memset(void *, int, size_t); #endif diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch2/mpimem.h mpich/mpid/ch2/mpimem.h *** /home/MPI/mpich/current/mpich/mpid/ch2/mpimem.h Tue Jul 16 09:19:04 1996 --- mpich/mpid/ch2/mpimem.h Thu Sep 19 14:39:35 1996 *************** *** 17,25 **** --- 17,31 ---- #define free $'Use mpimem.h'$ #define calloc $'Use mpimem.h'$ #endif #else + /* We'd like to have a definition for memset etc. If we can find it ... */ + #if defined(HAVE_MEMORY_H) #include + #elif defined(HAVE_STRING_H) + #include + #endif + /* Need to determine how to declare malloc for all systems, some of which may need/allow an explicit declaration */ #include #define MALLOC(a) malloc( (unsigned)(a) ) diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_lfshmem/lfshmempriv.c mpich/mpid/ch_lfshmem/lfshmempriv.c *** /home/MPI/mpich/current/mpich/mpid/ch_lfshmem/lfshmempriv.c Fri Jul 5 09:58:31 1996 --- mpich/mpid/ch_lfshmem/lfshmempriv.c Thu Sep 19 12:43:24 1996 *************** *** 147,155 **** --- 147,158 ---- while ( *cnt ) p2p_yield(); /* If process 0, change phase. Reset the OTHER counter*/ if (MPID_myid == 0) { + /* Note that this requires that these operations occur + in EXACTLY THIS ORDER */ MPID_shmem->barrier.phase = ! MPID_shmem->barrier.phase; + p2p_write_sync(); *cntother = MPID_shmem->barrier.size; } else while (! *cntother) p2p_yield(); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_mpl/Makefile.in mpich/mpid/ch_mpl/Makefile.in *** /home/MPI/mpich/current/mpich/mpid/ch_mpl/Makefile.in Sat Jul 6 09:11:24 1996 --- mpich/mpid/ch_mpl/Makefile.in Mon Oct 7 21:15:16 1996 *************** *** 1,6 **** # ! # $Id: Makefile.in,v 1.3 1996/07/06 14:11:24 gropp Exp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. # --- 1,6 ---- # ! # $Id: Makefile.in,v 1.3 1996/07/06 14:11:24 gropp Exp gropp $ # # (C) 1993,1995 by Argonne National Laboratory and Mississipi State University. # All rights reserved. See COPYRIGHT in top-level directory. # *************** *** 47,55 **** chinit.o chnodename.o chtick.o mplpriv.o queue.o cmnargs.o \ tr2.o sbcnst2.o \ $(ASMFILES_O) gclock.o read_clock.o @DEVOFILES@ ! default: $(LIBNAME) libdev: $(LIBDEV) $(SOURCE): ../ch2/mpid.h chdef.h --- 47,55 ---- chinit.o chnodename.o chtick.o mplpriv.o queue.o cmnargs.o \ tr2.o sbcnst2.o \ $(ASMFILES_O) gclock.o read_clock.o @DEVOFILES@ ! default: $(LIBNAME) spxcp libdev: $(LIBDEV) $(SOURCE): ../ch2/mpid.h chdef.h *************** *** 65,72 **** --- 65,78 ---- /bin/rm -f *~ $(MPI_OBJECTS) libmpid.a mprerr.o read_clock.o: read_clock.sav cp read_clock.sav read_clock.o + # + # Some IBM implemenations of make are INCORRECT and fail to use the following + # rule to override the default rules (and looks for a gclock.c). + # If you have this problme, just execute this copy and file a bug report with + # IBM. + # gclock.o: gclock.sav cp gclock.sav gclock.o setlinks: *************** *** 95,98 **** --- 101,113 ---- lint -chvuz -I../.. -I../../include -I../ch2 \ -I./ \ -DMPID_DEVICE_CODE $(SOURCE) ../util/queue.c ../util/cmnargs.c + # + # spxcp is an IBM SP-specific program to copy executables using the + # underlying SP message-passing code. This is needed because POE doesn't + # do this. If for some reason this fails to compile, there is nothing lost; + # the mpirun code uses it ONLY if it is available. + # + spxcp: spxcp.c + -mpcc -o spxcp spxcp.c + -cp spxcp ../../lib/$(ARCH)/$(COMM) diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_nexus/Makefile.in mpich/mpid/ch_nexus/Makefile.in *** /home/MPI/mpich/current/mpich/mpid/ch_nexus/Makefile.in Mon Mar 18 14:07:57 1996 --- mpich/mpid/ch_nexus/Makefile.in Wed Sep 18 08:56:19 1996 *************** *** 23,34 **** ALL: default LIBNAME = ../../lib/$(ARCH)/$(COMM)/libmpi.a CFLAGS = @CFLAGS@ $(OPTFLAGS) -I../.. -I../../include -I./ \ $(INCLUDE_DIR) \ ! -DMPI_$(ARCH) -DMPID_DEVICE_CODE @GETNAME_DEFS@ @DEVCFLAGS@ \ ! @DEV_DEFS@ SOURCE = nexusevent.c nexusrecv.c nexussend.c nexusinit.c nexusprobe.c \ nexussync.c nexuspriv.c nexuscoll.c nexusdebug.c nexushetero.c SOURCEC = $(SOURCE) SOURCEF = --- 23,37 ---- ALL: default LIBNAME = ../../lib/$(ARCH)/$(COMM)/libmpi.a + # Some makes will continue past a new line, so if @DEV_DEFS@ is empty, + # we'd have a problem. I've moved a permanent definition to the end of the + # list. CFLAGS = @CFLAGS@ $(OPTFLAGS) -I../.. -I../../include -I./ \ $(INCLUDE_DIR) \ ! -DMPID_DEVICE_CODE @GETNAME_DEFS@ @DEVCFLAGS@ \ ! @DEV_DEFS@ -DMPI_$(ARCH) SOURCE = nexusevent.c nexusrecv.c nexussend.c nexusinit.c nexusprobe.c \ nexussync.c nexuspriv.c nexuscoll.c nexusdebug.c nexushetero.c SOURCEC = $(SOURCE) SOURCEF = *************** *** 54,60 **** ../../lib/$(ARCH)/$(COMM)/libmpi.a: $(MPI_OBJECTS) $(AR) $@ $? $(RANLIB) $@ ! ! cc -o (CFLAGS) -DBUILD_MAIN --- 57,64 ---- ../../lib/$(ARCH)/$(COMM)/libmpi.a: $(MPI_OBJECTS) $(AR) $@ $? $(RANLIB) $@ ! # This looks like an old piece of makefile. ! stray_main: ! cc -o $(CFLAGS) -DBUILD_MAIN diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/config.status mpich/mpid/ch_p4/p4-1.4/config.status *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/config.status Sat Jul 27 08:35:50 1996 --- mpich/mpid/ch_p4/p4-1.4/config.status Thu Oct 17 09:37:37 1996 *************** *** 3,18 **** # Run this file to recreate the current configuration. # This directory was configured as follows, # on host godzilla.mcs.anl.gov: # ! # ./configure -p4arch=SUN -p4make=make -opt=-g -p4comm=ch_p4 for arg do case "$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo running ${CONFIG_SHELL-/bin/sh} ./configure -p4arch=SUN -p4make=make -opt=-g -p4comm=ch_p4 ! exec ${CONFIG_SHELL-/bin/sh} ./configure -p4arch=SUN -p4make=make -opt=-g -p4comm=ch_p4 ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done --- 3,18 ---- # Run this file to recreate the current configuration. # This directory was configured as follows, # on host godzilla.mcs.anl.gov: # ! # ./configure -p4arch=SUN -p4make=make -opt=-g -cc=gcc -p4comm=ch_p4 -cflags=-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES for arg do case "$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo running ${CONFIG_SHELL-/bin/sh} ./configure -p4arch=SUN -p4make=make -opt=-g -cc=gcc -p4comm=ch_p4 -cflags=-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES ! exec ${CONFIG_SHELL-/bin/sh} ./configure -p4arch=SUN -p4make=make -opt=-g -cc=gcc -p4comm=ch_p4 -cflags=-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esac done *************** *** 19,42 **** trap 'rm -f Makefile lib/Makefile alog/Makefile usc/Makefile usc/usctest/Makefile messages/Makefile include/Makefile lib_f/Makefile contrib/Makefile contrib_f/Makefile bin/Makefile doc/Makefile messages_f/Makefile misc/Makefile monitors/Makefile servers/Makefile; exit 1' 1 3 15 RANLIB='ranlib' P4ARCH='SUN' MAKE='make' ! CC='cc' ! DEFS=' -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SIGACTION=1' CFLAGS='' FC='f77' ! CLINKER='cc' FLINKER='f77' AR='ar lruv' RM='/bin/rm' P4_OBJ='$(P4_COMM_OBJ) $(P4_SOCK_OBJ) $(P4_SHMEM_OBJ)' MDEP_LIBS='' CRYPT_LIBS='' ! MDEP_CFLAGS=' ' MDEP_FFLAGS='' MDEP_LFLAGS='' OPTFLAGS='-g' ! P4_CONFIGURED_TIME='Sat Jul 27 08:35:32 CDT 1996' DEFINE_ALOG='#undef ALOG_TRACE' DEFINE_SYSV_IPC='#undef SYSV_IPC' DEFINE_VENDOR_IPC='#undef VENDOR_IPC' DEFINE_P4_DPRINTFL='#define P4_DPRINTFL' --- 19,42 ---- trap 'rm -f Makefile lib/Makefile alog/Makefile usc/Makefile usc/usctest/Makefile messages/Makefile include/Makefile lib_f/Makefile contrib/Makefile contrib_f/Makefile bin/Makefile doc/Makefile messages_f/Makefile misc/Makefile monitors/Makefile servers/Makefile; exit 1' 1 3 15 RANLIB='ranlib' P4ARCH='SUN' MAKE='make' ! CC='gcc' ! DEFS=' -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DUSE_STDARG=1 -DHAVE_SIGACTION=1' CFLAGS='' FC='f77' ! CLINKER='gcc' FLINKER='f77' AR='ar lruv' RM='/bin/rm' P4_OBJ='$(P4_COMM_OBJ) $(P4_SOCK_OBJ) $(P4_SHMEM_OBJ)' MDEP_LIBS='' CRYPT_LIBS='' ! MDEP_CFLAGS='-Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint -DNEEDS_STDLIB_PROTOTYPES ' MDEP_FFLAGS='' MDEP_LFLAGS='' OPTFLAGS='-g' ! P4_CONFIGURED_TIME='Thu Oct 17 09:36:50 CDT 1996' DEFINE_ALOG='#undef ALOG_TRACE' DEFINE_SYSV_IPC='#undef SYSV_IPC' DEFINE_VENDOR_IPC='#undef VENDOR_IPC' DEFINE_P4_DPRINTFL='#define P4_DPRINTFL' *************** *** 43,51 **** LISTENER_PATHNAME='' RSHCOMMAND='' LIBS='' srcdir='.' ! DEFS=' -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SIGACTION=1' prefix='' exec_prefix='' prsub='' extrasub='' --- 43,51 ---- LISTENER_PATHNAME='' RSHCOMMAND='' LIBS='' srcdir='.' ! DEFS=' -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DUSE_STDARG=1 -DHAVE_SIGACTION=1' prefix='' exec_prefix='' prsub='' extrasub='' diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/listener_p4.c mpich/mpid/ch_p4/p4-1.4/lib/listener_p4.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/listener_p4.c Thu Nov 30 15:14:26 1995 --- mpich/mpid/ch_p4/p4-1.4/lib/listener_p4.c Thu Sep 5 10:24:58 1996 *************** *** 6,14 **** /* * listener_p4 * * args: ! * debug_level * max_connections * listening_fd * slave_fd */ --- 6,14 ---- /* * listener_p4 * * args: ! * p4_debug_level * max_connections * listening_fd * slave_fd */ *************** *** 22,30 **** if (argc != 5) p4_error("listener_p4: invalid argc", argc); ! debug_level = atoi(argv[1]); p4_dprintfl(70, "got: %s %s %s %s\n", argv[1], argv[2], argv[3], argv[4]); p4_global = (struct p4_global_data *) --- 22,30 ---- if (argc != 5) p4_error("listener_p4: invalid argc", argc); ! p4_debug_level = atoi(argv[1]); p4_dprintfl(70, "got: %s %s %s %s\n", argv[1], argv[2], argv[3], argv[4]); p4_global = (struct p4_global_data *) diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.c mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.c Thu Apr 11 13:10:38 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.c Thu Sep 5 10:24:57 1996 *************** *** 1255,1263 **** alloc_global(); /* sets p4_global */ p4_local = alloc_local_rm(); p4_global->num_in_proctable = p4_n_to_i(bm_msg.numinproctab); p4_global->local_slave_count = p4_n_to_i(bm_msg.numslaves); ! debug_level = p4_n_to_i(bm_msg.debug_level); strcpy(p4_global->application_id, bm_msg.application_id); # if defined(IPSC860) crecv(INITIAL_INFO, p4_global->proctable, (long) sizeof(p4_global->proctable)); --- 1255,1263 ---- alloc_global(); /* sets p4_global */ p4_local = alloc_local_rm(); p4_global->num_in_proctable = p4_n_to_i(bm_msg.numinproctab); p4_global->local_slave_count = p4_n_to_i(bm_msg.numslaves); ! p4_debug_level = p4_n_to_i(bm_msg.debug_level); strcpy(p4_global->application_id, bm_msg.application_id); # if defined(IPSC860) crecv(INITIAL_INFO, p4_global->proctable, (long) sizeof(p4_global->proctable)); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.h mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.h *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.h Tue Jun 4 12:25:47 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_MD.h Fri Sep 6 12:41:29 1996 *************** *** 86,94 **** #if defined(FX8) || defined(FX2800) || defined(FX2800_SWITCH) #define ALLIANT #endif ! #if defined(FX2800) || defined(FX2800_SWITCH) || defined(FREEBSD) #define VPRINTF #endif #if defined(DELTA) || defined(IPSC860_SOCKETS) || defined(PARAGON) --- 86,95 ---- #if defined(FX8) || defined(FX2800) || defined(FX2800_SWITCH) #define ALLIANT #endif ! /* Rumor has it LINUX support VPRINTF */ ! #if defined(FX2800) || defined(FX2800_SWITCH) || defined(FREEBSD) || defined(LINUX) #define VPRINTF #endif #if defined(DELTA) || defined(IPSC860_SOCKETS) || defined(PARAGON) diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_alloc.c mpich/mpid/ch_p4/p4-1.4/lib/p4_alloc.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_alloc.c Mon May 20 08:02:58 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_alloc.c Thu Sep 19 11:12:58 1996 *************** *** 19,26 **** --- 19,27 ---- l->queued_messages = (struct p4_msg_queue *) p4_malloc(sizeof(struct p4_msg_queue)); initialize_msg_queue(l->queued_messages); l->soft_errors = 0; + l->conntab = 0; # ifdef CAN_DO_XDR if ((l->xdr_buff = (char *) p4_malloc(XDR_BUFF_LEN)) == NULL) { *************** *** 51,58 **** --- 52,60 ---- l->queued_messages = (struct p4_msg_queue *) p4_malloc(sizeof(struct p4_msg_queue)); initialize_msg_queue(l->queued_messages); l->soft_errors = 0; + l->conntab = 0; # ifdef CAN_DO_XDR if ((l->xdr_buff = (char *) p4_malloc(XDR_BUFF_LEN)) == NULL) { *************** *** 77,84 **** --- 79,87 ---- l->procgroup = NULL; l->queued_messages = NULL; l->xdr_buff = NULL; l->soft_errors = 0; + l->conntab = 0; return (l); } /* alloc_local_listener */ struct local_data *alloc_local_slave() *************** *** 94,101 **** --- 97,105 ---- l->queued_messages = (struct p4_msg_queue *) p4_malloc(sizeof(struct p4_msg_queue)); initialize_msg_queue(l->queued_messages); l->soft_errors = 0; + l->conntab = 0; # ifdef CAN_DO_XDR if (!(p4_global->local_communication_only)) { diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_args.c mpich/mpid/ch_p4/p4-1.4/lib/p4_args.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_args.c Thu Feb 22 17:32:19 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_args.c Thu Sep 19 08:32:44 1996 *************** *** 32,41 **** else strcpy(pgm, *argv); /* Set all command line flags (except procgroup) to their defaults */ ! debug_level = 0; ! remote_debug_level = 0; bm_outfile[0] = '\0'; procgroup_file[0] = '\0'; strcpy(local_domain, ""); hand_start_remotes = FALSE; --- 32,41 ---- else strcpy(pgm, *argv); /* Set all command line flags (except procgroup) to their defaults */ ! p4_debug_level = 0; ! p4_remote_debug_level = 0; bm_outfile[0] = '\0'; procgroup_file[0] = '\0'; strcpy(local_domain, ""); hand_start_remotes = FALSE; *************** *** 112,120 **** if (!strcmp(*a, "-p4dbg")) { if (bad_arg(a[1])) usage(); ! debug_level = atoi(a[1]); strip_out_args(a, argc, &c, 2); continue; } if (!strcmp(*a, "-p4ssport")) --- 112,120 ---- if (!strcmp(*a, "-p4dbg")) { if (bad_arg(a[1])) usage(); ! p4_debug_level = atoi(a[1]); strip_out_args(a, argc, &c, 2); continue; } if (!strcmp(*a, "-p4ssport")) *************** *** 128,136 **** if (!strcmp(*a, "-p4rdbg")) { if (bad_arg(a[1])) usage(); ! remote_debug_level = atoi(a[1]); strip_out_args(a, argc, &c, 2); continue; } if (!strcmp(*a, "-p4gm")) --- 128,136 ---- if (!strcmp(*a, "-p4rdbg")) { if (bad_arg(a[1])) usage(); ! p4_remote_debug_level = atoi(a[1]); strip_out_args(a, argc, &c, 2); continue; } if (!strcmp(*a, "-p4gm")) *************** *** 185,202 **** } if (!strcmp(*a, "-p4help")) usage(); } ! if (procgroup_file[0] == '\0') ! { ! strcpy(procgroup_file,argv[0]); ! strcat(procgroup_file,".pg"); ! if ((fp = fopen(procgroup_file,"r")) == NULL) /* pgm.pg not there */ ! strcpy(procgroup_file, "procgroup"); ! else ! fclose(fp); } - p4_dprintfl(10,"using procgroup file %s\n",procgroup_file); } static P4VOID strip_out_args(argv, argc, c, num) char **argv; --- 185,206 ---- } if (!strcmp(*a, "-p4help")) usage(); } ! if (!execer_starting_remotes) { ! if (procgroup_file[0] == '\0') ! { ! strcpy(procgroup_file,argv[0]); ! strcat(procgroup_file,".pg"); ! if ((fp = fopen(procgroup_file,"r")) == NULL) { ! /* pgm.pg not there */ ! strcpy(procgroup_file, "procgroup"); ! } ! else ! fclose(fp); ! } ! p4_dprintfl(10,"using procgroup file %s\n",procgroup_file); } } static P4VOID strip_out_args(argv, argc, c, num) char **argv; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_bm.c mpich/mpid/ch_p4/p4-1.4/lib/p4_bm.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_bm.c Mon May 20 08:11:28 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_bm.c Thu Sep 5 10:24:49 1996 *************** *** 163,171 **** local_pg = &(pg->entries[0]); bm_msg.type = p4_i_to_n(INITIAL_INFO); bm_msg.numinproctab = p4_i_to_n(p4_global->num_in_proctable); bm_msg.numslaves = p4_i_to_n(local_pg->numslaves_in_group); ! bm_msg.debug_level = p4_i_to_n(remote_debug_level); bm_msg.memsize = p4_i_to_n(globmemsize); bm_msg.logging_flag = p4_i_to_n(logging_flag); strcpy(bm_msg.application_id, p4_global->application_id); strcpy(bm_msg.version, P4_PATCHLEVEL); --- 163,171 ---- local_pg = &(pg->entries[0]); bm_msg.type = p4_i_to_n(INITIAL_INFO); bm_msg.numinproctab = p4_i_to_n(p4_global->num_in_proctable); bm_msg.numslaves = p4_i_to_n(local_pg->numslaves_in_group); ! bm_msg.debug_level = p4_i_to_n(p4_remote_debug_level); bm_msg.memsize = p4_i_to_n(globmemsize); bm_msg.logging_flag = p4_i_to_n(logging_flag); strcpy(bm_msg.application_id, p4_global->application_id); strcpy(bm_msg.version, P4_PATCHLEVEL); *************** *** 458,466 **** if (*listener_prg) { char dbg_c[10], max_c[10], lfd_c[10], sfd_c[10]; ! sprintf(dbg_c, "%d", debug_level); sprintf(max_c, "%d", p4_global->max_connections); sprintf(lfd_c, "%d", l->listening_fd); sprintf(sfd_c, "%d", l->slave_fd); p4_dprintfl(70, "exec %s %s %s %s %s\n", --- 458,466 ---- if (*listener_prg) { char dbg_c[10], max_c[10], lfd_c[10], sfd_c[10]; ! sprintf(dbg_c, "%d", p4_debug_level); sprintf(max_c, "%d", p4_global->max_connections); sprintf(lfd_c, "%d", l->listening_fd); sprintf(sfd_c, "%d", l->slave_fd); p4_dprintfl(70, "exec %s %s %s %s %s\n", diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_debug.c mpich/mpid/ch_p4/p4-1.4/lib/p4_debug.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_debug.c Tue Mar 5 08:13:47 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_debug.c Fri Sep 6 12:40:02 1996 *************** *** 12,29 **** #endif int p4_get_dbg_level() { ! return(debug_level); } P4VOID p4_set_dbg_level(level) int level; { ! debug_level = level; } ! #if defined(DELTA) || defined(NCUBE) || defined(LINUX) P4VOID p4_dprintf(fmt, a, b, c, d, e, f, g, h, i) { printf("%s: ",whoami_p4); --- 12,30 ---- #endif int p4_get_dbg_level() { ! return(p4_debug_level); } P4VOID p4_set_dbg_level(level) int level; { ! p4_debug_level = level; } ! /* LINUX now (?) support stdarg */ ! #if defined(DELTA) || defined(NCUBE) P4VOID p4_dprintf(fmt, a, b, c, d, e, f, g, h, i) { printf("%s: ",whoami_p4); *************** *** 74,86 **** } #endif #endif ! #if defined(DELTA) || defined(NCUBE) || defined(LINUX) P4VOID p4_dprintfl(level, fmt, a, b, c, d, e, f, g, h, i) { ! if (level > debug_level) return; printf("%s: ",whoami_p4); printf(fmt,a,b,c,d,e,f,g,h,i); fflush(stdout); --- 75,88 ---- } #endif #endif ! #if defined(DELTA) || defined(NCUBE) ! /* LINUX now (?) supports stdarg */ P4VOID p4_dprintfl(level, fmt, a, b, c, d, e, f, g, h, i) { ! if (level > p4_debug_level) return; printf("%s: ",whoami_p4); printf(fmt,a,b,c,d,e,f,g,h,i); fflush(stdout); *************** *** 92,100 **** { va_list ap; va_start( ap, fmt ); ! if (level > debug_level) return; printf("%d: %s: ", level, whoami_p4); if (p4_global) printf("(%f) ", p4_usclock()); --- 94,102 ---- { va_list ap; va_start( ap, fmt ); ! if (level > p4_debug_level) return; printf("%d: %s: ", level, whoami_p4); if (p4_global) printf("(%f) ", p4_usclock()); *************** *** 115,123 **** va_dcl { va_list ap; ! if (level > debug_level) return; printf("%d: %s: ", level, whoami_p4); if (p4_global) printf("(%f) ", p4_usclock()); --- 117,125 ---- va_dcl { va_list ap; ! if (level > p4_debug_level) return; printf("%d: %s: ", level, whoami_p4); if (p4_global) printf("(%f) ", p4_usclock()); *************** *** 141,149 **** int i; struct p4_global_data *g = p4_global; struct proc_info *p; ! if (level > debug_level) return; p4_dprintf("Dumping global data for process %d at %x\n", getpid(), g); --- 143,151 ---- int i; struct p4_global_data *g = p4_global; struct proc_info *p; ! if (level > p4_debug_level) return; p4_dprintf("Dumping global data for process %d at %x\n", getpid(), g); *************** *** 167,175 **** { struct local_data *l = p4_local; int i; ! if (level > debug_level) return; p4_dprintf("Dumping local data for process %d at %x\n", getpid(), l); --- 169,177 ---- { struct local_data *l = p4_local; int i; ! if (level > p4_debug_level) return; p4_dprintf("Dumping local data for process %d at %x\n", getpid(), l); *************** *** 217,225 **** int level; { struct listener_data *l = listener_info; ! if (level > debug_level) return; p4_dprintf("Dumping listener data for process %d at %x\n", getpid(), l); p4_dprintf(" listening_fd = %d\n", l->listening_fd); --- 219,227 ---- int level; { struct listener_data *l = listener_info; ! if (level > p4_debug_level) return; p4_dprintf("Dumping listener data for process %d at %x\n", getpid(), l); p4_dprintf(" listening_fd = %d\n", l->listening_fd); *************** *** 231,239 **** { struct p4_procgroup_entry *pe; int i; ! if (level > debug_level) return; p4_dprintf("Procgroup:\n"); for (pe = procgroup->entries, i = 0; --- 233,241 ---- { struct p4_procgroup_entry *pe; int i; ! if (level > p4_debug_level) return; p4_dprintf("Procgroup:\n"); for (pe = procgroup->entries, i = 0; *************** *** 259,267 **** int level; { int i; ! if (level > debug_level) return; for (i = 0; i < p4_global->num_in_proctable; i++) { --- 261,269 ---- int level; { int i; ! if (level > p4_debug_level) return; for (i = 0; i < p4_global->num_in_proctable; i++) { diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_funcs.h mpich/mpid/ch_p4/p4-1.4/lib/p4_funcs.h *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_funcs.h Fri May 17 10:56:22 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_funcs.h Tue Sep 17 08:28:38 1996 *************** *** 11,18 **** --- 11,19 ---- #endif #endif double p4_usclock ANSI_ARGS((void)); + P4VOID init_usclock ANSI_ARGS((void)); char *p4_shmalloc ANSI_ARGS((int)); P4VOID p4_set_avail_buff ANSI_ARGS((int,int)); P4BOOL p4_am_i_cluster_master ANSI_ARGS((void)); int p4_askfor ANSI_ARGS((p4_askfor_monitor_t *, int, int (*)(P4VOID *), *************** *** 24,32 **** int p4_clock ANSI_ARGS(( void )); int p4_create ANSI_ARGS(( int (*)(void) )); int p4_create_procgroup ANSI_ARGS((void)); int p4_startup ANSI_ARGS((struct p4_procgroup *)); ! #if defined(DELTA) || defined(NCUBE) || defined(LINUX) P4VOID p4_dprintf ANSI_ARGS((int,int,int,int,int,int,int,int,int,int)); #if defined(P4_DPRINTFL) P4VOID p4_dprintfl ANSI_ARGS((int,int,int,int,int,int,int,int,int,int,int)); #endif --- 25,33 ---- int p4_clock ANSI_ARGS(( void )); int p4_create ANSI_ARGS(( int (*)(void) )); int p4_create_procgroup ANSI_ARGS((void)); int p4_startup ANSI_ARGS((struct p4_procgroup *)); ! #if defined(DELTA) || defined(NCUBE) P4VOID p4_dprintf ANSI_ARGS((int,int,int,int,int,int,int,int,int,int)); #if defined(P4_DPRINTFL) P4VOID p4_dprintfl ANSI_ARGS((int,int,int,int,int,int,int,int,int,int,int)); #endif *************** *** 98,105 **** --- 99,107 ---- P4VOID * )); char *p4_version ANSI_ARGS((void)); char *p4_machine_type ANSI_ARGS((void)); int p4_wait_for_end ANSI_ARGS((void)); + int p4_proc_info ANSI_ARGS(( int, char ** )); P4VOID p4_print_avail_buffs ANSI_ARGS((void)); struct p4_procgroup *p4_alloc_procgroup ANSI_ARGS((void)); /* The p4 send routines are actually macros that use this routine */ int send_message ANSI_ARGS((int, int, int, char *, int, int, P4BOOL, P4BOOL)); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_globals.h mpich/mpid/ch_p4/p4-1.4/lib/p4_globals.h *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_globals.h Thu Nov 30 15:14:19 1995 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_globals.h Thu Sep 5 10:24:53 1996 *************** *** 9,17 **** PUBLIC char procgroup_file[256]; PUBLIC char bm_outfile[100]; PUBLIC char rm_outfile_head[100]; PUBLIC char whoami_p4[100]; ! PUBLIC int debug_level, remote_debug_level; PUBLIC int logging_flag; PUBLIC int execer_mynodenum; PUBLIC char execer_id[132]; PUBLIC char execer_myhost[100]; --- 9,17 ---- PUBLIC char procgroup_file[256]; PUBLIC char bm_outfile[100]; PUBLIC char rm_outfile_head[100]; PUBLIC char whoami_p4[100]; ! PUBLIC int p4_debug_level, p4_remote_debug_level; PUBLIC int logging_flag; PUBLIC int execer_mynodenum; PUBLIC char execer_id[132]; PUBLIC char execer_myhost[100]; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_procgroup.c mpich/mpid/ch_p4/p4-1.4/lib/p4_procgroup.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_procgroup.c Fri May 17 10:59:41 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_procgroup.c Sat Sep 21 17:12:37 1996 *************** *** 42,49 **** --- 42,60 ---- logname = (char *) getlogin(); # endif if ((fp = fopen(procgroup_file, "r")) == NULL) { + /* Thanks to Tony Kimball for this suggestion */ + #define P4_ALLOW_NP_1_DEFAULT + #ifdef P4_ALLOW_NP_1_DEFAULT + pg->num_entries = 1; + pe = pg->entries; + strcpy( pe->host_name, "localhost" ); + pe->numslaves_in_group = 0; + pe->slave_full_pathname[0] = 0; + pe->username[0] = 0; + return pg; + #else if (p4_hard_errors) { char tmp[1300]; sprintf( tmp, "open error on procgroup file (%s)", procgroup_file ); *************** *** 50,62 **** p4_error(tmp,0); } /* In case p4_error doesn't return or p4_hard_errors not set */ return 0; } pe = pg->entries; ! while (fgets(buf, sizeof(buf), fp) != NULL) { for (s = buf; isspace(*s); s++) ; --- 61,74 ---- p4_error(tmp,0); } /* In case p4_error doesn't return or p4_hard_errors not set */ return 0; + #endif } pe = pg->entries; ! while (fp != NULL && fgets(buf, sizeof(buf), fp) != NULL) { for (s = buf; isspace(*s); s++) ; *************** *** 95,102 **** --- 107,115 ---- p4_error("read procgroup: exceeded max # of procgroup entries", P4_MAX_PROCGROUP_ENTRIES); } + fclose( fp ); dump_procgroup(pg,50); return (pg); } /* read_procgroup */ diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_rm.c mpich/mpid/ch_p4/p4-1.4/lib/p4_rm.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_rm.c Mon May 27 10:51:24 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_rm.c Tue Sep 17 08:29:36 1996 *************** *** 28,42 **** extern char whoami_p4[]; struct net_initial_handshake hs; /* struct slave_listener_msg lmsg; */ struct bm_rm_msg msg; ! int type, rc, i, numslaves; #if defined(SP1_EUIH) int len; #endif #if defined(NCUBE) int unused_flag; #endif int conn_retries; struct p4_global_data *g; char outfile[128]; --- 28,45 ---- extern char whoami_p4[]; struct net_initial_handshake hs; /* struct slave_listener_msg lmsg; */ struct bm_rm_msg msg; ! int type, rc, numslaves; #if defined(SP1_EUIH) int len; #endif #if defined(NCUBE) int unused_flag; #endif + #if defined(IPSC860) || defined(CM5) || defined(NCUBE) || defined(SP1_EUI) || defined(SP1_EUIH) + int i; + #endif int conn_retries; struct p4_global_data *g; char outfile[128]; *************** *** 116,128 **** g->local_communication_only = FALSE; g->num_in_proctable = p4_n_to_i(msg.numinproctab); numslaves = p4_n_to_i(msg.numslaves); rm_num = p4_n_to_i(msg.rm_num); ! debug_level = p4_n_to_i(msg.debug_level); strcpy(outfile, msg.outfile); strcpy(p4_global->application_id, msg.application_id); p4_dprintfl(90, "got numslaves=%d outfile=%s rm_num=%d dbglvl=%d appid=%s\n", ! numslaves, outfile, rm_num, debug_level, msg.application_id); MD_initenv(); usc_init(); init_usclock(); --- 119,131 ---- g->local_communication_only = FALSE; g->num_in_proctable = p4_n_to_i(msg.numinproctab); numslaves = p4_n_to_i(msg.numslaves); rm_num = p4_n_to_i(msg.rm_num); ! p4_debug_level = p4_n_to_i(msg.debug_level); strcpy(outfile, msg.outfile); strcpy(p4_global->application_id, msg.application_id); p4_dprintfl(90, "got numslaves=%d outfile=%s rm_num=%d dbglvl=%d appid=%s\n", ! numslaves, outfile, rm_num, p4_debug_level, msg.application_id); MD_initenv(); usc_init(); init_usclock(); *************** *** 407,415 **** if (*listener_prg) { char dbg_c[10], max_c[10], lfd_c[10], sfd_c[10]; ! sprintf(dbg_c, "%d", debug_level); sprintf(max_c, "%d", p4_global->max_connections); sprintf(lfd_c, "%d", l->listening_fd); sprintf(sfd_c, "%d", l->slave_fd); p4_dprintfl(70, "exec %s %s %s %s %s\n", --- 410,418 ---- if (*listener_prg) { char dbg_c[10], max_c[10], lfd_c[10], sfd_c[10]; ! sprintf(dbg_c, "%d", p4_debug_level); sprintf(max_c, "%d", p4_global->max_connections); sprintf(lfd_c, "%d", l->listening_fd); sprintf(sfd_c, "%d", l->slave_fd); p4_dprintfl(70, "exec %s %s %s %s %s\n", diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_conn.c mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_conn.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_conn.c Mon Feb 26 14:37:10 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_conn.c Thu Sep 5 08:49:51 1996 *************** *** 5,12 **** --- 5,13 ---- #include #ifndef TIMEOUT_VALUE #define TIMEOUT_VALUE 300 #endif + int p4_has_timedout ANSI_ARGS(( int )); int p4_has_timedout( flag ) int flag; { static time_t start_time; *************** *** 52,60 **** int my_id; struct slave_listener_msg msg; int connection_fd; int dest_listener_con_fd; - int connected_to_dest_listener; int my_listener, dest_listener; int new_listener_port, new_listener_fd; int oldmask; int num_tries; --- 53,60 ---- diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_cr.c mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_cr.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_cr.c Tue Jun 4 07:45:22 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_cr.c Thu Sep 19 08:29:13 1996 *************** *** 38,45 **** --- 38,46 ---- net_slave_info(pe, rm_outfile_head, rm_fd, i); } } + close( serv_fd ); return (0); } P4VOID net_slave_info(pe, outfile, rm_fd, rm_num) *************** *** 53,63 **** int slave_idx, slave_pid, pidx, rm_ind; msg.type = p4_i_to_n(INITIAL_INFO); msg.numinproctab = p4_i_to_n(p4_global->num_in_proctable); msg.numslaves = p4_i_to_n(pe->numslaves_in_group); strcpy(msg.outfile, outfile); ! msg.debug_level = p4_i_to_n(remote_debug_level); msg.memsize = p4_i_to_n(globmemsize); msg.logging_flag = p4_i_to_n(logging_flag); strcpy(msg.application_id, p4_global->application_id); strcpy(msg.version, P4_PATCHLEVEL); --- 54,65 ---- int slave_idx, slave_pid, pidx, rm_ind; msg.type = p4_i_to_n(INITIAL_INFO); msg.numinproctab = p4_i_to_n(p4_global->num_in_proctable); + msg.rm_num = p4_i_to_n( rm_num ); msg.numslaves = p4_i_to_n(pe->numslaves_in_group); strcpy(msg.outfile, outfile); ! msg.debug_level = p4_i_to_n(p4_remote_debug_level); msg.memsize = p4_i_to_n(globmemsize); msg.logging_flag = p4_i_to_n(logging_flag); strcpy(msg.application_id, p4_global->application_id); strcpy(msg.version, P4_PATCHLEVEL); *************** *** 138,160 **** #endif static char *curhostname = 0; static char errbuf[256]; static int child_pid = 0; P4VOID p4_accept_timeout(sigval) int sigval; { ! if (child_pid) { ! kill( child_pid, SIGQUIT ); } ! if (curhostname) { ! sprintf( errbuf, "Timeout in making connection to remote process on %s", ! curhostname ); ! p4_error( errbuf, 0 ); } ! else { ! p4_error( "Timeout in making connection to remote process", 0 ); } ! exit(1); } /* * Run the slave pgm on host; returns the file descriptor of the --- 140,168 ---- #endif static char *curhostname = 0; static char errbuf[256]; static int child_pid = 0; + /* active_fd is the fd that we're waiting on when the timeout happened */ + static int active_fd = -1; + P4VOID p4_accept_timeout ANSI_ARGS(( int )); P4VOID p4_accept_timeout(sigval) int sigval; { ! if (child_pid) { ! kill( child_pid, SIGQUIT ); } ! if (curhostname) { ! sprintf( errbuf, ! "Timeout in making connection to remote process on %s", ! curhostname ); ! p4_error( errbuf, 0 ); } ! else { ! p4_error( "Timeout in making connection to remote process", 0 ); } ! if (active_fd >= 0) ! close( active_fd ); ! exit(1); } /* * Run the slave pgm on host; returns the file descriptor of the *************** *** 187,195 **** defined(NEXT) || defined(CRAY) || \ defined(CONVEX) || defined(KSR) || \ defined(FX2800) || defined(FX2800_SWITCH) || \ defined(SP1) ! char *getpw_ss(); # endif # if defined(SP1) strcpy(myhost,p4_global->proctable[0].host_name); --- 195,203 ---- defined(NEXT) || defined(CRAY) || \ defined(CONVEX) || defined(KSR) || \ defined(FX2800) || defined(FX2800_SWITCH) || \ defined(SP1) ! char *getpw_ss ANSI_ARGS(()); # endif # if defined(SP1) strcpy(myhost,p4_global->proctable[0].host_name); *************** *** 273,281 **** else #endif /* USE_OLD_SERVER */ { #if defined(HAS_RSHCOMMAND) ! strcpy( remote_shell, RSHCOMMAND ) #endif #if defined(DELTA) p4_dprintf("delta cannot create remote processes\n"); #else --- 281,289 ---- else #endif /* USE_OLD_SERVER */ { #if defined(HAS_RSHCOMMAND) ! strcpy( remote_shell, RSHCOMMAND ); #endif #if defined(DELTA) p4_dprintf("delta cannot create remote processes\n"); #else *************** *** 327,334 **** --- 335,343 ---- response from the created process. See MPIBUGS #989; I got a traceback showing this exact problem. */ curhostname = host; + active_fd = serv_fd; SIGNAL_P4(SIGALRM,p4_accept_timeout); { #ifndef CRAY struct itimerval timelimit; *************** *** 375,382 **** --- 384,392 ---- setitimer( ITIMER_REAL, &timelimit, 0 ); #else alarm( 0 ); #endif + active_fd = -1; SIGNAL_P4(SIGALRM,SIG_DFL); } hs.pid = (int) htonl(getpid()); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_list.c mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_list.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_list.c Mon Feb 12 10:31:08 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_list.c Thu Sep 19 08:24:12 1996 *************** *** 51,58 **** --- 51,60 ---- fd++; } } + close( l->listening_fd ); + p4_dprintfl(70, "exit listener\n"); exit(0); } diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_sr.c mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_sr.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_sr.c Mon May 20 09:07:12 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_sock_sr.c Thu Sep 19 08:23:39 1996 *************** *** 173,180 **** --- 173,182 ---- nmsg.data_type = p4_i_to_n(0); net_send(fd, &nmsg, sizeof(struct p4_net_msg_hdr), FALSE ); + close( fd ); + return 0; } /* diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sys_funcs.h mpich/mpid/ch_p4/p4-1.4/lib/p4_sys_funcs.h *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_sys_funcs.h Thu Jul 18 09:28:51 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_sys_funcs.h Thu Sep 5 08:57:18 1996 *************** *** 133,140 **** --- 133,141 ---- P4VOID waitspin ANSI_ARGS((int)); #endif P4BOOL sock_msg_avail_on_fd ANSI_ARGS((int)); int socket_send ANSI_ARGS((int,int,int,char *,int,int,int)); + int socket_close_conn ANSI_ARGS((int)); int start_slave ANSI_ARGS((char *, char *, char *, int, char *, char *(*)(char *, char *))); int subtree_broadcast_p4 ANSI_ARGS((int, int, void *,int,int)); P4VOID trap_sig_errs ANSI_ARGS((void)); diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_utils.c mpich/mpid/ch_p4/p4-1.4/lib/p4_utils.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/lib/p4_utils.c Mon Jul 22 09:16:48 1996 --- mpich/mpid/ch_p4/p4-1.4/lib/p4_utils.c Thu Sep 19 12:43:27 1996 *************** *** 194,201 **** --- 194,206 ---- *start = p4_global->low_cluster_id; *end = p4_global->hi_cluster_id; } + /* This is sometimes found in sys/param.h. We only need a long name */ + #ifndef MAXHOSTNAMELEN + #define MAXHOSTNAMELEN 256 + #endif + /* This is used to figure out the local id of the calling process by * indexing into the proctable until you find a hostname and a unix id * that are the same as yours. */ *************** *** 203,210 **** --- 208,217 ---- { int i, my_unix_id; struct proc_info *pi; struct hostent *myhp, *pghp; + struct in_addr myaddr; /* 8/14/96, llewins@msmail4.hac.com */ + char myname[MAXHOSTNAMELEN]; /* 9/10/96, llewins@msmail4.hac.com */ #ifdef SGI struct hostent myh; /* 7/12/95, bri@sgi.com */ #endif *************** *** 223,245 **** myhp = &myh; /* 7/12/95, bri@sgi.com */ #else myhp = gethostbyname_p4(p4_global->my_host_name); #endif for (pi = p4_global->proctable, i = 0; i < p4_global->num_in_proctable; i++, pi++) { if (pi->unix_id == my_unix_id) { ! if (strcmp(pi->host_name, p4_global->my_host_name) == 0) ! { ! return (i); ! } ! /* all nodes on sp1 seem to have same inet address by this test */ # if !defined(SP1) else { ! pghp = gethostbyname_p4(pi->host_name); ! if (bcmp(myhp->h_addr, pghp->h_addr, myhp->h_length) == 0) { return (i); } } --- 230,257 ---- myhp = &myh; /* 7/12/95, bri@sgi.com */ #else myhp = gethostbyname_p4(p4_global->my_host_name); #endif + bcopy(myhp->h_addr, (char *)&myaddr, myhp->h_length); /* 8/14/96, llewins@msmail4.hac.com */ + strcpy(myname, myhp->h_name); /* 9/10/96, llewins@msmail4.hac.com */ for (pi = p4_global->proctable, i = 0; i < p4_global->num_in_proctable; i++, pi++) { if (pi->unix_id == my_unix_id) { ! pghp = gethostbyname_p4(pi->host_name); ! if (strcmp(pghp->h_name, myname) == 0) /* 8/27/96, llewins@msmail4.hac.com */ ! { ! return (i); ! } ! /* all nodes on sp1 seem to have same inet address by this test. ! */ ! /* After the fix above, the SP1 will probably be fine!! llewins */ # if !defined(SP1) else { ! if (bcmp((char *)&myaddr, pghp->h_addr, pghp->h_length) == 0) ! /* 8/14/96, llewins@msmail4.hac.com */ { return (i); } } *************** *** 734,742 **** --- 746,756 ---- p4_free(p4_local->procgroup); p4_free(p4_local->conntab); p4_shfree((P4VOID *)(p4_local->queued_messages->m.qs)); p4_free(p4_local->queued_messages); + #ifdef CAN_DO_XDR p4_free(p4_local->xdr_buff); + #endif p4_free(p4_local); free_avail_quels(); /* (in p4_global) */ for (i = 0; i < P4_MAX_MSG_QUEUES; i++) diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/servers/killiserv_p4.c mpich/mpid/ch_p4/p4-1.4/servers/killiserv_p4.c *** /home/MPI/mpich/current/mpich/mpid/ch_p4/p4-1.4/servers/killiserv_p4.c Mon May 24 11:24:40 1993 --- mpich/mpid/ch_p4/p4-1.4/servers/killiserv_p4.c Tue Sep 17 11:21:33 1996 *************** *** 4,11 **** --- 4,14 ---- int debug_level; char whoami[100]; char local_domain[100]; + /* Forward decls */ + VOID kill_server ANSI_ARGS(( char * )); + main(argc,argv) int argc; char **argv; { *************** *** 35,43 **** { struct net_message_t msg; int fd; ! fd = net_conn_to_listener(host, UNRESERVED_PORT); if (fd == -1) { printf("couldn't connect to server on %s\n", host); return; --- 38,46 ---- { struct net_message_t msg; int fd; ! fd = net_conn_to_listener(host, UNRESERVED_PORT,1); if (fd == -1) { printf("couldn't connect to server on %s\n", host); return; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/chconfig.h mpich/mpid/ch_shmem/chconfig.h *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/chconfig.h Tue Apr 9 11:13:17 1996 --- mpich/mpid/ch_shmem/chconfig.h Fri Sep 6 16:29:16 1996 *************** *** 5,9 **** --- 5,13 ---- #define MPID_CommInit(oldcomm,newcomm) MPI_SUCCESS #define MPID_CommFree(comm) MPI_SUCCESS + /* Hook for debuggers (totalview) on created processes */ + #define MPID_HAS_PROC_INFO + #define MPID_getpid(i,n) p2p_proc_info((i),(n)) + #endif diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2p.c mpich/mpid/ch_shmem/p2p.c *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2p.c Sun May 12 04:12:00 1996 --- mpich/mpid/ch_shmem/p2p.c Mon Sep 30 12:11:54 1996 *************** *** 337,344 **** --- 337,356 ---- } *****/ + /* + * Generate an error message for operations that have errno values. + */ + void p2p_syserror( string, value ) + char *string; + int value; + { + perror( "Error detected by system routine: " ); + p2p_error( string, value ); + } + + void p2p_error(string,value) char * string; int value; { diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2p_locks.h mpich/mpid/ch_shmem/p2p_locks.h *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2p_locks.h Wed May 15 17:04:35 1996 --- mpich/mpid/ch_shmem/p2p_locks.h Mon Sep 30 12:17:41 1996 *************** *** 120,131 **** --- 120,133 ---- # if defined(PREFER_SPINLOCKS) # define p2p_lock_init(l) (*(l)) = usnewlock(p2p_sgi_usptr) # define p2p_lock(l) ussetlock(*(l)) # define p2p_unlock(l) usunsetlock(*(l)) + # define p2p_lock_name "uslocks - spinlocks" # elif defined(PREFER_SEMAPHORES) # define p2p_lock_init(l) (*(l)) = usnewsema(p2p_sgi_usptr,1) # define p2p_lock(l) uspsema(*(l)) # define p2p_unlock(l) usvsema(*(l)) + # define p2p_lock_name "uslocks - semaphores" # else 'Oops - no uslocks' # endif #endif *************** *** 136,143 **** --- 138,146 ---- typedef int p2p_lock_t[4]; # define p2p_lock_init(l) { *((int*)(l)) = 1; } # define p2p_lock(l) MPID_SHMEM__acquire_lock(l) # define p2p_unlock(l) MPID_SHMEM__release_lock(l) + # define p2p_lock_name "HPUX assembly language locks" #endif #if defined(USE_TSLOCKS) /* Pass the routines a (p2p_lock_t *) */ *************** *** 144,154 **** --- 147,159 ---- typedef long p2p_lock_t; # define p2p_lock_init(l) tslock_init(l) # define p2p_lock(l) tslock(l) # define p2p_unlock(l) tsunlock(l) + # define p2p_lock_name "tslocks" #endif #if defined(USE_MSEM) + #include /* Problem - some systems (e.g., HP) use struct msemaphore, others use just msemaphore */ # if defined(MSEMAPHORE_IS_STRUCT) /* HP-style */ typedef struct msemaphore MPID_msemaphore; *************** *** 166,173 **** --- 171,179 ---- # define p2p_lock_init(l) msem_init(&(l)->lock, MSEM_UNLOCKED) # define p2p_lock(l) msem_lock(&(l)->lock, 0) # define p2p_unlock(l ) msem_unlock(&(l)->lock, 0) + # define p2p_lock_name "msem_lock" /* Non-cache-line-separated locks: typedef msemaphore p2p_lock_t; # define p2p_lock_init(l) msem_init(l, MSEM_UNLOCKED) *************** *** 186,193 **** --- 192,200 ---- typedef mutex_t p2p_lock_t; # define p2p_lock_init(l) mutex_init(l,USYNC_PROCESS,(void *)NULL) # define p2p_lock(l) mutex_lock(l) # define p2p_unlock(l) mutex_unlock(l) + # define p2p_lock_name "mutex_lock" #endif #if defined(USE_SEMOP) # include *************** *** 199,206 **** --- 206,214 ---- static struct sembuf sem_unlock[1] = { 0, 1, 0 }; # define p2p_lock_init(l) semop_init(l) # define p2p_lock(l) semop_lock(l) # define p2p_unlock(l) semop_unlock(l) + # define p2p_lock_name "semop_lock" void semop_init ANSI_ARGS((p2p_lock_t *)); void semop_lock ANSI_ARGS((p2p_lock_t *)); void semop_unlock ANSI_ARGS((p2p_lock_t *)); #endif *************** *** 225,228 **** --- 233,250 ---- # define MD_lock(l) ussetlock((l)) # define MD_unlock(l) usunsetlock((l)) # endif #endif + + /* + * p2p_write_sync forces writes to be written to cache-coherent memory. + * Some processors have special, assembly-language instructions for this. + * Otherwise, you can usually do a lock/unlock. + * + * This has been made specific to MPID; this should really use + * a lock initialized in p2p_init, with a p2p_write_sync_init() + * macro used to do the lock initialization. + */ + #define p2p_write_sync() {\ + p2p_lock( &MPID_shmem->globlock );\ + p2p_unlock( &MPID_shmem->globlock );\ + } diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2pprocs.c mpich/mpid/ch_shmem/p2pprocs.c *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/p2pprocs.c Sat May 11 12:34:53 1996 --- mpich/mpid/ch_shmem/p2pprocs.c Fri Sep 6 16:15:25 1996 *************** *** 416,423 **** --- 416,437 ---- kill( -MPID_SHMEM_ppid, SIGKILL ); #endif } + /* Return the pid of the process id of the id corresponding to + MPI_COMM_WORLD */ + /* name is used to get IP address for some network address valid for the + processor running the process */ + int p2p_proc_info( id, name ) + int id; + char **name; + { + *name = "localhost"; + /* This isn't quite right, because the MPID_child_pid array is + unordered with respect to MPI_COMM_WORLD ranks */ + return MPID_child_pid[id]; + } + #endif /* PROCESS_CREATE_METH == FORK */ #if PROCESS_CREATE_METH == PTHREAD_SX4 #include diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmeminit.c mpich/mpid/ch_shmem/shmeminit.c *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmeminit.c Mon Jul 22 16:17:22 1996 --- mpich/mpid/ch_shmem/shmeminit.c Mon Sep 30 13:02:59 1996 *************** *** 1,6 **** /* ! * $Id: shmeminit.c,v 1.1 1996/07/22 21:17:22 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: shmeminit.c,v 1.1 1996/07/22 21:17:22 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * All rights reserved. See COPYRIGHT in top-level directory. */ *************** *** 119,129 **** MPID_SHMEM_finalize(); return 0; } void MPID_SHMEM_Version_name( name ) char *name; { ! sprintf( name, "ADI version %4.2f - transport %s", MPIDPATCHLEVEL, ! MPIDTRANSPORT ); } --- 119,132 ---- MPID_SHMEM_finalize(); return 0; } + /* + * Currently, this is inactive because adi2init contains MPID_Version_name . + */ void MPID_SHMEM_Version_name( name ) char *name; { ! sprintf( name, "ADI version %4.2f - transport %s, locks %s", ! MPIDPATCHLEVEL, MPIDTRANSPORT, p2p_lock_name ); } diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmemneager.c mpich/mpid/ch_shmem/shmemneager.c *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmemneager.c Thu Jul 18 09:41:18 1996 --- mpich/mpid/ch_shmem/shmemneager.c Mon Sep 30 10:34:57 1996 *************** *** 210,223 **** if (runex->s.count > 0) { MEMCPY( rhandle->buf, runex->start, msglen ); MPID_FreeGetAddress( runex->start ); } - MPID_RecvFree( runex ); rhandle->s = runex->s; rhandle->wait = 0; rhandle->test = 0; rhandle->push = 0; rhandle->is_complete = 1; if (rhandle->finish) (rhandle->finish)( rhandle ); return err; --- 210,223 ---- if (runex->s.count > 0) { MEMCPY( rhandle->buf, runex->start, msglen ); MPID_FreeGetAddress( runex->start ); } rhandle->s = runex->s; rhandle->wait = 0; rhandle->test = 0; rhandle->push = 0; rhandle->is_complete = 1; + MPID_RecvFree( runex ); if (rhandle->finish) (rhandle->finish)( rhandle ); return err; diff -rc4 /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmempriv.c mpich/mpid/ch_shmem/shmempriv.c *** /home/MPI/mpich/current/mpich/mpid/ch_shmem/shmempriv.c Sat May 11 12:18:56 1996 --- mpich/mpid/ch_shmem/shmempriv.c Thu Sep 19 12:43:22 1996 *************** *** 229,245 **** call, there are more */ p2p_setpgrp(); #if defined (MPI_cspp) ! p2p_create_procs( numprocs, *argc, argv ); MPID_myNode = myNode = (int) MPID_SHMEM_getNodeId(); p2p_lock(&(MPID_shmem->globid_lock[myNode])); MPID_myid = (MPID_shmem->globid[myNode])++; p2p_unlock(&(MPID_shmem->globid_lock[myNode])); #else ! p2p_create_procs( numprocs - 1, *argc, argv ); p2p_lock( &MPID_shmem->globlock ); MPID_myid = MPID_shmem->globid++; p2p_unlock( &MPID_shmem->globlock ); --- 229,245 ---- call, there are more */ p2p_setpgrp(); #if defined (MPI_cspp) ! p2p_create_procs( numprocs ); MPID_myNode = myNode = (int) MPID_SHMEM_getNodeId(); p2p_lock(&(MPID_shmem->globid_lock[myNode])); MPID_myid = (MPID_shmem->globid[myNode])++; p2p_unlock(&(MPID_shmem->globid_lock[myNode])); #else ! p2p_create_procs( numprocs - 1 ); p2p_lock( &MPID_shmem->globlock ); MPID_myid = MPID_shmem->globid++; p2p_unlock( &MPID_shmem->globlock ); *************** *** 279,286 **** --- 279,287 ---- /* If process 0, change phase. Reset the OTHER counter*/ if (MPID_myid == 0) { MPID_shmem->barrier.phase = ! MPID_shmem->barrier.phase; + p2p_write_sync(); *cntother = MPID_shmem->barrier.size; } else while (! *cntother) p2p_yield(); diff -rc4 /home/MPI/mpich/current/mpich/mpid/util/sbcnst2.c mpich/mpid/util/sbcnst2.c *** /home/MPI/mpich/current/mpich/mpid/util/sbcnst2.c Fri Mar 29 07:57:24 1996 --- mpich/mpid/util/sbcnst2.c Wed Sep 25 16:18:14 1996 *************** *** 8,17 **** #include #define _SBCNSTDEF #include "sbcnst2.h" ! /* #define DEBUG */ /* This file contains routines for allocating a number of fixed-sized blocks. This is often a good way to improve the performance of dynamic-memory codes, at the expense of some additional space. However, unlike a purely --- 8,24 ---- #include #define _SBCNSTDEF #include "sbcnst2.h" ! #define DEBUG ! #define DEBUG1 + #ifdef DEBUG + /* Needed for MPI_COMM_WORLD and MPI_ERR_xxx */ + #include "mpi.h" + #define MPID_ERROR(comm,err,str) fprintf(stderr,str);exit(err) + #endif + /* This file contains routines for allocating a number of fixed-sized blocks. This is often a good way to improve the performance of dynamic-memory codes, at the expense of some additional space. However, unlike a purely *************** *** 112,125 **** --- 119,141 ---- } /* MPID_SBfree - return a fixed-sized block to the allocator + + This just adds to the headers free list. */ void MPID_SBfree( sb, ptr ) MPID_SBHeader sb; void *ptr; { MPID_THREAD_DS_LOCK(sb) + #ifdef DEBUG1 + if ((long)ptr < 1024) { + printf( "Suspicious pointer %x in MPID_SBfree\n", ptr ); + /* MPID_ERROR( MPI_COMM_WORLD, MPI_ERR_OTHER, + "suspicious pointer in MPID_SBfree" ); */ + } + #endif ((MPID_SBblock *)ptr)->next = (char *)(sb->avail); sb->avail = (MPID_SBblock *)ptr; #ifdef DEBUG ((MPID_SBblock *)ptr)->sentinal_1 = 0xdeadbeef; *************** *** 360,367 **** } if (p->sentinal_2 != 0xbeeffeed) { MPID_ERROR( MPI_COMM_WORLD, MPI_ERR_OTHER, "Corrupted memory (4)!" ); } ! p = p->next; } } #endif --- 376,383 ---- } if (p->sentinal_2 != 0xbeeffeed) { MPID_ERROR( MPI_COMM_WORLD, MPI_ERR_OTHER, "Corrupted memory (4)!" ); } ! p = (MPID_SBblock *)(p->next); } } #endif diff -rc4 /home/MPI/mpich/current/mpich/profiling/lib/message_prof.w mpich/profiling/lib/message_prof.w *** /home/MPI/mpich/current/mpich/profiling/lib/message_prof.w Wed Mar 22 13:24:13 1995 --- mpich/profiling/lib/message_prof.w Tue Sep 17 09:46:55 1996 *************** *** 79,86 **** --- 79,87 ---- MPI_Comm_rank( MPI_COMM_WORLD, &procid_{{fileno}} ); requests_head_{{fileno}} = requests_tail_{{fileno}} = 0; {{endfn}} + {{fn fn_name MPI_Send MPI_Bsend MPI_Ssend MPI_Rsend}} {{vardecl int typesize}} {{callfn}} if ({{dest}} != MPI_PROC_NULL) { *************** *** 217,227 **** size, note ); } } if (last) { - requests_head_{{fileno}} = rq->next; - } else { last->next = rq->next; } free( rq ); } --- 218,228 ---- size, note ); } } if (last) { last->next = rq->next; + } else { + requests_head_{{fileno}} = rq->next; } free( rq ); } *************** *** 235,244 **** {{fn fn_name MPI_Waitany}} {{callfn}} ! ProcessWaitTest_{{fileno}}( {{array_of_requests}}[*{{index}}], {{status}}, ! "{{fn_name}}" ); {{endfn}} --- 236,245 ---- {{fn fn_name MPI_Waitany}} {{callfn}} ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}}[*{{index}}]), ! {{status}}, "{{fn_name}}" ); {{endfn}} *************** *** 246,257 **** {{vardecl int i}} {{callfn}} for ({{i}}=0; {{i}} < *{{outcount}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( {{array_of_requests}} ! [{{array_of_indices}}[{{i}}]], ! {{array_of_statuses}} ! [{{array_of_indices}}[{{i}}]], "{{fn_name}}" ); } {{endfn}} --- 247,258 ---- {{vardecl int i}} {{callfn}} for ({{i}}=0; {{i}} < *{{outcount}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}} ! [{{array_of_indices}}[{{i}}]]), ! &({{array_of_statuses}} ! [{{array_of_indices}}[{{i}}]]), "{{fn_name}}" ); } {{endfn}} *************** *** 260,269 **** {{vardecl int i}} /* fprintf( stderr, "{{fn_name}} call on %d\n", procid_{{fileno}} ); */ {{callfn}} for ({{i}}=0; {{i}} < {{count}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( {{array_of_requests}}[{{i}}], ! {{array_of_statuses}}[{{i}}], "{{fn_name}}" ); } {{endfn}} --- 261,270 ---- {{vardecl int i}} /* fprintf( stderr, "{{fn_name}} call on %d\n", procid_{{fileno}} ); */ {{callfn}} for ({{i}}=0; {{i}} < {{count}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}}[{{i}}]), ! &({{array_of_statuses}}[{{i}}]), "{{fn_name}}" ); } {{endfn}} *************** *** 276,295 **** {{fn fn_name MPI_Testany}} {{callfn}} if (*{{flag}}) ! ProcessWaitTest_{{fileno}}( {{array_of_requests}}[*{{index}}], {{status}}, "{{fn_name}}" ); {{endfn}} {{fn fn_name MPI_Testsome}} {{vardecl int i}} {{callfn}} for ({{i}}=0; {{i}} < *{{outcount}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( {{array_of_requests}} ! [{{array_of_indices}}[{{i}}]], ! {{array_of_statuses}} ! [{{array_of_indices}}[{{i}}]], "{{fn_name}}" ); } {{endfn}} --- 277,296 ---- {{fn fn_name MPI_Testany}} {{callfn}} if (*{{flag}}) ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}}[*{{index}}]), {{status}}, "{{fn_name}}" ); {{endfn}} {{fn fn_name MPI_Testsome}} {{vardecl int i}} {{callfn}} for ({{i}}=0; {{i}} < *{{outcount}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}} ! [{{array_of_indices}}[{{i}}]]), ! &({{array_of_statuses}} ! [{{array_of_indices}}[{{i}}]]), "{{fn_name}}" ); } {{endfn}} *************** *** 298,307 **** {{vardecl int i}} {{callfn}} if (*{{flag}}) { for ({{i}}=0; {{i}} < {{count}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( {{array_of_requests}}[{{i}}], ! {{array_of_statuses}}[{{i}}], "{{fn_name}}" ); } } {{endfn}} --- 299,308 ---- {{vardecl int i}} {{callfn}} if (*{{flag}}) { for ({{i}}=0; {{i}} < {{count}}; {{i}}++) { ! ProcessWaitTest_{{fileno}}( &({{array_of_requests}}[{{i}}]), ! &({{array_of_statuses}}[{{i}}]), "{{fn_name}}" ); } } {{endfn}} diff -rc4 /home/MPI/mpich/current/mpich/profiling/lib/requests.h mpich/profiling/lib/requests.h *** /home/MPI/mpich/current/mpich/profiling/lib/requests.h Mon Apr 29 12:42:32 1996 --- mpich/profiling/lib/requests.h Tue Oct 15 14:09:41 1996 *************** *** 3,10 **** --- 3,11 ---- typedef struct request_list_ { MPI_Request request; int status, size, tag, otherParty; + int is_persistent; struct request_list_ *next; } request_list; #define RQ_SEND 0x1 *************** *** 16,47 **** ** the send/receive as 'happening'. ** */ ! #define rq_remove( head, rq ) { \ request_list *ptr, *last; \ ptr = head; \ last = 0; \ while (ptr && (ptr->request != rq)) { \ last = ptr; \ ptr = ptr->next; \ } \ ! if (ptr) { \ ! if (!last) { \ ! head = ptr->next; \ ! } else { \ ! last->next = ptr->next; \ ! } \ ! free( ptr ); }} #define rq_add( head, tail, rq ) { \ if (!head) { \ head = tail = rq; \ } else { \ ! tail->next = rq; \ }} #define rq_find( head, req, rq ) { \ rq = head; \ while (rq && (rq->request != req)) rq = rq->next; } #endif --- 17,70 ---- ** the send/receive as 'happening'. ** */ ! #define rq_alloc( head_alloc, newrq ) {\ ! if (head_alloc) {\ ! newrq=head_alloc;head_alloc=newrq->next;\ ! }else{\ ! newrq = (request_list*) malloc(sizeof( request_list ));\ ! }} ! ! #define rq_remove_at( head, tail, head_alloc, ptr, last ) { \ ! if (ptr) { \ ! if (!last) { \ ! head = ptr->next; \ ! } else { \ ! last->next = ptr->next; \ ! if (tail == ptr) tail = last; \ ! } \ ! ptr->next = head_alloc; head_alloc = ptr;}} ! ! #define rq_remove( head, tail, head_alloc, rq ) { \ request_list *ptr, *last; \ ptr = head; \ last = 0; \ while (ptr && (ptr->request != rq)) { \ last = ptr; \ ptr = ptr->next; \ } \ ! rq_remove_at( head, tail, head_alloc, ptr, last );} #define rq_add( head, tail, rq ) { \ if (!head) { \ head = tail = rq; \ } else { \ ! tail->next = rq; tail = rq; \ }} #define rq_find( head, req, rq ) { \ rq = head; \ while (rq && (rq->request != req)) rq = rq->next; } + #define rq_init( head_alloc ) {\ + int i; request_list *newrq; head_alloc = 0;\ + for (i=0;i<20;i++) {\ + newrq = (request_list*) malloc(sizeof( request_list ));\ + newrq->next = head_alloc;\ + head_alloc = newrq;\ + }} + + #define rq_end( head_alloc ) {\ + request_list *rq; while (head_alloc) {\ + rq = head_alloc->next;free(head_alloc);head_alloc=rq;}} #endif diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps.c mpich/profiling/nupshot/bitmaps.c *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps.c Thu Jan 11 13:07:40 1996 --- mpich/profiling/nupshot/bitmaps.c Thu Sep 5 13:41:34 1996 *************** *** 34,165 **** return name; } #define x2x2_width 4 #define x2x2_height 4 ! static unsigned char x2x2_bits[] = { 0x0f, 0x0f, 0x03, 0x03}; #define black_width 16 #define black_height 16 ! static unsigned char black_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; #define boxes_width 8 #define boxes_height 8 ! static unsigned char boxes_bits[] = { 0x0f, 0x09, 0x09, 0x0f, 0xf0, 0x90, 0x90, 0xf0}; #define dimple3_width 16 #define dimple3_height 16 ! static unsigned char dimple3_bits[] = { 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define dllines3_width 9 #define dllines3_height 9 ! static unsigned char dllines3_bits[] = { 0x24, 0x01, 0x92, 0x00, 0x49, 0x00, 0x24, 0x01, 0x92, 0x00, 0x49, 0x00, 0x24, 0x01, 0x92, 0x00, 0x49, 0x00}; #define dllines4_width 4 #define dllines4_height 4 ! static unsigned char dllines4_bits[] = { 0x01, 0x08, 0x04, 0x02}; #define dlines3_width 9 #define dlines3_height 9 ! static unsigned char dlines3_bits[] = { 0x49, 0x00, 0x92, 0x00, 0x24, 0x01, 0x49, 0x00, 0x92, 0x00, 0x24, 0x01, 0x49, 0x00, 0x92, 0x00, 0x24, 0x01}; #define drlines4_width 4 #define drlines4_height 4 ! static unsigned char drlines4_bits[] = { 0x01, 0x02, 0x04, 0x08}; #define gray_width 2 #define gray_height 2 ! static unsigned char gray_bits[] = { 0x01, 0x02}; #define light_gray_width 4 #define light_gray_height 2 ! static unsigned char light_gray_bits[] = { 0x08, 0x02}; #define gray3_width 4 #define gray3_height 4 ! static unsigned char gray3_bits[] = { 0x01, 0x00, 0x04, 0x00}; #define hlines2_width 16 #define hlines2_height 16 ! static unsigned char hlines2_bits[] = { 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; #define hlines3_width 15 #define hlines3_height 15 ! static unsigned char hlines3_bits[] = { 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; #define hlines4_width 16 #define hlines4_height 16 ! static unsigned char hlines4_bits[] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define vlines2_width 4 #define vlines2_height 4 ! static unsigned char vlines2_bits[] = { 0x0a, 0x0a, 0x0a, 0x0a}; #define vlines3_width 3 #define vlines3_height 1 ! static unsigned char vlines3_bits[] = { 0x02}; #define vlines4_width 4 #define vlines4_height 4 ! static unsigned char vlines4_bits[] = { 0x08, 0x08, 0x08, 0x08}; #define white_width 2 #define white_height 2 ! static unsigned char white_bits[] = { 0x00, 0x00}; #define zoom_in_horiz_width 20 #define zoom_in_horiz_height 20 ! static unsigned char zoom_in_horiz_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x60, 0x80, 0x01, 0x70, 0x80, 0x03, 0xf8, 0xf3, 0x07, 0xfc, 0xf3, 0x0f, 0xfc, 0xf3, 0x0f, 0xf8, 0xf3, 0x07, 0x70, 0x80, 0x03, 0x60, 0x80, 0x01, 0x40, 0x80, 0x00, --- 34,167 ---- return name; } + /* Some versions (all?) of tk.h use char, not unsigned char, for the bit + sources. A compiler might complain about a mismatch */ #define x2x2_width 4 #define x2x2_height 4 ! static /*unsigned*/ char x2x2_bits[] = { 0x0f, 0x0f, 0x03, 0x03}; #define black_width 16 #define black_height 16 ! static /*unsigned*/ char black_bits[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; #define boxes_width 8 #define boxes_height 8 ! static /*unsigned*/ char boxes_bits[] = { 0x0f, 0x09, 0x09, 0x0f, 0xf0, 0x90, 0x90, 0xf0}; #define dimple3_width 16 #define dimple3_height 16 ! static /*unsigned*/ char dimple3_bits[] = { 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define dllines3_width 9 #define dllines3_height 9 ! static /*unsigned*/ char dllines3_bits[] = { 0x24, 0x01, 0x92, 0x00, 0x49, 0x00, 0x24, 0x01, 0x92, 0x00, 0x49, 0x00, 0x24, 0x01, 0x92, 0x00, 0x49, 0x00}; #define dllines4_width 4 #define dllines4_height 4 ! static /*unsigned*/ char dllines4_bits[] = { 0x01, 0x08, 0x04, 0x02}; #define dlines3_width 9 #define dlines3_height 9 ! static /*unsigned*/ char dlines3_bits[] = { 0x49, 0x00, 0x92, 0x00, 0x24, 0x01, 0x49, 0x00, 0x92, 0x00, 0x24, 0x01, 0x49, 0x00, 0x92, 0x00, 0x24, 0x01}; #define drlines4_width 4 #define drlines4_height 4 ! static /*unsigned*/ char drlines4_bits[] = { 0x01, 0x02, 0x04, 0x08}; #define gray_width 2 #define gray_height 2 ! static /*unsigned*/ char gray_bits[] = { 0x01, 0x02}; #define light_gray_width 4 #define light_gray_height 2 ! static /*unsigned*/ char light_gray_bits[] = { 0x08, 0x02}; #define gray3_width 4 #define gray3_height 4 ! static /*unsigned*/ char gray3_bits[] = { 0x01, 0x00, 0x04, 0x00}; #define hlines2_width 16 #define hlines2_height 16 ! static /*unsigned*/ char hlines2_bits[] = { 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}; #define hlines3_width 15 #define hlines3_height 15 ! static /*unsigned*/ char hlines3_bits[] = { 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00}; #define hlines4_width 16 #define hlines4_height 16 ! static /*unsigned*/ char hlines4_bits[] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define vlines2_width 4 #define vlines2_height 4 ! static /*unsigned*/ char vlines2_bits[] = { 0x0a, 0x0a, 0x0a, 0x0a}; #define vlines3_width 3 #define vlines3_height 1 ! static /*unsigned*/ char vlines3_bits[] = { 0x02}; #define vlines4_width 4 #define vlines4_height 4 ! static /*unsigned*/ char vlines4_bits[] = { 0x08, 0x08, 0x08, 0x08}; #define white_width 2 #define white_height 2 ! static /*unsigned*/ char white_bits[] = { 0x00, 0x00}; #define zoom_in_horiz_width 20 #define zoom_in_horiz_height 20 ! static /*unsigned*/ char zoom_in_horiz_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x60, 0x80, 0x01, 0x70, 0x80, 0x03, 0xf8, 0xf3, 0x07, 0xfc, 0xf3, 0x0f, 0xfc, 0xf3, 0x0f, 0xf8, 0xf3, 0x07, 0x70, 0x80, 0x03, 0x60, 0x80, 0x01, 0x40, 0x80, 0x00, *************** *** 166,174 **** 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define zoom_out_horiz_width 20 #define zoom_out_horiz_height 20 ! static unsigned char zoom_out_horiz_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x60, 0x80, 0x01, 0xe0, 0xc0, 0x01, 0xfc, 0xe1, 0x0f, 0xfc, 0xf3, 0x0f, 0xfc, 0xf3, 0x0f, 0xfc, 0xe1, 0x0f, 0xe0, 0xc0, 0x01, 0x60, 0x80, 0x01, 0x20, 0x00, 0x01, --- 168,176 ---- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define zoom_out_horiz_width 20 #define zoom_out_horiz_height 20 ! static /*unsigned*/ char zoom_out_horiz_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x60, 0x80, 0x01, 0xe0, 0xc0, 0x01, 0xfc, 0xe1, 0x0f, 0xfc, 0xf3, 0x0f, 0xfc, 0xf3, 0x0f, 0xfc, 0xe1, 0x0f, 0xe0, 0xc0, 0x01, 0x60, 0x80, 0x01, 0x20, 0x00, 0x01, *************** *** 175,183 **** 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define zoom_in_vert_width 20 #define zoom_in_vert_height 20 ! static unsigned char zoom_in_vert_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3f, 0x00, 0x80, 0x7f, 0x00, 0xc0, 0xff, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0xc0, 0xff, 0x00, --- 177,185 ---- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; #define zoom_in_vert_width 20 #define zoom_in_vert_height 20 ! static /*unsigned*/ char zoom_in_vert_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3f, 0x00, 0x80, 0x7f, 0x00, 0xc0, 0xff, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0xc0, 0xff, 0x00, *************** *** 184,192 **** 0x80, 0x7f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0c, 0x00}; #define zoom_out_vert_width 20 #define zoom_out_vert_height 20 ! static unsigned char zoom_out_vert_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3f, 0x00, 0x80, 0x7f, 0x00, --- 186,194 ---- 0x80, 0x7f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0c, 0x00}; #define zoom_out_vert_width 20 #define zoom_out_vert_height 20 ! static /*unsigned*/ char zoom_out_vert_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x1e, 0x00, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x3f, 0x00, 0x80, 0x7f, 0x00, diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/config.status mpich/profiling/nupshot/config.status *** /home/MPI/mpich/current/mpich/profiling/nupshot/config.status Fri May 3 15:18:55 1996 --- mpich/profiling/nupshot/config.status Fri Sep 6 10:50:27 1996 *************** *** 17,26 **** done trap 'rm -f Makefile; exit 1' 1 3 15 NUPSHOT_HOME='/home/gropp/mpich/profiling/nupshot' ! CC='cc' ! CPP='cc -E' tk_ok='1' XINCLUDES=' -I/usr/local/X11R5/include' XLIBSW='-L/usr/local/X11R5/lib -lX11' XPMLIB='' --- 17,26 ---- done trap 'rm -f Makefile; exit 1' 1 3 15 NUPSHOT_HOME='/home/gropp/mpich/profiling/nupshot' ! CC='gcc -Wall' ! CPP='gcc -Wall -E' tk_ok='1' XINCLUDES=' -I/usr/local/X11R5/include' XLIBSW='-L/usr/local/X11R5/lib -lX11' XPMLIB='' diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/msgs.c mpich/profiling/nupshot/msgs.c *** /home/MPI/mpich/current/mpich/profiling/nupshot/msgs.c Wed Mar 22 15:11:33 1995 --- mpich/profiling/nupshot/msgs.c Fri Oct 4 10:35:13 1996 *************** *** 9,16 **** --- 9,20 ---- #include "msgs.h" #include "expandingList.h" #include "str_dup.h" + #ifndef MPI_PROC_NULL + #define MPI_PROC_NULL (-1) + #endif + #define TESTING 1 #define MALLOC_DEBUG 0 #define USE_QSORT 0 *************** *** 249,256 **** --- 253,263 ---- newPosting.isUsed = 1; newPosting.tag = tag; newPosting.time = time; + if (proc == MPI_PROC_NULL) { + return 0; + } if (proc < 0 || proc > msg_data->np) { fprintf( stderr, "Message to invalid partner (%d)\n", proc ); return 0; } *************** *** 292,299 **** --- 299,310 ---- fprintf( stderr, "enter MatchingMsgPosted\n" ); malloc_verify(); fprintf( stderr, "entered MatchingMsgPosted\n" ); #endif + + if (proc == MPI_PROC_NULL) { + return 1; + } if (proc < 0 || proc > msg_data->np) { fprintf( stderr, "Matching message to invalid partner (%d)\n", proc ); return 0; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/mtn.c mpich/profiling/nupshot/mtn.c *** /home/MPI/mpich/current/mpich/profiling/nupshot/mtn.c Thu Jan 11 13:07:54 1996 --- mpich/profiling/nupshot/mtn.c Fri Sep 6 10:51:40 1996 *************** *** 550,558 **** /* draw background polygon */ /* set tag to background color tag */ ! sprintf( tags, "color_bg", i ); /* set fill to background color */ argv[j+4] = mtn->bg; /* set stipple to none */ argv[j+8] = ""; --- 550,558 ---- /* draw background polygon */ /* set tag to background color tag */ ! sprintf( tags, "color_bg" /* , i */ ); /* set fill to background color */ argv[j+4] = mtn->bg; /* set stipple to none */ argv[j+8] = ""; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/procs.c mpich/profiling/nupshot/procs.c *** /home/MPI/mpich/current/mpich/profiling/nupshot/procs.c Thu May 2 16:31:04 1996 --- mpich/profiling/nupshot/procs.c Fri Sep 6 10:52:57 1996 *************** *** 63,71 **** int n; char *name; { char ** namePtr; ! int namelength, oldnamelength; /* quick-access temp var. */ namePtr = &ListItem( process_data->defs.list, processDefInfo, n ).name; --- 63,71 ---- int n; char *name; { char ** namePtr; ! /* int namelength, oldnamelength; */ /* quick-access temp var. */ namePtr = &ListItem( process_data->defs.list, processDefInfo, n ).name; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/error mpich/profiling/nupshot/bitmaps/error *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/error Thu Mar 16 19:04:37 1995 --- mpich/profiling/nupshot/bitmaps/error Thu Sep 5 13:43:29 1996 *************** *** 1,7 **** #define error_width 17 #define error_height 17 ! static unsigned char error_bits[] = { 0xf0, 0x0f, 0x00, 0x58, 0x15, 0x00, 0xac, 0x2a, 0x00, 0x16, 0x50, 0x00, 0x2b, 0xa0, 0x00, 0x55, 0x40, 0x01, 0xa3, 0xc0, 0x00, 0x45, 0x41, 0x01, 0x83, 0xc2, 0x00, 0x05, 0x45, 0x01, 0x03, 0xca, 0x00, 0x05, 0x74, 0x01, 0x0a, 0xa8, 0x00, 0x14, 0x58, 0x00, 0xe8, 0x2f, 0x00, 0x50, 0x15, 0x00, --- 1,7 ---- #define error_width 17 #define error_height 17 ! static /*unsigned*/ char error_bits[] = { 0xf0, 0x0f, 0x00, 0x58, 0x15, 0x00, 0xac, 0x2a, 0x00, 0x16, 0x50, 0x00, 0x2b, 0xa0, 0x00, 0x55, 0x40, 0x01, 0xa3, 0xc0, 0x00, 0x45, 0x41, 0x01, 0x83, 0xc2, 0x00, 0x05, 0x45, 0x01, 0x03, 0xca, 0x00, 0x05, 0x74, 0x01, 0x0a, 0xa8, 0x00, 0x14, 0x58, 0x00, 0xe8, 0x2f, 0x00, 0x50, 0x15, 0x00, diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/gray25 mpich/profiling/nupshot/bitmaps/gray25 *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/gray25 Thu Mar 16 19:04:37 1995 --- mpich/profiling/nupshot/bitmaps/gray25 Thu Sep 5 13:43:28 1996 *************** *** 1,6 **** #define gray25_width 16 #define gray25_height 16 ! static unsigned char gray25_bits[] = { 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88}; --- 1,6 ---- #define gray25_width 16 #define gray25_height 16 ! static /*unsigned*/ char gray25_bits[] = { 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x22, 0x22, 0x00, 0x00, 0x88, 0x88}; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/gray50 mpich/profiling/nupshot/bitmaps/gray50 *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/gray50 Thu Mar 16 19:04:37 1995 --- mpich/profiling/nupshot/bitmaps/gray50 Thu Sep 5 13:43:27 1996 *************** *** 1,6 **** #define gray50_width 16 #define gray50_height 16 ! static unsigned char gray50_bits[] = { 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa}; --- 1,6 ---- #define gray50_width 16 #define gray50_height 16 ! static /*unsigned*/ char gray50_bits[] = { 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa}; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/hourglass mpich/profiling/nupshot/bitmaps/hourglass *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/hourglass Thu Mar 16 19:04:38 1995 --- mpich/profiling/nupshot/bitmaps/hourglass Thu Sep 5 13:43:25 1996 *************** *** 1,7 **** #define hourglass_width 19 #define hourglass_height 21 ! static unsigned char hourglass_bits[] = { 0xff, 0xff, 0x07, 0x55, 0x55, 0x05, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, 0xc2, 0x0a, 0x03, 0x46, 0x05, 0x01, 0x82, 0x0a, 0x03, 0x06, 0x05, 0x01, 0x02, 0x03, 0x03, 0x86, 0x05, 0x01, 0xc2, 0x0a, 0x03, 0x66, 0x15, 0x01, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, --- 1,7 ---- #define hourglass_width 19 #define hourglass_height 21 ! static /*unsigned*/ char hourglass_bits[] = { 0xff, 0xff, 0x07, 0x55, 0x55, 0x05, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, 0xc2, 0x0a, 0x03, 0x46, 0x05, 0x01, 0x82, 0x0a, 0x03, 0x06, 0x05, 0x01, 0x02, 0x03, 0x03, 0x86, 0x05, 0x01, 0xc2, 0x0a, 0x03, 0x66, 0x15, 0x01, 0xa2, 0x2a, 0x03, 0x66, 0x15, 0x01, diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/info mpich/profiling/nupshot/bitmaps/info *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/info Thu Mar 16 19:04:38 1995 --- mpich/profiling/nupshot/bitmaps/info Thu Sep 5 13:43:24 1996 *************** *** 1,5 **** #define info_width 8 #define info_height 21 ! static unsigned char info_bits[] = { 0x3c, 0x2a, 0x16, 0x2a, 0x14, 0x00, 0x00, 0x3f, 0x15, 0x2e, 0x14, 0x2c, 0x14, 0x2c, 0x14, 0x2c, 0x14, 0x2c, 0xd7, 0xab, 0x55}; --- 1,5 ---- #define info_width 8 #define info_height 21 ! static /*unsigned*/ char info_bits[] = { 0x3c, 0x2a, 0x16, 0x2a, 0x14, 0x00, 0x00, 0x3f, 0x15, 0x2e, 0x14, 0x2c, 0x14, 0x2c, 0x14, 0x2c, 0x14, 0x2c, 0xd7, 0xab, 0x55}; diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/questhead mpich/profiling/nupshot/bitmaps/questhead *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/questhead Thu Mar 16 19:04:38 1995 --- mpich/profiling/nupshot/bitmaps/questhead Thu Sep 5 13:43:23 1996 *************** *** 1,7 **** #define questhead_width 20 #define questhead_height 22 ! static unsigned char questhead_bits[] = { 0xf8, 0x1f, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0xeb, 0xaf, 0x00, 0xf5, 0x5f, 0x01, 0xfb, 0xbf, 0x00, 0x75, 0x5d, 0x01, 0xfb, 0xbe, 0x02, 0x75, 0x5d, 0x05, 0xab, 0xbe, 0x0a, 0x55, 0x5f, 0x07, 0xab, 0xaf, 0x00, 0xd6, 0x57, 0x01, 0xac, 0xab, 0x00, 0xd8, 0x57, 0x00, 0xb0, 0xaa, 0x00, --- 1,7 ---- #define questhead_width 20 #define questhead_height 22 ! static /*unsigned*/ char questhead_bits[] = { 0xf8, 0x1f, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0xeb, 0xaf, 0x00, 0xf5, 0x5f, 0x01, 0xfb, 0xbf, 0x00, 0x75, 0x5d, 0x01, 0xfb, 0xbe, 0x02, 0x75, 0x5d, 0x05, 0xab, 0xbe, 0x0a, 0x55, 0x5f, 0x07, 0xab, 0xaf, 0x00, 0xd6, 0x57, 0x01, 0xac, 0xab, 0x00, 0xd8, 0x57, 0x00, 0xb0, 0xaa, 0x00, diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/question mpich/profiling/nupshot/bitmaps/question *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/question Thu Mar 16 19:04:38 1995 --- mpich/profiling/nupshot/bitmaps/question Thu Sep 5 13:43:22 1996 *************** *** 1,7 **** #define question_width 17 #define question_height 27 ! static unsigned char question_bits[] = { 0xf0, 0x0f, 0x00, 0x58, 0x15, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0x2b, 0xa8, 0x00, 0x15, 0x50, 0x01, 0x0b, 0xa0, 0x00, 0x05, 0x60, 0x01, 0x0b, 0xa0, 0x00, 0x05, 0x60, 0x01, 0x0b, 0xb0, 0x00, 0x00, 0x58, 0x01, 0x00, 0xaf, 0x00, 0x80, 0x55, 0x00, 0xc0, 0x2a, 0x00, 0x40, 0x15, 0x00, --- 1,7 ---- #define question_width 17 #define question_height 27 ! static /*unsigned*/ char question_bits[] = { 0xf0, 0x0f, 0x00, 0x58, 0x15, 0x00, 0xac, 0x2a, 0x00, 0x56, 0x55, 0x00, 0x2b, 0xa8, 0x00, 0x15, 0x50, 0x01, 0x0b, 0xa0, 0x00, 0x05, 0x60, 0x01, 0x0b, 0xa0, 0x00, 0x05, 0x60, 0x01, 0x0b, 0xb0, 0x00, 0x00, 0x58, 0x01, 0x00, 0xaf, 0x00, 0x80, 0x55, 0x00, 0xc0, 0x2a, 0x00, 0x40, 0x15, 0x00, diff -rc4 /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/warning mpich/profiling/nupshot/bitmaps/warning *** /home/MPI/mpich/current/mpich/profiling/nupshot/bitmaps/warning Thu Mar 16 19:04:38 1995 --- mpich/profiling/nupshot/bitmaps/warning Thu Sep 5 13:43:21 1996 *************** *** 1,5 **** #define warning_width 6 #define warning_height 19 ! static unsigned char warning_bits[] = { 0x0c, 0x16, 0x2b, 0x15, 0x2b, 0x15, 0x2b, 0x16, 0x0a, 0x16, 0x0a, 0x16, 0x0a, 0x00, 0x00, 0x1e, 0x0a, 0x16, 0x0a}; --- 1,5 ---- #define warning_width 6 #define warning_height 19 ! static /*unsigned*/ char warning_bits[] = { 0x0c, 0x16, 0x2b, 0x15, 0x2b, 0x15, 0x2b, 0x16, 0x0a, 0x16, 0x0a, 0x16, 0x0a, 0x00, 0x00, 0x1e, 0x0a, 0x16, 0x0a}; diff -rc4 /home/MPI/mpich/current/mpich/profiling/upshot/bin/upshot.in mpich/profiling/upshot/bin/upshot.in *** /home/MPI/mpich/current/mpich/profiling/upshot/bin/upshot.in Tue Feb 6 12:34:39 1996 --- mpich/profiling/upshot/bin/upshot.in Tue Sep 17 13:38:32 1996 *************** *** 13,21 **** # # Get the version. If you KNOW the version, you can just do, e.g., # set tk_version 4.1 # Remove the patch info from the patchLevel ! set tk_version [ string range $tk_patchLevel 0 2 ] #set err [ catch { expr { #TK_VERSION# + 0 } } tk_version ] #if { $err != 0 } { set tk_version 3.6 } proc SetGlobalVars {} { --- 13,22 ---- # # Get the version. If you KNOW the version, you can just do, e.g., # set tk_version 4.1 # Remove the patch info from the patchLevel ! if { $tk_version == ""} { ! set tk_version [ string range $tk_patchLevel 0 2 ] } #set err [ catch { expr { #TK_VERSION# + 0 } } tk_version ] #if { $err != 0 } { set tk_version 3.6 } proc SetGlobalVars {} { diff -rc4 /home/MPI/mpich/current/mpich/profiling/wrappergen/Makefile.in mpich/profiling/wrappergen/Makefile.in *** /home/MPI/mpich/current/mpich/profiling/wrappergen/Makefile.in Tue May 30 11:08:23 1995 --- mpich/profiling/wrappergen/Makefile.in Thu Sep 5 16:12:51 1996 *************** *** 2,10 **** # MPIR_HOME = @MPIR_HOME@ OPTFLAGS = @OPTFLAGS@ ! CLINKER = cc EXECS = wrappergen write_proto MPI_PROTO = '-DPROTO_FILE="$(MPIR_HOME)/profiling/wrappergen/mpi_proto"' --- 2,10 ---- # MPIR_HOME = @MPIR_HOME@ OPTFLAGS = @OPTFLAGS@ ! CLINKER = $(CC) EXECS = wrappergen write_proto MPI_PROTO = '-DPROTO_FILE="$(MPIR_HOME)/profiling/wrappergen/mpi_proto"' diff -rc4 /home/MPI/mpich/current/mpich/src/c++/Makefile.in mpich/src/c++/Makefile.in *** /home/MPI/mpich/current/mpich/src/c++/Makefile.in Mon Apr 8 10:37:39 1996 --- mpich/src/c++/Makefile.in Tue Sep 17 15:59:57 1996 *************** *** 28,36 **** # default_all is the same as default, but without the RANLIB. This # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: global.o ! $(AR) ../../lib/$(ARCH)/$(COMM)/lib@MPILIBBAME@++.a $? profile_all: default: ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@++.a profile: --- 28,36 ---- # default_all is the same as default, but without the RANLIB. This # can speed up the build (ranlibs can take a LONG time). profile_all # is the same, but for the profile library default_all: global.o ! $(AR) ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@++.a $? profile_all: default: ../../lib/$(ARCH)/$(COMM)/lib@MPILIBNAME@++.a profile: diff -rc4 /home/MPI/mpich/current/mpich/src/coll/Makefile.in mpich/src/coll/Makefile.in *** /home/MPI/mpich/current/mpich/src/coll/Makefile.in Thu Jun 6 09:26:27 1996 --- mpich/src/coll/Makefile.in Wed Sep 4 11:51:03 1996 *************** *** 74,82 **** manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 74,82 ---- manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 83,91 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 83,91 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/coll/allgatherf.c mpich/src/coll/allgatherf.c *** /home/MPI/mpich/current/mpich/src/coll/allgatherf.c Thu Jun 6 09:51:00 1996 --- mpich/src/coll/allgatherf.c Fri Sep 27 10:28:10 1996 *************** *** 40,51 **** void mpi_allgather_ ( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,51 ---- void mpi_allgather_ ( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 61,82 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 61,80 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 84,95 **** void mpi_allgather_ ( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 82,93 ---- void mpi_allgather_ ( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 100,136 **** if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allgather_ ANSI_ARGS(( void *, int *, MPI_Datatype, ! void *, int *, MPI_Datatype, MPI_Comm, int * )); void mpi_allgather_ ( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 98,130 ---- if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allgather_ ANSI_ARGS(( void *, int *, MPI_Datatype *, ! void *, int *, MPI_Datatype *, MPI_Comm, int * )); void mpi_allgather_ ( sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Allgather(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/allgathervf.c mpich/src/coll/allgathervf.c *** /home/MPI/mpich/current/mpich/src/coll/allgathervf.c Thu Jun 6 09:50:59 1996 --- mpich/src/coll/allgathervf.c Fri Sep 27 10:29:24 1996 *************** *** 40,52 **** void mpi_allgatherv_ ( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,52 ---- void mpi_allgatherv_ ( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 62,84 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcounts = va_arg (ap, int *); displs = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcounts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 62,82 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcounts = va_arg (ap, int *); displs = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),recvcounts,displs,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 86,98 **** void mpi_allgatherv_ ( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 84,96 ---- void mpi_allgatherv_ ( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 103,139 **** if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcounts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allgatherv_ ANSI_ARGS(( void *, int *, MPI_Datatype, ! void *, int *, int *, MPI_Datatype, MPI_Comm, int * )); void mpi_allgatherv_ ( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcounts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 101,133 ---- if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),recvcounts,displs,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allgatherv_ ANSI_ARGS(( void *, int *, MPI_Datatype *, ! void *, int *, int *, MPI_Datatype *, MPI_Comm, int * )); void mpi_allgatherv_ ( sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcounts; int *displs; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Allgatherv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),recvcounts,displs,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/allreducef.c mpich/src/coll/allreducef.c *** /home/MPI/mpich/current/mpich/src/coll/allreducef.c Thu Jun 6 09:50:53 1996 --- mpich/src/coll/allreducef.c Fri Sep 27 10:30:20 1996 *************** *** 41,49 **** { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; --- 41,49 ---- { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; *************** *** 64,79 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); op = va_arg (ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 64,78 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); op = va_arg (ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! *datatype,(MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 81,89 **** void mpi_allreduce_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { --- 80,88 ---- void mpi_allreduce_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *************** *** 97,125 **** recvbuf = (void *)temp; } *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allreduce_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype, MPI_Op, MPI_Comm, int * )); void mpi_allreduce_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 96,122 ---- recvbuf = (void *)temp; } *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! *datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_allreduce_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype *, MPI_Op, MPI_Comm, int * )); void mpi_allreduce_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Allreduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! *datatype,(MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/alltoallf.c mpich/src/coll/alltoallf.c *** /home/MPI/mpich/current/mpich/src/coll/alltoallf.c Thu Jun 6 09:50:58 1996 --- mpich/src/coll/alltoallf.c Fri Sep 27 10:32:39 1996 *************** *** 40,51 **** void mpi_alltoall_( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,51 ---- void mpi_alltoall_( void *unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype * sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype * recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 60,81 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 60,79 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcount = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 83,94 **** void mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 81,92 ---- void mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 100,134 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_alltoall_ ANSI_ARGS(( void *, int *, MPI_Datatype, void *, int *, ! MPI_Datatype, MPI_Comm, int * )); void mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 98,128 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_alltoall_ ANSI_ARGS(( void *, int *, MPI_Datatype *, void *, int *, ! MPI_Datatype *, MPI_Comm, int * )); void mpi_alltoall_( sendbuf, sendcount, sendtype, recvbuf, recvcnt, recvtype, comm, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Alltoall(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/alltoallvf.c mpich/src/coll/alltoallvf.c *** /home/MPI/mpich/current/mpich/src/coll/alltoallvf.c Thu Jun 6 09:50:56 1996 --- mpich/src/coll/alltoallvf.c Fri Sep 27 10:34:53 1996 *************** *** 41,53 **** { void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 41,53 ---- { void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 64,86 **** buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnts = va_arg(ap, int *); sdispls = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); rdispls = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,rdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 64,84 ---- buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnts = va_arg(ap, int *); sdispls = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); rdispls = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,rdispls,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 89,101 **** recvbuf, recvcnts, rdispls, recvtype, comm, __ierr ) void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 87,99 ---- recvbuf, recvcnts, rdispls, recvtype, comm, __ierr ) void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 107,144 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,rdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_alltoallv_ ANSI_ARGS(( void *, int *, int *, MPI_Datatype, ! void *, int *, int *, MPI_Datatype, MPI_Comm, int * )); void mpi_alltoallv_ ( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm, __ierr ) void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,rdispls, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 105,138 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,rdispls,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_alltoallv_ ANSI_ARGS(( void *, int *, int *, MPI_Datatype *, ! void *, int *, int *, MPI_Datatype *, MPI_Comm, int * )); void mpi_alltoallv_ ( sendbuf, sendcnts, sdispls, sendtype, recvbuf, recvcnts, rdispls, recvtype, comm, __ierr ) void *sendbuf; int *sendcnts; int *sdispls; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *rdispls; ! MPI_Datatype *recvtype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Alltoallv(MPIR_F_PTR(sendbuf),sendcnts,sdispls,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,rdispls,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/bcastf.c mpich/src/coll/bcastf.c *** /home/MPI/mpich/current/mpich/src/coll/bcastf.c Thu Jun 6 09:29:38 1996 --- mpich/src/coll/bcastf.c Fri Sep 27 10:35:47 1996 *************** *** 40,48 **** void mpi_bcast_ (void *unknown, ...) { void *buffer; int *count; ! MPI_Datatype datatype; int *root; MPI_Comm comm; int *__ierr; int buflen; --- 40,48 ---- void mpi_bcast_ (void *unknown, ...) { void *buffer; int *count; ! MPI_Datatype *datatype; int *root; MPI_Comm comm; int *__ierr; int buflen; *************** *** 53,67 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 53,66 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count,*datatype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 68,76 **** void mpi_bcast_ ( buffer, count, datatype, root, comm, __ierr ) void *buffer; int*count; ! MPI_Datatype datatype; int*root; MPI_Comm comm; int *__ierr; { --- 67,75 ---- void mpi_bcast_ ( buffer, count, datatype, root, comm, __ierr ) void *buffer; int*count; ! MPI_Datatype * datatype; int*root; MPI_Comm comm; int *__ierr; { *************** *** 79,108 **** temp = _fcdtocp(buffer); buffer = (void *)temp; } ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bcast_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, MPI_Comm, int * )); void mpi_bcast_ ( buffer, count, datatype, root, comm, __ierr ) void *buffer; int*count; ! MPI_Datatype datatype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 78,104 ---- temp = _fcdtocp(buffer); buffer = (void *)temp; } ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count,*datatype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bcast_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, MPI_Comm, int * )); void mpi_bcast_ ( buffer, count, datatype, root, comm, __ierr ) void *buffer; int*count; ! MPI_Datatype *datatype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Bcast(MPIR_F_PTR(buffer),*count,*datatype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/gatherf.c mpich/src/coll/gatherf.c *** /home/MPI/mpich/current/mpich/src/coll/gatherf.c Thu Jun 6 16:24:07 1996 --- mpich/src/coll/gatherf.c Fri Sep 27 10:37:26 1996 *************** *** 40,51 **** void mpi_gather_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; --- 40,51 ---- void mpi_gather_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcount; ! MPI_Datatype *recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; *************** *** 62,84 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 62,82 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcount = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 86,97 **** void mpi_gather_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { --- 84,95 ---- void mpi_gather_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { *************** *** 104,140 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_gather_ ANSI_ARGS(( void *, int *, MPI_Datatype, void *, int *, ! MPI_Datatype, int *, MPI_Comm, int * )); void mpi_gather_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), ! *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 102,133 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_gather_ ANSI_ARGS(( void *, int *, MPI_Datatype *, void *, int *, ! MPI_Datatype *, int *, MPI_Comm, int * )); void mpi_gather_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcount, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcount; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Gather(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/gathervf.c mpich/src/coll/gathervf.c *** /home/MPI/mpich/current/mpich/src/coll/gathervf.c Thu Jun 6 09:41:23 1996 --- mpich/src/coll/gathervf.c Fri Sep 27 10:39:53 1996 *************** *** 40,52 **** void mpi_gatherv_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; --- 40,52 ---- void mpi_gatherv_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype *recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; *************** *** 63,86 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); displs = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 63,84 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); displs = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,displs,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 89,101 **** recvbuf, recvcnts, displs, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { --- 87,99 ---- recvbuf, recvcnts, displs, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { *************** *** 108,148 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_gatherv_ ANSI_ARGS(( void *, int *, MPI_Datatype, ! void *, int *, int *, MPI_Datatype, int *, MPI_Comm, int * )); void mpi_gatherv_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),recvcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 106,142 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,displs,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_gatherv_ ANSI_ARGS(( void *, int *, MPI_Datatype *, ! void *, int *, int *, MPI_Datatype *, int *, MPI_Comm, int * )); void mpi_gatherv_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcnts, displs, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnts; int *displs; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Gatherv(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),recvcnts,displs,*recvtype, *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/global_ops.c mpich/src/coll/global_ops.c *** /home/MPI/mpich/current/mpich/src/coll/global_ops.c Fri Jun 7 10:11:42 1996 --- mpich/src/coll/global_ops.c Tue Sep 24 17:01:57 1996 *************** *** 1,6 **** /* ! * $Id: global_ops.c,v 1.36 1996/06/07 15:08:09 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: global_ops.c,v 1.36 1996/06/07 15:08:09 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 8,15 **** --- 8,18 ---- /* Global Compute Operations + Note with the new integer values for MPI_INT etc, we can just switch on + the datatype in most cases. + */ #include "mpiimpl.h" #include "coll.h" *************** *** 31,40 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 34,42 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 122,131 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 124,132 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 215,224 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 216,224 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 323,332 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 323,331 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 437,446 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 436,444 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 540,549 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; --- 538,546 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; *************** *** 627,636 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 624,632 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 729,738 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; --- 725,733 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; *************** *** 816,825 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; --- 811,819 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_INT: { int *a = (int *)inoutvec; int *b = (int *)invec; *************** *** 919,928 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; --- 913,921 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); switch ((dtype)->dte_type) { case MPIR_LOGICAL: { MPIR_FORT_INT_T *a = (MPIR_FORT_INT_T *)inoutvec; *************** *** 1038,1047 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) if ((dtype)->dte_type == MPIR_STRUCT) { /* Perform the operation based on the type of the first type in */ /* struct */ --- 1031,1039 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); if ((dtype)->dte_type == MPIR_STRUCT) { /* Perform the operation based on the type of the first type in */ /* struct */ *************** *** 1135,1143 **** /* Some types are defined as contiguous with 2 elements */ else if ((dtype)->dte_type == MPIR_CONTIG && ((dtype)->count == 2)) { ! MPI_Datatype oldtype = (dtype)->old_type; /* Set the actual length */ len = len * (dtype)->count; --- 1127,1135 ---- /* Some types are defined as contiguous with 2 elements */ else if ((dtype)->dte_type == MPIR_CONTIG && ((dtype)->count == 2)) { ! struct MPIR_DATATYPE *oldtype = (dtype)->old_type; /* Set the actual length */ len = len * (dtype)->count; *************** *** 1248,1257 **** int *Len; MPI_Datatype *type; { int i, len = *Len; ! MPI_Datatype dtype = *type; ! MPIR_GET_REAL_DATATYPE(dtype) if ((dtype)->dte_type == MPIR_STRUCT) { /* Perform the operation based on the type of the first type in */ /* struct */ --- 1240,1248 ---- int *Len; MPI_Datatype *type; { int i, len = *Len; ! struct MPIR_DATATYPE *dtype = MPIR_GET_DTYPE_PTR(*type); if ((dtype)->dte_type == MPIR_STRUCT) { /* Perform the operation based on the type of the first type in */ /* struct */ *************** *** 1343,1351 **** } } else if ((dtype)->dte_type == MPIR_CONTIG && ((dtype)->count == 2)) { ! MPI_Datatype oldtype = (dtype)->old_type; /* Set the actual length */ len = len * (dtype)->count; --- 1334,1342 ---- } } else if ((dtype)->dte_type == MPIR_CONTIG && ((dtype)->count == 2)) { ! struct MPIR_DATATYPE *oldtype = (dtype)->old_type; /* Set the actual length */ len = len * (dtype)->count; diff -rc4 /home/MPI/mpich/current/mpich/src/coll/intra_fns.c mpich/src/coll/intra_fns.c *** /home/MPI/mpich/current/mpich/src/coll/intra_fns.c Fri Jun 7 10:11:42 1996 --- mpich/src/coll/intra_fns.c Wed Oct 2 11:09:16 1996 *************** *** 1,6 **** /* ! * $Id: intra_fns.c,v 1.3 1996/06/07 15:08:09 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: intra_fns.c,v 1.3 1996/06/07 15:08:09 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 640,647 **** --- 640,650 ---- */ MPI_Type_extent ( recvtype, &recv_extent ); + /* Switch communicators to the hidden collective */ + comm = comm->comm_coll; + /* First, load the "local" version in the recvbuf. */ mpi_errno = MPI_Sendrecv( sendbuf, sendcount, sendtype, rank, MPIR_ALLGATHER_TAG, (void *)((char *)recvbuf + rank*recvcount*recv_extent), diff -rc4 /home/MPI/mpich/current/mpich/src/coll/red_scatf.c mpich/src/coll/red_scatf.c *** /home/MPI/mpich/current/mpich/src/coll/red_scatf.c Thu Jun 6 10:29:20 1996 --- mpich/src/coll/red_scatf.c Fri Sep 27 10:40:38 1996 *************** *** 41,49 **** { void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; --- 41,49 ---- { void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; *************** *** 64,79 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype); op = va_arg(ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } --- 64,78 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnts = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); op = va_arg(ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } *************** *** 82,90 **** void mpi_reduce_scatter_ ( sendbuf, recvbuf, recvcnts, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { --- 81,89 ---- void mpi_reduce_scatter_ ( sendbuf, recvbuf, recvcnts, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *************** *** 98,130 **** recvbuf = (void *)temp; } *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_reduce_scatter_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype, MPI_Op, MPI_Comm, int * )); void mpi_reduce_scatter_ ( sendbuf, recvbuf, recvcnts, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 97,127 ---- recvbuf = (void *)temp; } *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_reduce_scatter_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype *, MPI_Op, MPI_Comm, int * )); void mpi_reduce_scatter_ ( sendbuf, recvbuf, recvcnts, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int *recvcnts; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Reduce_scatter(MPIR_F_PTR(sendbuf), ! MPIR_F_PTR(recvbuf),recvcnts,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/reducef.c mpich/src/coll/reducef.c *** /home/MPI/mpich/current/mpich/src/coll/reducef.c Thu Jun 6 09:50:55 1996 --- mpich/src/coll/reducef.c Fri Sep 27 10:47:11 1996 *************** *** 41,49 **** { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype datatype; MPI_Op op; int *root; MPI_Comm comm; int *__ierr; --- 41,49 ---- { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype *datatype; MPI_Op op; int *root; MPI_Comm comm; int *__ierr; *************** *** 65,80 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); op = va_arg(ap, MPI_Op); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } --- 65,79 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); op = va_arg(ap, MPI_Op); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } *************** *** 83,91 **** void mpi_reduce_ ( sendbuf, recvbuf, count, datatype, op, root, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; int*root; MPI_Comm comm; int *__ierr; --- 82,90 ---- void mpi_reduce_ ( sendbuf, recvbuf, count, datatype, op, root, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; int*root; MPI_Comm comm; int *__ierr; *************** *** 99,130 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_reduce_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype, MPI_Op, int *, MPI_Comm, int * )); void mpi_reduce_ ( sendbuf, recvbuf, count, datatype, op, root, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; int*root; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 98,128 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_reduce_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype *, MPI_Op, int *, MPI_Comm, int * )); void mpi_reduce_ ( sendbuf, recvbuf, count, datatype, op, root, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; int*root; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Reduce(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! *datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/scanf.c mpich/src/coll/scanf.c *** /home/MPI/mpich/current/mpich/src/coll/scanf.c Thu Jun 6 09:54:15 1996 --- mpich/src/coll/scanf.c Fri Sep 27 10:47:06 1996 *************** *** 41,49 **** { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; --- 41,49 ---- { void *sendbuf; void *recvbuf; int *count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; int buflen; *************** *** 64,78 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); op = va_arg(ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } --- 64,77 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); op = va_arg(ap, MPI_Op); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } *************** *** 81,89 **** void mpi_scan_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { --- 80,88 ---- void mpi_scan_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *************** *** 96,125 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scan_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype, MPI_Op, MPI_Comm, int * )); void mpi_scan_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 95,123 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count,*datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scan_ ANSI_ARGS(( void *, void *, int *, MPI_Datatype *, MPI_Op, MPI_Comm, int * )); void mpi_scan_ ( sendbuf, recvbuf, count, datatype, op, comm, __ierr ) void *sendbuf; void *recvbuf; int*count; ! MPI_Datatype *datatype; MPI_Op op; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Scan(MPIR_F_PTR(sendbuf),MPIR_F_PTR(recvbuf),*count, ! *datatype, (MPI_Op)MPIR_ToPointer( *(int*)(op) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/scatterf.c mpich/src/coll/scatterf.c *** /home/MPI/mpich/current/mpich/src/coll/scatterf.c Thu Jun 6 09:41:22 1996 --- mpich/src/coll/scatterf.c Fri Sep 27 10:44:25 1996 *************** *** 40,51 **** void mpi_scatter_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnt; ! MPI_Datatype recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; --- 40,51 ---- void mpi_scatter_ ( void *unknown, ...) { void *sendbuf; int *sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnt; ! MPI_Datatype *recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; *************** *** 62,84 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnt = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 62,82 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnt = va_arg (ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnt = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 87,98 **** recvbuf, recvcnt, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { --- 85,96 ---- recvbuf, recvcnt, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { *************** *** 105,143 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scatter_ ANSI_ARGS(( void *, int *, MPI_Datatype, ! void *, int *, MPI_Datatype, int *, MPI_Comm, int * )); void mpi_scatter_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), ! *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 103,136 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scatter_ ANSI_ARGS(( void *, int *, MPI_Datatype *, ! void *, int *, MPI_Datatype *, int *, MPI_Comm, int * )); void mpi_scatter_ ( sendbuf, sendcnt, sendtype, recvbuf, recvcnt, recvtype, root, comm, __ierr ) void *sendbuf; int*sendcnt; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Scatter(MPIR_F_PTR(sendbuf),*sendcnt,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/coll/scattervf.c mpich/src/coll/scattervf.c *** /home/MPI/mpich/current/mpich/src/coll/scattervf.c Thu Jun 6 09:51:05 1996 --- mpich/src/coll/scattervf.c Fri Sep 27 10:47:04 1996 *************** *** 41,52 **** { void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype sendtype; void *recvbuf; int *recvcnt; ! MPI_Datatype recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; --- 41,52 ---- { void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype *sendtype; void *recvbuf; int *recvcnt; ! MPI_Datatype *recvtype; int *root; MPI_Comm comm; int *__ierr; int buflen; *************** *** 64,86 **** buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnts = va_arg(ap, int *); displs = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnt = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 64,84 ---- buflen = va_arg(ap, int) /8; /* This is in bits. */ } sendcnts = va_arg(ap, int *); displs = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } recvcnt = va_arg (ap, int *); ! recvtype = va_arg(ap, MPI_Datatype *); root = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 90,101 **** root, comm, __ierr ) void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { --- 88,99 ---- root, comm, __ierr ) void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { *************** *** 108,128 **** temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scatterv_ ANSI_ARGS(( void *, int *, int *, MPI_Datatype, ! void *, int *, MPI_Datatype, int *, MPI_Comm, int * )); void mpi_scatterv_ ( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, --- 106,124 ---- temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_scatterv_ ANSI_ARGS(( void *, int *, int *, MPI_Datatype *, ! void *, int *, MPI_Datatype *, int *, MPI_Comm, int * )); void mpi_scatterv_ ( sendbuf, sendcnts, displs, sendtype, recvbuf, recvcnt, recvtype, *************** *** 129,148 **** root, comm, __ierr ) void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), ! MPIR_F_PTR(recvbuf),*recvcnt, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), ! *root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 125,141 ---- root, comm, __ierr ) void *sendbuf; int *sendcnts; int *displs; ! MPI_Datatype *sendtype; void *recvbuf; int*recvcnt; ! MPI_Datatype *recvtype; int*root; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Scatterv(MPIR_F_PTR(sendbuf),sendcnts,displs,*sendtype, ! MPIR_F_PTR(recvbuf),*recvcnt,*recvtype,*root, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/context/Makefile.in mpich/src/context/Makefile.in *** /home/MPI/mpich/current/mpich/src/context/Makefile.in Thu Jun 6 10:56:28 1996 --- mpich/src/context/Makefile.in Fri Aug 30 15:40:08 1996 *************** *** 110,118 **** /bin/mv groupcomparef.c groupcomparf.c ; fi manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 110,118 ---- /bin/mv groupcomparef.c groupcomparf.c ; fi manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 119,127 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 119,127 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_create.c mpich/src/context/comm_create.c *** /home/MPI/mpich/current/mpich/src/context/comm_create.c Wed Jun 26 14:27:27 1996 --- mpich/src/context/comm_create.c Thu Sep 19 14:54:15 1996 *************** *** 1,6 **** /* ! * $Id: comm_create.c,v 1.21 1996/06/26 19:27:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_create.c,v 1.21 1996/06/26 19:27:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 68,77 **** MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_CREATE" ); *comm_out = new_comm; (void) MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); ! (void) MPIR_Group_dup( group, &(new_comm->group) ); ! (void) MPIR_Group_dup( group, &(new_comm->local_group) ); /* Initialize the communicator with the device */ #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm ))) return mpi_errno; --- 68,77 ---- MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_CREATE" ); *comm_out = new_comm; (void) MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); ! MPIR_Group_dup( group, &(new_comm->group) ); ! MPIR_Group_dup( group, &(new_comm->local_group) ); /* Initialize the communicator with the device */ #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm ))) return mpi_errno; diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_dup.c mpich/src/context/comm_dup.c *** /home/MPI/mpich/current/mpich/src/context/comm_dup.c Wed Jun 26 14:27:27 1996 --- mpich/src/context/comm_dup.c Thu Sep 19 14:54:11 1996 *************** *** 1,6 **** /* ! * $Id: comm_dup.c,v 1.32 1996/06/26 19:27:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_dup.c,v 1.32 1996/06/26 19:27:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 52,62 **** /* Duplicate the communicator */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm,MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_DUP" ); ! (void) MPIR_Comm_init( new_comm, comm, comm->comm_type ); ! (void) MPIR_Group_dup ( comm->group, &(new_comm->group) ); ! (void) MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); new_comm->local_rank = new_comm->local_group->local_rank; new_comm->lrank_to_grank = new_comm->group->lrank_to_grank; new_comm->np = new_comm->group->np; new_comm->comm_name = 0; --- 52,62 ---- /* Duplicate the communicator */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm,MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_DUP" ); ! MPIR_Comm_init( new_comm, comm, comm->comm_type ); ! MPIR_Group_dup ( comm->group, &(new_comm->group) ); ! MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); new_comm->local_rank = new_comm->local_group->local_rank; new_comm->lrank_to_grank = new_comm->group->lrank_to_grank; new_comm->np = new_comm->group->np; new_comm->comm_name = 0; diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_group.c mpich/src/context/comm_group.c *** /home/MPI/mpich/current/mpich/src/context/comm_group.c Fri Apr 12 09:04:04 1996 --- mpich/src/context/comm_group.c Thu Sep 19 14:54:31 1996 *************** *** 1,6 **** /* ! * $Id: comm_group.c,v 1.12 1996/04/12 14:04:03 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_group.c,v 1.12 1996/04/12 14:04:03 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 33,40 **** return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_COMM_GROUP" ); } else { ! (void) MPIR_Group_dup( comm->local_group, group ); return (MPI_SUCCESS); } } --- 33,40 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_COMM_GROUP" ); } else { ! MPIR_Group_dup( comm->local_group, group ); return (MPI_SUCCESS); } } diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_rgroup.c mpich/src/context/comm_rgroup.c *** /home/MPI/mpich/current/mpich/src/context/comm_rgroup.c Fri Apr 12 09:04:49 1996 --- mpich/src/context/comm_rgroup.c Thu Sep 19 15:38:27 1996 *************** *** 1,6 **** /* ! * $Id: comm_rgroup.c,v 1.7 1996/04/12 14:04:49 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_rgroup.c,v 1.7 1996/04/12 14:04:49 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 34,41 **** return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_COMM_REMOTE_GROUP" ); } else { ! (void)MPIR_Group_dup( comm->group, group ); return (MPI_SUCCESS); } } --- 34,41 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_COMM_REMOTE_GROUP" ); } else { ! MPIR_Group_dup( comm->group, group ); return (MPI_SUCCESS); } } diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_split.c mpich/src/context/comm_split.c *** /home/MPI/mpich/current/mpich/src/context/comm_split.c Wed Jun 26 14:27:29 1996 --- mpich/src/context/comm_split.c Thu Sep 19 14:41:55 1996 *************** *** 1,6 **** /* ! * $Id: comm_split.c,v 1.40 1996/06/26 19:27:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_split.c,v 1.40 1996/06/26 19:27:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 132,143 **** /* Make communicator using contexts allocated */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_SPLIT" ); *comm_out = new_comm; ! (void) MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); new_comm->group = group; ! (void) MPIR_Group_dup ( group, &(new_comm->local_group) ); #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm )) ) return mpi_errno; #endif --- 132,143 ---- /* Make communicator using contexts allocated */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED, "Out of space in MPI_COMM_SPLIT" ); *comm_out = new_comm; ! MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); new_comm->group = group; ! MPIR_Group_dup ( group, &(new_comm->local_group) ); #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm )) ) return mpi_errno; #endif diff -rc4 /home/MPI/mpich/current/mpich/src/context/comm_util.c mpich/src/context/comm_util.c *** /home/MPI/mpich/current/mpich/src/context/comm_util.c Wed Jul 17 13:04:20 1996 --- mpich/src/context/comm_util.c Wed Sep 25 08:46:22 1996 *************** *** 1,6 **** /* ! * $Id: comm_util.c,v 1.40 1996/07/17 18:04:19 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: comm_util.c,v 1.40 1996/07/17 18:04:19 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 33,54 **** MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm,MPI_ERR_EXHAUSTED, "Error creating new communicator" ); ! (void) MPIR_Comm_init( new_comm, comm, comm_type ); MPIR_Attr_dup_tree ( comm, new_comm ); if (comm_type == MPIR_INTRA) { new_comm->recv_context = comm->recv_context + 1; new_comm->send_context = new_comm->recv_context; ! (void) MPIR_Group_dup ( comm->local_group, &(new_comm->group) ); ! (void) MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); } else { new_comm->recv_context = comm->recv_context + 1; new_comm->send_context = comm->send_context + 1; ! (void) MPIR_Group_dup ( comm->group, &(new_comm->group) ); ! (void) MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); } new_comm->local_rank = new_comm->local_group->local_rank; new_comm->lrank_to_grank = new_comm->group->lrank_to_grank; new_comm->np = new_comm->group->np; --- 33,54 ---- MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),comm,MPI_ERR_EXHAUSTED, "Error creating new communicator" ); ! MPIR_Comm_init( new_comm, comm, comm_type ); MPIR_Attr_dup_tree ( comm, new_comm ); if (comm_type == MPIR_INTRA) { new_comm->recv_context = comm->recv_context + 1; new_comm->send_context = new_comm->recv_context; ! MPIR_Group_dup ( comm->local_group, &(new_comm->group) ); ! MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); } else { new_comm->recv_context = comm->recv_context + 1; new_comm->send_context = comm->send_context + 1; ! MPIR_Group_dup ( comm->group, &(new_comm->group) ); ! MPIR_Group_dup ( comm->local_group, &(new_comm->local_group) ); } new_comm->local_rank = new_comm->local_group->local_rank; new_comm->lrank_to_grank = new_comm->group->lrank_to_grank; new_comm->np = new_comm->group->np; *************** *** 66,75 **** reads it from the new_comm structure */ #ifdef MPI_ADI2 if ((mpi_errno = MPID_CommInit( comm, new_comm ))) return mpi_errno; ! /* Is that a storage leak ??? Shouldn't we free new_comm if the init ! * fails ? (Or will it get freed higher up ???) */ #else if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm ))) return mpi_errno; --- 66,75 ---- reads it from the new_comm structure */ #ifdef MPI_ADI2 if ((mpi_errno = MPID_CommInit( comm, new_comm ))) return mpi_errno; ! /* Is that a storage leak ? Shouldn't we free new_comm if the init ! * fails ? (Or will it get freed higher up ??) */ #else if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, comm, new_comm ))) return mpi_errno; *************** *** 176,185 **** /* MPIR_Comm_init - Initialize some of the elements of a communicator from an existing one. */ ! int MPIR_Comm_init ( new_comm, comm, comm_type ) MPI_Comm new_comm, comm; MPIR_COMM_TYPE comm_type; { MPIR_SET_COOKIE(new_comm,MPIR_COMM_COOKIE); --- 176,189 ---- /* MPIR_Comm_init - Initialize some of the elements of a communicator from an existing one. + + This can't return anything but success, so I've changed it + to void. gcc in check mode complains about not using the + result, even when cast to void! */ ! void MPIR_Comm_init ( new_comm, comm, comm_type ) MPI_Comm new_comm, comm; MPIR_COMM_TYPE comm_type; { MPIR_SET_COOKIE(new_comm,MPIR_COMM_COOKIE); *************** *** 192,200 **** new_comm->ref_count = 1; new_comm->permanent = 0; new_comm->collops = 0; new_comm->attr_cache = 0; - return(MPI_SUCCESS); } /*+ --- 196,203 ---- diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_diff.c mpich/src/context/group_diff.c *** /home/MPI/mpich/current/mpich/src/context/group_diff.c Fri Apr 12 09:07:49 1996 --- mpich/src/context/group_diff.c Thu Sep 19 15:34:36 1996 *************** *** 1,6 **** /* ! * $Id: group_diff.c,v 1.18 1996/04/12 14:07:48 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_diff.c,v 1.18 1996/04/12 14:07:48 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 47,59 **** "Error in MPI_GROUP_DIFFERENCE" ); /* Check for EMPTY groups */ if ( group1 == MPI_GROUP_EMPTY ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } if ( group2 == MPI_GROUP_EMPTY ) { ! (void) MPIR_Group_dup ( group1, group_out ); return (mpi_errno); } /* Create the new group */ --- 47,59 ---- "Error in MPI_GROUP_DIFFERENCE" ); /* Check for EMPTY groups */ if ( group1 == MPI_GROUP_EMPTY ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } if ( group2 == MPI_GROUP_EMPTY ) { ! MPIR_Group_dup ( group1, group_out ); return (mpi_errno); } /* Create the new group */ *************** *** 89,97 **** /* If there is a null intersection */ if ( n <= 0 ) { FREE( new_group ); ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Alloc memory for lrank_to_grank array */ --- 89,97 ---- /* If there is a null intersection */ if ( n <= 0 ) { FREE( new_group ); ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Alloc memory for lrank_to_grank array */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_excl.c mpich/src/context/group_excl.c *** /home/MPI/mpich/current/mpich/src/context/group_excl.c Fri Apr 12 09:07:54 1996 --- mpich/src/context/group_excl.c Thu Sep 19 15:34:01 1996 *************** *** 1,6 **** /* ! * $Id: group_excl.c,v 1.16 1996/04/12 14:07:53 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_excl.c,v 1.16 1996/04/12 14:07:53 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 54,68 **** return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_EXCL" ); /* Check for a EMPTY input group */ if ( (group == MPI_GROUP_EMPTY) || (n >= group->np) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Check for no ranks to exclude */ if ( n <= 0 ) { ! (void) MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Create the new group */ --- 54,68 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_EXCL" ); /* Check for a EMPTY input group */ if ( (group == MPI_GROUP_EMPTY) || (n >= group->np) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Check for no ranks to exclude */ if ( n <= 0 ) { ! MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Create the new group */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_incl.c mpich/src/context/group_incl.c *** /home/MPI/mpich/current/mpich/src/context/group_incl.c Fri Apr 12 09:09:53 1996 --- mpich/src/context/group_incl.c Thu Sep 19 15:35:19 1996 *************** *** 1,6 **** /* ! * $Id: group_incl.c,v 1.16 1996/04/12 14:09:53 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_incl.c,v 1.16 1996/04/12 14:09:53 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 55,63 **** return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_INCL" ); /* Check for a EMPTY input group or EMPTY sized new group */ if ( (group == MPI_GROUP_EMPTY) || (n <= 0) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Check that the ranks are in range, at least (still need to check for --- 55,63 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_INCL" ); /* Check for a EMPTY input group or EMPTY sized new group */ if ( (group == MPI_GROUP_EMPTY) || (n <= 0) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Check that the ranks are in range, at least (still need to check for diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_inter.c mpich/src/context/group_inter.c *** /home/MPI/mpich/current/mpich/src/context/group_inter.c Fri Apr 12 09:11:11 1996 --- mpich/src/context/group_inter.c Thu Sep 19 15:35:41 1996 *************** *** 1,6 **** /* ! * $Id: group_inter.c,v 1.18 1996/04/12 14:11:11 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_inter.c,v 1.18 1996/04/12 14:11:11 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 48,56 **** "Error in MPI_GROUP_INTERSECTION" ); /* Check for EMPTY groups */ if ( (group1 == MPI_GROUP_EMPTY) || (group2 == MPI_GROUP_EMPTY) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Create the new group */ --- 48,56 ---- "Error in MPI_GROUP_INTERSECTION" ); /* Check for EMPTY groups */ if ( (group1 == MPI_GROUP_EMPTY) || (group2 == MPI_GROUP_EMPTY) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Create the new group */ *************** *** 86,94 **** /* If there is a null intersection */ if ( n <= 0 ) { FREE( new_group ); ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Alloc memory for lrank_to_grank array */ --- 86,94 ---- /* If there is a null intersection */ if ( n <= 0 ) { FREE( new_group ); ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); return (mpi_errno); } /* Alloc memory for lrank_to_grank array */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_rexcl.c mpich/src/context/group_rexcl.c *** /home/MPI/mpich/current/mpich/src/context/group_rexcl.c Fri Apr 12 09:11:26 1996 --- mpich/src/context/group_rexcl.c Thu Sep 19 15:36:16 1996 *************** *** 1,6 **** /* ! * $Id: group_rexcl.c,v 1.17 1996/04/12 14:11:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_rexcl.c,v 1.17 1996/04/12 14:11:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 59,73 **** "Error in MPI_GROUP_RANGE_EXCL" ); /* Check for a EMPTY input group */ if ( (group == MPI_GROUP_EMPTY) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Check for no range ranks to exclude */ if ( n <= 0 ) { ! (void) MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Allocate set marking space for group if necessary */ --- 59,73 ---- "Error in MPI_GROUP_RANGE_EXCL" ); /* Check for a EMPTY input group */ if ( (group == MPI_GROUP_EMPTY) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Check for no range ranks to exclude */ if ( n <= 0 ) { ! MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Allocate set marking space for group if necessary */ *************** *** 92,104 **** } /* Check np to see if we have original group or if we have null group */ if (np == 0) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } if (np == group->np) { ! (void) MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Create the new group */ --- 92,104 ---- } /* Check np to see if we have original group or if we have null group */ if (np == 0) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } if (np == group->np) { ! MPIR_Group_dup ( group, newgroup ); return (mpi_errno); } /* Create the new group */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_rincl.c mpich/src/context/group_rincl.c *** /home/MPI/mpich/current/mpich/src/context/group_rincl.c Fri Apr 12 09:11:32 1996 --- mpich/src/context/group_rincl.c Thu Sep 19 15:36:37 1996 *************** *** 1,6 **** /* ! * $Id: group_rincl.c,v 1.17 1996/04/12 14:11:31 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_rincl.c,v 1.17 1996/04/12 14:11:31 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 55,63 **** "Error in MPI_GROUP_RANGE_INCL" ); /* Check for a EMPTY input group or EMPTY sized new group */ if ( (group == MPI_GROUP_EMPTY) || (n <= 0) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Determine the number of ranks that will be included */ --- 55,63 ---- "Error in MPI_GROUP_RANGE_INCL" ); /* Check for a EMPTY input group or EMPTY sized new group */ if ( (group == MPI_GROUP_EMPTY) || (n <= 0) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Determine the number of ranks that will be included */ *************** *** 67,75 **** np += ranks; /* Check for np == 0 ranks to include */ if ( np <=0 ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Create the new group */ --- 67,75 ---- np += ranks; /* Check for np == 0 ranks to include */ if ( np <=0 ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, newgroup ); return (mpi_errno); } /* Create the new group */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_union.c mpich/src/context/group_union.c *** /home/MPI/mpich/current/mpich/src/context/group_union.c Fri Apr 12 09:11:52 1996 --- mpich/src/context/group_union.c Thu Sep 19 15:37:09 1996 *************** *** 1,6 **** /* ! * $Id: group_union.c,v 1.18 1996/04/12 14:11:52 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_union.c,v 1.18 1996/04/12 14:11:52 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 46,62 **** return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_UNION" ); /* Check for EMPTY groups */ if ( (group1 == MPI_GROUP_EMPTY) && (group2 == MPI_GROUP_EMPTY) ) { ! (void) MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); ! return (mpi_errno); } if ( group1 == MPI_GROUP_EMPTY ) { ! (void) MPIR_Group_dup ( group2, group_out ); return (mpi_errno); } if ( group2 == MPI_GROUP_EMPTY ) { ! (void) MPIR_Group_dup ( group1, group_out ); return (mpi_errno); } /* Create the new group */ --- 46,62 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GROUP_UNION" ); /* Check for EMPTY groups */ if ( (group1 == MPI_GROUP_EMPTY) && (group2 == MPI_GROUP_EMPTY) ) { ! MPIR_Group_dup ( MPI_GROUP_EMPTY, group_out ); ! return (mpi_errno); } if ( group1 == MPI_GROUP_EMPTY ) { ! MPIR_Group_dup ( group2, group_out ); return (mpi_errno); } if ( group2 == MPI_GROUP_EMPTY ) { ! MPIR_Group_dup ( group1, group_out ); return (mpi_errno); } /* Create the new group */ diff -rc4 /home/MPI/mpich/current/mpich/src/context/group_util.c mpich/src/context/group_util.c *** /home/MPI/mpich/current/mpich/src/context/group_util.c Fri Apr 12 09:11:59 1996 --- mpich/src/context/group_util.c Thu Sep 19 14:53:07 1996 *************** *** 1,6 **** /* ! * $Id: group_util.c,v 1.21 1996/04/12 14:11:58 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: group_util.c,v 1.21 1996/04/12 14:11:58 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 76,90 **** MPIR_Group_dup - +*/ ! int MPIR_Group_dup( group, new_group ) MPI_Group group, *new_group; { (*new_group) = group; if ( group != MPI_GROUP_NULL ) group->ref_count++; - return(MPI_SUCCESS); } #endif /*+ --- 76,89 ---- MPIR_Group_dup - +*/ ! void MPIR_Group_dup( group, new_group ) MPI_Group group, *new_group; { (*new_group) = group; if ( group != MPI_GROUP_NULL ) group->ref_count++; } #endif /*+ diff -rc4 /home/MPI/mpich/current/mpich/src/context/ic_create.c mpich/src/context/ic_create.c *** /home/MPI/mpich/current/mpich/src/context/ic_create.c Wed Jun 26 14:27:30 1996 --- mpich/src/context/ic_create.c Thu Sep 19 14:53:05 1996 *************** *** 1,6 **** /* ! * $Id: ic_create.c,v 1.24 1996/06/26 19:27:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: ic_create.c,v 1.24 1996/06/26 19:27:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 19,27 **** Input Paramters: . local_comm - Local (intra)communicator . local_leader - Rank in local_comm of leader (often 0) . peer_comm - Remote communicator ! . remote_leader - Rank in peer_comm of leader (often 0) . tag - Message tag to use in constructing intercommunicator; if multiple 'MPI_Intercomm_creates' are being made, they should use different tags (more precisely, ensure that the local and remote leaders are using different tags for each 'MPI_intercomm_create'). --- 19,27 ---- Input Paramters: . local_comm - Local (intra)communicator . local_leader - Rank in local_comm of leader (often 0) . peer_comm - Remote communicator ! . remote_leader - Rank in peer_comm of remote leader (often 0) . tag - Message tag to use in constructing intercommunicator; if multiple 'MPI_Intercomm_creates' are being made, they should use different tags (more precisely, ensure that the local and remote leaders are using different tags for each 'MPI_intercomm_create'). *************** *** 215,225 **** /* inter-communicator */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),local_comm, MPI_ERR_EXHAUSTED,"Out of space in MPI_INTERCOMM_CREATE" ); *comm_out = new_comm; ! (void) MPIR_Comm_init( new_comm, local_comm, MPIR_INTER ); new_comm->group = remote_group; ! (void) MPIR_Group_dup( local_comm->group, &(new_comm->local_group) ); #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, local_comm, new_comm )) ) return mpi_errno; #endif --- 215,225 ---- /* inter-communicator */ MPIR_ALLOC(new_comm,NEW(struct MPIR_COMMUNICATOR),local_comm, MPI_ERR_EXHAUSTED,"Out of space in MPI_INTERCOMM_CREATE" ); *comm_out = new_comm; ! MPIR_Comm_init( new_comm, local_comm, MPIR_INTER ); new_comm->group = remote_group; ! MPIR_Group_dup( local_comm->group, &(new_comm->local_group) ); #ifndef MPI_ADI2 if ((mpi_errno = MPID_Comm_init( new_comm->ADIctx, local_comm, new_comm )) ) return mpi_errno; #endif diff -rc4 /home/MPI/mpich/current/mpich/src/context/ic_merge.c mpich/src/context/ic_merge.c *** /home/MPI/mpich/current/mpich/src/context/ic_merge.c Wed Jun 26 14:27:30 1996 --- mpich/src/context/ic_merge.c Thu Sep 19 14:53:03 1996 *************** *** 1,6 **** /* ! * $Id: ic_merge.c,v 1.16 1996/06/26 19:27:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: ic_merge.c,v 1.16 1996/06/26 19:27:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 70,78 **** /* Make the new communicator */ MPIR_ALLOC_POP(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED,"Out of space in MPI_COMM_CREATE" ); ! (void) MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); (void) MPIR_Attr_create_tree ( new_comm ); MPIR_Comm_collops_init( new_comm, MPIR_INTRA); /* Get the high value for our side */ --- 70,78 ---- /* Make the new communicator */ MPIR_ALLOC_POP(new_comm,NEW(struct MPIR_COMMUNICATOR),comm, MPI_ERR_EXHAUSTED,"Out of space in MPI_COMM_CREATE" ); ! MPIR_Comm_init( new_comm, comm, MPIR_INTRA ); (void) MPIR_Attr_create_tree ( new_comm ); MPIR_Comm_collops_init( new_comm, MPIR_INTRA); /* Get the high value for our side */ *************** *** 86,94 **** else { MPIR_CALL_POP(MPI_Group_union(comm->local_group, comm->group, &(new_comm->group) ),comm,myname); } ! (void) MPIR_Group_dup ( new_comm->group, &(new_comm->local_group) ); #ifndef MPI_ADI2 MPIR_CALL_POP(MPID_Comm_init( new_comm->ADIctx, comm, new_comm ),comm, myname); --- 86,94 ---- else { MPIR_CALL_POP(MPI_Group_union(comm->local_group, comm->group, &(new_comm->group) ),comm,myname); } ! MPIR_Group_dup ( new_comm->group, &(new_comm->local_group) ); #ifndef MPI_ADI2 MPIR_CALL_POP(MPID_Comm_init( new_comm->ADIctx, comm, new_comm ),comm, myname); diff -rc4 /home/MPI/mpich/current/mpich/src/dmpi/Makefile.in mpich/src/dmpi/Makefile.in *** /home/MPI/mpich/current/mpich/src/dmpi/Makefile.in Mon Apr 8 10:37:37 1996 --- mpich/src/dmpi/Makefile.in Fri Aug 30 15:40:07 1996 *************** *** 53,61 **** # -anyname -I pubinc $(MPI_CSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 53,61 ---- # -anyname -I pubinc $(MPI_CSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 62,70 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 62,70 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/dmpi/bswap.c mpich/src/dmpi/bswap.c *** /home/MPI/mpich/current/mpich/src/dmpi/bswap.c Thu May 16 07:11:21 1996 --- mpich/src/dmpi/bswap.c Tue Oct 15 09:09:45 1996 *************** *** 46,54 **** } int MPIR_Type_swap_copy(d, s, t, N, ctx) unsigned char *d, *s; ! MPI_Datatype t; int N; void *ctx; { int len = t->size * N; --- 46,54 ---- } int MPIR_Type_swap_copy(d, s, t, N, ctx) unsigned char *d, *s; ! struct MPIR_DATATYPE *t; int N; void *ctx; { int len = t->size * N; *************** *** 101,109 **** } void MPIR_Type_swap_inplace(b, t, N) unsigned char *b; ! MPI_Datatype t; int N; { switch (t->dte_type) { case MPIR_CHAR: --- 101,109 ---- } void MPIR_Type_swap_inplace(b, t, N) unsigned char *b; ! struct MPIR_DATATYPE *t; int N; { switch (t->dte_type) { case MPIR_CHAR: *************** *** 151,164 **** int MPIR_Mem_convert_len( dest_type, datatype, count ) int dest_type, count; MPI_Datatype datatype; { #ifdef HAS_XDR ! if (dest_type == MPIR_MSGREP_XDR) ! return MPIR_Mem_XDR_Len( datatype, count ); #endif /* This works for both no conversion and for byte-swap/extend */ ! return datatype->size * count; } #ifdef HAS_XDR /* XXXX- Both of these routines need a way of returning the true size --- 151,166 ---- int MPIR_Mem_convert_len( dest_type, datatype, count ) int dest_type, count; MPI_Datatype datatype; { + struct MPIR_DATATYPE *dtype_ptr; #ifdef HAS_XDR ! if (dest_type == MPIR_MSGREP_XDR) ! return MPIR_Mem_XDR_Len( datatype, count ); #endif /* This works for both no conversion and for byte-swap/extend */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! return dtype_ptr->size * count; } #ifdef HAS_XDR /* XXXX- Both of these routines need a way of returning the true size diff -rc4 /home/MPI/mpich/current/mpich/src/dmpi/dmpi.c mpich/src/dmpi/dmpi.c *** /home/MPI/mpich/current/mpich/src/dmpi/dmpi.c Wed Jul 17 13:04:14 1996 --- mpich/src/dmpi/dmpi.c Mon Oct 14 16:08:29 1996 *************** *** 1,6 **** /* ! * $Id: dmpi.c,v 1.36 1996/07/17 18:04:13 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: dmpi.c,v 1.36 1996/07/17 18:04:13 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 174,181 **** --- 174,182 ---- { register MPIR_SHANDLE *shandle; register int mpi_errno = MPI_SUCCESS; int dest_type = 0; + struct MPIR_DATATYPE *dtype_ptr; shandle = &(*request)->shandle; if (shandle->dest == MPI_PROC_NULL) return mpi_errno; *************** *** 187,198 **** */ /* First, packed data. This is a spacial case, because the data format is that set in comm->msgrep */ ! if (shandle->datatype->dte_type == MPIR_PACKED) { shandle->msgrep = shandle->comm->msgrep; shandle->dev_shandle.bytes_as_contig = ! shandle->count * shandle->datatype->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; --- 188,201 ---- */ /* First, packed data. This is a spacial case, because the data format is that set in comm->msgrep */ ! ! dtype_ptr = MPIR_GET_DTYPE_PTR(shandle->datatype); ! if (dtype_ptr->dte_type == MPIR_PACKED) { shandle->msgrep = shandle->comm->msgrep; shandle->dev_shandle.bytes_as_contig = ! shandle->count * dtype_ptr->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; *************** *** 206,214 **** /* Get the dest type if we might be heterogeneous */ if (MPID_IS_HETERO == 1) dest_type = MPIR_Dest_needs_conversion(shandle->comm,shandle->dest); ! if (dest_type || !shandle->datatype->is_contig) { /* We need to do some conversion. In both the contiguous and non-contiguous cases, we need to allocate space and call the packing routines. */ --- 209,217 ---- /* Get the dest type if we might be heterogeneous */ if (MPID_IS_HETERO == 1) dest_type = MPIR_Dest_needs_conversion(shandle->comm,shandle->dest); ! if (dest_type || !dtype_ptr->is_contig) { /* We need to do some conversion. In both the contiguous and non-contiguous cases, we need to allocate space and call the packing routines. */ *************** *** 223,244 **** else { /* Contiguous and homogeneous */ shandle->msgrep = MPIR_MSGREP_RECEIVER; shandle->dev_shandle.bytes_as_contig = ! shandle->count * shandle->datatype->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; } #else /* NOT heterogeneous */ ! if (shandle->datatype->is_contig) { /* Contiguous, no conversion form */ /* This SHOULD have been handled in the macro that expands into a call to this routine */ shandle->dev_shandle.bytes_as_contig = ! shandle->count * shandle->datatype->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; --- 226,247 ---- else { /* Contiguous and homogeneous */ shandle->msgrep = MPIR_MSGREP_RECEIVER; shandle->dev_shandle.bytes_as_contig = ! shandle->count * dtype_ptr->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; } #else /* NOT heterogeneous */ ! if (dtype_ptr->is_contig) { /* Contiguous, no conversion form */ /* This SHOULD have been handled in the macro that expands into a call to this routine */ shandle->dev_shandle.bytes_as_contig = ! shandle->count * dtype_ptr->size; if (shandle->dev_shandle.bytes_as_contig > 0 && shandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; shandle->dev_shandle.start = shandle->bufadd; shandle->bufpos = 0; *************** *** 280,287 **** --- 283,291 ---- int MPIR_Receive_setup(request) MPI_Request *request; { + struct MPIR_DATATYPE *dtype_ptr; MPIR_RHANDLE *rhandle; int mpi_errno = MPI_SUCCESS; int dest_type = 0; *************** *** 295,306 **** /* Even for contiguous data, if heterogeneous, we may need to allocate a larger buffer ... */ #if defined(MPID_HAS_HETERO) if (MPID_IS_HETERO == 1) dest_type = MPIR_Dest_needs_conversion(rhandle->comm,rhandle->source); ! if (dest_type || !rhandle->datatype->is_contig) { /* This is OK but not optimal, as this will use MPI_Pack_size to allocate the buffer; pack_size will use the most pessimistic value */ if ((mpi_errno = --- 299,312 ---- /* Even for contiguous data, if heterogeneous, we may need to allocate a larger buffer ... */ + dtype_ptr = MPIR_GET_DTYPE_PTR(rhandle->datatype); + #if defined(MPID_HAS_HETERO) if (MPID_IS_HETERO == 1) dest_type = MPIR_Dest_needs_conversion(rhandle->comm,rhandle->source); ! if (dest_type || !dtype_ptr->is_contig) { /* This is OK but not optimal, as this will use MPI_Pack_size to allocate the buffer; pack_size will use the most pessimistic value */ if ((mpi_errno = *************** *** 314,332 **** else { /* Contiguous and homogeneous */ rhandle->dev_rhandle.start = rhandle->bufadd; rhandle->dev_rhandle.bytes_as_contig = ! rhandle->count * rhandle->datatype->extent; if (rhandle->dev_rhandle.bytes_as_contig > 0 && rhandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; rhandle->bufpos = 0; } #else ! if (rhandle->datatype->is_contig) { rhandle->dev_rhandle.start = rhandle->bufadd; rhandle->dev_rhandle.bytes_as_contig = ! rhandle->count * rhandle->datatype->extent; if (rhandle->dev_rhandle.bytes_as_contig > 0 && rhandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; rhandle->bufpos = 0; --- 320,338 ---- else { /* Contiguous and homogeneous */ rhandle->dev_rhandle.start = rhandle->bufadd; rhandle->dev_rhandle.bytes_as_contig = ! rhandle->count * dtype_ptr->extent; if (rhandle->dev_rhandle.bytes_as_contig > 0 && rhandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; rhandle->bufpos = 0; } #else ! if (dtype_ptr->is_contig) { rhandle->dev_rhandle.start = rhandle->bufadd; rhandle->dev_rhandle.bytes_as_contig = ! rhandle->count * dtype_ptr->extent; if (rhandle->dev_rhandle.bytes_as_contig > 0 && rhandle->bufadd == 0) mpi_errno = MPI_ERR_BUFFER; rhandle->bufpos = 0; *************** *** 343,351 **** } #endif #ifdef FOO ! if (rhandle->datatype->is_contig) { #if defined(MPID_HAS_HETERO) if (MPID_IS_HETERO == 1 && (dest_type = MPIR_Dest_needs_conversion(rhandle->comm,rhandle->source))) { /* This is a heterogeneous case - we MAY need a longer buffer, --- 349,357 ---- } #endif #ifdef FOO ! if (dtype_ptr->is_contig) { #if defined(MPID_HAS_HETERO) if (MPID_IS_HETERO == 1 && (dest_type = MPIR_Dest_needs_conversion(rhandle->comm,rhandle->source))) { /* This is a heterogeneous case - we MAY need a longer buffer, diff -rc4 /home/MPI/mpich/current/mpich/src/dmpi/dmpipk.c mpich/src/dmpi/dmpipk.c *** /home/MPI/mpich/current/mpich/src/dmpi/dmpipk.c Fri Jun 7 10:12:32 1996 --- mpich/src/dmpi/dmpipk.c Mon Oct 14 16:31:24 1996 *************** *** 1,6 **** /* ! * $Id: dmpipk.c,v 1.24 1996/06/07 15:12:29 gropp Exp $ * * (C) 1994 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: dmpipk.c,v 1.24 1996/06/07 15:12:29 gropp Exp gropp $ * * (C) 1994 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 25,33 **** void MPIR_Pack_Hvector( comm, buf, count, datatype, dest, outbuf ) MPI_Comm comm; char *buf; int count, dest; ! MPI_Datatype datatype; char *outbuf; { int count1 = datatype->count, /* Number of blocks */ blocklen = datatype->blocklen; /* Number of elements in each block */ --- 25,33 ---- void MPIR_Pack_Hvector( comm, buf, count, datatype, dest, outbuf ) MPI_Comm comm; char *buf; int count, dest; ! struct MPIR_DATATYPE *datatype; char *outbuf; { int count1 = datatype->count, /* Number of blocks */ blocklen = datatype->blocklen; /* Number of elements in each block */ *************** *** 88,96 **** void MPIR_UnPack_Hvector( inbuf, count, datatype, source, outbuf ) char *inbuf; int count, source; ! MPI_Datatype datatype; char *outbuf; { int count1 = datatype->count, /* Number of blocks */ blocklen = datatype->blocklen; /* Number of elements in each block */ --- 88,96 ---- void MPIR_UnPack_Hvector( inbuf, count, datatype, source, outbuf ) char *inbuf; int count, source; ! struct MPIR_DATATYPE *datatype; char *outbuf; { int count1 = datatype->count, /* Number of blocks */ blocklen = datatype->blocklen; /* Number of elements in each block */ *************** *** 147,157 **** /* Get the length needed for the Hvector as a contiguous lump */ int MPIR_HvectorLen( count, datatype ) int count; ! MPI_Datatype datatype; { ! return datatype->size * count; } #ifndef MPI_ADI2 /* --- 147,157 ---- /* Get the length needed for the Hvector as a contiguous lump */ int MPIR_HvectorLen( count, datatype ) int count; ! struct MPIR_DATATYPE *datatype; { ! return datatype->size * count; } #ifndef MPI_ADI2 /* *************** *** 168,177 **** MPI_Request request; { int size; int mpi_errno = MPI_SUCCESS; ! if (!datatype->committed) return MPI_ERR_TYPE | MPIR_ERR_UNCOMMITTED; if (count == 0) { request->chandle.bufpos = 0; --- 168,181 ---- MPI_Request request; { int size; int mpi_errno = MPI_SUCCESS; + struct MPIR_DATATYPE *dtype_ptr; + + + dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! if (!dtype_ptr->committed) return MPI_ERR_TYPE | MPIR_ERR_UNCOMMITTED; if (count == 0) { request->chandle.bufpos = 0; *************** *** 178,186 **** request->shandle.dev_shandle.bytes_as_contig = 0; return MPI_SUCCESS; } ! if (datatype->dte_type == MPIR_PACKED) { /* Data requires no further modification */ /* PRINTF( "Packing packed data!\n" ); */ /* Mark this data appropriately and indicate that it is packed in the request --- 182,190 ---- request->shandle.dev_shandle.bytes_as_contig = 0; return MPI_SUCCESS; } ! if (dtype_ptr->dte_type == MPIR_PACKED) { /* Data requires no further modification */ /* PRINTF( "Packing packed data!\n" ); */ /* Mark this data appropriately and indicate that it is packed in the request *************** *** 219,227 **** MPIR_Comm_needs_conversion(request->chandle.comm)) request->chandle.msgrep = MPIR_MSGREP_XDR; */ #endif ! MPI_PACKED->ref_count ++; if (!request->shandle.persistent) MPIR_Type_free( &request->shandle.datatype ); request->shandle.datatype = MPI_PACKED; request->shandle.dev_shandle.start = request->chandle.bufpos; --- 223,235 ---- MPIR_Comm_needs_conversion(request->chandle.comm)) request->chandle.msgrep = MPIR_MSGREP_XDR; */ #endif ! {struct MPIR_DATATYPE *packed_ptr; ! packed_ptr = MPIR_GET_DTYPE_PTR(MPI_PACKED); ! packed_ptr->ref_count++; ! } ! /* MPI_PACKED->ref_count ++; */ if (!request->shandle.persistent) MPIR_Type_free( &request->shandle.datatype ); request->shandle.datatype = MPI_PACKED; request->shandle.dev_shandle.start = request->chandle.bufpos; *************** *** 243,252 **** MPI_Datatype datatype; MPI_Request request; { int len; ! if (!datatype->committed) return MPI_ERR_TYPE | MPIR_ERR_UNCOMMITTED; /* We can't use datatype->size * count, since the actual code may require padding */ --- 251,264 ---- MPI_Datatype datatype; MPI_Request request; { int len; + struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! ! ! if (!dtype_ptr->committed) return MPI_ERR_TYPE | MPIR_ERR_UNCOMMITTED; /* We can't use datatype->size * count, since the actual code may require padding */ *************** *** 279,291 **** int *act_count; { int mpi_errno = MPI_SUCCESS; int dest_len; /* Use generic unpack */ /* PRINTF( "Using generic unpack\n" ); */ /* Need to update act_count to bytes WRITTEN */ ! if (datatype->dte_type == MPIR_PACKED) { /* Data requires no further modification */ memcpy( buf, request->chandle.bufpos, *act_count ); } else { --- 291,306 ---- int *act_count; { int mpi_errno = MPI_SUCCESS; int dest_len; + struct MPIR_DATATYPE *dtype_ptr; + dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); + /* Use generic unpack */ /* PRINTF( "Using generic unpack\n" ); */ /* Need to update act_count to bytes WRITTEN */ ! if (dtype_ptr->dte_type == MPIR_PACKED) { /* Data requires no further modification */ memcpy( buf, request->chandle.bufpos, *act_count ); } else { diff -rc4 /home/MPI/mpich/current/mpich/src/dmpi/pkutil.c mpich/src/dmpi/pkutil.c *** /home/MPI/mpich/current/mpich/src/dmpi/pkutil.c Wed Jul 17 13:04:15 1996 --- mpich/src/dmpi/pkutil.c Tue Oct 15 09:13:20 1996 *************** *** 1,6 **** /* ! * $Id: pkutil.c,v 1.13 1996/07/17 18:04:13 gropp Exp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: pkutil.c,v 1.13 1996/07/17 18:04:13 gropp Exp gropp $ * * (C) 1995 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 57,67 **** #define MPIR_Type_XDR_decode MPID_Type_XDR_decode #define MPIR_Mem_XDR_Init MPID_Mem_XDR_Init #define MPIR_Mem_XDR_Free MPID_Mem_XDR_Free ! int MPIR_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, MPI_Datatype, ! int, void * )); ! int MPIR_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void * )); #endif #ifdef MPID_HAS_HETERO --- 57,68 ---- #define MPIR_Type_XDR_decode MPID_Type_XDR_decode #define MPIR_Mem_XDR_Init MPID_Mem_XDR_Init #define MPIR_Mem_XDR_Free MPID_Mem_XDR_Free ! int MPIR_Type_XDR_encode ANSI_ARGS(( unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void * )); ! int MPIR_Type_XDR_decode ANSI_ARGS(( unsigned char *, int, ! struct MPIR_DATATYPE*, int, unsigned char *, int, int *, int *, void * )); #endif #ifdef MPID_HAS_HETERO *************** *** 70,78 **** int MPIR_Mem_XDR_Init ANSI_ARGS((char *, int, enum xdr_op, XDR * )); int MPIR_Mem_XDR_Free ANSI_ARGS((XDR *)); #endif int MPIR_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! MPI_Datatype, int, void *)); #endif #ifdef MPI_ADI2 #define MPIR_MSGFORM_XDR MPID_MSG_XDR --- 71,79 ---- int MPIR_Mem_XDR_Init ANSI_ARGS((char *, int, enum xdr_op, XDR * )); int MPIR_Mem_XDR_Free ANSI_ARGS((XDR *)); #endif int MPIR_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void *)); #endif #ifdef MPI_ADI2 #define MPIR_MSGFORM_XDR MPID_MSG_XDR *************** *** 86,94 **** #define MPIR_Type_swap_copy MPID_Type_swap_copy #define MPIR_Mem_convert_len MPID_Mem_convert_len int MPIR_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! MPI_Datatype, int, void *)); #endif /* This code assumes that we can use char * pointers (previous code --- 87,95 ---- #define MPIR_Type_swap_copy MPID_Type_swap_copy #define MPIR_Mem_convert_len MPID_Mem_convert_len int MPIR_Type_swap_copy ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void *)); #endif /* This code assumes that we can use char * pointers (previous code *************** *** 120,128 **** MPI_Datatype type; void *dest; int *totlen; { ! int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, MPI_Datatype, int, void * )) = 0; void *packctx = 0; int err; int outlen; --- 121,130 ---- MPI_Datatype type; void *dest; int *totlen; { ! int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE *, int, void * )) = 0; void *packctx = 0; int err; int outlen; *************** *** 129,137 **** #ifdef HAS_XDR XDR xdr_ctx; #endif ! MPIR_GET_REAL_DATATYPE(type) #ifdef MPID_HAS_HETERO switch (dest_type) { case MPIR_MSGFORM_XDR: #if HAS_XDR --- 131,139 ---- #ifdef HAS_XDR XDR xdr_ctx; #endif ! /* MPIR_GET_REAL_DATATYPE(type) */ #ifdef MPID_HAS_HETERO switch (dest_type) { case MPIR_MSGFORM_XDR: #if HAS_XDR *************** *** 191,208 **** #endif MPI_Datatype type; int *act_len, *dest_len; { ! int (*unpackcontig) ANSI_ARGS((unsigned char *, int, MPI_Datatype, int, ! unsigned char *, int, int *, int *, void *)) = 0; void *unpackctx = 0; int err, used_len; #ifdef HAS_XDR XDR xdr_ctx; #endif ! MPIR_GET_REAL_DATATYPE(type) #ifdef MPID_HAS_HETERO if (msgrep == MPIR_MSGREP_XDR /* || (MPID_IS_HETERO == 1 && MPIR_Comm_needs_conversion(comm))*/ --- 193,211 ---- #endif MPI_Datatype type; int *act_len, *dest_len; { ! struct MPIR_DATATYPE *dtype_ptr; ! int (*unpackcontig) ANSI_ARGS((unsigned char *, int, struct MPIR_DATATYPE*, ! int, unsigned char *, int, int *, int *, void *)) = 0; void *unpackctx = 0; int err, used_len; #ifdef HAS_XDR XDR xdr_ctx; #endif ! dtype_ptr = MPIR_GET_DTYPE_PTR(type); #ifdef MPID_HAS_HETERO if (msgrep == MPIR_MSGREP_XDR /* || (MPID_IS_HETERO == 1 && MPIR_Comm_needs_conversion(comm))*/ *************** *** 219,227 **** } #endif *dest_len = 0; used_len = 0; ! err = MPIR_Unpack2( (char *)src, count, type, unpackcontig, unpackctx, (char *)dest, srcsize, dest_len, &used_len ); *act_len = used_len; #ifdef HAS_XDR if (unpackcontig == MPIR_Type_XDR_decode) --- 222,230 ---- } #endif *dest_len = 0; used_len = 0; ! err = MPIR_Unpack2( (char *)src, count, dtype_ptr, unpackcontig, unpackctx, (char *)dest, srcsize, dest_len, &used_len ); *act_len = used_len; #ifdef HAS_XDR if (unpackcontig == MPIR_Type_XDR_decode) *************** *** 276,285 **** MPI_Datatype type; MPI_Comm comm; int *size; { ! MPIR_GET_REAL_DATATYPE(type) /* Figure out size needed to pack type. This uses the same logic as MPIR_Pack, except that it can handle, through dest_type, specific formats for specific destinations. --- 279,289 ---- MPI_Datatype type; MPI_Comm comm; int *size; { + struct MPIR_DATATYPE *dtype_ptr; ! /*MPIR_GET_REAL_DATATYPE(type) */ /* Figure out size needed to pack type. This uses the same logic as MPIR_Pack, except that it can handle, through dest_type, specific formats for specific destinations. *************** *** 289,297 **** dest_type = MPIR_MSGREP_RECEIVER; #ifdef MPID_HAS_HETERO (*size) = MPIR_Mem_convert_len( dest_type, type, incount ); #else ! (*size) = type->size * incount; #endif return MPI_SUCCESS; } #endif --- 293,303 ---- dest_type = MPIR_MSGREP_RECEIVER; #ifdef MPID_HAS_HETERO (*size) = MPIR_Mem_convert_len( dest_type, type, incount ); #else ! dtype_ptr = MPIR_GET_DTYPE_PTR(type); ! ! (*size) = dtype_ptr->size * incount; #endif return MPI_SUCCESS; } #endif *************** *** 319,330 **** */ int MPIR_Pack2( buf, count, type, packcontig, packctx, dest, outlen, totlen ) char *buf; int count; ! MPI_Datatype type; char *dest; int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, ! MPI_Datatype, int, void *)); void *packctx; int *outlen, *totlen; { int i,j; --- 325,336 ---- */ int MPIR_Pack2( buf, count, type, packcontig, packctx, dest, outlen, totlen ) char *buf; int count; ! struct MPIR_DATATYPE *type; char *dest; int (*packcontig) ANSI_ARGS((unsigned char *, unsigned char *, ! struct MPIR_DATATYPE*, int, void *)); void *packctx; int *outlen, *totlen; { int i,j; *************** *** 470,482 **** int MPIR_Unpack2 ( src, count, type, unpackcontig, unpackctx, dest, srclen, dest_len, used_len ) char *src, *dest; int count, srclen; ! int (*unpackcontig) ANSI_ARGS((unsigned char *, int, MPI_Datatype, int, unsigned char *, int, int *, int *, void *)); void *unpackctx; ! MPI_Datatype type; int *dest_len; int *used_len; { int i,j; --- 476,489 ---- int MPIR_Unpack2 ( src, count, type, unpackcontig, unpackctx, dest, srclen, dest_len, used_len ) char *src, *dest; int count, srclen; ! int (*unpackcontig) ANSI_ARGS((unsigned char *, int, ! struct MPIR_DATATYPE*, int, unsigned char *, int, int *, int *, void *)); void *unpackctx; ! struct MPIR_DATATYPE *type; int *dest_len; int *used_len; { int i,j; *************** *** 483,493 **** --- 490,502 ---- int mpi_errno = MPI_SUCCESS; char *tmp_buf; int len, srcreadlen, destlen; + #ifdef FOO if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,type)) return MPIR_ERROR(MPI_COMM_WORLD, mpi_errno, "Internal Error in MPIR_UNPACK"); + #endif /* Unpack contiguous data */ if (type->is_contig) { if (!unpackcontig) { *************** *** 622,630 **** */ int MPIR_Elementcnt( src, num, datatype, inbytes, dest, srclen, srcreadlen, destlen, ctx ) unsigned char *dest, *src; ! MPI_Datatype datatype; int num, inbytes, srclen, *srcreadlen, *destlen; void *ctx; { int len = datatype->size * num; --- 631,639 ---- */ int MPIR_Elementcnt( src, num, datatype, inbytes, dest, srclen, srcreadlen, destlen, ctx ) unsigned char *dest, *src; ! struct MPIR_DATATYPE *datatype; int num, inbytes, srclen, *srcreadlen, *destlen; void *ctx; { int len = datatype->size * num; *************** *** 665,717 **** /* The interface makes these unsigned chars */ int MPIR_Printcontig( dest, src, datatype, num, ctx ) unsigned char *dest, *src; ! MPI_Datatype datatype; int num; void *ctx; { ! int len = datatype->size * num; /* gcc doesn't like subtracting from a POINTER to unsigned(!) */ ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! ((char *)dest)-o_offset, ((char *)src)-i_offset, len ); ! return len; } int MPIR_Printcontig2( src, num, datatype, inbytes, dest, ctx ) char *dest, *src; ! MPI_Datatype datatype; int num, inbytes; void *ctx; { ! int len = datatype->size * num; ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! dest-o_offset, src-i_offset, len ); ! return len; } int MPIR_Printcontig2a( src, num, datatype, inbytes, dest, srclen, srcreadlen, destlen, ctx ) unsigned char *dest, *src; ! MPI_Datatype datatype; int num, inbytes, srclen, *srcreadlen, *destlen; void *ctx; { ! int len = datatype->size * num; ! ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! (char *)dest-o_offset, (char *)src-i_offset, len ); ! *srcreadlen = len; ! *destlen = len; ! return MPI_SUCCESS; } int MPIR_PrintDatatypePack( fp, count, type, in_offset, out_offset ) FILE *fp; int count; ! MPI_Datatype type; int in_offset, out_offset; { int outlen, totlen; char *src, *dest; --- 674,726 ---- /* The interface makes these unsigned chars */ int MPIR_Printcontig( dest, src, datatype, num, ctx ) unsigned char *dest, *src; ! struct MPIR_DATATYPE *datatype; int num; void *ctx; { ! int len = datatype->size * num; /* gcc doesn't like subtracting from a POINTER to unsigned(!) */ ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! ((char *)dest)-o_offset, ((char *)src)-i_offset, len ); ! return len; } int MPIR_Printcontig2( src, num, datatype, inbytes, dest, ctx ) char *dest, *src; ! struct MPIR_DATATYPE *datatype; int num, inbytes; void *ctx; { ! int len = datatype->size * num; ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! dest-o_offset, src-i_offset, len ); ! return len; } int MPIR_Printcontig2a( src, num, datatype, inbytes, dest, srclen, srcreadlen, destlen, ctx ) unsigned char *dest, *src; ! struct MPIR_DATATYPE *datatype; int num, inbytes, srclen, *srcreadlen, *destlen; void *ctx; { ! int len = datatype->size * num; ! ! fprintf( datatype_fp, "Copy %x <- %x for %d bytes\n", ! (char *)dest-o_offset, (char *)src-i_offset, len ); ! *srcreadlen = len; ! *destlen = len; ! return MPI_SUCCESS; } int MPIR_PrintDatatypePack( fp, count, type, in_offset, out_offset ) FILE *fp; int count; ! struct MPIR_DATATYPE *type; int in_offset, out_offset; { int outlen, totlen; char *src, *dest; *************** *** 739,765 **** int count; MPI_Datatype type; int in_offset, out_offset; { ! int srclen, destlen, used_len; ! char *src, *dest; ! int size; ! datatype_fp = fp ? fp : stdout; ! i_offset = (char *)0; ! o_offset = (char *)0; ! src = (char *)in_offset; ! dest = (char *)out_offset; ! MPI_Type_size( type, &size ); ! srclen = count * size; ! if (!in_offset) { ! i_offset = &i_dummy; ! src = i_offset; } ! if (!out_offset) { ! o_offset = &i_dummy; ! dest = o_offset; } ! MPIR_Unpack2( src, count, type, MPIR_Printcontig2a, (void *)0, dest, ! srclen, &destlen, &used_len ); ! return MPI_SUCCESS; } --- 748,776 ---- int count; MPI_Datatype type; int in_offset, out_offset; { ! struct MPIR_DATATYPE *dtype_ptr; ! int srclen, destlen, used_len; ! char *src, *dest; ! int size; ! datatype_fp = fp ? fp : stdout; ! i_offset = (char *)0; ! o_offset = (char *)0; ! src = (char *)in_offset; ! dest = (char *)out_offset; ! MPI_Type_size( type, &size ); ! srclen = count * size; ! if (!in_offset) { ! i_offset = &i_dummy; ! src = i_offset; } ! if (!out_offset) { ! o_offset = &i_dummy; ! dest = o_offset; } ! dtype_ptr = MPIR_GET_DTYPE_PTR(type); ! MPIR_Unpack2( src, count, dtype_ptr, MPIR_Printcontig2a, (void *)0, dest, ! srclen, &destlen, &used_len ); ! return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/Makefile.in mpich/src/env/Makefile.in *** /home/MPI/mpich/current/mpich/src/env/Makefile.in Fri Jun 7 10:11:57 1996 --- mpich/src/env/Makefile.in Wed Oct 2 14:19:28 1996 *************** *** 31,44 **** MPI_FOBJECTS = farg.o initfcmn.o initfdte.o MPI_COBJECTS = abort.o debugutil.o init.o initutil.o finalize.o initialize.o \ errorstring.o initdte.o \ getpname.o errcreate.o errset.o errget.o errfree.o errclass.o \ ! wtime.o wtick.o errmsg.o MPI_FSOURCES = farg.f initfcmn.f initfdte.f MPI_CSOURCES = abort.c debugutil.c init.c initutil.c \ finalize.c initialize.c errorstring.c initdte.c \ getpname.c errcreate.c errset.c errget.c errfree.c errclass.c \ ! wtime.c wtick.c errmsg.c MPI_TSOURCES = errclass.c MPI_WSOURCES = abortf.c finalizef.c errclassf.c MPI_WOBJECTS = initializef.o abortf.o initf.o finalizef.o errorstringf.o \ getpnamef.o errcreatef.o errsetf.o errgetf.o errfreef.o errclassf.o \ --- 31,44 ---- MPI_FOBJECTS = farg.o initfcmn.o initfdte.o MPI_COBJECTS = abort.o debugutil.o init.o initutil.o finalize.o initialize.o \ errorstring.o initdte.o \ getpname.o errcreate.o errset.o errget.o errfree.o errclass.o \ ! wtime.o wtick.o errmsg.o int2handle.o handle2int.o MPI_FSOURCES = farg.f initfcmn.f initfdte.f MPI_CSOURCES = abort.c debugutil.c init.c initutil.c \ finalize.c initialize.c errorstring.c initdte.c \ getpname.c errcreate.c errset.c errget.c errfree.c errclass.c \ ! wtime.c wtick.c errmsg.c int2handle.c handle2int.c MPI_TSOURCES = errclass.c MPI_WSOURCES = abortf.c finalizef.c errclassf.c MPI_WOBJECTS = initializef.o abortf.o initf.o finalizef.o errorstringf.o \ getpnamef.o errcreatef.o errsetf.o errgetf.o errfreef.o errclassf.o \ *************** *** 71,79 **** -anyname -I pubinc $(MPI_TSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 71,79 ---- -anyname -I pubinc $(MPI_TSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 80,88 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 80,88 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: *************** *** 105,113 **** # Warning: some systems might not support -g. We'll deal with that when # we have to. We use the part of CFLAGS that does not include the # optimization switches. debugutil.o: debugutil.c ! $(CC) -g @CFLAGS@ $(INCLUDE_DIR) -DMPI_$(ARCH) $(MPIPROFILE) -c $< # GETNAME_DEFS are needed by mpehname.c; these need mpe includes mpehname.o: mpehname.c $(CC) $(CFLAGS) @GETNAME_DEFS@ -c -I../../mpe mpehname.c --- 105,114 ---- # Warning: some systems might not support -g. We'll deal with that when # we have to. We use the part of CFLAGS that does not include the # optimization switches. debugutil.o: debugutil.c ! $(CC) -g @CFLAGS@ $(INCLUDE_DIR) -DMPI_$(ARCH) $(MPIPROFILE) -c \ ! debugutil.c # GETNAME_DEFS are needed by mpehname.c; these need mpe includes mpehname.o: mpehname.c $(CC) $(CFLAGS) @GETNAME_DEFS@ -c -I../../mpe mpehname.c diff -rc4 /home/MPI/mpich/current/mpich/src/env/debugutil.c mpich/src/env/debugutil.c *** /home/MPI/mpich/current/mpich/src/env/debugutil.c Fri Jul 5 11:03:10 1996 --- mpich/src/env/debugutil.c Fri Sep 27 07:42:04 1996 *************** *** 1,6 **** /* ! * $Id: debugutil.c,v 1.1 1996/07/05 16:03:09 gropp Exp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: debugutil.c,v 1.1 1996/07/05 16:03:09 gropp Exp gropp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 73,80 **** --- 73,107 ---- /* This routine is only here to have a breakpoint set in it, * it doesn't need any contents itself, but we don't want * it inlined and removed despite that. */ + + #if (defined(__osf__) && defined(__alpha)) + /* Under Digital Unix ("the operating system formerly known as OSF1") + * including the header files is not sufficient to cause the type + * definitions to be included in the object file debug information. + * (This is not entirely accurate, they are actually there, but + * TotalView's delayed symbol loader thinks that it doesn't need + * them, so it doesn't parse them.) + * To cause this to happen you also need to instance an entity of + * that type. This simplest way to do that (without causing static + * space to be allocated) is to instance local variables in a + * function. Since we have this function to hand... + * + * This also has the useful effect of documenting the + * types which are used by TotalView's MPICH support, and here + * they are. + */ + MPIR_SQUEUE sq; + MPID_QHDR qh; + MPID_QUEUE q; + MPID_QEL qel; + MPIR_SQEL sqel; + MPIR_RHANDLE rh; + MPIR_Comm_list cl; + MPIR_Communicator c; + MPI_Status s; + #endif } diff -rc4 /home/MPI/mpich/current/mpich/src/env/errcreate.c mpich/src/env/errcreate.c *** /home/MPI/mpich/current/mpich/src/env/errcreate.c Thu Apr 11 15:27:58 1996 --- mpich/src/env/errcreate.c Mon Sep 23 10:22:39 1996 *************** *** 1,6 **** /* ! * $Id: errcreate.c,v 1.8 1996/04/11 20:27:58 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: errcreate.c,v 1.8 1996/04/11 20:27:58 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 39,55 **** int MPI_Errhandler_create( function, errhandler ) MPI_Handler_function *function; MPI_Errhandler *errhandler; { ! MPI_Errhandler new; ! MPIR_ALLOC(new,(MPI_Errhandler) MPIR_SBalloc( MPIR_errhandlers ), MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Error in MPI_ERRHANDLER_CREATE" ); MPIR_SET_COOKIE(new,MPIR_ERRHANDLER_COOKIE); new->routine = function; new->ref_count = 1; *errhandler = new; return MPI_SUCCESS; } --- 39,59 ---- int MPI_Errhandler_create( function, errhandler ) MPI_Handler_function *function; MPI_Errhandler *errhandler; { ! struct MPIR_Errhandler *new; ! MPIR_ALLOC(new,(struct MPIR_Errhandler*) MPIR_SBalloc( MPIR_errhandlers ), MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Error in MPI_ERRHANDLER_CREATE" ); MPIR_SET_COOKIE(new,MPIR_ERRHANDLER_COOKIE); new->routine = function; new->ref_count = 1; + #ifdef NEW_POINTERS + *errhandler = (MPI_Errhandler)MPIR_FromPointer( new ); + #else *errhandler = new; + #endif return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/errfree.c mpich/src/env/errfree.c *** /home/MPI/mpich/current/mpich/src/env/errfree.c Thu Apr 11 15:28:04 1996 --- mpich/src/env/errfree.c Mon Sep 23 15:33:07 1996 *************** *** 1,6 **** /* ! * $Id: errfree.c,v 1.8 1996/04/11 20:28:04 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: errfree.c,v 1.8 1996/04/11 20:28:04 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 34,45 **** --- 34,57 ---- if (MPIR_TEST_ERRHANDLER(MPI_COMM_WORLD,*errhandler)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_ERRHANDLER_FREE" ); + #ifdef NEW_POINTERS + { struct MPIR_Errhandler *old = + (struct MPIR_Errhandler *)MPIR_ToPointer( *errhandler ); + old->ref_count --; + if (old->ref_count <= 0) { + MPIR_SET_COOKIE((old),0); + MPIR_SBfree ( MPIR_errhandlers, old ); + MPIR_RmPointer( *errhandler ); + } + } + #else (*errhandler)->ref_count --; if ((*errhandler)->ref_count <= 0) { MPIR_SET_COOKIE((*errhandler),0); MPIR_SBfree ( MPIR_errhandlers, (*errhandler) ); } + #endif *errhandler = MPI_ERRHANDLER_NULL; return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/errfreef.c mpich/src/env/errfreef.c *** /home/MPI/mpich/current/mpich/src/env/errfreef.c Tue May 28 09:11:07 1996 --- mpich/src/env/errfreef.c Sun Sep 22 09:42:20 1996 *************** *** 31,38 **** --- 31,41 ---- #define mpi_errhandler_free_ mpi_errhandler_free #endif #endif + /* Prototype to suppress warnings about missing prototypes */ + void mpi_errhandler_free_ ANSI_ARGS(( MPI_Errhandler *, int * )); + void mpi_errhandler_free_( errhandler, __ierr ) MPI_Errhandler *errhandler; int *__ierr; { *************** *** 41,46 **** *__ierr = MPI_Errhandler_free( &old ); if (!old) { MPIR_RmPointer( *(int*)errhandler ); } ! *(int *)errhandler = MPI_ERRHANDLER_NULL; } --- 44,49 ---- *__ierr = MPI_Errhandler_free( &old ); if (!old) { MPIR_RmPointer( *(int*)errhandler ); } ! *(int *)errhandler = (int)MPI_ERRHANDLER_NULL; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/errget.c mpich/src/env/errget.c *** /home/MPI/mpich/current/mpich/src/env/errget.c Thu Apr 11 15:28:10 1996 --- mpich/src/env/errget.c Mon Sep 23 15:36:21 1996 *************** *** 1,6 **** /* ! * $Id: errget.c,v 1.7 1996/04/11 20:28:10 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: errget.c,v 1.7 1996/04/11 20:28:10 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 38,45 **** --- 38,49 ---- } *errhandler = comm->error_handler; /* A get creates a reference to an error handler; the user must explicitly free this reference */ + #ifdef NEW_POINTERS + MPIR_Errhandler_mark( *errhandler, 1 ); + #else comm->error_handler->ref_count ++; + #endif } return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/errset.c mpich/src/env/errset.c *** /home/MPI/mpich/current/mpich/src/env/errset.c Thu Apr 11 15:28:39 1996 --- mpich/src/env/errset.c Mon Sep 23 11:17:36 1996 *************** *** 1,6 **** /* ! * $Id: errset.c,v 1.8 1996/04/11 20:28:39 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: errset.c,v 1.8 1996/04/11 20:28:39 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 30,40 **** --- 30,53 ---- return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_ERRHANDLER_SET" ); } else { + #ifdef NEW_POINTERS + /* Test for validity of new error handler */ + {struct MPIR_Errhandler *old = (struct MPIR_Errhandler *) + MPIR_ToPointer( errhandler ); + if (!old MPIR_TEST_COOKIE(old,MPIR_ERRHANDLER_COOKIE)) { + return MPIR_ERROR( comm, MPI_ERR_ARG, + "Error in MPI_ERRHANDLER_SET"); + } + old->ref_count++; + } + #endif if (comm->error_handler) MPI_Errhandler_free( &comm->error_handler ); comm->error_handler = errhandler; + #ifndef NEW_POINTERS errhandler->ref_count ++; + #endif } return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/env/finalize.c mpich/src/env/finalize.c *** /home/MPI/mpich/current/mpich/src/env/finalize.c Fri Jun 7 10:12:24 1996 --- mpich/src/env/finalize.c Mon Sep 23 10:21:49 1996 *************** *** 1,6 **** /* ! * $Id: finalize.c,v 1.34 1996/06/07 15:12:21 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: finalize.c,v 1.34 1996/06/07 15:12:21 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 172,182 **** --- 172,193 ---- MPI_Keyval_free( &MPIR_HOST ); MPI_Keyval_free( &MPIR_IO ); MPI_Keyval_free( &MPIR_WTIME_IS_GLOBAL ); + #ifdef NEW_POINTERS + {MPI_Errhandler tmp; + tmp = MPI_ERRORS_RETURN; + MPI_Errhandler_free( &tmp ); + tmp = MPI_ERRORS_ARE_FATAL; + MPI_Errhandler_free( &tmp ); + tmp = MPIR_ERRORS_WARN; + MPI_Errhandler_free( &tmp ); + } + #else MPI_Errhandler_free( &MPI_ERRORS_RETURN ); MPI_Errhandler_free( &MPI_ERRORS_ARE_FATAL ); MPI_Errhandler_free( &MPIR_ERRORS_WARN ); + #endif #ifdef MPI_ADI2 #ifdef MPID_HAS_PROC_INFO /* Release any space we allocated for the proc table */ diff -rc4 /home/MPI/mpich/current/mpich/src/env/initdte.c mpich/src/env/initdte.c *** /home/MPI/mpich/current/mpich/src/env/initdte.c Fri Jun 7 10:12:25 1996 --- mpich/src/env/initdte.c Fri Sep 27 07:35:00 1996 *************** *** 1,6 **** /* ! * $Id: initdte.c,v 1.2 1996/06/07 15:12:21 gropp Exp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: initdte.c,v 1.2 1996/06/07 15:12:21 gropp Exp gropp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 18,29 **** #else #include "mpisys.h" #endif ! #if defined(POINTER_64_BITS) ! extern void *MPIR_ToPointer(); ! extern int MPIR_FromPointer(); ! extern void MPIR_RmPointer(); #else #define MPIR_ToPointer(a) a #define MPIR_FromPointer(a) (int)a #define MPIR_RmPointer(a) --- 18,29 ---- #else #include "mpisys.h" #endif ! #if defined(POINTER_64_BITS) || 1 ! extern void *MPIR_ToPointer ANSI_ARGS(( int )); ! extern int MPIR_FromPointer ANSI_ARGS(( void * )); ! extern void MPIR_RmPointer ANSI_ARGS((int)); #else #define MPIR_ToPointer(a) a #define MPIR_FromPointer(a) (int)a #define MPIR_RmPointer(a) *************** *** 49,60 **** /* Global memory management variables for fixed-size blocks */ void *MPIR_dtes; /* sbcnst datatype elements */ - /* Predefined datatypes are mapped into an array; this allows the datatypes - themselves to be fixed integers (possibly encoding their length) */ - MPI_Datatype MPIR_datatypes[MPIR_MAX_DATATYPE_ARRAY]; - /* Static space for predefined datatypes */ struct MPIR_DATATYPE MPIR_I_CHAR, MPIR_I_SHORT, MPIR_I_INT, MPIR_I_LONG, MPIR_I_UCHAR, MPIR_I_USHORT, MPIR_I_UINT, MPIR_I_ULONG, MPIR_I_FLOAT, MPIR_I_DOUBLE, --- 49,56 ---- *************** *** 68,88 **** MPIR_I_LONG_INT, MPIR_I_SHORT_INT, MPIR_I_2INT, MPIR_I_REAL, MPIR_I_DOUBLE_PRECISION, MPIR_I_COMPLEX, MPIR_I_DCOMPLEX, MPIR_I_LONG_DOUBLE_INT, ! MPIR_I_LOGICAL; /* Global pre-assigned datatypes */ ! #ifdef MPIR_MEMDEBUG ! MPI_Datatype MPIR_Init_basic_datatype ANSI_ARGS(( MPIR_NODETYPE, int, ! char *, int )); ! #else ! MPI_Datatype MPIR_Init_basic_datatype ANSI_ARGS(( MPIR_NODETYPE, int )); ! #endif ! void MPIR_Setup_datatype ANSI_ARGS((MPI_Datatype,MPIR_NODETYPE,int)); ! void MPIR_Setup_base_datatype ANSI_ARGS((MPI_Datatype, MPI_Datatype, MPIR_NODETYPE, int)); ! void MPIR_Setup_complex_datatype ANSI_ARGS((MPI_Datatype,MPI_Datatype)); /* C Datatypes for MINLOC and MAXLOC functions. These allow us to construct the structures to match the compiler that is used to build MPICH, and, if the user uses the recommended compile --- 64,81 ---- MPIR_I_LONG_INT, MPIR_I_SHORT_INT, MPIR_I_2INT, MPIR_I_REAL, MPIR_I_DOUBLE_PRECISION, MPIR_I_COMPLEX, MPIR_I_DCOMPLEX, MPIR_I_LONG_DOUBLE_INT, ! MPIR_I_LOGICAL, MPIR_I_INTEGER, MPIR_I_2FLOAT, ! MPIR_I_2DOUBLE; /* Global pre-assigned datatypes */ ! void MPIR_Setup_base_datatype ANSI_ARGS((MPI_Datatype, struct MPIR_DATATYPE *, MPIR_NODETYPE, int)); ! void MPIR_Setup_complex_datatype ANSI_ARGS((MPI_Datatype, MPI_Datatype, ! struct MPIR_DATATYPE * )); ! void MPIR_Type_contiguous ANSI_ARGS(( int, MPI_Datatype, ! struct MPIR_DATATYPE *, MPI_Datatype )); /* C Datatypes for MINLOC and MAXLOC functions. These allow us to construct the structures to match the compiler that is used to build MPICH, and, if the user uses the recommended compile *************** *** 120,177 **** MPI_LONG_DOUBLE_INT_struct MPI_LONG_DOUBLE_INT_var; #endif /* Fortran datatypes */ - MPI_Datatype MPI_INTEGER; /* May be the same as MPI_INT */ - MPI_Datatype MPI_REAL; - MPI_Datatype MPI_DOUBLE_PRECISION; /* MPI_Datatype MPIR_logical_dte; */ ! MPI_Datatype MPIR_int1_dte; ! MPI_Datatype MPIR_int2_dte; ! MPI_Datatype MPIR_int4_dte; ! MPI_Datatype MPIR_real4_dte; ! MPI_Datatype MPIR_real8_dte; /* FORTRAN Datatypes for MINLOC and MAXLOC functions */ ! MPI_Datatype MPI_2INTEGER; /* May be the same as MPI_2INT */ ! MPI_Datatype MPIR_2real_dte; ! MPI_Datatype MPIR_2double_dte; ! MPI_Datatype MPIR_2complex_dte; ! MPI_Datatype MPIR_2dcomplex_dte; /* Sizes of Fortran types; computed when initialized. */ static int MPIR_FSIZE_C = 0; static int MPIR_FSIZE_R = 0; static int MPIR_FSIZE_D = 0; - #ifdef MPIR_MEMDEBUG - /* Convert the datatype init routine to pass through the file and line - so that we can more easily find allocation problems */ - #define MPIR_Init_basic_datatype( type, size ) \ - MPIR_Init_basic_datatype_real( type, size, __FILE__, __LINE__ ) - MPI_Datatype MPIR_Init_basic_datatype_real ANSI_ARGS(( MPIR_NODETYPE, int, - char *, int )); - #else - MPI_Datatype MPIR_Init_basic_datatype ANSI_ARGS(( MPIR_NODETYPE, int )); - #endif - void MPIR_Init_dtes() { MPI_Datatype type[3], temptype; MPI_Aint disp[3]; int blln[3]; ! int i; /* set up pre-defined data types */ DEBUG(PRINTF("[%d] About to create datatypes\n", MPIR_tid);) MPIR_dtes = MPIR_SBinit( sizeof( struct MPIR_DATATYPE ), 100, 100 ); - /* Setup the array of predefined datatypes. - Currently, this will include only the basic language types - */ - for (i=0; ialign = 1; ! MPI_UB->elements = 0; ! MPI_UB->count = 0; ! MPIR_Setup_datatype( MPI_LB, MPIR_LB, 0 ); ! MPI_LB->align = 1; ! MPI_LB->elements = 0; ! MPI_LB->count = 0; #if defined(HAVE_LONG_DOUBLE) MPIR_Setup_base_datatype( MPI_LONG_DOUBLE, &MPIR_I_LONG_DOUBLE, --- 256,273 ---- MPIR_Setup_base_datatype( MPI_UNSIGNED_LONG, &MPIR_I_ULONG, MPIR_ULONG, sizeof(unsigned long) ); MPIR_Setup_base_datatype( MPI_UNSIGNED, &MPIR_I_UINT, MPIR_UINT, sizeof(unsigned int) ); ! MPIR_Setup_base_datatype( MPI_PACKED, &MPIR_I_PACKED, MPIR_PACKED, 1 ); ! MPIR_Setup_base_datatype( MPI_UB, &MPIR_I_UB, MPIR_UB, 0 ); ! MPIR_I_UB.align = 1; ! MPIR_I_UB.elements = 0; ! MPIR_I_UB.count = 0; ! MPIR_Setup_base_datatype( MPI_LB, &MPIR_I_LB, MPIR_LB, 0 ); ! MPIR_I_LB.align = 1; ! MPIR_I_LB.elements = 0; ! MPIR_I_LB.count = 0; #if defined(HAVE_LONG_DOUBLE) MPIR_Setup_base_datatype( MPI_LONG_DOUBLE, &MPIR_I_LONG_DOUBLE, *************** *** 324,351 **** MPIR_LONGDOUBLE, 2*sizeof(double) ); #endif /* Initialize C and FORTRAN types for MINLOC and MAXLOC */ ! MPI_Type_contiguous ( 2, &MPIR_I_COMPLEX, &MPIR_2complex_dte ); ! MPI_Type_commit ( &MPIR_2complex_dte ); ! MPIR_Type_permanent ( MPIR_2complex_dte ); ! ! MPI_Type_contiguous ( 2, &MPIR_I_DCOMPLEX, &MPIR_2dcomplex_dte ); ! MPI_Type_commit ( &MPIR_2dcomplex_dte ); ! MPIR_Type_permanent ( MPIR_2dcomplex_dte ); /* Initialize C & FORTRAN 2int type for MINLOC and MAXLOC */ ! MPI_Type_contiguous ( 2, MPI_INT, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_2INT ); /* Note Fortran requires sizeof(INTEGER) == sizeof(REAL) */ ! if (sizeof(int) != MPIR_FSIZE_R) { ! MPI_Type_contiguous ( 2, MPI_INTEGER, &MPI_2INTEGER ); ! MPI_Type_commit ( &MPI_2INTEGER ); ! MPIR_Type_permanent ( MPI_2INTEGER ); ! } ! else ! MPI_2INTEGER = MPI_2INT; /* Initialize C types for MINLOC and MAXLOC */ /* I'm not sure that this is 100% portable */ blln[0] = blln[1] = blln[2] = 1; --- 277,293 ---- MPIR_LONGDOUBLE, 2*sizeof(double) ); #endif /* Initialize C and FORTRAN types for MINLOC and MAXLOC */ ! MPIR_Type_contiguous( 2, MPI_COMPLEX, &MPIR_I_2COMPLEX, MPI_2COMPLEX ); ! MPIR_Type_contiguous( 2, MPI_DOUBLE_COMPLEX, &MPIR_I_2DCOMPLEX, ! MPI_2DOUBLE_COMPLEX ); /* Initialize C & FORTRAN 2int type for MINLOC and MAXLOC */ ! MPIR_Type_contiguous( 2, MPI_INT, &MPIR_I_2INT, MPI_2INT ); /* Note Fortran requires sizeof(INTEGER) == sizeof(REAL) */ ! MPIR_Type_contiguous( 2, MPI_INTEGER, &MPIR_I_2INTEGER, MPI_2INTEGER ); /* Initialize C types for MINLOC and MAXLOC */ /* I'm not sure that this is 100% portable */ blln[0] = blln[1] = blln[2] = 1; *************** *** 357,397 **** disp[1] = (char *)&MPI_FLOAT_INT_var.loc - (char *)&MPI_FLOAT_INT_var; disp[2] = sizeof(MPI_FLOAT_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_FLOAT_INT ); type[0] = MPI_DOUBLE; disp[1] = (char *)&MPI_DOUBLE_INT_var.loc - (char *)&MPI_DOUBLE_INT_var; disp[2] = sizeof(MPI_DOUBLE_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_DOUBLE_INT ); type[0] = MPI_LONG; disp[1] = (char *)&MPI_LONG_INT_var.loc - (char *)&MPI_LONG_INT_var; disp[2] = sizeof(MPI_LONG_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_LONG_INT ); type[0] = MPI_SHORT; disp[1] = (char *)&MPI_SHORT_INT_var.loc - (char *)&MPI_SHORT_INT_var; disp[2] = sizeof(MPI_SHORT_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_SHORT_INT ); #if defined(HAVE_LONG_DOUBLE) type[0] = MPI_LONG_DOUBLE; disp[1] = (char *)&MPI_LONG_DOUBLE_INT_var.loc - (char *)&MPI_LONG_DOUBLE_INT_var; disp[2] = sizeof(MPI_LONG_DOUBLE_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_LONG_DOUBLE_INT ); #else /* use just double if long double not available */ ! memcpy( MPI_LONG_DOUBLE_INT, MPI_DOUBLE_INT, sizeof(struct MPIR_DATATYPE)); #endif #if defined(HAVE_LONG_LONG_INT) MPIR_Setup_base_datatype( MPI_LONG_LONG_INT, &MPIR_I_LONG_LONG_INT, --- 299,347 ---- disp[1] = (char *)&MPI_FLOAT_INT_var.loc - (char *)&MPI_FLOAT_INT_var; disp[2] = sizeof(MPI_FLOAT_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_FLOAT_INT, &MPIR_I_FLOAT_INT ); type[0] = MPI_DOUBLE; disp[1] = (char *)&MPI_DOUBLE_INT_var.loc - (char *)&MPI_DOUBLE_INT_var; disp[2] = sizeof(MPI_DOUBLE_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_DOUBLE_INT, ! &MPIR_I_DOUBLE_INT ); type[0] = MPI_LONG; disp[1] = (char *)&MPI_LONG_INT_var.loc - (char *)&MPI_LONG_INT_var; disp[2] = sizeof(MPI_LONG_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_LONG_INT, &MPIR_I_LONG_INT ); type[0] = MPI_SHORT; disp[1] = (char *)&MPI_SHORT_INT_var.loc - (char *)&MPI_SHORT_INT_var; disp[2] = sizeof(MPI_SHORT_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_SHORT_INT, &MPIR_I_SHORT_INT ); #if defined(HAVE_LONG_DOUBLE) type[0] = MPI_LONG_DOUBLE; disp[1] = (char *)&MPI_LONG_DOUBLE_INT_var.loc - (char *)&MPI_LONG_DOUBLE_INT_var; disp[2] = sizeof(MPI_LONG_DOUBLE_INT_struct); MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_LONG_DOUBLE_INT, ! &MPIR_I_LONG_DOUBLE_INT ); #else /* use just double if long double not available */ ! type[0] = MPI_DOUBLE; ! disp[1] = (char *)&MPI_DOUBLE_INT_var.loc - ! (char *)&MPI_DOUBLE_INT_var; ! disp[2] = sizeof(MPI_DOUBLE_INT_struct); ! MPI_Type_struct ( 3, blln, disp, type, &temptype ); ! MPIR_Setup_complex_datatype( temptype, MPI_LONG_DOUBLE_INT, ! &MPIR_I_LONG_DOUBLE_INT ); #endif #if defined(HAVE_LONG_LONG_INT) MPIR_Setup_base_datatype( MPI_LONG_LONG_INT, &MPIR_I_LONG_LONG_INT, *************** *** 405,412 **** --- 355,363 ---- /* Logical and character aren't portable in the code below */ #ifndef MPID_NO_FORTRAN DEBUG(PRINTF("[%d] About to setup Fortran datatypes\n", MPIR_tid);) /* Try to generate int1, int2, int4, real4, and real8 datatypes */ + #ifdef FOO MPIR_int1_dte = 0; MPIR_int2_dte = 0; MPIR_int4_dte = 0; MPIR_real4_dte = 0; *************** *** 417,427 **** if (sizeof(short) == 2) MPIR_int2_dte = MPI_SHORT; if (sizeof(int) == 4) MPIR_int4_dte = MPI_INT; if (sizeof(float) == 4) MPIR_real4_dte = MPI_FLOAT; if (sizeof(double) == 8) MPIR_real8_dte = MPI_DOUBLE; ! /* These need to be converted into legal integer values for systems with 64 bit pointers */ #ifdef POINTER_64_BITS { extern int MPIR_FromPointer(); int i_integer = MPIR_FromPointer(MPI_INTEGER), i_float = MPIR_FromPointer(MPI_REAL), --- 368,380 ---- if (sizeof(short) == 2) MPIR_int2_dte = MPI_SHORT; if (sizeof(int) == 4) MPIR_int4_dte = MPI_INT; if (sizeof(float) == 4) MPIR_real4_dte = MPI_FLOAT; if (sizeof(double) == 8) MPIR_real8_dte = MPI_DOUBLE; ! #endif /* These need to be converted into legal integer values for systems with 64 bit pointers */ + /* values are all PARAMETER in the Fortran. */ + #ifdef FOO #ifdef POINTER_64_BITS { extern int MPIR_FromPointer(); int i_integer = MPIR_FromPointer(MPI_INTEGER), i_float = MPIR_FromPointer(MPI_REAL), *************** *** 473,493 **** &MPIR_real8_dte, &MPIR_PACKED, &MPIR_UB, &MPIR_LB ); } #endif #endif ! } /* * Having initialized the datatype, we also need to free them */ void MPIR_Free_dtes() { MPIR_Free_perm_type( &MPI_REAL ); MPIR_Free_perm_type( &MPI_DOUBLE_PRECISION ); /* MPI_Type_free( &MPIR_complex_dte ); MPI_Type_free( &MPIR_dcomplex_dte ); MPI_Type_free( &MPIR_logical_dte ); */ #ifndef MPID_NO_FORTRAN #ifdef FOO /* Note that currently (see init.c), these are all copies of the existing C types, and so must not be freed (that will --- 426,448 ---- &MPIR_real8_dte, &MPIR_PACKED, &MPIR_UB, &MPIR_LB ); } #endif #endif ! #endif } /* * Having initialized the datatype, we also need to free them */ void MPIR_Free_dtes() { + #ifdef FOO MPIR_Free_perm_type( &MPI_REAL ); MPIR_Free_perm_type( &MPI_DOUBLE_PRECISION ); /* MPI_Type_free( &MPIR_complex_dte ); MPI_Type_free( &MPIR_dcomplex_dte ); MPI_Type_free( &MPIR_logical_dte ); */ + #endif #ifndef MPID_NO_FORTRAN #ifdef FOO /* Note that currently (see init.c), these are all copies of the existing C types, and so must not be freed (that will *************** *** 499,518 **** if (MPIR_real8_dte) MPI_Type_free( &MPIR_real8_dte ); #endif #endif /* Free the parts of the structure types */ MPIR_Type_free_struct( MPI_FLOAT_INT ); MPIR_Type_free_struct( MPI_DOUBLE_INT ); MPIR_Type_free_struct( MPI_LONG_INT ); MPIR_Type_free_struct( MPI_SHORT_INT ); MPIR_Type_free_struct( MPI_2INT ); ! ! if (MPI_2INT != MPI_2INTEGER) ! MPIR_Free_perm_type( &MPI_2INTEGER ); ! MPIR_Free_perm_type( &MPIR_2real_dte ); ! MPIR_Free_perm_type( &MPIR_2double_dte ); ! MPIR_Free_perm_type( &MPIR_2complex_dte ); ! MPIR_Free_perm_type( &MPIR_2dcomplex_dte ); #if defined(HAVE_LONG_DOUBLE) {MPI_Datatype t = MPI_LONG_DOUBLE_INT; MPI_Type_free( &t );} --- 454,475 ---- if (MPIR_real8_dte) MPI_Type_free( &MPIR_real8_dte ); #endif #endif /* Free the parts of the structure types */ + #ifdef FOO MPIR_Type_free_struct( MPI_FLOAT_INT ); MPIR_Type_free_struct( MPI_DOUBLE_INT ); MPIR_Type_free_struct( MPI_LONG_INT ); MPIR_Type_free_struct( MPI_SHORT_INT ); MPIR_Type_free_struct( MPI_2INT ); ! #endif ! #ifdef FOO ! MPIR_Free_perm_type( &MPIR_I_2INTEGER ); ! MPIR_Free_perm_type( &MPIR_I_2REAL ); ! MPIR_Free_perm_type( &MPIR_I_2DOUBLE ); ! MPIR_Free_perm_type( &MPIR_I_2COMPLEX ); ! MPIR_Free_perm_type( &MPIR_I_2DCOMPLEX ); ! #endif #if defined(HAVE_LONG_DOUBLE) {MPI_Datatype t = MPI_LONG_DOUBLE_INT; MPI_Type_free( &t );} *************** *** 520,608 **** #endif #if defined(HAVE_LONG_LONG_INT) /* MPI_Type_free( &MPI_LONG_LONG_INT ); */ #endif - } - void MPIR_Setup_datatype( new, type, size ) - MPI_Datatype new; - MPIR_NODETYPE type; - int size; - { - MPIR_SET_COOKIE(new,MPIR_DATATYPE_COOKIE) - new->dte_type = type; - new->committed = 1; - new->is_contig = 1; - new->lb = 0; - new->ub = size; - new->extent = size; - new->size = size; - new->align = size; - new->stride = size; - new->elements = 1; - new->count = 1; - new->blocklen = 1; - new->basic = 1; - new->permanent = 1; - new->old_type = new; - new->ref_count = 1; - } - /* This routine sets up a datatype that is specified as a small integer (val) and has a local reference */ - static int base_size_miss = 0; void MPIR_Setup_base_datatype( val, lval, type, size ) ! MPI_Datatype val, lval; ! MPIR_NODETYPE type; ! int size; { ! MPIR_Setup_datatype( lval, type, size ); ! /* Debugging test for sizes correct if encoded size implemented */ ! if (size != MPIR_DATATYPE_SIZE(val)) base_size_miss++; ! MPIR_datatypes[(MPI_Aint)val] = lval; } ! /* This takes a datatype created with the datatype routines, copies the data into the "newtype" structure, and frees the old datatype storage */ ! void MPIR_Setup_complex_datatype( oldtype, newtype ) ! MPI_Datatype oldtype, newtype; { ! memcpy( newtype, oldtype, sizeof(struct MPIR_DATATYPE) ); ! MPIR_SBfree ( MPIR_dtes, oldtype ); MPIR_Type_permanent ( newtype ); MPI_Type_commit( &newtype ); } ! ! #ifdef MPIR_MEMDEBUG ! MPI_Datatype MPIR_Init_basic_datatype_real( type, size, file, line ) ! MPIR_NODETYPE type; ! int size; ! char *file; ! int line; ! #else ! MPI_Datatype MPIR_Init_basic_datatype( type, size ) ! MPIR_NODETYPE type; ! int size; ! #endif { ! MPI_Datatype new; ! ! #ifdef MPIR_MEMDEBUG ! new = (MPI_Datatype) MPIR_trmalloc( (unsigned)MPIR_dtes, ! line, file ); ! #else ! new = (MPI_Datatype) MPIR_SBalloc( MPIR_dtes ); ! #endif ! if (!new) { ! MPIR_ERROR((MPI_Comm)0,MPI_ERR_EXHAUSTED, ! "Could not allocated predefined datatypes"); ! } ! MPIR_Setup_datatype( new, type, size ); ! return new; } #ifndef MPID_NO_FORTRAN /* This routine computes the sizes of the Fortran data types. It is --- 477,543 ---- #endif #if defined(HAVE_LONG_LONG_INT) /* MPI_Type_free( &MPI_LONG_LONG_INT ); */ #endif } /* This routine sets up a datatype that is specified as a small integer (val) and has a local reference */ void MPIR_Setup_base_datatype( val, lval, type, size ) ! MPI_Datatype val; ! struct MPIR_DATATYPE *lval; ! MPIR_NODETYPE type; ! int size; { ! MPIR_SET_COOKIE(lval,MPIR_DATATYPE_COOKIE) ! lval->dte_type = type; ! lval->committed = 1; ! lval->is_contig = 1; ! lval->lb = 0; ! lval->ub = size; ! lval->extent = size; ! lval->size = size; ! lval->align = size; ! lval->stride = size; ! lval->elements = 1; ! lval->count = 1; ! lval->blocklen = 1; ! lval->basic = 1; ! lval->permanent = 1; ! lval->old_type = lval; ! lval->ref_count = 1; ! MPIR_RegPointerIdx( val, lval ); } ! /* ! This takes a datatype created with the datatype routines, copies the data into the "newtype" structure, and frees the old datatype storage */ ! void MPIR_Setup_complex_datatype( oldtype, newtype, newtype_ptr ) ! MPI_Datatype oldtype, newtype; ! struct MPIR_DATATYPE *newtype_ptr; { ! struct MPIR_DATATYPE *oldtype_ptr; ! oldtype_ptr = MPIR_ToPointer( oldtype ); ! memcpy( newtype_ptr, oldtype_ptr, sizeof(struct MPIR_DATATYPE) ); ! /* Should this be MPI_Type_free( &oldtype->self )? */ ! MPIR_SBfree ( MPIR_dtes, oldtype_ptr ); MPIR_Type_permanent ( newtype ); + MPIR_RegPointerIdx( newtype, newtype_ptr ); MPI_Type_commit( &newtype ); } ! void MPIR_Type_contiguous( cnt, old_type, newtype_ptr, newtype ) ! int cnt; ! MPI_Datatype old_type, newtype; ! struct MPIR_DATATYPE *newtype_ptr; { ! MPI_Datatype tmp_type; ! MPI_Type_contiguous( cnt, old_type, &tmp_type ); ! MPIR_Setup_complex_datatype( tmp_type, newtype, newtype_ptr ); ! /* MPI_Type_free( &tmp_type ); */ } + #ifndef MPID_NO_FORTRAN /* This routine computes the sizes of the Fortran data types. It is diff -rc4 /home/MPI/mpich/current/mpich/src/env/initfcmn.f mpich/src/env/initfcmn.f *** /home/MPI/mpich/current/mpich/src/env/initfcmn.f Tue Apr 23 16:57:11 1996 --- mpich/src/env/initfcmn.f Thu Sep 26 10:37:41 1996 *************** *** 36,45 **** C MPI_OP_NULL = 0 C C Error handlers ! MPI_ERRORS_ARE_FATAL = err_fatal ! MPI_ERRORS_RETURN = err_ret C return end C --- 36,45 ---- C MPI_OP_NULL = 0 C C Error handlers ! c MPI_ERRORS_ARE_FATAL = err_fatal ! c MPI_ERRORS_RETURN = err_ret C return end C diff -rc4 /home/MPI/mpich/current/mpich/src/env/initfdte.f mpich/src/env/initfdte.f *** /home/MPI/mpich/current/mpich/src/env/initfdte.f Tue Mar 5 12:38:09 1996 --- mpich/src/env/initfdte.f Thu Sep 26 09:42:53 1996 *************** *** 13,36 **** $ MPIR_2dcomplex_dte, $ MPIR_int1_dte, MPIR_int2_dte, MPIR_int4_dte, MPIR_real4_dte, $ MPIR_real8_dte, MPIR_packed, MPIR_ub, MPIR_lb include '../../include/mpif.h' ! MPI_INTEGER = MPIR_int_dte ! MPI_REAL = MPIR_float_dte ! MPI_DOUBLE_PRECISION = MPIR_double_dte ! MPI_COMPLEX = MPIR_complex_dte ! MPI_DOUBLE_COMPLEX = MPIR_dcomplex_dte ! MPI_LOGICAL = MPIR_logical_dte ! MPI_CHARACTER = MPIR_char_dte ! MPI_BYTE = MPIR_byte_dte ! MPI_2REAL = MPIR_2real_dte ! MPI_2DOUBLE_PRECISION= MPIR_2double_dte ! MPI_2INTEGER = MPIR_2int_dte ! MPI_2COMPLEX = MPIR_2complex_dte ! MPI_2DOUBLE_COMPLEX = MPIR_2dcomplex_dte ! MPI_PACKED = MPIR_packed ! MPI_UB = MPIR_ub ! MPI_LB = MPIR_lb C C optional datatypes MPI_INTEGER1 = MPIR_int1_dte MPI_INTEGER2 = MPIR_int2_dte --- 13,36 ---- $ MPIR_2dcomplex_dte, $ MPIR_int1_dte, MPIR_int2_dte, MPIR_int4_dte, MPIR_real4_dte, $ MPIR_real8_dte, MPIR_packed, MPIR_ub, MPIR_lb include '../../include/mpif.h' ! c MPI_INTEGER = MPIR_int_dte ! c MPI_REAL = MPIR_float_dte ! c MPI_DOUBLE_PRECISION = MPIR_double_dte ! c MPI_COMPLEX = MPIR_complex_dte ! c MPI_DOUBLE_COMPLEX = MPIR_dcomplex_dte ! c MPI_LOGICAL = MPIR_logical_dte ! c MPI_CHARACTER = MPIR_char_dte ! c MPI_BYTE = MPIR_byte_dte ! c MPI_2REAL = MPIR_2real_dte ! c MPI_2DOUBLE_PRECISION= MPIR_2double_dte ! c MPI_2INTEGER = MPIR_2int_dte ! c MPI_2COMPLEX = MPIR_2complex_dte ! c MPI_2DOUBLE_COMPLEX = MPIR_2dcomplex_dte ! c MPI_PACKED = MPIR_packed ! c MPI_UB = MPIR_ub ! c MPI_LB = MPIR_lb C C optional datatypes MPI_INTEGER1 = MPIR_int1_dte MPI_INTEGER2 = MPIR_int2_dte diff -rc4 /home/MPI/mpich/current/mpich/src/env/initutil.c mpich/src/env/initutil.c *** /home/MPI/mpich/current/mpich/src/env/initutil.c Fri Jul 5 10:36:59 1996 --- mpich/src/env/initutil.c Mon Sep 23 15:28:12 1996 *************** *** 1,6 **** /* ! * $Id: initutil.c,v 1.11 1996/07/05 15:36:58 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: initutil.c,v 1.12 1996/09/08 15:37:15 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 18,25 **** --- 18,31 ---- #else #include "mpisys.h" #endif + /* This is a temporary for using select for a timeout */ + #if defined(MPID_HAS_PROC_INFO) && 0 + #include + #include + #endif + #ifndef PATCHLEVEL_SUBMINOR #define PATCHLEVEL_SUBMINOR 0 #endif *************** *** 98,107 **** --- 104,116 ---- This is done by the macro MPIR_F_PTR. */ void *MPIR_F_MPI_BOTTOM = 0; + #ifdef NEW_POINTERS + #else MPI_Errhandler MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN, MPIR_ERRORS_WARN; + #endif /* MPIR_Init - Initialize the MPI execution environment *************** *** 236,246 **** --- 245,262 ---- MPID_THREAD_DS_LOCK_INIT(&MPIR_unexpected_recvs) #endif /* Create Error handlers */ + #ifdef NEW_POINTERS + /* Must create at preassigned values */ + MPIR_Errhandler_create( MPIR_Errors_are_fatal, MPI_ERRORS_ARE_FATAL ); + MPIR_Errhandler_create( MPIR_Errors_return, MPI_ERRORS_RETURN ); + MPIR_Errhandler_create( MPIR_Errors_warn, MPIR_ERRORS_WARN ); + #else MPI_Errhandler_create( MPIR_Errors_are_fatal, &MPI_ERRORS_ARE_FATAL ); MPI_Errhandler_create( MPIR_Errors_return, &MPI_ERRORS_RETURN ); MPI_Errhandler_create( MPIR_Errors_warn, &MPIR_ERRORS_WARN ); + #endif /* GROUP_EMPTY is a valid empty group */ DEBUG(PRINTF("[%d] About to create groups and communicators\n", MPIR_tid);) MPI_GROUP_EMPTY = MPIR_CreateGroup(0); *************** *** 263,271 **** MPID_Set_lranks ( MPI_COMM_WORLD->group ); #else MPIR_SetToIdentity( MPI_COMM_WORLD->group ); #endif ! (void)MPIR_Group_dup ( MPI_COMM_WORLD->group, &(MPI_COMM_WORLD->local_group) ); #ifndef MPI_ADI2 (void)MPID_Comm_init( ADIctx, (MPI_Comm)0, MPI_COMM_WORLD ); #endif --- 279,287 ---- MPID_Set_lranks ( MPI_COMM_WORLD->group ); #else MPIR_SetToIdentity( MPI_COMM_WORLD->group ); #endif ! MPIR_Group_dup ( MPI_COMM_WORLD->group, &(MPI_COMM_WORLD->local_group) ); #ifndef MPI_ADI2 (void)MPID_Comm_init( ADIctx, (MPI_Comm)0, MPI_COMM_WORLD ); #endif *************** *** 276,284 **** --- 292,304 ---- MPI_COMM_WORLD->send_context = MPIR_WORLD_PT2PT_CONTEXT; MPI_COMM_WORLD->recv_context = MPIR_WORLD_PT2PT_CONTEXT; MPI_COMM_WORLD->error_handler = MPI_ERRORS_ARE_FATAL; MPI_COMM_WORLD->use_return_handler = 0; + #ifdef NEW_POINTERS + MPIR_Errhandler_mark( MPI_ERRORS_ARE_FATAL, 1 ); + #else MPI_ERRORS_ARE_FATAL->ref_count ++; + #endif MPI_COMM_WORLD->ref_count = 1; MPI_COMM_WORLD->permanent = 1; #ifdef MPI_ADI2 MPID_CommInit( (MPI_Comm)0, MPI_COMM_WORLD ); *************** *** 369,377 **** MPI_COMM_SELF->comm_type = MPIR_INTRA; MPI_COMM_SELF->group = MPIR_CreateGroup( 1 ); MPI_COMM_SELF->group->local_rank = 0; MPI_COMM_SELF->group->lrank_to_grank[0] = MPIR_tid; ! (void) MPIR_Group_dup ( MPI_COMM_SELF->group, &(MPI_COMM_SELF->local_group) ); #ifndef MPI_ADI2 (void)MPID_Comm_init( ADIctx, (MPI_Comm)0, MPI_COMM_SELF ); #endif --- 389,397 ---- MPI_COMM_SELF->comm_type = MPIR_INTRA; MPI_COMM_SELF->group = MPIR_CreateGroup( 1 ); MPI_COMM_SELF->group->local_rank = 0; MPI_COMM_SELF->group->lrank_to_grank[0] = MPIR_tid; ! MPIR_Group_dup ( MPI_COMM_SELF->group, &(MPI_COMM_SELF->local_group) ); #ifndef MPI_ADI2 (void)MPID_Comm_init( ADIctx, (MPI_Comm)0, MPI_COMM_SELF ); #endif *************** *** 383,391 **** --- 403,415 ---- MPI_COMM_SELF->send_context = MPIR_SELF_PT2PT_CONTEXT; MPI_COMM_SELF->recv_context = MPIR_SELF_PT2PT_CONTEXT; MPI_COMM_SELF->error_handler = MPI_ERRORS_ARE_FATAL; MPI_COMM_SELF->use_return_handler = 0; + #ifdef NEW_POINTERS + MPIR_Errhandler_mark( MPI_ERRORS_ARE_FATAL, 1 ); + #else MPI_ERRORS_ARE_FATAL->ref_count ++; + #endif MPI_COMM_SELF->ref_count = 1; MPI_COMM_SELF->permanent = 1; #ifdef MPI_ADI2 MPID_CommInit( MPI_COMM_WORLD, MPI_COMM_SELF ); *************** *** 428,437 **** --- 452,466 ---- i_lxor = MPIR_FromPointer(MPI_LXOR), i_bxor = MPIR_FromPointer(MPI_BXOR), i_maxloc = MPIR_FromPointer(MPI_MAXLOC), i_minloc = MPIR_FromPointer(MPI_MINLOC), + #ifdef NEW_POINTERS + i_err_fatal = MPI_ERRORS_ARE_FATAL, + i_err_ret = MPI_ERRORS_RETURN; + #else i_err_fatal = MPIR_FromPointer( MPI_ERRORS_ARE_FATAL ), i_err_ret = MPIR_FromPointer( MPI_ERRORS_RETURN ); + #endif mpir_init_fop_( &i_max, &i_min, &i_sum, &i_prod, &i_land, &i_band, &i_lor, &i_bor, &i_lxor, &i_bxor, &i_maxloc, &i_minloc, &i_err_fatal, &i_err_ret ); *************** *** 537,544 **** --- 566,582 ---- * There is no code in the library which will do it ! */ if (MPID_MyWorldRank != 0) { while (MPIR_debug_gate == 0) { + #ifdef FOO + /* This code was used as part of a test; + the sleep should work */ + struct timeval timeout; + timeout.tv_sec = 1; + timeout.tv_usec = 0; + select( 0, (void *)0, (void *)0, (void *)0, + &timeout ); + #endif sleep(1); } } } *************** *** 621,624 **** --- 659,709 ---- MPIR_F_MPI_BOTTOM = p; } #endif /* MPID_NO_FORTRAN */ + + #ifdef NEW_POINTERS + /****************************************************************************/ + /* The various MPI objects (MPI_Errhandler, MPI_Op, ... ) require some */ + /* special routines to initialize and manipulate them. For the "smaller" */ + /* objects, that code is here. The larger objects (e.g., MPI_Comm) */ + /* have their own xxx_util.c or initxxx.c files that contain the needed */ + /* code. */ + /****************************************************************************/ + /* Utility code for Errhandlers */ + /****************************************************************************/ + #ifdef MPI_ADI2 + #define MPIR_SBalloc MPID_SBalloc + #endif + int MPIR_Errhandler_create( function, errhandler ) + MPI_Handler_function *function; + MPI_Errhandler errhandler; + { + struct MPIR_Errhandler *new; + + MPIR_ALLOC(new,(struct MPIR_Errhandler*) MPIR_SBalloc( MPIR_errhandlers ), + MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, + "Error in MPI_ERRHANDLER_CREATE" ); + + MPIR_SET_COOKIE(new,MPIR_ERRHANDLER_COOKIE); + new->routine = function; + new->ref_count = 1; + + MPIR_RegPointerIdx( errhandler, new ); + return MPI_SUCCESS; + } + + /* Change the reference count of errhandler by incr */ + #ifdef MPIR_ToPointer + #undef MPIR_ToPointer + #endif + void MPIR_Errhandler_mark( errhandler, incr ) + MPI_Errhandler errhandler; + int incr; + { + struct MPIR_Errhandler *new = (struct MPIR_Errhandler *) + MPIR_ToPointer( errhandler ); + if (new) { + new->ref_count += incr; + } + } + #endif Binary files /home/MPI/mpich/current/mpich/src/env/mpich.En_US.cat and mpich/src/env/mpich.En_US.cat differ diff -rc4 /home/MPI/mpich/current/mpich/src/profile/Makefile.in mpich/src/profile/Makefile.in *** /home/MPI/mpich/current/mpich/src/profile/Makefile.in Thu Jun 6 11:27:37 1996 --- mpich/src/profile/Makefile.in Fri Aug 30 15:40:05 1996 *************** *** 58,66 **** -anyname -I pubinc $(MPI_TSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 58,66 ---- -anyname -I pubinc $(MPI_TSOURCES) manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 67,75 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 67,75 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/Makefile.in mpich/src/pt2pt/Makefile.in *** /home/MPI/mpich/current/mpich/src/pt2pt/Makefile.in Wed Jun 26 11:34:16 1996 --- mpich/src/pt2pt/Makefile.in Fri Aug 30 15:40:04 1996 *************** *** 124,132 **** manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 124,132 ---- manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 133,141 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 133,141 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/bsend_init.c mpich/src/pt2pt/bsend_init.c *** /home/MPI/mpich/current/mpich/src/pt2pt/bsend_init.c Fri Jun 7 10:00:49 1996 --- mpich/src/pt2pt/bsend_init.c Mon Oct 14 15:21:28 1996 *************** *** 1,6 **** /* ! * $Id: bsend_init.c,v 1.25 1996/06/07 15:00:49 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: bsend_init.c,v 1.25 1996/06/07 15:00:49 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 48,55 **** --- 48,56 ---- { int mpi_errno; int psize; void *bufp; + struct MPIR_DATATYPE *dtype_ptr; #ifdef MPI_ADI2 MPIR_PSHANDLE *shandle; #else MPI_Request handleptr; *************** *** 68,77 **** shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; --- 69,79 ---- shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_BSEND_INIT"); ! dtype_ptr->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; *************** *** 98,107 **** #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_BSEND_INIT"); *request = handleptr; handleptr = *request; --- 100,110 ---- #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_BSEND_INIT"); ! dtype_ptr->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_BSEND_INIT"); *request = handleptr; handleptr = *request; diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/bsend_initf.c mpich/src/pt2pt/bsend_initf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/bsend_initf.c Thu Jun 6 08:21:22 1996 --- mpich/src/pt2pt/bsend_initf.c Fri Sep 27 09:50:49 1996 *************** *** 45,53 **** of _fcd * and it has already been pulled off the list. */ char * buf; int * count; ! MPI_Datatype datatype; int* dest; int* tag; MPI_Comm comm; MPI_Request* request; --- 45,53 ---- of _fcd * and it has already been pulled off the list. */ char * buf; int * count; ! MPI_Datatype *datatype; int* dest; int* tag; MPI_Comm comm; MPI_Request* request; *************** *** 61,78 **** if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 61,77 ---- if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 79,87 **** #else void mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int* count; ! MPI_Datatype datatype; int* dest; int* tag; MPI_Comm comm; MPI_Request* request; --- 78,86 ---- #else void mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int* count; ! MPI_Datatype *datatype; int* dest; int* tag; MPI_Comm comm; MPI_Request* request; *************** *** 92,124 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bsend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 91,120 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bsend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_bsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Bsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/bsendf.c mpich/src/pt2pt/bsendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/bsendf.c Thu Jun 6 07:27:24 1996 --- mpich/src/pt2pt/bsendf.c Fri Sep 27 09:50:52 1996 *************** *** 39,47 **** void mpi_bsend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 39,47 ---- void mpi_bsend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 51,66 **** if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 51,65 ---- if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 67,75 **** void mpi_bsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 66,74 ---- void mpi_bsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 76,102 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bsend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, int * )); void mpi_bsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 75,99 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_bsend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, int * )); void mpi_bsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Bsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/commreq_free.c mpich/src/pt2pt/commreq_free.c *** /home/MPI/mpich/current/mpich/src/pt2pt/commreq_free.c Wed Jul 17 13:04:02 1996 --- mpich/src/pt2pt/commreq_free.c Mon Oct 14 14:50:23 1996 *************** *** 1,6 **** /* ! * $Id: commreq_free.c,v 1.19 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: commreq_free.c,v 1.19 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 99,109 **** #else rq = *request; if (rq->chandle.persistent) { ! if (--rq->chandle.datatype->ref_count <= 1) { MPIR_Type_free( &rq->chandle.datatype ); } /* Note: if this persistent request is ACTIVE, we must wait until it completes before freeing it; that free must take place within the wait */ } --- 99,111 ---- #else rq = *request; if (rq->chandle.persistent) { ! MPIR_Type_free( &rq->chandle.datatype ); ! /* if (--rq->chandle.datatype->ref_count <= 1) { MPIR_Type_free( &rq->chandle.datatype ); } + */ /* Note: if this persistent request is ACTIVE, we must wait until it completes before freeing it; that free must take place within the wait */ } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/create_recv.c mpich/src/pt2pt/create_recv.c *** /home/MPI/mpich/current/mpich/src/pt2pt/create_recv.c Fri Jun 7 10:11:07 1996 --- mpich/src/pt2pt/create_recv.c Mon Oct 14 15:09:07 1996 *************** *** 1,6 **** /* ! * $Id: create_recv.c,v 1.19 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: create_recv.c,v 1.19 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 48,55 **** --- 48,56 ---- int tag; MPI_Comm comm; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; #ifdef MPI_ADI2 MPIR_PRHANDLE *rhandle; #else MPI_Request handleptr; *************** *** 66,75 **** rhandle = &(*request)->persistent_rhandle; MPID_Request_init( &(rhandle->rhandle), MPIR_PERSISTENT_RECV ); /* Save the information about the operation, being careful with ref-counted items */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; rhandle->perm_datatype = datatype; rhandle->perm_tag = tag; rhandle->perm_source = source; rhandle->perm_count = count; --- 67,77 ---- rhandle = &(*request)->persistent_rhandle; MPID_Request_init( &(rhandle->rhandle), MPIR_PERSISTENT_RECV ); /* Save the information about the operation, being careful with ref-counted items */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_RECV_INIT"); ! dtype_ptr->ref_count++; rhandle->perm_datatype = datatype; rhandle->perm_tag = tag; rhandle->perm_source = source; rhandle->perm_count = count; *************** *** 81,90 **** #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_rhandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_RECV_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->rhandle,MPIR_REQUEST_COOKIE) --- 83,93 ---- #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_RECV_INIT"); ! dtype_ptr->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_rhandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_RECV_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->rhandle,MPIR_REQUEST_COOKIE) diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/create_recvf.c mpich/src/pt2pt/create_recvf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/create_recvf.c Thu Jun 6 08:03:58 1996 --- mpich/src/pt2pt/create_recvf.c Fri Sep 27 09:37:32 1996 *************** *** 41,49 **** { void *buf; int*count; MPI_Request *request; ! MPI_Datatype datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; --- 41,49 ---- { void *buf; int*count; MPI_Request *request; ! MPI_Datatype *datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; *************** *** 56,73 **** if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } --- 56,72 ---- if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count, *datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } *************** *** 76,84 **** void mpi_recv_init_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; MPI_Request *request; ! MPI_Datatype datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; --- 75,83 ---- void mpi_recv_init_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; MPI_Request *request; ! MPI_Datatype *datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; *************** *** 89,98 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } --- 88,96 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count, *datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } *************** *** 99,122 **** #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_recv_init_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_recv_init_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; MPI_Request *request; ! MPI_Datatype datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } --- 97,118 ---- #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_recv_init_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_recv_init_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; MPI_Request *request; ! MPI_Datatype *datatype; int*source; int*tag; MPI_Comm comm; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Recv_init(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/create_send.c mpich/src/pt2pt/create_send.c *** /home/MPI/mpich/current/mpich/src/pt2pt/create_send.c Fri Jun 7 10:11:07 1996 --- mpich/src/pt2pt/create_send.c Mon Oct 14 15:09:35 1996 *************** *** 1,6 **** /* ! * $Id: create_send.c,v 1.20 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: create_send.c,v 1.20 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 47,54 **** --- 47,55 ---- MPI_Comm comm; MPI_Request *request; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; #ifdef MPI_ADI2 MPIR_PSHANDLE *shandle; #else MPI_Request handleptr; *************** *** 65,74 **** shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; --- 66,76 ---- shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_SEND_INIT"); ! dtype_ptr->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; *************** *** 81,90 **** #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ),comm, MPI_ERR_EXHAUSTED,"Error in MPI_SEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) --- 83,93 ---- #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_SEND_INIT"); ! dtype_ptr->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ),comm, MPI_ERR_EXHAUSTED,"Error in MPI_SEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/create_sendf.c mpich/src/pt2pt/create_sendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/create_sendf.c Thu Jun 6 07:22:52 1996 --- mpich/src/pt2pt/create_sendf.c Fri Sep 27 09:36:17 1996 *************** *** 40,48 **** void mpi_send_init_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_send_init_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } --- 56,72 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, ! *datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } *************** *** 74,82 **** void mpi_send_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 74,82 ---- void mpi_send_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 88,119 **** temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_send_init_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_send_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer( lrequest ); --- 88,117 ---- temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, *datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer( lrequest ); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_send_init_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_send_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Send_init(MPIR_F_PTR(buf),*count, *datatype, *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer( lrequest ); diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/getcount.c mpich/src/pt2pt/getcount.c *** /home/MPI/mpich/current/mpich/src/pt2pt/getcount.c Thu Apr 11 15:18:35 1996 --- mpich/src/pt2pt/getcount.c Wed Sep 25 13:05:36 1996 *************** *** 1,6 **** /* ! * $Id: getcount.c,v 1.12 1996/04/11 20:18:35 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: getcount.c,v 1.12 1996/04/11 20:18:35 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 34,60 **** MPI_Datatype datatype; int *count; { int mpi_errno; if (MPIR_TEST_DATATYPE(MPI_COMM_WORLD,datatype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GET_COUNT" ); ! MPIR_GET_REAL_DATATYPE(datatype) /* Check for correct number of bytes */ ! if (datatype->size == 0) { if (status->count > 0) (*count) = MPI_UNDEFINED; else /* This is ambiguous */ (*count) = 0; } else { ! if ((status->count % (datatype->size)) != 0) (*count) = MPI_UNDEFINED; else ! (*count) = status->count / (datatype->size); } return (MPI_SUCCESS); } --- 34,62 ---- MPI_Datatype datatype; int *count; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; if (MPIR_TEST_DATATYPE(MPI_COMM_WORLD,datatype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_GET_COUNT" ); ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_GET_COUNT"); /* Check for correct number of bytes */ ! if (dtype_ptr->size == 0) { if (status->count > 0) (*count) = MPI_UNDEFINED; else /* This is ambiguous */ (*count) = 0; } else { ! if ((status->count % (dtype_ptr->size)) != 0) (*count) = MPI_UNDEFINED; else ! (*count) = status->count / (dtype_ptr->size); } return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/getcountf.c mpich/src/pt2pt/getcountf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/getcountf.c Thu Jun 6 08:19:52 1996 --- mpich/src/pt2pt/getcountf.c Fri Sep 27 09:12:01 1996 *************** *** 28,43 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_get_count_ ANSI_ARGS(( MPI_Status *, MPI_Datatype, int *, int * )); void mpi_get_count_( status, datatype, count, __ierr ) MPI_Status *status; ! MPI_Datatype datatype; int *count; int *__ierr; { ! *__ierr = MPI_Get_count(status, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! count); } --- 28,41 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_get_count_ ANSI_ARGS(( MPI_Status *, MPI_Datatype*, int *, int * )); void mpi_get_count_( status, datatype, count, __ierr ) MPI_Status *status; ! MPI_Datatype *datatype; int *count; int *__ierr; { ! *__ierr = MPI_Get_count(status, *datatype, count); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/getelements.c mpich/src/pt2pt/getelements.c *** /home/MPI/mpich/current/mpich/src/pt2pt/getelements.c Thu Apr 11 15:18:43 1996 --- mpich/src/pt2pt/getelements.c Wed Sep 25 13:05:35 1996 *************** *** 1,6 **** /* ! * $Id: getelements.c,v 1.7 1996/04/11 20:18:42 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: getelements.c,v 1.7 1996/04/11 20:18:42 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 34,47 **** MPI_Datatype datatype; int *elements; { int count, mpi_errno; ! if (MPIR_TEST_DATATYPE(MPI_COMM_WORLD,datatype)) ! return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, ! "Error in MPI_GET_ELEMENTS" ); - MPIR_GET_REAL_DATATYPE(datatype) /* Find the number of elements */ MPI_Get_count (status, datatype, &count); if (count == MPI_UNDEFINED) { /* To do this correctly, we need to run through the datatype, --- 34,46 ---- MPI_Datatype datatype; int *elements; { int count, mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_GET_ELEMENTS"); /* Find the number of elements */ MPI_Get_count (status, datatype, &count); if (count == MPI_UNDEFINED) { /* To do this correctly, we need to run through the datatype, *************** *** 57,88 **** *elements = count; /* HACK ALERT -- the code in this if is not correct */ /* but for now ... */ double cnt = ! (double) status->count / (double) datatype->size; ! (*elements) = (int) ( cnt * (double) datatype->elements ); #endif { int srclen, destlen, used_len; int i_dummy; srclen = status->count; /* Need to set count so that we'll exit when we run out of ! items. It could be ceil(status->count/datatype->size) . Alternately, we could check that used_len >= srclen - epsilon (in case there isn't enough for the last item). Why isn't this correct? */ ! if (datatype->size > 0) ! count = 1 + (srclen / datatype->size); else { *elements = srclen ? MPI_UNDEFINED : 0; return MPI_SUCCESS; } *elements = 0; used_len = 0; ! MPIR_Unpack2( (char *)&i_dummy, count, datatype, MPIR_Elementcnt, (void *)elements, (char *)&i_dummy, srclen, &destlen, &used_len ); /* If anything is left, return undefined */ if (used_len != srclen) --- 56,87 ---- *elements = count; /* HACK ALERT -- the code in this if is not correct */ /* but for now ... */ double cnt = ! (double) status->count / (double) dtype_ptr->size; ! (*elements) = (int) ( cnt * (double) dtype_ptr->elements ); #endif { int srclen, destlen, used_len; int i_dummy; srclen = status->count; /* Need to set count so that we'll exit when we run out of ! items. It could be ceil(status->count/dtype_ptr->size) . Alternately, we could check that used_len >= srclen - epsilon (in case there isn't enough for the last item). Why isn't this correct? */ ! if (dtype_ptr->size > 0) ! count = 1 + (srclen / dtype_ptr->size); else { *elements = srclen ? MPI_UNDEFINED : 0; return MPI_SUCCESS; } *elements = 0; used_len = 0; ! MPIR_Unpack2( (char *)&i_dummy, count, dtype_ptr, MPIR_Elementcnt, (void *)elements, (char *)&i_dummy, srclen, &destlen, &used_len ); /* If anything is left, return undefined */ if (used_len != srclen) *************** *** 89,97 **** *elements = MPI_UNDEFINED; } } else ! (*elements) = count * datatype->elements; return (MPI_SUCCESS); } --- 88,96 ---- *elements = MPI_UNDEFINED; } } else ! (*elements) = count * dtype_ptr->elements; return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/getelementsf.c mpich/src/pt2pt/getelementsf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/getelementsf.c Thu Jun 6 07:57:06 1996 --- mpich/src/pt2pt/getelementsf.c Fri Sep 27 09:28:53 1996 *************** *** 28,43 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_get_elements_ ANSI_ARGS(( MPI_Status *, MPI_Datatype, int *, int * )); void mpi_get_elements_ ( status, datatype, elements, __ierr ) MPI_Status *status; ! MPI_Datatype datatype; int *elements; int *__ierr; { ! *__ierr = MPI_Get_elements(status, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! elements); } --- 28,41 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_get_elements_ ANSI_ARGS(( MPI_Status *, MPI_Datatype *, int *, int * )); void mpi_get_elements_ ( status, datatype, elements, __ierr ) MPI_Status *status; ! MPI_Datatype *datatype; int *elements; int *__ierr; { ! *__ierr = MPI_Get_elements(status,*datatype,elements); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/ibsendf.c mpich/src/pt2pt/ibsendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/ibsendf.c Thu Jun 6 07:32:27 1996 --- mpich/src/pt2pt/ibsendf.c Fri Sep 27 09:53:15 1996 *************** *** 40,48 **** void mpi_ibsend_( void *unknown, ...) { void *buf; int *count; ! MPI_Datatype datatype; int *dest; int *tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_ibsend_( void *unknown, ...) { void *buf; int *count; ! MPI_Datatype *datatype; int *dest; int *tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 56,71 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 74,82 **** void mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 73,81 ---- void mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 87,120 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ibsend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif --- 86,116 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ibsend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_ibsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Ibsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/initrecv.c mpich/src/pt2pt/initrecv.c *** /home/MPI/mpich/current/mpich/src/pt2pt/initrecv.c Wed Mar 27 13:04:40 1996 --- mpich/src/pt2pt/initrecv.c Mon Oct 14 15:33:30 1996 *************** *** 20,36 **** MPI_Comm comm; MPI_Request request; int nonblocking; { request->type = MPIR_RECV; request->rhandle.source = source; request->rhandle.tag = tag; request->rhandle.errval = MPI_SUCCESS; request->rhandle.contextid = comm->recv_context; request->rhandle.comm = comm; - MPIR_GET_REAL_DATATYPE(datatype) request->rhandle.datatype = datatype; ! datatype->ref_count++; request->rhandle.bufadd = buf; request->rhandle.count = count; MPID_Clr_completed( comm->ADIctx, request ); #ifdef MPID_HAS_HETERO --- 20,40 ---- MPI_Comm comm; MPI_Request request; int nonblocking; { + struct MPIR_DATATYPE *dtype_ptr; + int mpi_errno; + request->type = MPIR_RECV; request->rhandle.source = source; request->rhandle.tag = tag; request->rhandle.errval = MPI_SUCCESS; request->rhandle.contextid = comm->recv_context; request->rhandle.comm = comm; request->rhandle.datatype = datatype; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_RECV_INIT"); ! dtype_ptr->ref_count++; request->rhandle.bufadd = buf; request->rhandle.count = count; MPID_Clr_completed( comm->ADIctx, request ); #ifdef MPID_HAS_HETERO diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/initsend.c mpich/src/pt2pt/initsend.c *** /home/MPI/mpich/current/mpich/src/pt2pt/initsend.c Wed Mar 27 13:05:04 1996 --- mpich/src/pt2pt/initsend.c Mon Oct 14 15:33:11 1996 *************** *** 21,28 **** --- 21,30 ---- MPI_Request request; MPIR_Mode mode; int nonblocking; { + struct MPIR_DATATYPE *dtype_ptr; + int mpi_errno; /* For better cache behavior, we order these as they are found in the actual structure */ *************** *** 33,43 **** else request->shandle.dest = comm->group->lrank_to_grank[dest]; request->shandle.tag = tag; MPID_Clr_completed( comm->ADIctx, request ); ! MPIR_GET_REAL_DATATYPE(datatype) request->shandle.datatype = datatype; ! datatype->ref_count++; request->shandle.comm = comm; #ifdef MPID_HAS_HETERO request->shandle.msgrep = MPIR_MSGREP_SENDER; #endif --- 35,47 ---- else request->shandle.dest = comm->group->lrank_to_grank[dest]; request->shandle.tag = tag; MPID_Clr_completed( comm->ADIctx, request ); ! /* MPIR_GET_REAL_DATATYPE(datatype) */ request->shandle.datatype = datatype; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_SSEND_INIT"); ! dtype_ptr->ref_count++; request->shandle.comm = comm; #ifdef MPID_HAS_HETERO request->shandle.msgrep = MPIR_MSGREP_SENDER; #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/irecvf.c mpich/src/pt2pt/irecvf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/irecvf.c Thu Jun 6 08:16:00 1996 --- mpich/src/pt2pt/irecvf.c Fri Sep 27 08:29:46 1996 *************** *** 44,52 **** void mpi_irecv_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*source; int*tag; MPI_Comm comm; MPI_Request *request; --- 44,52 ---- void mpi_irecv_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*source; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 60,76 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 60,75 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 77,85 **** #else void mpi_irecv_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*source; int*tag; MPI_Comm comm; MPI_Request *request; --- 76,84 ---- #else void mpi_irecv_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype * datatype; int*source; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 90,122 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_irecv_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_irecv_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; ! int*count; ! MPI_Datatype datatype; ! int*source; ! int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), *source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 89,119 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_irecv_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_irecv_( buf, count, datatype, source, tag, comm, request, __ierr ) void *buf; ! int *count; ! MPI_Datatype *datatype; ! int *source; ! int *tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Irecv(MPIR_F_PTR(buf),*count,*datatype, *source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/irsendf.c mpich/src/pt2pt/irsendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/irsendf.c Thu Jun 6 07:35:32 1996 --- mpich/src/pt2pt/irsendf.c Fri Sep 27 08:31:57 1996 *************** *** 40,48 **** void mpi_irsend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_irsend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 56,71 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 74,82 **** void mpi_irsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 73,81 ---- void mpi_irsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 87,119 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_irsend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_irsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif --- 86,116 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_irsend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_irsend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Irsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/isend.c mpich/src/pt2pt/isend.c *** /home/MPI/mpich/current/mpich/src/pt2pt/isend.c Wed Jun 26 14:27:15 1996 --- mpich/src/pt2pt/isend.c Mon Sep 30 10:27:32 1996 *************** *** 1,6 **** /* ! * $Id: isend.c,v 1.20 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: isend.c,v 1.20 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 59,67 **** /* Remember the send operation in case the user is interested while * debugging. (This is a macro which may expand to nothing...) */ ! MPIR_REMEMBER_SEND(&(*request)->shandle, buf, count, datatype, dest, tag, comm); if (dest == MPI_PROC_NULL) { (*request)->shandle.is_complete = 1; return MPI_SUCCESS; --- 59,68 ---- /* Remember the send operation in case the user is interested while * debugging. (This is a macro which may expand to nothing...) */ ! MPIR_REMEMBER_SEND(&(*request)->shandle, buf, count, datatype, dest, tag, ! comm); if (dest == MPI_PROC_NULL) { (*request)->shandle.is_complete = 1; return MPI_SUCCESS; diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/isendf.c mpich/src/pt2pt/isendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/isendf.c Thu Jun 6 08:06:15 1996 --- mpich/src/pt2pt/isendf.c Fri Sep 27 08:30:57 1996 *************** *** 44,52 **** void mpi_isend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 44,52 ---- void mpi_isend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 60,76 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 60,75 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 77,85 **** #else void mpi_isend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 76,84 ---- #else void mpi_isend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 91,100 **** temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 90,98 ---- temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 101,125 **** #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_isend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_isend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif --- 99,121 ---- #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_isend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_isend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Isend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/issendf.c mpich/src/pt2pt/issendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/issendf.c Thu Jun 6 07:33:21 1996 --- mpich/src/pt2pt/issendf.c Fri Sep 27 08:33:36 1996 *************** *** 40,48 **** void mpi_issend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_issend_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 56,71 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 74,82 **** void mpi_issend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 73,81 ---- void mpi_issend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 88,121 **** temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_issend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_issend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif --- 87,117 ---- temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_issend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_issend_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Issend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/mperror.c mpich/src/pt2pt/mperror.c *** /home/MPI/mpich/current/mpich/src/pt2pt/mperror.c Fri Jun 7 10:11:10 1996 --- mpich/src/pt2pt/mperror.c Wed Sep 25 10:49:35 1996 *************** *** 1,6 **** /* ! * $Id: mperror.c,v 1.24 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: mperror.c,v 1.24 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 169,176 **** --- 169,188 ---- (probably) just want to return. If so, we set "use_return_handler" */ if (comm && comm->use_return_handler) return code; /* Call handler routine */ + #ifdef NEW_POINTERS + {struct MPIR_Errhandler *errhand = MPIR_ToPointer( handler ); + if (!errhand || !errhand->routine) { + fprintf( stderr, "Fatal error; unknown error handler\n\ + May be MPI call before MPI_INIT. Error message is %s and code is %d\n", + string, code ); + return code; + } + (*errhand->routine)( &comm, &code, string, file, &line ); + } + #else (*handler->routine)( &comm, &code, string, file, &line ); + #endif return (code); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/pack_size.c mpich/src/pt2pt/pack_size.c *** /home/MPI/mpich/current/mpich/src/pt2pt/pack_size.c Fri Jun 7 10:11:11 1996 --- mpich/src/pt2pt/pack_size.c Tue Sep 24 10:44:30 1996 *************** *** 1,6 **** /* ! * $Id: pack_size.c,v 1.10 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: pack_size.c,v 1.10 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 10,17 **** --- 10,19 ---- #ifndef MPI_ADI2 #include "mpisys.h" #endif + extern struct MPIR_DATATYPE MPIR_I_DCOMPLEX; + /*@ MPI_Pack_size - Returns the upper bound on the amount of space needed to pack a message *************** *** 39,47 **** int *size; { int mpi_errno; ! if (MPIR_TEST_COMM(comm,comm) || MPIR_TEST_DATATYPE(comm,datatype) || MPIR_TEST_ARG(size)) return MPIR_ERROR(comm, mpi_errno, "Error in MPI_PACK_SIZE" ); #ifdef MPI_ADI2 --- 41,49 ---- int *size; { int mpi_errno; ! if (MPIR_TEST_COMM(comm,comm) || MPIR_TEST_ARG(size)) return MPIR_ERROR(comm, mpi_errno, "Error in MPI_PACK_SIZE" ); #ifdef MPI_ADI2 diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/pack_sizef.c mpich/src/pt2pt/pack_sizef.c *** /home/MPI/mpich/current/mpich/src/pt2pt/pack_sizef.c Thu Jun 6 08:22:43 1996 --- mpich/src/pt2pt/pack_sizef.c Fri Sep 27 09:53:56 1996 *************** *** 28,44 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_pack_size_ ANSI_ARGS(( int *, MPI_Datatype, MPI_Comm, int *, int * )); void mpi_pack_size_ ( incount, datatype, comm, size, __ierr ) int*incount; ! MPI_Datatype datatype; MPI_Comm comm; int *size; int *__ierr; { ! *__ierr = MPI_Pack_size(*incount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),size); } --- 28,44 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_pack_size_ ANSI_ARGS(( int *, MPI_Datatype *, MPI_Comm, int *, ! int * )); void mpi_pack_size_ ( incount, datatype, comm, size, __ierr ) int*incount; ! MPI_Datatype *datatype; MPI_Comm comm; int *size; int *__ierr; { ! *__ierr = MPI_Pack_size(*incount,*datatype, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),size); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/packf.c mpich/src/pt2pt/packf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/packf.c Thu Jun 6 07:58:19 1996 --- mpich/src/pt2pt/packf.c Fri Sep 27 09:33:23 1996 *************** *** 40,48 **** void mpi_pack_ ( void *unknown, ...) { void *inbuf; int*incount; ! MPI_Datatype datatype; void *outbuf; int*outcount; int *position; MPI_Comm comm; --- 40,48 ---- void mpi_pack_ ( void *unknown, ...) { void *inbuf; int*incount; ! MPI_Datatype *datatype; void *outbuf; int*outcount; int *position; MPI_Comm comm; *************** *** 58,71 **** return; } else { if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ incount = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); outbuf = va_arg(ap, void *); buflen = va_arg(ap, int ) /8; } else { incount = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); outbuf = va_arg(ap, void *); } } --- 58,71 ---- return; } else { if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) /8; /* This is in bits. */ incount = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); outbuf = va_arg(ap, void *); buflen = va_arg(ap, int ) /8; } else { incount = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); outbuf = va_arg(ap, void *); } } *************** *** 73,82 **** position = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 73,82 ---- position = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount,*datatype, ! outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 83,91 **** void mpi_pack_ ( inbuf, incount, type, outbuf, outcount, position, comm, __ierr ) void *inbuf; int*incount; ! MPI_Datatype type; void *outbuf; int*outcount; int *position; MPI_Comm comm; --- 83,91 ---- void mpi_pack_ ( inbuf, incount, type, outbuf, outcount, position, comm, __ierr ) void *inbuf; int*incount; ! MPI_Datatype *type; void *outbuf; int*outcount; int *position; MPI_Comm comm; *************** *** 100,130 **** temp = _fcdtocp(outbuf); outbuf = (void *)temp; } ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(type) ),outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_pack_ ANSI_ARGS(( void *, int *, MPI_Datatype, void *, int *, int *, MPI_Comm, int * )); void mpi_pack_ ( inbuf, incount, type, outbuf, outcount, position, comm, __ierr ) void *inbuf; int*incount; ! MPI_Datatype type; void *outbuf; int*outcount; int *position; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(type) ), outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 100,128 ---- temp = _fcdtocp(outbuf); outbuf = (void *)temp; } ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount,*type,outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_pack_ ANSI_ARGS(( void *, int *, MPI_Datatype *, void *, int *, int *, MPI_Comm, int * )); void mpi_pack_ ( inbuf, incount, type, outbuf, outcount, position, comm, __ierr ) void *inbuf; int*incount; ! MPI_Datatype *type; void *outbuf; int*outcount; int *position; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Pack(MPIR_F_PTR(inbuf),*incount,*type, outbuf,*outcount,position, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/recv.c mpich/src/pt2pt/recv.c *** /home/MPI/mpich/current/mpich/src/pt2pt/recv.c Fri Jun 7 10:11:12 1996 --- mpich/src/pt2pt/recv.c Mon Oct 14 15:27:56 1996 *************** *** 1,6 **** /* ! * $Id: recv.c,v 1.37 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: recv.c,v 1.37 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 79,89 **** rhandle.tag = tag; rhandle.contextid = comm->recv_context; rhandle.errval = MPI_SUCCESS; rhandle.comm = comm; ! MPIR_GET_REAL_DATATYPE(datatype) rhandle.datatype = datatype; ! datatype->ref_count ++; rhandle.bufadd = buf; rhandle.count = count; MPID_Clr_completed( comm->ADIctx, request ); rhandle.persistent = 0; --- 79,89 ---- rhandle.tag = tag; rhandle.contextid = comm->recv_context; rhandle.errval = MPI_SUCCESS; rhandle.comm = comm; ! /* MPIR_GET_REAL_DATATYPE(datatype) */ rhandle.datatype = datatype; ! /* datatype->ref_count ++; */ rhandle.bufadd = buf; rhandle.count = count; MPID_Clr_completed( comm->ADIctx, request ); rhandle.persistent = 0; *************** *** 111,119 **** source, request, &status->count ), comm, "Error in MPI_RECV"); } #endif ! rhandle.datatype->ref_count--; #endif } else { /* See MPI standard section 3.11 */ --- 111,119 ---- source, request, &status->count ), comm, "Error in MPI_RECV"); } #endif ! /* rhandle.datatype->ref_count--; */ #endif } else { /* See MPI standard section 3.11 */ diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/recvf.c mpich/src/pt2pt/recvf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/recvf.c Thu Jun 6 08:15:50 1996 --- mpich/src/pt2pt/recvf.c Thu Sep 26 09:02:30 1996 *************** *** 40,48 **** void mpi_recv_( void *unknown, ...) { void *buf; int*count,*source,*tag; ! MPI_Datatype datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; int buflen; --- 40,48 ---- void mpi_recv_( void *unknown, ...) { void *buf; int*count,*source,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; int buflen; *************** *** 53,69 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else --- 53,68 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); source = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else *************** *** 70,78 **** void mpi_recv_( buf, count, datatype, source, tag, comm, status, __ierr ) void *buf; int*count,*source,*tag; ! MPI_Datatype datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { --- 69,77 ---- void mpi_recv_( buf, count, datatype, source, tag, comm, status, __ierr ) void *buf; int*count,*source,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { *************** *** 80,108 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_recv_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_recv_( buf, count, datatype, source, tag, comm, status, __ierr ) void *buf; ! int*count,*source,*tag; ! MPI_Datatype datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif --- 79,104 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_recv_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_recv_( buf, count, datatype, source, tag, comm, status, __ierr ) void *buf; ! int *count,*source,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { ! *__ierr = MPI_Recv(MPIR_F_PTR(buf),*count,*datatype,*source,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/rsend.c mpich/src/pt2pt/rsend.c *** /home/MPI/mpich/current/mpich/src/pt2pt/rsend.c Fri Jun 7 10:11:12 1996 --- mpich/src/pt2pt/rsend.c Mon Oct 14 15:12:34 1996 *************** *** 1,6 **** /* ! * $Id: rsend.c,v 1.16 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: rsend.c,v 1.16 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 78,86 **** MPIR_ERROR( comm, mpi_errno, "Could not free allocated send buffer in MPI_RSEND" ); } #endif ! shandle.datatype->ref_count--; } return mpi_errno; #endif } --- 78,87 ---- MPIR_ERROR( comm, mpi_errno, "Could not free allocated send buffer in MPI_RSEND" ); } #endif ! MPIR_Type_free( &shandle.datatype ); ! /* shandle.datatype->ref_count--; */ } return mpi_errno; #endif } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/rsend_init.c mpich/src/pt2pt/rsend_init.c *** /home/MPI/mpich/current/mpich/src/pt2pt/rsend_init.c Fri Jun 7 10:11:13 1996 --- mpich/src/pt2pt/rsend_init.c Mon Oct 14 15:21:49 1996 *************** *** 1,6 **** /* ! * $Id: rsend_init.c,v 1.21 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: rsend_init.c,v 1.21 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 49,56 **** --- 49,57 ---- MPI_Comm comm; MPI_Request *request; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; #ifdef MPI_ADI2 MPIR_PSHANDLE *shandle; #else MPI_Request handleptr; *************** *** 69,78 **** shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; --- 70,80 ---- shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_RSEND_INIT"); ! dtype_ptr->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; *************** *** 85,94 **** #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm, MPI_ERR_EXHAUSTED,"Error in MPI_RSEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) --- 87,97 ---- #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_RSEND_INIT"); ! dtype_ptr->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm, MPI_ERR_EXHAUSTED,"Error in MPI_RSEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/rsend_initf.c mpich/src/pt2pt/rsend_initf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/rsend_initf.c Thu Jun 6 07:39:15 1996 --- mpich/src/pt2pt/rsend_initf.c Fri Sep 27 09:40:25 1996 *************** *** 40,48 **** void mpi_rsend_init_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_rsend_init_( void *unknown, ...) { void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 56,71 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 74,82 **** void mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 73,81 ---- void mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 87,120 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_rsend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 86,116 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_rsend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_rsend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Rsend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/rsendf.c mpich/src/pt2pt/rsendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/rsendf.c Thu Jun 6 07:28:56 1996 --- mpich/src/pt2pt/rsendf.c Fri Sep 27 08:29:56 1996 *************** *** 40,48 **** void mpi_rsend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,48 ---- void mpi_rsend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 52,67 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 52,66 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 68,76 **** void mpi_rsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 67,75 ---- void mpi_rsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 77,104 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_rsend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, int * )); void mpi_rsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; ! int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, ! (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 76,100 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_rsend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, int * )); void mpi_rsend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; ! int *count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Rsend(MPIR_F_PTR(buf),*count,*datatype, ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/send.c mpich/src/pt2pt/send.c *** /home/MPI/mpich/current/mpich/src/pt2pt/send.c Fri Jun 7 10:11:13 1996 --- mpich/src/pt2pt/send.c Mon Oct 14 15:27:42 1996 *************** *** 1,6 **** /* ! * $Id: send.c,v 1.24 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: send.c,v 1.24 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 80,90 **** shandle.tag = tag; MPID_Clr_completed(comm->ADIctx, request); ! MPIR_GET_REAL_DATATYPE(datatype) shandle.datatype = datatype; ! datatype->ref_count++; shandle.comm = comm; #ifdef MPID_HAS_HETERO shandle.msgrep = MPIR_MSGREP_SENDER; --- 80,90 ---- shandle.tag = tag; MPID_Clr_completed(comm->ADIctx, request); ! /* MPIR_GET_REAL_DATATYPE(datatype) */ shandle.datatype = datatype; ! /* datatype->ref_count++; */ shandle.comm = comm; #ifdef MPID_HAS_HETERO shandle.msgrep = MPIR_MSGREP_SENDER; *************** *** 118,126 **** MPIR_ERROR( comm, mpi_errno, "Could not free allocated send buffer in MPI_SEND" ); } #endif ! shandle.datatype->ref_count--; return mpi_errno; #endif } --- 118,126 ---- MPIR_ERROR( comm, mpi_errno, "Could not free allocated send buffer in MPI_SEND" ); } #endif ! /* shandle.datatype->ref_count--; */ return mpi_errno; #endif } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/sendf.c mpich/src/pt2pt/sendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/sendf.c Thu Jun 6 08:15:53 1996 --- mpich/src/pt2pt/sendf.c Thu Sep 26 09:01:28 1996 *************** *** 40,48 **** void mpi_send_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,48 ---- void mpi_send_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 52,67 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 52,66 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) /8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 68,76 **** void mpi_send_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 67,75 ---- void mpi_send_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 77,104 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_send_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, ! int * )); void mpi_send_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 76,100 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_send_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, ! MPI_Comm, int * )); void mpi_send_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Send(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/sendrecv_rep.c mpich/src/pt2pt/sendrecv_rep.c *** /home/MPI/mpich/current/mpich/src/pt2pt/sendrecv_rep.c Wed Jul 17 13:04:03 1996 --- mpich/src/pt2pt/sendrecv_rep.c Wed Sep 25 13:05:32 1996 *************** *** 1,6 **** /* ! * $Id: sendrecv_rep.c,v 1.10 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: sendrecv_rep.c,v 1.10 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 56,63 **** --- 56,64 ---- void *rbuf; MPI_Status status_array[2]; MPI_Request req[2]; MPIR_ERROR_DECL; + struct MPIR_DATATYPE *dtype_ptr; static char myname[] = "Error in MPI_SENDRECV_REPLACE"; /* Check for invalid arguments */ if ( MPIR_TEST_COMM(comm,comm) || MPIR_TEST_DATATYPE(comm,datatype) || *************** *** 71,81 **** to send contiguous data... */ MPIR_ERROR_PUSH(comm); ! MPIR_GET_REAL_DATATYPE(datatype); ! if (count == 0 || datatype->is_contig) { ! buflen = datatype->extent * count; MPIR_CALL_POP(MPI_Isend ( buf, count, datatype, dest, sendtag, comm, &req[0] ),comm,myname); if (buflen > 0) { MPIR_ALLOC_POP(rbuf,(void *)MALLOC( buflen ), --- 72,83 ---- to send contiguous data... */ MPIR_ERROR_PUSH(comm); ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,comm,"MPI_SENDRECV_REPL"); ! if (count == 0 || dtype_ptr->is_contig) { ! buflen = dtype_ptr->extent * count; MPIR_CALL_POP(MPI_Isend ( buf, count, datatype, dest, sendtag, comm, &req[0] ),comm,myname); if (buflen > 0) { MPIR_ALLOC_POP(rbuf,(void *)MALLOC( buflen ), diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/sendrecvf.c mpich/src/pt2pt/sendrecvf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/sendrecvf.c Thu Jun 6 08:17:44 1996 --- mpich/src/pt2pt/sendrecvf.c Fri Sep 27 09:25:18 1996 *************** *** 40,52 **** void mpi_sendrecv_( void * unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype sendtype; int *dest,*sendtag; void *recvbuf; int *recvcount; ! MPI_Datatype recvtype; int *source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; --- 40,52 ---- void mpi_sendrecv_( void * unknown, ...) { void *sendbuf; int *sendcount; ! MPI_Datatype *sendtype; int *dest,*sendtag; void *recvbuf; int *recvcount; ! MPI_Datatype *recvtype; int *source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; *************** *** 64,90 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int ) / 8; /* The length is in bits. */ } sendcount = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); sendtag = va_arg(ap, int *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } recvcount = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype); source = va_arg(ap, int *); recvtag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ),*dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else --- 64,88 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int ) / 8; /* The length is in bits. */ } sendcount = va_arg(ap, int *); ! sendtype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); sendtag = va_arg(ap, int *); recvbuf = va_arg(ap, void *); if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } recvcount = va_arg(ap, int *); ! recvtype = va_arg(ap, MPI_Datatype*); source = va_arg(ap, int *); recvtag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype,*dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else *************** *** 93,105 **** recvbuf, recvcount, recvtype, source, recvtag, comm, status, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype sendtype; int*dest,*sendtag; void *recvbuf; int*recvcount; ! MPI_Datatype recvtype; int*source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; --- 91,103 ---- recvbuf, recvcount, recvtype, source, recvtag, comm, status, __ierr ) void *sendbuf; int*sendcount; ! MPI_Datatype *sendtype; int*dest,*sendtag; void *recvbuf; int*recvcount; ! MPI_Datatype *recvtype; int*source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; *************** *** 112,153 **** if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ),*dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ),*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_sendrecv_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, ! void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, __ierr ) ! void *sendbuf; ! int*sendcount; ! MPI_Datatype sendtype; ! int*dest,*sendtag; ! void *recvbuf; ! int*recvcount; ! MPI_Datatype recvtype; ! int*source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; { ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(sendtype) ), *dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(recvtype) ), *source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif --- 110,147 ---- if (_isfcd(recvbuf)) { temp = _fcdtocp(recvbuf); recvbuf = (void *)temp; } ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype,*dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_sendrecv_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, ! void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_sendrecv_( sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, __ierr ) ! void *sendbuf; ! int *sendcount; ! MPI_Datatype *sendtype; ! int *dest,*sendtag; ! void *recvbuf; ! int *recvcount; ! MPI_Datatype *recvtype; ! int *source,*recvtag; MPI_Comm comm; MPI_Status *status; int *__ierr; { ! *__ierr = MPI_Sendrecv(MPIR_F_PTR(sendbuf),*sendcount,*sendtype, *dest,*sendtag, ! MPIR_F_PTR(recvbuf),*recvcount,*recvtype, *source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/sendrecvrepf.c mpich/src/pt2pt/sendrecvrepf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/sendrecvrepf.c Thu Jun 6 07:25:31 1996 --- mpich/src/pt2pt/sendrecvrepf.c Fri Sep 27 09:28:22 1996 *************** *** 40,48 **** void mpi_sendrecv_replace_( void *unknown, ...) { void *buf; int *count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; va_list ap; --- 40,48 ---- void mpi_sendrecv_replace_( void *unknown, ...) { void *buf; int *count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype *datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; va_list ap; *************** *** 53,61 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); sendtag = va_arg(ap, int *); source = va_arg(ap, int *); recvtag = va_arg(ap, int *); --- 53,61 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); sendtag = va_arg(ap, int *); source = va_arg(ap, int *); recvtag = va_arg(ap, int *); *************** *** 62,71 **** comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else --- 62,71 ---- comm = va_arg(ap, MPI_Comm); status = va_arg(ap, MPI_Status *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count,*datatype,*dest, ! *sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #else *************** *** 73,81 **** void mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, __ierr ) void *buf; int*count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { --- 73,81 ---- void mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, __ierr ) void *buf; int*count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype *datatype; MPI_Comm comm; MPI_Status *status; int *__ierr; { *************** *** 84,113 **** temp = _fcdtocp(buf); buf = (void *) temp; } *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_sendrecv_replace_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, __ierr ) ! void *buf; ! int*count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype datatype; MPI_Comm comm; ! MPI_Status *status; int *__ierr; { *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), status); } #endif --- 84,112 ---- temp = _fcdtocp(buf); buf = (void *) temp; } *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count, ! *datatype,*dest,*sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),status); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_sendrecv_replace_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, int *, int *, MPI_Comm, MPI_Status *, int * )); void mpi_sendrecv_replace_( buf, count, datatype, dest, sendtag, source, recvtag, comm, status, __ierr ) ! void *buf; ! int *count,*dest,*sendtag,*source,*recvtag; ! MPI_Datatype *datatype; MPI_Comm comm; ! MPI_Status *status; int *__ierr; { *__ierr = MPI_Sendrecv_replace(MPIR_F_PTR(buf),*count, ! *datatype,*dest,*sendtag,*source,*recvtag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), status); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/sendutil.c mpich/src/pt2pt/sendutil.c *** /home/MPI/mpich/current/mpich/src/pt2pt/sendutil.c Fri Jul 5 11:03:20 1996 --- mpich/src/pt2pt/sendutil.c Wed Sep 25 09:33:31 1996 *************** *** 1,6 **** /* ! * $Id: sendutil.c,v 1.1 1996/07/05 16:03:20 gropp Exp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. * --- 1,6 ---- /* ! * $Id: sendutil.c,v 1.1 1996/07/05 16:03:20 gropp Exp gropp $ * * (C) 1996 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. * *************** *** 54,62 **** --- 54,65 ---- int target; int tag; MPI_Comm comm; { + struct MPIR_DATATYPE *dtype_ptr; + /* Assume that the allocator maintains its own lock */ + MPIR_SQEL * sqe = (MPIR_SQEL *) MPID_SBalloc( MPIR_sqels ); int contig_size = 0; sqe->db_shandle = sh; *************** *** 66,74 **** sqe->db_data = buff; sqe->db_next = (MPIR_SQEL *)0; /* ***Assume that it's a flat datatype... *** */ ! MPIR_DATATYPE_GET_SIZE(datatype,contig_size); sqe->db_byte_length = count * contig_size; /* Insert at the tail of the list */ --- 69,78 ---- sqe->db_data = buff; sqe->db_next = (MPIR_SQEL *)0; /* ***Assume that it's a flat datatype... *** */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! contig_size = MPIR_GET_DTYPE_SIZE(datatype,dtype_ptr); sqe->db_byte_length = count * contig_size; /* Insert at the tail of the list */ diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/ssend_init.c mpich/src/pt2pt/ssend_init.c *** /home/MPI/mpich/current/mpich/src/pt2pt/ssend_init.c Fri Jun 7 10:11:15 1996 --- mpich/src/pt2pt/ssend_init.c Mon Oct 14 15:22:43 1996 *************** *** 1,6 **** /* ! * $Id: ssend_init.c,v 1.19 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: ssend_init.c,v 1.19 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 46,53 **** --- 46,54 ---- MPI_Comm comm; MPI_Request *request; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; #ifdef MPI_ADI2 MPIR_PSHANDLE *shandle; #else MPI_Request handleptr; *************** *** 66,75 **** shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; --- 67,77 ---- shandle = &(*request)->persistent_shandle; MPID_Request_init( &(shandle->shandle), MPIR_PERSISTENT_SEND ); /* Save the information about the operation, being careful with ref-counted items */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_SSEND_INIT"); ! dtype_ptr->ref_count++; shandle->perm_datatype = datatype; shandle->perm_tag = tag; shandle->perm_dest = dest; shandle->perm_count = count; *************** *** 82,91 **** #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! MPIR_GET_REAL_DATATYPE(datatype) ! datatype->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_SSEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) --- 84,94 ---- #else /* See MPI_TYPE_FREE. A free can not happen while the datatype may be in use. Thus, a nonblocking operation increments the reference count */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_SSEND_INIT"); ! dtype_ptr->ref_count++; MPIR_ALLOC(handleptr,(MPI_Request) MPIR_SBalloc( MPIR_shandles ), comm,MPI_ERR_EXHAUSTED,"Error in MPI_SSEND_INIT"); *request = handleptr; MPIR_SET_COOKIE(&handleptr->shandle,MPIR_REQUEST_COOKIE) diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/ssend_initf.c mpich/src/pt2pt/ssend_initf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/ssend_initf.c Thu Jun 6 07:40:23 1996 --- mpich/src/pt2pt/ssend_initf.c Fri Sep 27 09:39:34 1996 *************** *** 40,48 **** void mpi_ssend_init_( void *unknown, ...) { void *buf; int *count; ! MPI_Datatype datatype; int *dest; int *tag; MPI_Comm comm; MPI_Request *request; --- 40,48 ---- void mpi_ssend_init_( void *unknown, ...) { void *buf; int *count; ! MPI_Datatype *datatype; int *dest; int *tag; MPI_Comm comm; MPI_Request *request; *************** *** 56,72 **** if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 56,71 ---- if (_numargs() == NUMPARAMS+1) { buflen = (va_arg(ap, int)) / 8; /* This is in bits. */ } count = va_arg (ap, int *); ! datatype = va_arg(ap, MPI_Datatype *); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); request = va_arg(ap, MPI_Request *); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } *************** *** 74,82 **** void mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; --- 73,81 ---- void mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; *************** *** 87,120 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ssend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } --- 86,116 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *) temp; } ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ),&lrequest); *(int*)request = MPIR_FromPointer(lrequest); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ssend_init_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, MPI_Request *, int * )); void mpi_ssend_init_( buf, count, datatype, dest, tag, comm, request, __ierr ) void *buf; int*count; ! MPI_Datatype *datatype; int*dest; int*tag; MPI_Comm comm; MPI_Request *request; int *__ierr; { MPI_Request lrequest; ! *__ierr = MPI_Ssend_init(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) ), &lrequest); *(int*)request = MPIR_FromPointer(lrequest); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/ssendf.c mpich/src/pt2pt/ssendf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/ssendf.c Thu Jun 6 07:27:22 1996 --- mpich/src/pt2pt/ssendf.c Fri Sep 27 08:32:47 1996 *************** *** 40,48 **** void mpi_ssend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 40,48 ---- void mpi_ssend_( void *unknown, ...) { void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 52,73 **** if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else void mpi_ssend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { _fcd temp; --- 52,72 ---- if (_numargs() == NUMPARAMS+1) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } count = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); dest = va_arg(ap, int *); tag = va_arg(ap, int *); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else void mpi_ssend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 74,100 **** if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ssend_ ANSI_ARGS(( void *, int *, MPI_Datatype, int *, int *, MPI_Comm, int * )); void mpi_ssend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! *dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 73,96 ---- if (_isfcd(buf)) { temp = _fcdtocp(buf); buf = (void *)temp; } ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_ssend_ ANSI_ARGS(( void *, int *, MPI_Datatype *, int *, int *, MPI_Comm, int * )); void mpi_ssend_( buf, count, datatype, dest, tag, comm, __ierr ) void *buf; int*count,*dest,*tag; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; { ! *__ierr = MPI_Ssend(MPIR_F_PTR(buf),*count,*datatype,*dest,*tag, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/testall.c mpich/src/pt2pt/testall.c *** /home/MPI/mpich/current/mpich/src/pt2pt/testall.c Wed Jun 26 14:27:16 1996 --- mpich/src/pt2pt/testall.c Mon Oct 14 15:07:24 1996 *************** *** 1,6 **** /* ! * $Id: testall.c,v 1.24 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: testall.c,v 1.24 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 257,267 **** #endif } if (!request->chandle.persistent) { ! if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } MPI_Request_free( &array_of_requests[i] ); /* Question: should we ALWAYS set to null? */ array_of_requests[i] = NULL; } --- 257,269 ---- #endif } if (!request->chandle.persistent) { ! MPIR_Type_free( &request->chandle.datatype ); ! /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } + */ MPI_Request_free( &array_of_requests[i] ); /* Question: should we ALWAYS set to null? */ array_of_requests[i] = NULL; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/testany.c mpich/src/pt2pt/testany.c *** /home/MPI/mpich/current/mpich/src/pt2pt/testany.c Wed Jun 26 14:27:17 1996 --- mpich/src/pt2pt/testany.c Mon Oct 14 15:03:34 1996 *************** *** 1,6 **** /* ! * $Id: testany.c,v 1.30 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: testany.c,v 1.30 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 206,216 **** --- 206,219 ---- &status->count ); #endif } if (!request->chandle.persistent) { + MPIR_Type_free( &request->chandle.datatype ); + /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } + */ MPI_Request_free( &array_of_requests[i] ); array_of_requests[i] = NULL; } else { diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/testsome.c mpich/src/pt2pt/testsome.c *** /home/MPI/mpich/current/mpich/src/pt2pt/testsome.c Wed Jun 26 14:27:17 1996 --- mpich/src/pt2pt/testsome.c Mon Oct 14 15:20:37 1996 *************** *** 1,6 **** /* ! * $Id: testsome.c,v 1.21 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: testsome.c,v 1.21 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 206,216 **** #endif } nfound++; if (!request->chandle.persistent) { ! if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); ! } MPI_Request_free( &array_of_requests[i] ); array_of_requests[i] = NULL; } else { --- 206,217 ---- #endif } nfound++; if (!request->chandle.persistent) { ! MPIR_Type_free( &request->chandle.datatype ); ! /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); ! }*/ MPI_Request_free( &array_of_requests[i] ); array_of_requests[i] = NULL; } else { diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_commit.c mpich/src/pt2pt/type_commit.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_commit.c Wed Jul 17 13:04:04 1996 --- mpich/src/pt2pt/type_commit.c Wed Sep 25 13:05:31 1996 *************** *** 1,6 **** /* ! * $Id: type_commit.c,v 1.22 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_commit.c,v 1.22 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 25,77 **** int MPI_Type_commit ( datatype ) MPI_Datatype *datatype; { int mpi_errno; ! if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,*datatype)) ! return MPIR_ERROR(MPI_COMM_WORLD,mpi_errno, ! "Error in MPI_TYPE_COMMIT" ); /* We could also complain about committing twice, but we chose not to, based on the view that it isn't obviously an error. */ /* Just do the simplest conversion to contiguous where possible */ #if defined(MPID_HAS_HETERO) if (!MPID_IS_HETERO) #endif { ! if (!(*datatype)->is_contig) { /* I want to add a test for the struct { contig, UB } form of variable count strided vectors; this will not have size == extent. Because of this, using the simple test of size == extent as a filter is not useful. */ int j, is_contig; MPI_Aint offset; ! MPI_Datatype type = *datatype; ! if ((MPI_Aint)type->size == type->extent) { ! switch (type->dte_type) { case MPIR_STRUCT: ! offset = type->indices[0]; /* If the initial offset is not 0, then mark as non-contiguous. This is because many of the quick tests for valid buffers depend on the initial address being valid if is_contig is set */ is_contig = (offset == 0); ! for (j=0;is_contig && jcount-1; j++) { ! if (!type->old_types[j]->is_contig) { is_contig = 0; break; } if (offset + ! type->old_types[j]->extent * (MPI_Aint)type->blocklens[j] != ! type->indices[j+1]) { is_contig = 0; break; } ! offset += type->old_types[j]->extent * ! (MPI_Aint)type->blocklens[j]; } ! if (!type->old_types[type->count-1]->is_contig) is_contig = 0; if (is_contig) { ! type->is_contig = 1; ! type->old_type = 0; /* If we don't set to null, then the code in type_contig.c will use the extent of type->old_types[0] */ ! /* type->old_type = type->old_types[0]; */ /* PRINTF( "Making structure type contiguous..." ); */ /* Should free all old structure members ... */ } break; --- 25,85 ---- int MPI_Type_commit ( datatype ) MPI_Datatype *datatype; { int mpi_errno; ! struct MPIR_DATATYPE *dtype_ptr; ! ! dtype_ptr = MPIR_GET_DTYPE_PTR(*datatype); ! MPIR_TEST_DTYPE(*datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_COMMIT"); ! /* We could also complain about committing twice, but we chose not to, based on the view that it isn't obviously an error. */ + /* Test for predefined datatypes */ + if (dtype_ptr->basic) + return MPI_SUCCESS; + /* Just do the simplest conversion to contiguous where possible */ #if defined(MPID_HAS_HETERO) if (!MPID_IS_HETERO) #endif { ! if (!(dtype_ptr)->is_contig) { /* I want to add a test for the struct { contig, UB } form of variable count strided vectors; this will not have size == extent. Because of this, using the simple test of size == extent as a filter is not useful. */ int j, is_contig; MPI_Aint offset; ! if ((MPI_Aint)dtype_ptr->size == dtype_ptr->extent) { ! switch (dtype_ptr->dte_type) { case MPIR_STRUCT: ! offset = dtype_ptr->indices[0]; /* If the initial offset is not 0, then mark as non-contiguous. This is because many of the quick tests for valid buffers depend on the initial address being valid if is_contig is set */ is_contig = (offset == 0); ! for (j=0;is_contig && jcount-1; j++) { ! if (!dtype_ptr->old_types[j]->is_contig) { ! is_contig = 0; break; } if (offset + ! dtype_ptr->old_types[j]->extent * ! (MPI_Aint)dtype_ptr->blocklens[j] != ! dtype_ptr->indices[j+1]) { is_contig = 0; break; } ! offset += dtype_ptr->old_types[j]->extent * ! (MPI_Aint)dtype_ptr->blocklens[j]; } ! if (!dtype_ptr->old_types[dtype_ptr->count-1]->is_contig) ! is_contig = 0; if (is_contig) { ! dtype_ptr->is_contig = 1; ! dtype_ptr->old_type = 0; /* If we don't set to null, then the code in type_contig.c will use the extent of type->old_types[0] */ ! /* dtype_ptr->old_type = dtype_ptr->old_types[0]; */ /* PRINTF( "Making structure type contiguous..." ); */ /* Should free all old structure members ... */ } break; *************** *** 84,91 **** } } /* Nothing else to do yet */ ! (*datatype)->committed = 1; return MPI_SUCCESS; } --- 92,99 ---- } } /* Nothing else to do yet */ ! (dtype_ptr)->committed = 1; return MPI_SUCCESS; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_commitf.c mpich/src/pt2pt/type_commitf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_commitf.c Thu Jun 6 07:43:06 1996 --- mpich/src/pt2pt/type_commitf.c Fri Sep 27 09:54:44 1996 *************** *** 33,39 **** void mpi_type_commit_ ( datatype, __ierr ) MPI_Datatype *datatype; int *__ierr; { ! MPI_Datatype ldatatype = (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ); ! *__ierr = MPI_Type_commit( &ldatatype ); } --- 33,38 ---- void mpi_type_commit_ ( datatype, __ierr ) MPI_Datatype *datatype; int *__ierr; { ! *__ierr = MPI_Type_commit( datatype ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_contig.c mpich/src/pt2pt/type_contig.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_contig.c Wed Jul 17 13:04:05 1996 --- mpich/src/pt2pt/type_contig.c Wed Sep 25 14:40:19 1996 *************** *** 1,6 **** /* ! * $Id: type_contig.c,v 1.21 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_contig.c,v 1.21 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 38,64 **** int count; MPI_Datatype old_type; MPI_Datatype *newtype; { ! MPI_Datatype dteptr; int mpi_errno = MPI_SUCCESS; /* Check for bad arguments */ ! MPIR_GET_REAL_DATATYPE(old_type) ! if ( MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,old_type) || ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_type->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_type->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_CONTIGUOUS" ); /* Are we making a null datatype? */ if (count == 0) { /* (*newtype) = MPI_DATATYPE_NULL; */ - MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ), - MPI_COMM_WORLD,MPI_ERR_EXHAUSTED, - "Error in MPI_TYPE_CONTIGUOUS" ); - *newtype = dteptr; MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_CONTIG; dteptr->committed = 0; dteptr->basic = 0; --- 38,66 ---- int count; MPI_Datatype old_type; MPI_Datatype *newtype; { ! struct MPIR_DATATYPE *dteptr; int mpi_errno = MPI_SUCCESS; + struct MPIR_DATATYPE *old_dtype_ptr; /* Check for bad arguments */ ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_type); ! MPIR_TEST_DTYPE(old_type,old_dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_CONTIGUOUS"); ! if ( ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_dtype_ptr->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_dtype_ptr->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_CONTIGUOUS" ); + MPIR_ALLOC(dteptr,(struct MPIR_DATATYPE *) MPIR_SBalloc( MPIR_dtes ), + MPI_COMM_WORLD,MPI_ERR_EXHAUSTED, + "Error in MPI_TYPE_CONTIGUOUS" ); + *newtype = (MPI_Datatype) MPIR_FromPointer( dteptr ); /* Are we making a null datatype? */ if (count == 0) { /* (*newtype) = MPI_DATATYPE_NULL; */ MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_CONTIG; dteptr->committed = 0; dteptr->basic = 0; *************** *** 79,105 **** dteptr->has_ub = 0; dteptr->size = 0; dteptr->real_lb = 0; dteptr->real_ub = 0; ! dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type); return (mpi_errno); } /* Create and fill in the datatype */ - MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ),MPI_COMM_WORLD, - MPI_ERR_EXHAUSTED,"Error in MPI_TYPE_CONTIGUOUS"); - *newtype = dteptr; MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_CONTIG; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->ref_count = 1; ! dteptr->align = old_type->align; dteptr->stride = 1; dteptr->blocklen = 1; ! dteptr->is_contig = old_type->is_contig; ! dteptr->elements = count * old_type->elements; dteptr->has_ub = 0; dteptr->has_lb = 0; /* Take care of contiguous vs non-contiguous case. --- 81,106 ---- dteptr->has_ub = 0; dteptr->size = 0; dteptr->real_lb = 0; dteptr->real_ub = 0; ! dteptr->self = *newtype; ! dteptr->old_type = MPIR_Type_dup (old_dtype_ptr); return (mpi_errno); } /* Create and fill in the datatype */ MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_CONTIG; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->ref_count = 1; ! dteptr->align = old_dtype_ptr->align; dteptr->stride = 1; dteptr->blocklen = 1; ! dteptr->is_contig = old_dtype_ptr->is_contig; ! dteptr->elements = count * old_dtype_ptr->elements; ! dteptr->self = *newtype; dteptr->has_ub = 0; dteptr->has_lb = 0; /* Take care of contiguous vs non-contiguous case. *************** *** 106,119 **** Note that some datatypes (MPIR_STRUCT) that are marked as contiguous (byt the code in MPI_Type_commit) may have not have an old_type. */ ! if (old_type->is_contig && old_type->old_type) { ! dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type->old_type); ! dteptr->count = count * old_type->count; } else { ! dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type); dteptr->count = count; } /* Set the upper/lower bounds and the extent and size */ --- 107,120 ---- Note that some datatypes (MPIR_STRUCT) that are marked as contiguous (byt the code in MPI_Type_commit) may have not have an old_type. */ ! if (old_dtype_ptr->is_contig && old_dtype_ptr->old_type) { ! dteptr->old_type = MPIR_Type_dup (old_dtype_ptr->old_type); ! dteptr->count = count * old_dtype_ptr->count; } else { ! dteptr->old_type = MPIR_Type_dup (old_dtype_ptr); dteptr->count = count; } /* Set the upper/lower bounds and the extent and size */ diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_contigf.c mpich/src/pt2pt/type_contigf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_contigf.c Thu Jun 6 07:44:07 1996 --- mpich/src/pt2pt/type_contigf.c Fri Sep 27 09:42:24 1996 *************** *** 28,46 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_contiguous_ ANSI_ARGS(( int *, MPI_Datatype, MPI_Datatype *, int * )); void mpi_type_contiguous_( count, old_type, newtype, __ierr ) int*count; ! MPI_Datatype old_type; MPI_Datatype *newtype; int *__ierr; { ! MPI_Datatype lnewtype = 0; ! *__ierr = MPI_Type_contiguous(*count, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(old_type) ), ! &lnewtype); ! *(int*)newtype = MPIR_FromPointer(lnewtype); } --- 28,42 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_contiguous_ ANSI_ARGS(( int *, MPI_Datatype *, MPI_Datatype *, int * )); void mpi_type_contiguous_( count, old_type, newtype, __ierr ) int*count; ! MPI_Datatype *old_type; MPI_Datatype *newtype; int *__ierr; { ! *__ierr = MPI_Type_contiguous(*count,*old_type,newtype ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_extent.c mpich/src/pt2pt/type_extent.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_extent.c Thu Apr 11 15:24:49 1996 --- mpich/src/pt2pt/type_extent.c Wed Sep 25 13:05:29 1996 *************** *** 1,6 **** /* ! * $Id: type_extent.c,v 1.8 1996/04/11 20:24:49 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_extent.c,v 1.8 1996/04/11 20:24:49 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 30,43 **** MPI_Datatype datatype; MPI_Aint *extent; { int mpi_errno; ! /* Check for bad datatype */ ! if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,datatype)) ! return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, ! "Error in MPI_TYPE_EXTENT" ); ! MPIR_GET_REAL_DATATYPE(datatype) /* Assign the extent and return */ ! (*extent) = datatype->extent; return (MPI_SUCCESS); } --- 30,42 ---- MPI_Datatype datatype; MPI_Aint *extent; { int mpi_errno; ! struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_EXTENT"); ! /* Assign the extent and return */ ! (*extent) = dtype_ptr->extent; return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_extentf.c mpich/src/pt2pt/type_extentf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_extentf.c Thu Jun 6 08:21:21 1996 --- mpich/src/pt2pt/type_extentf.c Fri Sep 27 09:55:18 1996 *************** *** 28,44 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_extent_ ANSI_ARGS(( MPI_Datatype, int *, int * )); void mpi_type_extent_( datatype, extent, __ierr ) ! MPI_Datatype datatype; int *extent; int *__ierr; { MPI_Aint c_extent; ! *__ierr = MPI_Type_extent( ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),&c_extent); /* Really should check for truncation, ala mpi_address_ */ *extent = (int)c_extent; } --- 28,43 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_extent_ ANSI_ARGS(( MPI_Datatype *, int *, int * )); void mpi_type_extent_( datatype, extent, __ierr ) ! MPI_Datatype *datatype; int *extent; int *__ierr; { MPI_Aint c_extent; ! *__ierr = MPI_Type_extent(*datatype,&c_extent); /* Really should check for truncation, ala mpi_address_ */ *extent = (int)c_extent; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_free.c mpich/src/pt2pt/type_free.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_free.c Thu Apr 11 15:25:05 1996 --- mpich/src/pt2pt/type_free.c Wed Sep 25 12:55:44 1996 *************** *** 1,6 **** /* ! * $Id: type_free.c,v 1.16 1996/04/11 20:25:05 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_free.c,v 1.16 1996/04/11 20:25:05 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 32,52 **** int MPI_Type_free ( datatype ) MPI_Datatype *datatype; { int mpi_errno = MPI_SUCCESS; /* Check for bad arguments */ ! if (MPIR_TEST_ARG(datatype) || ! MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,*datatype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_FREE" ); /* Freeing null datatypes succeeds silently */ if ( (*datatype) == MPI_DATATYPE_NULL ) return (MPI_SUCCESS); /* We can't free permanent objects unless finalize has been called */ ! if ( ( (*datatype)->permanent ) && MPIR_Has_been_initialized == 1) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_PERM_TYPE, "Error in MPI_TYPE_FREE" ); mpi_errno = MPIR_Type_free( datatype ); --- 32,59 ---- int MPI_Type_free ( datatype ) MPI_Datatype *datatype; { int mpi_errno = MPI_SUCCESS; + struct MPIR_DATATYPE *dtype_ptr; /* Check for bad arguments */ ! if (MPIR_TEST_ARG(datatype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_FREE" ); + dtype_ptr = MPIR_GET_DTYPE_PTR(*datatype); + MPIR_TEST_DTYPE(*datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_FREE"); + + /* Test for predefined datatypes */ + if (dtype_ptr->basic) + return MPI_SUCCESS; + /* Freeing null datatypes succeeds silently */ if ( (*datatype) == MPI_DATATYPE_NULL ) return (MPI_SUCCESS); /* We can't free permanent objects unless finalize has been called */ ! if ( ( (dtype_ptr)->permanent ) && MPIR_Has_been_initialized == 1) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_PERM_TYPE, "Error in MPI_TYPE_FREE" ); mpi_errno = MPIR_Type_free( datatype ); diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_freef.c mpich/src/pt2pt/type_freef.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_freef.c Thu Jun 6 07:47:55 1996 --- mpich/src/pt2pt/type_freef.c Fri Sep 27 09:55:44 1996 *************** *** 34,45 **** void mpi_type_free_ ( datatype, __ierr ) MPI_Datatype *datatype; int *__ierr; { ! MPI_Datatype ldatatype = (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ); ! *__ierr = MPI_Type_free(&ldatatype); ! /* We need to recover this pointer */ ! if (!ldatatype) { ! MPIR_RmPointer( *(int*)(datatype) ); ! *(int*)datatype = 0; ! } } --- 34,39 ---- void mpi_type_free_ ( datatype, __ierr ) MPI_Datatype *datatype; int *__ierr; { ! *__ierr = MPI_Type_free(datatype); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_hind.c mpich/src/pt2pt/type_hind.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_hind.c Wed Jul 17 13:04:07 1996 --- mpich/src/pt2pt/type_hind.c Wed Sep 25 16:27:22 1996 *************** *** 1,6 **** /* ! * $Id: type_hind.c,v 1.20 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_hind.c,v 1.20 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 43,61 **** MPI_Aint indices[]; MPI_Datatype old_type; MPI_Datatype *newtype; { ! MPI_Datatype dteptr; MPI_Aint ub, lb, high, low, real_ub, real_lb; int i, mpi_errno = MPI_SUCCESS; int total_count; /* Check for bad arguments */ ! MPIR_GET_REAL_DATATYPE(old_type) ! if ( MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,old_type) || ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_type->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_type->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_HINDEXED" ); /* Are we making a null datatype? */ --- 43,63 ---- MPI_Aint indices[]; MPI_Datatype old_type; MPI_Datatype *newtype; { ! struct MPIR_DATATYPE *dteptr; MPI_Aint ub, lb, high, low, real_ub, real_lb; int i, mpi_errno = MPI_SUCCESS; int total_count; + struct MPIR_DATATYPE *old_dtype_ptr; /* Check for bad arguments */ ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_type); ! MPIR_TEST_DTYPE(old_type,old_dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_HINDEXED"); ! if ( ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_dtype_ptr->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_dtype_ptr->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_HINDEXED" ); /* Are we making a null datatype? */ *************** *** 66,89 **** return MPI_Type_contiguous( 0, MPI_INT, newtype ); } /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ), MPI_COMM_WORLD, MPI_ERR_EXHAUSTED,"Error in MPI_TYPE_HINDEXED"); ! *newtype = dteptr; MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_HINDEXED; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->is_contig = 0; dteptr->ref_count = 1; ! dteptr->align = old_type->align; ! dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type); dteptr->count = count; dteptr->elements = 0; ! dteptr->has_ub = old_type->has_ub; ! dteptr->has_lb = old_type->has_lb; /* Create indices and blocklens arrays and fill them */ dteptr->indices = ( MPI_Aint * ) MALLOC( count * sizeof( MPI_Aint ) ); dteptr->blocklens = ( int * ) MALLOC( count * sizeof( int ) ); --- 68,92 ---- return MPI_Type_contiguous( 0, MPI_INT, newtype ); } /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(struct MPIR_DATATYPE *) MPIR_SBalloc( MPIR_dtes ), MPI_COMM_WORLD, MPI_ERR_EXHAUSTED,"Error in MPI_TYPE_HINDEXED"); ! *newtype = (MPI_Datatype)MPIR_FromPointer( dteptr ); MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_HINDEXED; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->is_contig = 0; dteptr->ref_count = 1; ! dteptr->align = old_dtype_ptr->align; ! dteptr->old_type = MPIR_Type_dup (old_dtype_ptr); dteptr->count = count; dteptr->elements = 0; ! dteptr->has_ub = old_dtype_ptr->has_ub; ! dteptr->has_lb = old_dtype_ptr->has_lb; ! dteptr->self = *newtype; /* Create indices and blocklens arrays and fill them */ dteptr->indices = ( MPI_Aint * ) MALLOC( count * sizeof( MPI_Aint ) ); dteptr->blocklens = ( int * ) MALLOC( count * sizeof( int ) ); *************** *** 91,105 **** return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_HINDEXED" ); low = indices[0]; high = indices[0] + ! ((MPI_Aint)blocklens[0] * old_type->extent); real_lb = indices[0]; real_ub = real_lb; for (i = 0; i < count; i++) { dteptr->indices[i] = indices[i]; dteptr->blocklens[i] = blocklens[i]; ! ub = indices[i] + (blocklens[i] * old_type->extent) ; lb = indices[i]; if (ub > lb) { if ( high < ub ) high = ub; if ( low > lb ) low = lb; --- 94,108 ---- return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_HINDEXED" ); low = indices[0]; high = indices[0] + ! ((MPI_Aint)blocklens[0] * old_dtype_ptr->extent); real_lb = indices[0]; real_ub = real_lb; for (i = 0; i < count; i++) { dteptr->indices[i] = indices[i]; dteptr->blocklens[i] = blocklens[i]; ! ub = indices[i] + (blocklens[i] * old_dtype_ptr->extent) ; lb = indices[i]; if (ub > lb) { if ( high < ub ) high = ub; if ( low > lb ) low = lb; *************** *** 109,135 **** if ( low > ub ) low = ub; } if (indices[i] < real_lb) real_lb = indices[i]; if (indices[i] + ! ((MPI_Aint)blocklens[i] * (old_type->real_ub - old_type->real_lb)) > real_ub) real_ub = indices[i] + ! (blocklens[i] * (old_type->real_ub - old_type->real_lb)); dteptr->elements += blocklens[i]; } /* Set the upper/lower bounds and the extent and size */ ! if (old_type->has_lb) ! dteptr->lb = old_type->lb; else dteptr->lb = low; ! if (old_type->has_ub) ! dteptr->ub = old_type->ub; else dteptr->ub = high; dteptr->extent = high - low; ! dteptr->size = dteptr->elements * old_type->size; dteptr->real_ub = real_ub; dteptr->real_lb = real_lb; /* --- 112,138 ---- if ( low > ub ) low = ub; } if (indices[i] < real_lb) real_lb = indices[i]; if (indices[i] + ! ((MPI_Aint)blocklens[i] * (old_dtype_ptr->real_ub - old_dtype_ptr->real_lb)) > real_ub) real_ub = indices[i] + ! (blocklens[i] * (old_dtype_ptr->real_ub - old_dtype_ptr->real_lb)); dteptr->elements += blocklens[i]; } /* Set the upper/lower bounds and the extent and size */ ! if (old_dtype_ptr->has_lb) ! dteptr->lb = old_dtype_ptr->lb; else dteptr->lb = low; ! if (old_dtype_ptr->has_ub) ! dteptr->ub = old_dtype_ptr->ub; else dteptr->ub = high; dteptr->extent = high - low; ! dteptr->size = dteptr->elements * old_dtype_ptr->size; dteptr->real_ub = real_ub; dteptr->real_lb = real_lb; /* *************** *** 136,143 **** dteptr->elements contains the number of elements in the top level type. to get the total elements, we multiply by the number of elements in the old type. */ ! dteptr->elements *= old_type->elements; return (mpi_errno); } --- 139,146 ---- dteptr->elements contains the number of elements in the top level type. to get the total elements, we multiply by the number of elements in the old type. */ ! dteptr->elements *= old_dtype_ptr->elements; return (mpi_errno); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_hindf.c mpich/src/pt2pt/type_hindf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_hindf.c Thu Jun 6 07:49:01 1996 --- mpich/src/pt2pt/type_hindf.c Fri Sep 27 09:43:00 1996 *************** *** 33,52 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_hindexed_ ANSI_ARGS(( int *, int [], int [], MPI_Datatype, MPI_Datatype *, int * )); void mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, __ierr ) int*count; int blocklens[]; int indices[]; ! MPI_Datatype old_type; MPI_Datatype *newtype; int *__ierr; { - MPI_Datatype lnewtype = 0; MPI_Aint *c_indices; int i; if (*count > 0) { --- 33,51 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_hindexed_ ANSI_ARGS(( int *, int [], int [], MPI_Datatype *, MPI_Datatype *, int * )); void mpi_type_hindexed_( count, blocklens, indices, old_type, newtype, __ierr ) int*count; int blocklens[]; int indices[]; ! MPI_Datatype *old_type; MPI_Datatype *newtype; int *__ierr; { MPI_Aint *c_indices; int i; if (*count > 0) { *************** *** 58,74 **** for (i=0; i<*count; i++) { c_indices[i] = (MPI_Aint) indices[i]; } ! *__ierr = MPI_Type_hindexed(*count,blocklens,c_indices, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(old_type) ), ! &lnewtype); ! *(int*)newtype = MPIR_FromPointer(lnewtype); FREE( c_indices ); } else if (*count == 0) { *__ierr = MPI_SUCCESS; ! *(int*)newtype = 0; } else { *__ierr = MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_COUNT, "Negative count in MPI_TYPE_HINDEXED" ); --- 57,71 ---- for (i=0; i<*count; i++) { c_indices[i] = (MPI_Aint) indices[i]; } ! *__ierr = MPI_Type_hindexed(*count,blocklens,c_indices,*old_type, ! newtype); FREE( c_indices ); } else if (*count == 0) { *__ierr = MPI_SUCCESS; ! *newtype = 0; } else { *__ierr = MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_COUNT, "Negative count in MPI_TYPE_HINDEXED" ); diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_hvec.c mpich/src/pt2pt/type_hvec.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_hvec.c Thu Apr 11 15:25:26 1996 --- mpich/src/pt2pt/type_hvec.c Wed Sep 25 16:26:53 1996 *************** *** 1,6 **** /* ! * $Id: type_hvec.c,v 1.20 1996/04/11 20:25:26 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_hvec.c,v 1.20 1996/04/11 20:25:26 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 43,60 **** MPI_Aint stride; MPI_Datatype old_type; MPI_Datatype *newtype; { ! MPI_Datatype dteptr; int mpi_errno = MPI_SUCCESS; /* Check for bad arguments */ ! MPIR_GET_REAL_DATATYPE(old_type) ! if ( MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,old_type) || ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ( (blocklen < 0) && (mpi_errno = MPI_ERR_ARG) ) || ! ( (old_type->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_type->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_HVECTOR" ); /* Are we making a null datatype? */ --- 43,61 ---- MPI_Aint stride; MPI_Datatype old_type; MPI_Datatype *newtype; { ! struct MPIR_DATATYPE *dteptr; int mpi_errno = MPI_SUCCESS; + struct MPIR_DATATYPE *old_dtype_ptr; /* Check for bad arguments */ ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_type); ! if ( ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ( (blocklen < 0) && (mpi_errno = MPI_ERR_ARG) ) || ! ( (old_dtype_ptr->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_dtype_ptr->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_HVECTOR" ); /* Are we making a null datatype? */ *************** *** 62,113 **** return MPI_Type_contiguous( 0, MPI_INT, newtype ); } /* Handle the case where blocklen & stride make a contiguous type */ ! if ( ((blocklen * old_type->extent) == stride) || (count == 1) ) return MPI_Type_contiguous ( count * blocklen, old_type, newtype ); /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ),MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_HVECTOR" ); ! *newtype = dteptr; MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_HVECTOR; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->is_contig = 0; dteptr->ref_count = 1; ! dteptr->align = old_type->align; ! dteptr->elements = count * blocklen * old_type->elements; dteptr->stride = stride; dteptr->blocklen = blocklen; ! dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type); dteptr->count = count; ! dteptr->has_ub = old_type->has_ub; ! dteptr->has_lb = old_type->has_lb; /* Set the upper/lower bounds and the extent and size */ ! dteptr->extent = ((count-1) * stride) + (blocklen * old_type->extent); if (dteptr->extent < 0) { ! dteptr->ub = old_type->lb; dteptr->lb = dteptr->ub + dteptr->extent; ! dteptr->real_ub= old_type->real_lb; dteptr->real_lb= dteptr->real_ub + ((count-1) * stride) + ! (blocklen * (old_type->real_ub - old_type->real_lb)); dteptr->extent = -dteptr->extent; } else { ! dteptr->lb = old_type->lb; if (dteptr->has_ub) ! dteptr->ub = old_type->ub; else dteptr->ub = dteptr->lb + dteptr->extent; ! dteptr->real_lb = old_type->real_lb; dteptr->real_ub = dteptr->real_lb + ((count-1) * stride) + ! (blocklen * (old_type->real_ub - old_type->real_lb)); } dteptr->size = count * blocklen * dteptr->old_type->size; return (mpi_errno); --- 63,115 ---- return MPI_Type_contiguous( 0, MPI_INT, newtype ); } /* Handle the case where blocklen & stride make a contiguous type */ ! if ( ((blocklen * old_dtype_ptr->extent) == stride) || (count == 1) ) return MPI_Type_contiguous ( count * blocklen, old_type, newtype ); /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(struct MPIR_DATATYPE *) MPIR_SBalloc( MPIR_dtes ),MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_HVECTOR" ); ! *newtype = (MPI_Datatype) MPIR_FromPointer( dteptr ); MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_HVECTOR; dteptr->committed = 0; dteptr->basic = 0; dteptr->permanent = 0; dteptr->is_contig = 0; dteptr->ref_count = 1; ! dteptr->align = old_dtype_ptr->align; ! dteptr->elements = count * blocklen * old_dtype_ptr->elements; dteptr->stride = stride; dteptr->blocklen = blocklen; ! dteptr->old_type = MPIR_Type_dup (old_dtype_ptr); dteptr->count = count; ! dteptr->has_ub = old_dtype_ptr->has_ub; ! dteptr->has_lb = old_dtype_ptr->has_lb; ! dteptr->self = *newtype; /* Set the upper/lower bounds and the extent and size */ ! dteptr->extent = ((count-1) * stride) + (blocklen * old_dtype_ptr->extent); if (dteptr->extent < 0) { ! dteptr->ub = old_dtype_ptr->lb; dteptr->lb = dteptr->ub + dteptr->extent; ! dteptr->real_ub= old_dtype_ptr->real_lb; dteptr->real_lb= dteptr->real_ub + ((count-1) * stride) + ! (blocklen * (old_dtype_ptr->real_ub - old_dtype_ptr->real_lb)); dteptr->extent = -dteptr->extent; } else { ! dteptr->lb = old_dtype_ptr->lb; if (dteptr->has_ub) ! dteptr->ub = old_dtype_ptr->ub; else dteptr->ub = dteptr->lb + dteptr->extent; ! dteptr->real_lb = old_dtype_ptr->real_lb; dteptr->real_ub = dteptr->real_lb + ((count-1) * stride) + ! (blocklen * (old_dtype_ptr->real_ub - old_dtype_ptr->real_lb)); } dteptr->size = count * blocklen * dteptr->old_type->size; return (mpi_errno); diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_hvecf.c mpich/src/pt2pt/type_hvecf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_hvecf.c Thu Jun 6 07:55:37 1996 --- mpich/src/pt2pt/type_hvecf.c Fri Sep 27 09:41:22 1996 *************** *** 28,50 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_hvector_ ANSI_ARGS(( int *, int *, int *, MPI_Datatype, MPI_Datatype *, int * )); void mpi_type_hvector_( count, blocklen, stride, old_type, newtype, __ierr ) int *count; int *blocklen; int *stride; ! MPI_Datatype old_type; MPI_Datatype *newtype; int *__ierr; { - MPI_Datatype lnewtype = 0; MPI_Aint c_stride = (MPI_Aint)*stride; ! *__ierr = MPI_Type_hvector(*count,*blocklen,c_stride, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(old_type) ), ! &lnewtype); ! *(int*)newtype = MPIR_FromPointer(lnewtype); } --- 28,46 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_hvector_ ANSI_ARGS(( int *, int *, int *, MPI_Datatype *, MPI_Datatype *, int * )); void mpi_type_hvector_( count, blocklen, stride, old_type, newtype, __ierr ) int *count; int *blocklen; int *stride; ! MPI_Datatype *old_type; MPI_Datatype *newtype; int *__ierr; { MPI_Aint c_stride = (MPI_Aint)*stride; ! *__ierr = MPI_Type_hvector(*count,*blocklen,c_stride,*old_type,newtype); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_ind.c mpich/src/pt2pt/type_ind.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_ind.c Thu Apr 11 15:25:32 1996 --- mpich/src/pt2pt/type_ind.c Wed Sep 25 13:05:27 1996 *************** *** 1,6 **** /* ! * $Id: type_ind.c,v 1.20 1996/04/11 20:25:32 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_ind.c,v 1.20 1996/04/11 20:25:32 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 64,79 **** { MPI_Aint *hindices; int i, mpi_errno = MPI_SUCCESS; int total_count; MPIR_ERROR_DECL; /* Check for bad arguments */ ! MPIR_GET_REAL_DATATYPE(old_type) ! if ( MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,old_type) || ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_type->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_type->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_INDEXED" ); /* Are we making a null datatype? */ --- 64,81 ---- { MPI_Aint *hindices; int i, mpi_errno = MPI_SUCCESS; int total_count; + struct MPIR_DATATYPE *old_dtype_ptr; MPIR_ERROR_DECL; /* Check for bad arguments */ ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_type); ! MPIR_TEST_DTYPE(old_type,old_dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_INDEXED"); ! if ( ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ! ( (old_dtype_ptr->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_dtype_ptr->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_INDEXED" ); /* Are we making a null datatype? */ *************** *** 94,176 **** by extent(old_type), and using that */ MPIR_ALLOC(hindices,(MPI_Aint *)MALLOC(count*sizeof(MPI_Aint)), MPI_COMM_WORLD,MPI_ERR_EXHAUSTED,"Error in MPI_TYPE_INDEXED"); for (i=0; iextent; } MPIR_ERROR_PUSH(MPI_COMM_WORLD); mpi_errno = MPI_Type_hindexed( count, blocklens, hindices, old_type, newtype ); MPIR_ERROR_POP(MPI_COMM_WORLD); FREE(hindices); MPIR_RETURN(MPI_COMM_WORLD,mpi_errno, "Error in MPI_TYPE_INDEXED"); - #ifdef FOO - /* Create and fill in the datatype */ - MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ), MPI_COMM_WORLD, - MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_INDEXED" ); - *newtype = dteptr; - MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) - dteptr->dte_type = MPIR_INDEXED; - dteptr->committed = 0; - dteptr->basic = 0; - dteptr->permanent = 0; - dteptr->is_contig = 0; - dteptr->ref_count = 1; - dteptr->align = old_type->align; - dteptr->old_type = (MPI_Datatype)MPIR_Type_dup (old_type); - dteptr->count = count; - dteptr->elements = 0; - dteptr->has_ub = old_type->has_ub; - dteptr->has_lb = old_type->has_lb; - - /* Create indices and blocklens arrays and fill them */ - dteptr->indices = ( MPI_Aint * ) MALLOC( count * sizeof( MPI_Aint ) ); - dteptr->blocklens = ( int * ) MALLOC( count * sizeof( int ) ); - if (!dteptr->indices || !dteptr->blocklens) - return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, - "Out of space in MPI_TYPE_HINDEXED" ); - high = (indices[0] + blocklens[0]) * old_type->extent; - low = (indices[0] * old_type->extent); - if (high < low) { - tmp = high; - high = low; - low = tmp; - } - for (i = 0; i < count; i++) { - dteptr->indices[i] = indices[i] * old_type->extent; - dteptr->blocklens[i] = blocklens[i]; - ub = dteptr->indices[i] + (blocklens[i] * old_type->extent) ; - lb = dteptr->indices[i]; - if (ub > lb) { - if ( high < ub ) high = ub; - if ( low > lb ) low = lb; - } - else { - if ( high < lb ) high = lb; - if ( low > ub ) low = ub; - } - dteptr->elements += blocklens[i]; - } - - /* Set the upper/lower bounds and the extent and size */ - if (old_type->has_lb) - dteptr->lb = old_type->lb; - else - dteptr->lb = low; - if (old_type->has_ub) - dteptr->ub = old_type->ub; - else - dteptr->ub = high; - dteptr->extent = high - low; - dteptr->size = dteptr->elements * old_type->size; - - /* - dteptr->elements contains the number of elements in the top level - type. to get the total elements, we multiply by the number of elements - in the old type. - */ - /* Using *= on hpux with -O optimization causes this routine to fail (!) */ - dteptr->elements = dteptr->elements * old_type->elements; - - return (mpi_errno); - #endif } --- 96,108 ---- by extent(old_type), and using that */ MPIR_ALLOC(hindices,(MPI_Aint *)MALLOC(count*sizeof(MPI_Aint)), MPI_COMM_WORLD,MPI_ERR_EXHAUSTED,"Error in MPI_TYPE_INDEXED"); for (i=0; iextent; } MPIR_ERROR_PUSH(MPI_COMM_WORLD); mpi_errno = MPI_Type_hindexed( count, blocklens, hindices, old_type, newtype ); MPIR_ERROR_POP(MPI_COMM_WORLD); FREE(hindices); MPIR_RETURN(MPI_COMM_WORLD,mpi_errno, "Error in MPI_TYPE_INDEXED"); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_indf.c mpich/src/pt2pt/type_indf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_indf.c Thu Jun 6 08:21:19 1996 --- mpich/src/pt2pt/type_indf.c Fri Sep 27 09:43:32 1996 *************** *** 28,48 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_indexed_ ANSI_ARGS(( int *, int [], int [], MPI_Datatype, MPI_Datatype *, int * )); void mpi_type_indexed_( count, blocklens, indices, old_type, newtype, __ierr ) int*count; int blocklens[]; int indices[]; ! MPI_Datatype old_type; MPI_Datatype *newtype; int *__ierr; { ! MPI_Datatype lnewtype = 0; ! *__ierr = MPI_Type_indexed(*count,blocklens,indices, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(old_type) ), ! &lnewtype); ! *(int*)newtype = MPIR_FromPointer(lnewtype); } --- 28,44 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_indexed_ ANSI_ARGS(( int *, int [], int [], MPI_Datatype *, MPI_Datatype *, int * )); void mpi_type_indexed_( count, blocklens, indices, old_type, newtype, __ierr ) int*count; int blocklens[]; int indices[]; ! MPI_Datatype *old_type; MPI_Datatype *newtype; int *__ierr; { ! *__ierr = MPI_Type_indexed(*count,blocklens,indices,*old_type,newtype ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_lb.c mpich/src/pt2pt/type_lb.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_lb.c Thu Apr 11 15:25:40 1996 --- mpich/src/pt2pt/type_lb.c Wed Sep 25 13:05:26 1996 *************** *** 1,6 **** /* ! * $Id: type_lb.c,v 1.10 1996/04/11 20:25:40 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_lb.c,v 1.10 1996/04/11 20:25:40 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 32,47 **** MPI_Datatype datatype; MPI_Aint *displacement; { int mpi_errno; ! if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,datatype) || ! MPIR_TEST_ARG(displacement)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_LB" ); /* Assign the lb and return */ ! ! MPIR_GET_REAL_DATATYPE(datatype) ! (*displacement) = datatype->lb; return (MPI_SUCCESS); } --- 32,48 ---- MPI_Datatype datatype; MPI_Aint *displacement; { int mpi_errno; + struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_LB"); ! ! if (MPIR_TEST_ARG(displacement)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_LB" ); /* Assign the lb and return */ ! (*displacement) = dtype_ptr->lb; return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_lbf.c mpich/src/pt2pt/type_lbf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_lbf.c Thu Jun 6 07:51:47 1996 --- mpich/src/pt2pt/type_lbf.c Fri Sep 27 09:30:23 1996 *************** *** 28,43 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_lb_ ANSI_ARGS(( MPI_Datatype, int *, int * )); void mpi_type_lb_ ( datatype, displacement, __ierr ) ! MPI_Datatype datatype; int *displacement; int *__ierr; { MPI_Aint c_displacement; ! *__ierr = MPI_Type_lb( ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), &c_displacement); /* Should check for truncation */ *displacement = (int)c_displacement; } --- 28,42 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_lb_ ANSI_ARGS(( MPI_Datatype*, int *, int * )); void mpi_type_lb_ ( datatype, displacement, __ierr ) ! MPI_Datatype *datatype; int *displacement; int *__ierr; { MPI_Aint c_displacement; ! *__ierr = MPI_Type_lb(*datatype, &c_displacement); /* Should check for truncation */ *displacement = (int)c_displacement; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_size.c mpich/src/pt2pt/type_size.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_size.c Thu Apr 11 15:25:46 1996 --- mpich/src/pt2pt/type_size.c Wed Sep 25 13:05:23 1996 *************** *** 1,6 **** /* ! * $Id: type_size.c,v 1.9 1996/04/11 20:25:46 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_size.c,v 1.9 1996/04/11 20:25:46 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 32,45 **** MPI_Datatype datatype; int *size; { int mpi_errno; ! if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,datatype) || MPIR_TEST_ARG(size)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_SIZE" ); /* Assign the size and return */ ! /* For SOME versions, could use just MPIR_DATATYPE_SIZE */ ! MPIR_GET_REAL_DATATYPE(datatype) ! (*size) = (int)(datatype->size); return (MPI_SUCCESS); } --- 32,48 ---- MPI_Datatype datatype; int *size; { int mpi_errno; ! ! struct MPIR_DATATYPE *dtype_ptr; ! if (MPIR_TEST_ARG(size)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_SIZE" ); + dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); + MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_SIZE"); + /* Assign the size and return */ ! (*size) = (int)(dtype_ptr->size); return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_sizef.c mpich/src/pt2pt/type_sizef.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_sizef.c Thu Jun 6 07:55:35 1996 --- mpich/src/pt2pt/type_sizef.c Fri Sep 27 09:37:31 1996 *************** *** 28,45 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_size_ ANSI_ARGS(( MPI_Datatype, int *, int * )); void mpi_type_size_ ( datatype, size, __ierr ) ! MPI_Datatype datatype; int *size; int *__ierr; { /* MPI_Aint c_size;*/ int c_size; ! *__ierr = MPI_Type_size( ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), &c_size); /* Should check for truncation */ *size = (int)c_size; } --- 28,44 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_size_ ANSI_ARGS(( MPI_Datatype *, int *, int * )); void mpi_type_size_ ( datatype, size, __ierr ) ! MPI_Datatype *datatype; int *size; int *__ierr; { /* MPI_Aint c_size;*/ int c_size; ! *__ierr = MPI_Type_size(*datatype, &c_size); /* Should check for truncation */ *size = (int)c_size; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_struct.c mpich/src/pt2pt/type_struct.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_struct.c Wed Jul 17 13:04:08 1996 --- mpich/src/pt2pt/type_struct.c Thu Sep 26 08:55:27 1996 *************** *** 1,6 **** /* ! * $Id: type_struct.c,v 1.29 1996/06/07 15:07:30 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_struct.c,v 1.29 1996/06/07 15:07:30 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 72,80 **** MPI_Aint indices[]; MPI_Datatype old_types[]; MPI_Datatype *newtype; { ! MPI_Datatype dteptr; MPI_Aint ub, lb, high, low, real_ub, real_lb, real_init; int high_init = 0, low_init = 0; int i, mpi_errno = MPI_SUCCESS; MPI_Aint ub_marker, lb_marker; --- 72,80 ---- MPI_Aint indices[]; MPI_Datatype old_types[]; MPI_Datatype *newtype; { ! struct MPIR_DATATYPE* dteptr; MPI_Aint ub, lb, high, low, real_ub, real_lb, real_init; int high_init = 0, low_init = 0; int i, mpi_errno = MPI_SUCCESS; MPI_Aint ub_marker, lb_marker; *************** *** 96,119 **** total_count += blocklens[i]; if ( blocklens[i] < 0) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_OTHER, "Negative block length in MPI_TYPE_STRUCT"); - MPIR_GET_REAL_DATATYPE(old_types[i]) if ( old_types[i] == MPI_DATATYPE_NULL ) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_TYPE, "Null type in MPI_TYPE_STRUCT"); - if (MPIR_TEST_IS_DATATYPE( MPI_COMM_WORLD, old_types[i] )) - return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_TYPE, - "Invalid old datatype in MPI_TYPE_STRUCT" ); } if (total_count == 0) { return MPI_Type_contiguous( 0, MPI_INT, newtype ); } ! /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(MPI_Datatype) MPIR_SBalloc( MPIR_dtes ),MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_STRUCT" ); ! *newtype = dteptr; MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_STRUCT; dteptr->committed = 0; dteptr->basic = 0; --- 96,115 ---- total_count += blocklens[i]; if ( blocklens[i] < 0) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_OTHER, "Negative block length in MPI_TYPE_STRUCT"); if ( old_types[i] == MPI_DATATYPE_NULL ) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_TYPE, "Null type in MPI_TYPE_STRUCT"); } if (total_count == 0) { return MPI_Type_contiguous( 0, MPI_INT, newtype ); } ! /* Create and fill in the datatype */ ! MPIR_ALLOC(dteptr,(struct MPIR_DATATYPE *) MPIR_SBalloc( MPIR_dtes ),MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_STRUCT" ); ! *newtype = (MPI_Datatype) MPIR_FromPointer( dteptr ); MPIR_SET_COOKIE(dteptr,MPIR_DATATYPE_COOKIE) dteptr->dte_type = MPIR_STRUCT; dteptr->committed = 0; dteptr->basic = 0; *************** *** 125,151 **** dteptr->size = 0; dteptr->align = 1; dteptr->has_ub = 0; dteptr->has_lb = 0; /* Create indices and blocklens arrays and fill them */ dteptr->indices = ( MPI_Aint * ) MALLOC( count * sizeof( MPI_Aint ) ); dteptr->blocklens = ( int * ) MALLOC( count * sizeof( int ) ); dteptr->old_types = ! ( MPI_Datatype * ) MALLOC(count*sizeof(MPI_Datatype)); if (!dteptr->indices || !dteptr->blocklens || !dteptr->old_types) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_STRUCT" ); high = low = ub = lb = 0; real_ub = real_lb = 0; real_init = 0; for (i = 0; i < count; i++) { ! dteptr->old_types[i] = (MPI_Datatype)MPIR_Type_dup (old_types[i]); dteptr->indices[i] = indices[i]; dteptr->blocklens[i] = blocklens[i]; ! if (dteptr->align < old_types[i]->align) ! dteptr->align = old_types[i]->align; ! if ( old_types[i]->dte_type == MPIR_UB ) { if (ub_found) { if (indices[i] > ub_marker) ub_marker = indices[i]; } --- 121,153 ---- dteptr->size = 0; dteptr->align = 1; dteptr->has_ub = 0; dteptr->has_lb = 0; + dteptr->self = *newtype; /* Create indices and blocklens arrays and fill them */ dteptr->indices = ( MPI_Aint * ) MALLOC( count * sizeof( MPI_Aint ) ); dteptr->blocklens = ( int * ) MALLOC( count * sizeof( int ) ); dteptr->old_types = ! ( struct MPIR_DATATYPE ** )MALLOC(count*sizeof(struct MPIR_DATATYPE *)); if (!dteptr->indices || !dteptr->blocklens || !dteptr->old_types) return MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, "Out of space in MPI_TYPE_STRUCT" ); high = low = ub = lb = 0; real_ub = real_lb = 0; real_init = 0; for (i = 0; i < count; i++) { ! struct MPIR_DATATYPE *old_dtype_ptr; ! ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_types[i]); ! MPIR_TEST_DTYPE(old_types[i],old_dtype_ptr,MPI_COMM_WORLD, ! "MPI_TYPE_STRUCT"); ! dteptr->old_types[i] = MPIR_Type_dup (old_dtype_ptr); dteptr->indices[i] = indices[i]; dteptr->blocklens[i] = blocklens[i]; ! if (dteptr->align < old_dtype_ptr->align) ! dteptr->align = old_dtype_ptr->align; ! if ( old_dtype_ptr->dte_type == MPIR_UB ) { if (ub_found) { if (indices[i] > ub_marker) ub_marker = indices[i]; } *************** *** 153,161 **** ub_marker = indices[i]; ub_found = 1; } } ! else if ( old_types[i]->dte_type == MPIR_LB ) { if (lb_found) { if ( indices[i] < lb_marker ) lb_marker = indices[i]; } --- 155,163 ---- ub_marker = indices[i]; ub_found = 1; } } ! else if ( old_dtype_ptr->dte_type == MPIR_LB ) { if (lb_found) { if ( indices[i] < lb_marker ) lb_marker = indices[i]; } *************** *** 167,196 **** else { /* Since the datatype is NOT a UB or LB, save the real limits */ if (!real_init) { real_init = 1; ! real_lb = old_types[i]->real_lb; ! real_ub = old_types[i]->real_ub; } else { ! if (old_types[i]->real_lb < real_lb) ! real_lb = old_types[i]->real_lb; ! if (old_types[i]->real_ub > real_ub) ! real_ub = old_types[i]->real_ub; } /* Next, check to see if datatype has an MPI_LB or MPI_UB within it... */ ! if (old_types[i]->has_ub) { ub_found = 1; ! ub_marker = old_types[i]->ub; } ! if (old_types[i]->has_lb) { lb_found = 1; ! lb_marker = old_types[i]->lb; } /* Get the ub/lb from the datatype (if a MPI_UB or MPI_LB was found, then these values will be ignored). */ ! ub = indices[i] + (blocklens[i] * old_types[i]->extent) ; lb = indices[i]; if (!high_init) { high = ub; high_init = 1; } else if (ub > high) high = ub; if (!low_init ) { low = lb; low_init = 1; } --- 169,198 ---- else { /* Since the datatype is NOT a UB or LB, save the real limits */ if (!real_init) { real_init = 1; ! real_lb = old_dtype_ptr->real_lb; ! real_ub = old_dtype_ptr->real_ub; } else { ! if (old_dtype_ptr->real_lb < real_lb) ! real_lb = old_dtype_ptr->real_lb; ! if (old_dtype_ptr->real_ub > real_ub) ! real_ub = old_dtype_ptr->real_ub; } /* Next, check to see if datatype has an MPI_LB or MPI_UB within it... */ ! if (old_dtype_ptr->has_ub) { ub_found = 1; ! ub_marker = old_dtype_ptr->ub; } ! if (old_dtype_ptr->has_lb) { lb_found = 1; ! lb_marker = old_dtype_ptr->lb; } /* Get the ub/lb from the datatype (if a MPI_UB or MPI_LB was found, then these values will be ignored). */ ! ub = indices[i] + (blocklens[i] * old_dtype_ptr->extent) ; lb = indices[i]; if (!high_init) { high = ub; high_init = 1; } else if (ub > high) high = ub; if (!low_init ) { low = lb; low_init = 1; } *************** *** 202,218 **** else { if ( high < lb ) high = lb; if ( low > ub ) low = ub; } ! dteptr->elements += (blocklens[i] * old_types[i]->elements); } } ! ! for (i=0; i<(count-1); i++) { ! size = old_types[i]->size * blocklens[i]; ! dteptr->size += size; } ! dteptr->size += (blocklens[i] * old_types[i]->size); /* Set the upper/lower bounds and the extent and size */ if (lb_found) { dteptr->lb = lb_marker; --- 204,221 ---- else { if ( high < lb ) high = lb; if ( low > ub ) low = ub; } ! dteptr->elements += (blocklens[i] * old_dtype_ptr->elements); } + if (i < count - 1) { + size = old_dtype_ptr->size * blocklens[i]; + dteptr->size += size; } ! else { ! dteptr->size += (blocklens[i] * old_dtype_ptr->size); } ! } /* Set the upper/lower bounds and the extent and size */ if (lb_found) { dteptr->lb = lb_marker; diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_structf.c mpich/src/pt2pt/type_structf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_structf.c Fri Jun 14 09:24:30 1996 --- mpich/src/pt2pt/type_structf.c Thu Sep 26 09:06:06 1996 *************** *** 44,68 **** void mpi_type_struct_( count, blocklens, indices, old_types, newtype, __ierr ) int *count; int blocklens[]; int indices[]; - #ifdef POINTER_64_BITS - /* If old_types is an ARRAY of MPI_Datatype, then if pointers and Fortran - integers are different lengths, this code will be confused. - */ - int old_types[]; - #else MPI_Datatype old_types[]; - #endif MPI_Datatype *newtype; int *__ierr; { - MPI_Datatype lnewtype = 0; MPI_Aint *c_indices; int i; - #ifdef POINTER_64_BITS - MPI_Datatype *old; - #endif if (*count > 0) { /* We really only need to do this when sizeof(MPI_Aint) != sizeof(INTEGER) */ --- 44,57 ---- *************** *** 72,103 **** for (i=0; i<*count; i++) { c_indices[i] = (MPI_Aint) indices[i]; } } else if (*count == 0) { *__ierr = MPI_SUCCESS; ! *(int*)newtype = 0; } else { *__ierr = MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_COUNT, "Negative count in MPI_TYPE_STRUCT" ); } - #ifdef POINTER_64_BITS - MPIR_FALLOC(old,(MPI_Datatype *)MALLOC( *count * sizeof(MPI_Datatype) ), - MPI_COMM_WORLD, MPI_ERR_EXHAUSTED, - "Out of space in MPI_TYPE_STRUCT" ); - for (i=0; i<*count; i++) { - old[i] = (MPI_Datatype)MPIR_ToPointer(old_types[i]); - } - *__ierr = MPI_Type_struct(*count,blocklens,c_indices,old,&lnewtype); - FREE( old ); - #else - - *__ierr = MPI_Type_struct(*count,blocklens,c_indices,old_types, - &lnewtype); - #endif - - FREE( c_indices ); - *(int*)newtype = MPIR_FromPointer(lnewtype); } --- 61,79 ---- for (i=0; i<*count; i++) { c_indices[i] = (MPI_Aint) indices[i]; } + *__ierr = MPI_Type_struct(*count,blocklens,c_indices,old_types, + newtype); + + FREE( c_indices ); } else if (*count == 0) { *__ierr = MPI_SUCCESS; ! *newtype = 0; } else { *__ierr = MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_COUNT, "Negative count in MPI_TYPE_STRUCT" ); } } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_ub.c mpich/src/pt2pt/type_ub.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_ub.c Thu Apr 11 15:26:05 1996 --- mpich/src/pt2pt/type_ub.c Wed Sep 25 13:05:22 1996 *************** *** 1,6 **** /* ! * $Id: type_ub.c,v 1.10 1996/04/11 20:26:05 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_ub.c,v 1.10 1996/04/11 20:26:05 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 32,45 **** MPI_Datatype datatype; MPI_Aint *displacement; { int mpi_errno; ! if (MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,datatype) || MPIR_TEST_ARG(displacement)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_UB" ); /* Assign the ub and return */ ! MPIR_GET_REAL_DATATYPE(datatype) ! (*displacement) = datatype->ub; return (MPI_SUCCESS); } --- 32,49 ---- MPI_Datatype datatype; MPI_Aint *displacement; { int mpi_errno; ! struct MPIR_DATATYPE *dtype_ptr; ! ! if ( MPIR_TEST_ARG(displacement)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_UB" ); /* Assign the ub and return */ ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! MPIR_TEST_DTYPE(datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_UB"); ! ! (*displacement) = dtype_ptr->ub; return (MPI_SUCCESS); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_ubf.c mpich/src/pt2pt/type_ubf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_ubf.c Thu Jun 6 07:54:49 1996 --- mpich/src/pt2pt/type_ubf.c Fri Sep 27 09:30:26 1996 *************** *** 28,44 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_ub_ ANSI_ARGS(( MPI_Datatype, int *, int * )); void mpi_type_ub_ ( datatype, displacement, __ierr ) ! MPI_Datatype datatype; int *displacement; int *__ierr; { MPI_Aint c_displacement; ! *__ierr = MPI_Type_ub( ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ),&c_displacement); /* Should check for truncation */ *displacement = (int)c_displacement; } --- 28,43 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_ub_ ANSI_ARGS(( MPI_Datatype*, int *, int * )); void mpi_type_ub_ ( datatype, displacement, __ierr ) ! MPI_Datatype *datatype; int *displacement; int *__ierr; { MPI_Aint c_displacement; ! *__ierr = MPI_Type_ub(*datatype,&c_displacement); /* Should check for truncation */ *displacement = (int)c_displacement; } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_util.c mpich/src/pt2pt/type_util.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_util.c Thu Apr 11 15:26:11 1996 --- mpich/src/pt2pt/type_util.c Wed Sep 25 14:07:11 1996 *************** *** 1,6 **** /* ! * $Id: type_util.c,v 1.15 1996/04/11 20:26:11 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_util.c,v 1.15 1996/04/11 20:26:11 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 29,43 **** permanent types until the finalize stage, the reference count is not used to determine whether or not the type is freed during normal program execution. +*/ ! MPI_Datatype MPIR_Type_dup ( datatype ) ! MPI_Datatype datatype; { /* We increment the reference count even for the permanent types, so that an eventual free (in MPI_Finalize) will correctly free these types */ ! datatype->ref_count++; ! return (datatype); } /*+ --- 29,43 ---- permanent types until the finalize stage, the reference count is not used to determine whether or not the type is freed during normal program execution. +*/ ! struct MPIR_DATATYPE * MPIR_Type_dup ( dtype_ptr ) ! struct MPIR_DATATYPE *dtype_ptr; { /* We increment the reference count even for the permanent types, so that an eventual free (in MPI_Finalize) will correctly free these types */ ! dtype_ptr->ref_count++; ! return (dtype_ptr); } /*+ *************** *** 45,54 **** +*/ int MPIR_Type_permanent ( datatype ) MPI_Datatype datatype; { ! if (datatype) ! datatype->permanent = 1; return (MPI_SUCCESS); } /* --- 45,56 ---- +*/ int MPIR_Type_permanent ( datatype ) MPI_Datatype datatype; { ! struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(datatype); ! if (dtype_ptr) ! dtype_ptr->permanent = 1; return (MPI_SUCCESS); } /* *************** *** 62,165 **** int MPIR_Type_free ( datatype ) MPI_Datatype *datatype; { int mpi_errno = MPI_SUCCESS; ! MPI_Datatype dtype = *datatype; /* Check for bad arguments */ ! if (MPIR_TEST_ARG(datatype) || ! MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,dtype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_FREE" ); /* Freeing null datatypes succeeds silently */ ! if ( dtype == MPI_DATATYPE_NULL ) return (MPI_SUCCESS); /* We can't free permanent objects unless finalize has been called */ ! if ( ( dtype->permanent ) && MPIR_Has_been_initialized == 1) { ! if (dtype->ref_count > 1) ! dtype->ref_count--; return MPI_SUCCESS; } /* Free datatype */ ! if ( dtype->ref_count <= 1 ) { /* Free malloc'd memory for various datatypes */ ! if ( (dtype->dte_type == MPIR_INDEXED) || ! (dtype->dte_type == MPIR_HINDEXED) || ! (dtype->dte_type == MPIR_STRUCT) ) { ! FREE ( dtype->indices ); ! FREE ( dtype->blocklens ); } /* Free the old_type if not a struct */ ! if ( (dtype->dte_type != MPIR_STRUCT) && (!dtype->basic) ) ! MPIR_Type_free ( &(dtype->old_type) ); /* Free the old_types of a struct */ ! if (dtype->dte_type == MPIR_STRUCT) { int i; /* Decrease the reference count */ ! for (i=0; icount; i++) ! MPIR_Type_free ( &(dtype->old_types[i]) ); /* Free the malloc'd memory */ ! FREE ( dtype->old_types ); } /* Free the datatype structure */ ! MPIR_SET_COOKIE(dtype,0); /* If the type is permanent and in static storage, we can't free it here... Until all permanent datatypes are placed into static storage, this will leave some storage leaks. */ ! if ( !dtype->permanent ) { ! MPIR_SBfree ( MPIR_dtes, dtype ); } } else ! dtype->ref_count--; /* We have to do this because the permanent types are constants */ ! if ( !dtype->permanent ) (*datatype) = MPI_DATATYPE_NULL; return (mpi_errno); } /* Free the parts of a structure datatype */ void MPIR_Type_free_struct( dtype ) MPI_Datatype dtype; { /* Free malloc'd memory for various datatypes */ ! if ( (dtype->dte_type == MPIR_INDEXED) || ! (dtype->dte_type == MPIR_HINDEXED) || ! (dtype->dte_type == MPIR_STRUCT) ) { ! FREE ( dtype->indices ); ! FREE ( dtype->blocklens ); } /* Free the old_type if not a struct */ ! if ( (dtype->dte_type != MPIR_STRUCT) && (!dtype->basic) ) ! MPIR_Type_free ( &(dtype->old_type) ); /* Free the old_types of a struct */ ! if (dtype->dte_type == MPIR_STRUCT) { ! int i; ! /* Decrease the reference count */ ! for (i=0; icount; i++) ! MPIR_Type_free ( &(dtype->old_types[i]) ); ! /* Free the malloc'd memory */ ! FREE ( dtype->old_types ); } /* Free the datatype structure */ ! MPIR_SET_COOKIE(dtype,0); } /* This routine returns the "real" lb and ub, ignoring any explicitly set TYPE_LB or TYPE_UB. This is needed when allocating space for a --- 64,172 ---- int MPIR_Type_free ( datatype ) MPI_Datatype *datatype; { int mpi_errno = MPI_SUCCESS; ! struct MPIR_DATATYPE *dtype_ptr; /* Check for bad arguments */ ! if (MPIR_TEST_ARG(datatype)) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_FREE" ); /* Freeing null datatypes succeeds silently */ ! if ( *datatype == MPI_DATATYPE_NULL ) return (MPI_SUCCESS); + dtype_ptr = MPIR_GET_DTYPE_PTR(*datatype); + MPIR_TEST_DTYPE(*datatype,dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_FREE"); + /* We can't free permanent objects unless finalize has been called */ ! if ( ( dtype_ptr->permanent ) && MPIR_Has_been_initialized == 1) { ! if (dtype_ptr->ref_count > 1) ! dtype_ptr->ref_count--; return MPI_SUCCESS; } /* Free datatype */ ! if ( dtype_ptr->ref_count <= 1 ) { /* Free malloc'd memory for various datatypes */ ! if ( (dtype_ptr->dte_type == MPIR_INDEXED) || ! (dtype_ptr->dte_type == MPIR_HINDEXED) || ! (dtype_ptr->dte_type == MPIR_STRUCT) ) { ! FREE ( dtype_ptr->indices ); ! FREE ( dtype_ptr->blocklens ); } /* Free the old_type if not a struct */ ! if ( (dtype_ptr->dte_type != MPIR_STRUCT) && (!dtype_ptr->basic) ) ! MPIR_Type_free ( &(dtype_ptr->old_type->self) ); /* Free the old_types of a struct */ ! if (dtype_ptr->dte_type == MPIR_STRUCT) { int i; /* Decrease the reference count */ ! for (i=0; icount; i++) ! MPIR_Type_free ( &(dtype_ptr->old_types[i]->self) ); /* Free the malloc'd memory */ ! FREE ( dtype_ptr->old_types ); } /* Free the datatype structure */ ! MPIR_SET_COOKIE(dtype_ptr,0); /* If the type is permanent and in static storage, we can't free it here... Until all permanent datatypes are placed into static storage, this will leave some storage leaks. */ ! if ( !dtype_ptr->permanent ) { ! MPIR_SBfree ( MPIR_dtes, dtype_ptr ); ! MPIR_RmPointer( *datatype ); } } else ! dtype_ptr->ref_count--; /* We have to do this because the permanent types are constants */ ! if ( !dtype_ptr->permanent ) (*datatype) = MPI_DATATYPE_NULL; return (mpi_errno); } + #ifdef FOO /* Free the parts of a structure datatype */ void MPIR_Type_free_struct( dtype ) MPI_Datatype dtype; { /* Free malloc'd memory for various datatypes */ ! if ( (dtype->dte_type == MPIR_INDEXED) || ! (dtype->dte_type == MPIR_HINDEXED) || ! (dtype->dte_type == MPIR_STRUCT) ) { ! FREE ( dtype->indices ); ! FREE ( dtype->blocklens ); } /* Free the old_type if not a struct */ ! if ( (dtype->dte_type != MPIR_STRUCT) && (!dtype->basic) ) ! MPIR_Type_free ( &(dtype->old_type) ); /* Free the old_types of a struct */ ! if (dtype->dte_type == MPIR_STRUCT) { ! int i; ! /* Decrease the reference count */ ! for (i=0; icount; i++) ! MPIR_Type_free ( &(dtype->old_types[i]) ); ! /* Free the malloc'd memory */ ! FREE ( dtype->old_types ); } /* Free the datatype structure */ ! MPIR_SET_COOKIE(dtype,0); } + #endif /* This routine returns the "real" lb and ub, ignoring any explicitly set TYPE_LB or TYPE_UB. This is needed when allocating space for a *************** *** 176,186 **** /* *lb = dtype->real_lb; *ub = dtype->real_ub; */ ! MPIR_GET_REAL_DATATYPE(dtype) ! *lb = dtype->lb; ! *ub = dtype->ub; } /* * Routine to free a datatype --- 183,195 ---- /* *lb = dtype->real_lb; *ub = dtype->real_ub; */ ! struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(dtype); ! ! *lb = dtype_ptr->lb; ! *ub = dtype_ptr->ub; } /* * Routine to free a datatype *************** *** 187,194 **** */ void MPIR_Free_perm_type( type ) MPI_Datatype *type; { ! if (!type || !(*type)) return; ! (*type)->permanent = 0; ! MPI_Type_free( type ); } --- 196,206 ---- */ void MPIR_Free_perm_type( type ) MPI_Datatype *type; { ! struct MPIR_DATATYPE *dtype_ptr; ! ! if (!type || !(*type)) return; ! dtype_ptr = MPIR_GET_DTYPE_PTR(*type); ! (dtype_ptr)->permanent = 0; ! MPI_Type_free( type ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_vec.c mpich/src/pt2pt/type_vec.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_vec.c Wed Jul 17 13:04:09 1996 --- mpich/src/pt2pt/type_vec.c Wed Sep 25 13:05:20 1996 *************** *** 1,6 **** /* ! * $Id: type_vec.c,v 1.13 1996/07/17 18:04:00 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: type_vec.c,v 1.13 1996/07/17 18:04:00 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 32,48 **** MPI_Datatype old_type; MPI_Datatype *newtype; { int mpi_errno = MPI_SUCCESS; MPIR_ERROR_DECL; /* Check for bad arguments */ ! MPIR_GET_REAL_DATATYPE(old_type) ! if ( MPIR_TEST_IS_DATATYPE(MPI_COMM_WORLD,old_type) || ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ( (blocklen < 0) && (mpi_errno = MPI_ERR_ARG) ) || ! ( (old_type->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_type->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_VECTOR" ); /* Handle the case where blocklen & stride make a contiguous type */ --- 32,50 ---- MPI_Datatype old_type; MPI_Datatype *newtype; { int mpi_errno = MPI_SUCCESS; + struct MPIR_DATATYPE *old_dtype_ptr; MPIR_ERROR_DECL; /* Check for bad arguments */ ! old_dtype_ptr = MPIR_GET_DTYPE_PTR(old_type); ! MPIR_TEST_DTYPE(old_type,old_dtype_ptr,MPI_COMM_WORLD,"MPI_TYPE_VEC"); ! if ( ( (count < 0) && (mpi_errno = MPI_ERR_COUNT) ) || ( (blocklen < 0) && (mpi_errno = MPI_ERR_ARG) ) || ! ( (old_dtype_ptr->dte_type == MPIR_UB) && (mpi_errno = MPI_ERR_TYPE) ) || ! ( (old_dtype_ptr->dte_type == MPIR_LB) && (mpi_errno = MPI_ERR_TYPE) ) ) return MPIR_ERROR( MPI_COMM_WORLD, mpi_errno, "Error in MPI_TYPE_VECTOR" ); /* Handle the case where blocklen & stride make a contiguous type */ *************** *** 55,63 **** } /* Reduce this to the hvector case */ mpi_errno = MPI_Type_hvector ( count, blocklen, ! (MPI_Aint)stride * old_type->extent, old_type, newtype ); MPIR_ERROR_POP(MPI_COMM_WORLD); MPIR_RETURN(MPI_COMM_WORLD,mpi_errno,"Error in MPI_TYPE_VECTOR"); } --- 57,65 ---- } /* Reduce this to the hvector case */ mpi_errno = MPI_Type_hvector ( count, blocklen, ! (MPI_Aint)stride * old_dtype_ptr->extent, old_type, newtype ); MPIR_ERROR_POP(MPI_COMM_WORLD); MPIR_RETURN(MPI_COMM_WORLD,mpi_errno,"Error in MPI_TYPE_VECTOR"); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/type_vecf.c mpich/src/pt2pt/type_vecf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/type_vecf.c Thu Jun 6 08:28:30 1996 --- mpich/src/pt2pt/type_vecf.c Fri Sep 27 09:41:51 1996 *************** *** 28,48 **** #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_vector_ ANSI_ARGS(( int *, int *, int *, MPI_Datatype, MPI_Datatype *, int * )); void mpi_type_vector_( count, blocklen, stride, old_type, newtype, __ierr ) int*count; int*blocklen; int*stride; ! MPI_Datatype old_type; MPI_Datatype *newtype; int *__ierr; { ! MPI_Datatype lnewtype = 0; ! *__ierr = MPI_Type_vector(*count,*blocklen,*stride, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(old_type) ), ! &lnewtype); ! *(int*)newtype = MPIR_FromPointer(lnewtype); } --- 28,44 ---- #endif #endif /* Prototype to suppress warnings about missing prototypes */ ! void mpi_type_vector_ ANSI_ARGS(( int *, int *, int *, MPI_Datatype *, MPI_Datatype *, int * )); void mpi_type_vector_( count, blocklen, stride, old_type, newtype, __ierr ) int*count; int*blocklen; int*stride; ! MPI_Datatype *old_type; MPI_Datatype *newtype; int *__ierr; { ! *__ierr = MPI_Type_vector(*count,*blocklen,*stride,*old_type,newtype ); } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/unpackf.c mpich/src/pt2pt/unpackf.c *** /home/MPI/mpich/current/mpich/src/pt2pt/unpackf.c Thu Jun 6 07:59:12 1996 --- mpich/src/pt2pt/unpackf.c Fri Sep 27 09:34:38 1996 *************** *** 43,51 **** int *insize; int *position; void *outbuf; int *outcount; ! MPI_Datatype datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; --- 43,51 ---- int *insize; int *position; void *outbuf; int *outcount; ! MPI_Datatype *datatype; MPI_Comm comm; int *__ierr; int buflen; va_list ap; *************** *** 66,81 **** if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } outcount = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(datatype) ), ! (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else --- 66,80 ---- if (_numargs() == NUMPARAMS+2) { buflen = va_arg(ap, int) / 8; /* The length is in bits. */ } outcount = va_arg(ap, int *); ! datatype = va_arg(ap, MPI_Datatype*); comm = va_arg(ap, MPI_Comm); __ierr = va_arg(ap, int *); *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! *datatype,(MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #else *************** *** 84,92 **** int*insize; int *position; void *outbuf; int*outcount; ! MPI_Datatype type; MPI_Comm comm; int *__ierr; { _fcd temp; --- 83,91 ---- int*insize; int *position; void *outbuf; int*outcount; ! MPI_Datatype *type; MPI_Comm comm; int *__ierr; { _fcd temp; *************** *** 98,114 **** temp = _fcdtocp(outbuf); outbuf = (void *) temp; } *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(type) ), ! (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_unpack_ ANSI_ARGS(( void *, int *, int *, void *, int *, MPI_Datatype, ! MPI_Comm, int * )); void mpi_unpack_ ( inbuf, insize, position, outbuf, outcount, type, comm, __ierr ) void *inbuf; --- 97,112 ---- temp = _fcdtocp(outbuf); outbuf = (void *) temp; } *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! *type, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif #else /* Prototype to suppress warnings about missing prototypes */ ! void mpi_unpack_ ANSI_ARGS(( void *, int *, int *, void *, int *, ! MPI_Datatype *, MPI_Comm, int * )); void mpi_unpack_ ( inbuf, insize, position, outbuf, outcount, type, comm, __ierr ) void *inbuf; *************** *** 115,127 **** int*insize; int *position; void *outbuf; int*outcount; ! MPI_Datatype type; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! (MPI_Datatype)MPIR_ToPointer( *(int*)(type) ), ! (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif --- 113,124 ---- int*insize; int *position; void *outbuf; int*outcount; ! MPI_Datatype *type; MPI_Comm comm; int *__ierr; { *__ierr = MPI_Unpack(inbuf,*insize,position,MPIR_F_PTR(outbuf),*outcount, ! *type, (MPI_Comm)MPIR_ToPointer( *(int*)(comm) )); } #endif diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/waitall.c mpich/src/pt2pt/waitall.c *** /home/MPI/mpich/current/mpich/src/pt2pt/waitall.c Wed Jun 26 14:27:18 1996 --- mpich/src/pt2pt/waitall.c Mon Oct 14 15:04:22 1996 *************** *** 1,6 **** /* ! * $Id: waitall.c,v 1.35 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: waitall.c,v 1.35 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 164,174 **** --- 164,177 ---- "Could not free allocated send buffer in MPI_WAITALL" ); } #endif if (!request->chandle.persistent) { + MPIR_Type_free( &request->chandle.datatype ); + /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } + */ /*FPRINTF( stderr, "[%d] freeing request %d\n", MPIR_tid, i );*/ MPI_Request_free( &array_of_requests[i] ); /* sets array_of_requests[i] = NULL; */ } *************** *** 224,234 **** --- 227,240 ---- } } #endif if (!request->chandle.persistent) { + MPIR_Type_free( &request->chandle.datatype ); + /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } + */ /*FPRINTF( stderr, "[%d] freeing request %d\n", MPIR_tid, i );*/ MPI_Request_free( &array_of_requests[i] ); /* sets array_of_requests[i] = NULL; */ } diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/waitany.c mpich/src/pt2pt/waitany.c *** /home/MPI/mpich/current/mpich/src/pt2pt/waitany.c Wed Jun 26 14:27:18 1996 --- mpich/src/pt2pt/waitany.c Mon Oct 14 15:08:11 1996 *************** *** 1,6 **** /* ! * $Id: waitany.c,v 1.22 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: waitany.c,v 1.22 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 187,197 **** --- 187,200 ---- } /* Spec requires, but... */ if (!request->chandle.persistent) { + MPIR_Type_free( &request->chandle.datatype ); + /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); } + */ MPI_Request_free( &array_of_requests[i] ); /* array_of_requests[i] = NULL; */ } else { diff -rc4 /home/MPI/mpich/current/mpich/src/pt2pt/waitsome.c mpich/src/pt2pt/waitsome.c *** /home/MPI/mpich/current/mpich/src/pt2pt/waitsome.c Wed Jun 26 14:27:19 1996 --- mpich/src/pt2pt/waitsome.c Mon Oct 14 15:18:35 1996 *************** *** 1,6 **** /* ! * $Id: waitsome.c,v 1.24 1996/06/26 19:27:12 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: waitsome.c,v 1.24 1996/06/26 19:27:12 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 210,220 **** } nfound++; /* Spec requires, but... */ if (!request->chandle.persistent) { ! if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); ! } MPI_Request_free( &array_of_requests[i] ); /* array_of_requests[i] = NULL; */ } else { --- 210,221 ---- } nfound++; /* Spec requires, but... */ if (!request->chandle.persistent) { ! MPIR_Type_free( &request->chandle.datatype ); ! /* if (--request->chandle.datatype->ref_count <= 0) { MPIR_Type_free( &request->chandle.datatype ); ! }*/ MPI_Request_free( &array_of_requests[i] ); /* array_of_requests[i] = NULL; */ } else { diff -rc4 /home/MPI/mpich/current/mpich/src/topol/Makefile.in mpich/src/topol/Makefile.in *** /home/MPI/mpich/current/mpich/src/topol/Makefile.in Thu Jun 6 11:24:50 1996 --- mpich/src/topol/Makefile.in Fri Aug 30 15:40:41 1996 *************** *** 80,88 **** /bin/mv graphdimsgetf.c graphdimsgtf.c ; fi manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 80,88 ---- /bin/mv graphdimsgetf.c graphdimsgtf.c ; fi manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 89,97 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 89,97 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/util/Makefile.in mpich/src/util/Makefile.in *** /home/MPI/mpich/current/mpich/src/util/Makefile.in Mon Apr 8 10:40:10 1996 --- mpich/src/util/Makefile.in Fri Aug 30 15:40:39 1996 *************** *** 61,69 **** manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp --- 61,69 ---- manpages: ../../util/doctext -mpath ../../man/man3 -ext 3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) ../../util/doc2lt $(MPI_CSOURCES) >> ../../rsum.tmp *************** *** 70,78 **** wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http:/www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: --- 70,78 ---- wwwpages: ../../util/doctext -html -mpath ../../www/www3 -I pubinc \ -index ../../www.index -jumpfile ../../jumpfile.list \ -mapref $(MPIR_HOME)/util/mpis.cit \ ! -indexdir "http://www.mcs.anl.gov/mpi/www/www3" -heading MPI \ -quotefmt ../../util/fortnotes ../../util/errnotes \ $(MPI_CSOURCES) source_names: diff -rc4 /home/MPI/mpich/current/mpich/src/util/mpirutil.c mpich/src/util/mpirutil.c *** /home/MPI/mpich/current/mpich/src/util/mpirutil.c Fri Jun 7 10:12:36 1996 --- mpich/src/util/mpirutil.c Tue Sep 24 15:48:19 1996 *************** *** 1,6 **** /* ! * $Id: mpirutil.c,v 1.21 1996/06/07 15:12:34 gropp Exp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: mpirutil.c,v 1.21 1996/06/07 15:12:34 gropp Exp gropp $ * * (C) 1993 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 325,334 **** MPI_Datatype dte; int indent; { int i; ! switch (dte->dte_type) { case MPIR_INT: MPIR_Tab( indent ); printf( "int\n" ); --- 325,337 ---- MPI_Datatype dte; int indent; { int i; + struct MPIR_DATATYPE *dtype_ptr; ! dtype_ptr = MPIR_GET_DTYPE_PTR(dte); ! ! switch (dtype_ptr->dte_type) { case MPIR_INT: MPIR_Tab( indent ); printf( "int\n" ); *************** *** 378,431 **** printf( "unsigned short\n" ); break; case MPIR_CONTIG: MPIR_Tab( indent ); ! printf( "contig, count = %d\n", dte->count ); ! MPIR_dump_dte( dte->old_type, indent + 2 ); break; case MPIR_VECTOR: MPIR_Tab( indent ); printf( "vector, count = %d, stride = %ld, blocklen = %d\n", ! dte->count, (long)dte->stride, dte->blocklen ); ! MPIR_dump_dte( dte->old_type, indent + 2 ); break; case MPIR_HVECTOR: MPIR_Tab( indent ); printf( "hvector, count = %d, stride = %ld, blocklen = %d\n", ! dte->count, (long)dte->stride, dte->blocklen ); ! MPIR_dump_dte( dte->old_type, indent + 2 ); break; case MPIR_INDEXED: MPIR_Tab( indent ); ! printf( "indexed, count = %d\n", dte->count ); ! MPIR_dump_dte( dte->old_type, indent + 2 ); ! for ( i = 0; i < dte->count; i++) { MPIR_Tab( indent + 4 ); printf("index = %ld, blocklen = %d\n", ! dte->indices[i], dte->blocklens[i] ); } break; case MPIR_HINDEXED: MPIR_Tab( indent ); ! printf( "hindexed, count = %d\n", dte->count ); ! MPIR_dump_dte( dte->old_type, indent + 2 ); ! for ( i = 0; i < dte->count; i++) { MPIR_Tab( indent + 4 ); printf("index = %ld, blocklen = %d\n", ! dte->indices[i], dte->blocklens[i] ); } break; case MPIR_STRUCT: MPIR_Tab( indent ); ! printf( "struct, count = %d\n", dte->count ); ! for ( i = 0; i < dte->count; i++) { MPIR_Tab( indent + 2 ); printf("index = %ld, blocklen = %d\n", ! dte->indices[i], dte->blocklens[i] ); ! MPIR_dump_dte( dte->old_types[i], indent + 2 ); } break; case MPIR_COMPLEX: MPIR_Tab( indent ); --- 381,434 ---- printf( "unsigned short\n" ); break; case MPIR_CONTIG: MPIR_Tab( indent ); ! printf( "contig, count = %d\n", dtype_ptr->count ); ! MPIR_dump_dte( dtype_ptr->old_type->self, indent + 2 ); break; case MPIR_VECTOR: MPIR_Tab( indent ); printf( "vector, count = %d, stride = %ld, blocklen = %d\n", ! dtype_ptr->count, (long)dtype_ptr->stride, dtype_ptr->blocklen ); ! MPIR_dump_dte( dtype_ptr->old_type->self, indent + 2 ); break; case MPIR_HVECTOR: MPIR_Tab( indent ); printf( "hvector, count = %d, stride = %ld, blocklen = %d\n", ! dtype_ptr->count, (long)dtype_ptr->stride, dtype_ptr->blocklen ); ! MPIR_dump_dte( dtype_ptr->old_type->self, indent + 2 ); break; case MPIR_INDEXED: MPIR_Tab( indent ); ! printf( "indexed, count = %d\n", dtype_ptr->count ); ! MPIR_dump_dte( dtype_ptr->old_type->self, indent + 2 ); ! for ( i = 0; i < dtype_ptr->count; i++) { MPIR_Tab( indent + 4 ); printf("index = %ld, blocklen = %d\n", ! dtype_ptr->indices[i], dtype_ptr->blocklens[i] ); } break; case MPIR_HINDEXED: MPIR_Tab( indent ); ! printf( "hindexed, count = %d\n", dtype_ptr->count ); ! MPIR_dump_dte( dtype_ptr->old_type->self, indent + 2 ); ! for ( i = 0; i < dtype_ptr->count; i++) { MPIR_Tab( indent + 4 ); printf("index = %ld, blocklen = %d\n", ! dtype_ptr->indices[i], dtype_ptr->blocklens[i] ); } break; case MPIR_STRUCT: MPIR_Tab( indent ); ! printf( "struct, count = %d\n", dtype_ptr->count ); ! for ( i = 0; i < dtype_ptr->count; i++) { MPIR_Tab( indent + 2 ); printf("index = %ld, blocklen = %d\n", ! dtype_ptr->indices[i], dtype_ptr->blocklens[i] ); ! MPIR_dump_dte( dtype_ptr->old_types[i]->self, indent + 2 ); } break; case MPIR_COMPLEX: MPIR_Tab( indent ); diff -rc4 /home/MPI/mpich/current/mpich/src/util/ptrcvt.c mpich/src/util/ptrcvt.c *** /home/MPI/mpich/current/mpich/src/util/ptrcvt.c Fri Jun 7 10:12:36 1996 --- mpich/src/util/ptrcvt.c Tue Oct 15 09:05:35 1996 *************** *** 1,6 **** /* ! * $Id: ptrcvt.c,v 1.12 1996/06/07 15:12:34 gropp Exp $ * * (C) 1994 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ --- 1,6 ---- /* ! * $Id: ptrcvt.c,v 1.12 1996/06/07 15:12:34 gropp Exp gropp $ * * (C) 1994 by Argonne National Laboratory and Mississipi State University. * See COPYRIGHT in top-level directory. */ *************** *** 42,49 **** --- 42,50 ---- #include "tr2.h" #else #include "mpisys.h" #endif + #include "ptrcvt.h" typedef struct _PtrToIdx { int idx; void *ptr; *************** *** 66,73 **** --- 67,76 ---- */ static int Perm_In_Use = 0; static int PermPtr = 0; + static int DebugFlag = 0; + void MPIR_PointerPerm( flag ) int flag; { PermPtr = flag; *************** *** 87,95 **** PtrBlocks[0] = PtrArray; /* Don't start with the first one, whose index is 0. That could break some code. */ ! avail = PtrArray + 1; } void *MPIR_ToPointer( idx ) int idx; --- 90,101 ---- PtrBlocks[0] = PtrArray; /* Don't start with the first one, whose index is 0. That could break some code. */ ! /* In fact, start 128 into the array ... */ ! avail = PtrArray + 128; ! PtrArray[MAX_PTRS-1].next = PtrArray + 1; ! PtrArray[127].next = 0; } void *MPIR_ToPointer( idx ) int idx; *************** *** 110,118 **** return (void *)0; } if (blocknum == 0 && blockidx == 0) return (void *)0; ! return PtrBlocks[blocknum][idx].ptr; } /* Create an index from a pointer */ int MPIR_FromPointer( ptr ) --- 116,128 ---- return (void *)0; } if (blocknum == 0 && blockidx == 0) return (void *)0; ! if (DebugFlag) { ! printf( "ToPointer is %d for pointer %x in block %d\n", ! idx, PtrBlocks[blocknum][blockidx].ptr, blocknum ); ! } ! return PtrBlocks[blocknum][blockidx].ptr; } /* Create an index from a pointer */ int MPIR_FromPointer( ptr ) *************** *** 133,140 **** --- 143,153 ---- avail = avail->next; new->next = 0; idx = new->idx; PtrArray[idx].ptr = ptr; + if (DebugFlag) { + printf( "Pointer %x has idx %d from avail list\n", ptr, idx ); + } return idx; } /* Allocate a new block and add it to the PtrBlock array */ *************** *** 161,168 **** --- 174,185 ---- idx = new->idx; new->ptr = ptr; avail = &PtrBlocks[blocknum][1]; + if (DebugFlag) { + printf( "Pointer %x has idx %d from new block %d at %d\n", + ptr, idx, blocknum, 1 ); + } return idx; } void MPIR_RmPointer( idx ) *************** *** 190,205 **** if (ptridx[blockidx].next) { /* In-use pointers NEVER have next set */ MPIR_ERROR_PUSH_ARG(&idx); MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_INDEX_FREED, ! "Error in MPI object" ); return; } ptridx[blockidx].next = avail; ptridx[blockidx].ptr = 0; avail = PtrArray + blockidx; } int MPIR_UsePointer( fp ) FILE *fp; { int count, perm_in_use; --- 207,229 ---- if (ptridx[blockidx].next) { /* In-use pointers NEVER have next set */ MPIR_ERROR_PUSH_ARG(&idx); MPIR_ERROR( MPI_COMM_WORLD, MPI_ERR_INDEX_FREED, ! "Error in MPI object - already freed" ); return; } + ptridx[blockidx].next = avail; ptridx[blockidx].ptr = 0; avail = PtrArray + blockidx; + if (DebugFlag) { + printf( "Removed idx %d in block %d\n", idx, blocknum ); + } } + /* + * Produce information on the pointer conversions in use on the specified file. + */ int MPIR_UsePointer( fp ) FILE *fp; { int count, perm_in_use; *************** *** 235,239 **** --- 259,313 ---- "# There are %d pointer conversions in use (used for Fortran)\n", in_use ); } return in_use; + } + + /* + * Given a predetermined idx (and corresponding pointer), place in the + * index to pointer table. For simplicity, predefined values MUST be + * in the initial block. + */ + void MPIR_RegPointerIdx( idx, ptr ) + int idx; + void *ptr; + { + PtrToIdx *new; + + if (DoInit) { + DoInit = 0; + MPIR_InitPointer(); + } + if (PermPtr) Perm_In_Use++; + + if (idx > MAX_PTRS) { + fprintf( stderr, "Internal error! Predefined index %d too large!\n", + idx ); + exit( 1 ); + return; + } + + PtrArray[idx].ptr = ptr; + PtrArray[idx].idx = idx; + /* Find the index block and link around it */ + if (avail == PtrArray + idx) { + avail = PtrArray[idx].next; + } + else { + new = avail; + while (new && new->next != PtrArray + idx) new = new->next; + if (new) + new->next = PtrArray[idx].next; + else { + /* If we didn't find the entry, we have a problem ... */ + printf( "Internal Error: Index %d is a duplicate\n", idx ); + exit( 1 ); + avail = 0; + } + } + /* In use pointers have next cleared */ + PtrArray[idx].next = 0; + + if (DebugFlag) { + printf( "Registered index %d with pointer %x\n", idx, ptr ); + } } diff -rc4 /home/MPI/mpich/current/mpich/util/maketar mpich/util/maketar *** /home/MPI/mpich/current/mpich/util/maketar Fri Jul 26 08:26:00 1996 --- mpich/util/maketar Mon Sep 30 12:45:35 1996 *************** *** 111,119 **** cp $MPIR_HOME/profiling/upshot/logfiles/states.c \ mpich-tmp/profiling/upshot/logfiles cp $MPIR_HOME/util/machines/machines.sample mpich-tmp/util/machines find mpich-tmp \( -name 'RCS' -o -name '*.o' -o -name '#*#' -o \ ! -name '*~' -o -name 'mputil.mp*' \) -print | \ sed 's%^%/bin/rm -rf %g' | sh find mpich-tmp/examples -name '*.pg' -exec /bin/rm \{\} \; find mpich-tmp/mpe -name '*.pg' -exec /bin/rm \{\} \; find mpich-tmp/mpe -name 'Makefile' -exec /bin/rm \{\} \; --- 111,120 ---- cp $MPIR_HOME/profiling/upshot/logfiles/states.c \ mpich-tmp/profiling/upshot/logfiles cp $MPIR_HOME/util/machines/machines.sample mpich-tmp/util/machines find mpich-tmp \( -name 'RCS' -o -name '*.o' -o -name '#*#' -o \ ! -name '*~' -o -name 'mputil.mp*' -o -name Makefile -o \ ! -name makefile \) -print | \ sed 's%^%/bin/rm -rf %g' | sh find mpich-tmp/examples -name '*.pg' -exec /bin/rm \{\} \; find mpich-tmp/mpe -name '*.pg' -exec /bin/rm \{\} \; find mpich-tmp/mpe -name 'Makefile' -exec /bin/rm \{\} \; diff -rc4 /home/MPI/mpich/current/mpich/util/mpiCC.in mpich/util/mpiCC.in *** /home/MPI/mpich/current/mpich/util/mpiCC.in Fri Jun 14 10:07:42 1996 --- mpich/util/mpiCC.in Thu Sep 19 09:22:40 1996 *************** *** 8,16 **** linkargs= linkobjs= gettinglinkarg=0 HasDashC=0 ! if [ -z "@CCC@" -o -z "@CCLINKER@" ] ; then echo "No C++ compiler and linker specified when MPICH configured." exit 1 fi for arg in "$@" ; do --- 8,17 ---- linkargs= linkobjs= gettinglinkarg=0 HasDashC=0 ! UsesPmpi=0 ! if [ -z "@CPP_COMPILE@" -o -z "@CCLINKER@" ] ; then echo "No C++ compiler and linker specified when MPICH configured." exit 1 fi for arg in "$@" ; do *************** *** 43,65 **** --- 44,89 ---- gettinglinkarg=1 DoLink=1 fi ;; + -l*) + # This SHOULD be the -l argument. Only for the linker + linkargs="$linkargs $arg" + allargs="$allargs $arg" + ;; -mpilog) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG=-llmpi else echo "-mpilog requires the MPE libraries" fi ;; -mpitrace) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG=-ltmpi else echo "-mpitrace requires the MPE libraries" fi ;; -mpianim) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG="-lampi @MPE_LIBS@ @X_LIB@" else echo "-mpianim requires the MPE libraries" *************** *** 129,137 **** if [ $DoCompile = 1 ] ; then if [ $HasDashC != 1 ] ; then compileargs="-c $compileargs" fi ! $Show @CCC@ @CCFLAGS@ @OPTFLAGS@ -DMPI_@ARCH@ -I@MPIR_HOME@/include \ $compileargs status=$? if [ $status != 0 ] ; then exit $status --- 153,161 ---- if [ $DoCompile = 1 ] ; then if [ $HasDashC != 1 ] ; then compileargs="-c $compileargs" fi ! $Show @CPP_COMPILER@ @CCFLAGS@ @OPTFLAGS@ -DMPI_@ARCH@ -I@MPIR_HOME@/include \ $compileargs status=$? if [ $status != 0 ] ; then exit $status diff -rc4 /home/MPI/mpich/current/mpich/util/mpicc.in mpich/util/mpicc.in *** /home/MPI/mpich/current/mpich/util/mpicc.in Fri Jun 14 10:07:46 1996 --- mpich/util/mpicc.in Thu Sep 19 09:22:42 1996 *************** *** 8,15 **** --- 8,16 ---- linkargs= linkobjs= gettinglinkarg=0 HasDashC=0 + UsesPmpi=0 for arg in "$@" ; do # echo procssing arg $arg # Special processing for -o name if [ $gettinglinkarg = 1 ] ; then *************** *** 39,61 **** --- 40,85 ---- gettinglinkarg=1 DoLink=1 fi ;; + -l*) + # This SHOULD be the -l argument. Only for the linker + linkargs="$linkargs $arg" + allargs="$allargs $arg" + ;; -mpilog) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG=-llmpi else echo "-mpilog requires the MPE libraries" fi ;; -mpitrace) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG=-ltmpi else echo "-mpitrace requires the MPE libraries" fi ;; -mpianim) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG="-lampi @MPE_LIBS@ @X_LIB@" else echo "-mpianim requires the MPE libraries" diff -rc4 /home/MPI/mpich/current/mpich/util/mpif77.in mpich/util/mpif77.in *** /home/MPI/mpich/current/mpich/util/mpif77.in Fri Jun 14 10:07:45 1996 --- mpich/util/mpif77.in Thu Sep 19 09:22:39 1996 *************** *** 8,15 **** --- 8,16 ---- linkargs= linkobjs= gettinglinkarg=0 HasDashC=0 + UsesPmpi=0 for arg in "$@" ; do # echo procssing arg $arg # Special processing for -o name if [ $gettinglinkarg = 1 ] ; then *************** *** 39,61 **** --- 40,85 ---- gettinglinkarg=1 DoLink=1 fi ;; + -l*) + # This SHOULD be the -l argument. Only for the linker + linkargs="$linkargs $arg" + allargs="$allargs $arg" + ;; -mpilog) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG="-lf@MPILIBNAME@ -llmpi" else echo "-mpilog requires the MPE libraries" fi ;; -mpitrace) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG="-lf@MPILIBNAME@ -ltmpi" else echo "-mpitrace requires the MPE libraries" fi ;; -mpianim) + if [ $UsesPmpi = 1 ] ; then + echo "Only one of -mpilog, -mpitrace, or -mpianim may be used." + exit 1 + else + UsesPmpi=1 + fi if [ -n "@MPE_LIBS@" ] ; then MPILOG="-lf@MPILIBNAME@ -lampi @MPE_LIBS@ @X_LIB@" else echo "-mpianim requires the MPE libraries" diff -rc4 /home/MPI/mpich/current/mpich/util/mpiinstall.in mpich/util/mpiinstall.in *** /home/MPI/mpich/current/mpich/util/mpiinstall.in Fri Jul 26 15:19:35 1996 --- mpich/util/mpiinstall.in Mon Oct 7 21:15:13 1996 *************** *** 45,54 **** -manpath=*)MPIMANPATH=`echo $arg | sed -e 's/-manpath=//g'` ;; -libonly) libonly=1 ;; -t) Show=echo just_testing=1 ;; ! -help|-u|-usage) echo "Install MPICH into $PREFIX." echo "-mode=nnnn - mode for regular files. Default is $MODE ." echo "-xmode=nnnn - mode for execuables and directories. Default is $XMODE ." echo "-prefix=path - Destination directory." --- 45,55 ---- -manpath=*)MPIMANPATH=`echo $arg | sed -e 's/-manpath=//g'` ;; -libonly) libonly=1 ;; -t) Show=echo just_testing=1 + failmode="soft" ;; ! -help|-u|-usage|-h) echo "Install MPICH into $PREFIX." echo "-mode=nnnn - mode for regular files. Default is $MODE ." echo "-xmode=nnnn - mode for execuables and directories. Default is $XMODE ." echo "-prefix=path - Destination directory." *************** *** 75,82 **** --- 76,99 ---- if [ -z "$APREFIX" ] ; then APREFIX=$PREFIX fi # + # If libonly, we need to get the correct default machine etc. We could + # get this from the config.status for the device, but the problem is that + # there are MANY items to restore. A better approach is to use an install + # script from the library directory itself. + if [ -n "$libonly" ] ; then + # trialname=`sed -n -e "s/DEFAULT_MACHINE='\(.*\)'/\1/p" \ + # lib/$ARCH/$COMM/config.status` + # if [ -n "$trialname" ] ; then + # DEFAULT_MACHINE="$trialname" + # fi + if [ -x lib/$ARCH/$COMM/mpiinstall ] ; then + . lib/$ARCH/$COMM/mpiinstall "$@" + exit $? + fi + fi + # # Update some fields that contain the build root directory # These work by extracting the syntax for specifying the library, and then # adding the correct destination to it. NFLIB_PATH=`echo "@FLIB_PATH@" | \ *************** *** 270,277 **** --- 287,295 ---- -e "s%[@]FINC[@]%$NFINC%g" \ -e "s%[@]BITMAP_DIR[@]%$PREFIX/lib/bitmaps%g" \ -e "s%[@]CC[@]%@CC@%g" \ -e "s%[@]CCC[@]%@CCC@%g" \ + -e "s%[@]CPP_COMPILER[@]%@CPP_COMPILER@%g" \ -e "s%[@]CFLAGS[@]%@CFLAGS@%g" \ -e "s%[@]CLINKER[@]%@CLINKER@%g" \ -e "s%[@]CCLINKER[@]%@CCLINKER@%g" \ -e "s%[@]COMM[@]%$COMM%g" \ *************** *** 430,438 **** FixupFileWithAt util/mpif77.in $PREFIX/bin/mpif77 $XMODE CopyFile $PREFIX/bin/mpif77 $PREFIX/lib/$ARCH/$COMM $XMODE # # mpiCC, if C++ selected ! if [ -n "@CCC@" ] ; then FixupFileWithAt util/mpiCC.in $PREFIX/bin/mpiCC $XMODE CopyFile $PREFIX/bin/mpiCC $PREFIX/lib/$ARCH/$COMM $XMODE fi else --- 448,456 ---- FixupFileWithAt util/mpif77.in $PREFIX/bin/mpif77 $XMODE CopyFile $PREFIX/bin/mpif77 $PREFIX/lib/$ARCH/$COMM $XMODE # # mpiCC, if C++ selected ! if [ -n "@CPP_COMPILER@" ] ; then FixupFileWithAt util/mpiCC.in $PREFIX/bin/mpiCC $XMODE CopyFile $PREFIX/bin/mpiCC $PREFIX/lib/$ARCH/$COMM $XMODE fi else *************** *** 449,457 **** ( cd $PREFIX/lib/$ARCH/$COMM ; ln -s ../../../bin/tarch tarch ) echo "/bin/rm -f $PREFIX/lib/$ARCH/$COMM/tarch" >> $UNINSTALLFILE fi FixupFileWithAt util/mpicc.in $PREFIX/lib/$ARCH/$COMM/mpicc $XMODE ! if [ -n "@CCC@" ] ; then FixupFileWithAt util/mpiCC.in $PREFIX/lib/$ARCH/$COMM/mpiCC $XMODE fi FixupFileWithAt util/mpif77.in $PREFIX/lib/$ARCH/$COMM/mpif77 $XMODE FixupFile util/mpireconfig.in $PREFIX/lib/$ARCH/$COMM/mpireconfig $XMODE --- 467,475 ---- ( cd $PREFIX/lib/$ARCH/$COMM ; ln -s ../../../bin/tarch tarch ) echo "/bin/rm -f $PREFIX/lib/$ARCH/$COMM/tarch" >> $UNINSTALLFILE fi FixupFileWithAt util/mpicc.in $PREFIX/lib/$ARCH/$COMM/mpicc $XMODE ! if [ -n "@CPP_COMPILER@" ] ; then FixupFileWithAt util/mpiCC.in $PREFIX/lib/$ARCH/$COMM/mpiCC $XMODE fi FixupFileWithAt util/mpif77.in $PREFIX/lib/$ARCH/$COMM/mpif77 $XMODE FixupFile util/mpireconfig.in $PREFIX/lib/$ARCH/$COMM/mpireconfig $XMODE *************** *** 502,509 **** --- 520,555 ---- # Libaries for file in lib/$ARCH/$COMM/*.a ; do $Show CopyFileP $file $PREFIX/lib/$ARCH/$COMM done + # + # Special programs (helper executeables) + # So far we have + # spxcp - Executable copy program for IBM SP. + for file in spxcp ; do + if [ -x lib/$ARCH/$COMM/$file ] ; then + $Show CopyFileP lib/$ARCH/$COMM/$file $PREFIX/lib/$ARCH/$COMM + fi + done + # + # Message files + if [ -z "$libonly" ] ; then + # Note that we need to get the mpich.*.m files for IRIX which has + # a message file directory as well as the message file. + for file in lib/$ARCH/mpich.* ; do + if [ $file = "mpich.cat" ] ; then + # This is a link; it assumes that En_US is the default. + if [ -f lib/$ARCH/mpich.En_US.cat ] ; then + $Show ln -s $PREFIX/lib/$ARCH/mpich.En_US.cat \ + $PREFIX/lib/$ARCH/mpich.cat + fi + elif [ -s $file ] ; then + # This will handle the case of no mpich.* matches + $Show CopyFile $file $PREFIX/lib/$ARCH + fi + done + fi + # Other files in lib need to be updated... # # Documentation # Note that we're not doing the www pages yet. *************** *** 597,605 **** # echo "/bin/rm -f $PREFIX/mpiuninstall" >> $UNINSTALLFILE # Add the directory removes to the UNINSTALL file for dir in $dirlist ; do ! echo "rmdir $dir" >> $UNINSTALLFILE done # cp $UNINSTALLFILE $PREFIX/mpiuninstall # --- 643,651 ---- # echo "/bin/rm -f $PREFIX/mpiuninstall" >> $UNINSTALLFILE # Add the directory removes to the UNINSTALL file for dir in $dirlist ; do ! echo "if [ -d $dir ] ; then rmdir $dir ; fi" >> $UNINSTALLFILE done # cp $UNINSTALLFILE $PREFIX/mpiuninstall # diff -rc4 /home/MPI/mpich/current/mpich/util/mpirun.anlspx.in mpich/util/mpirun.anlspx.in *** /home/MPI/mpich/current/mpich/util/mpirun.anlspx.in Sun Jun 30 13:17:48 1996 --- mpich/util/mpirun.anlspx.in Tue Oct 15 12:53:14 1996 *************** *** 16,23 **** --- 16,32 ---- fi # This if for the ANL SP1/2, using the ANL "spsubmit" program. # Users of "loadleveler" will probably want something like this # + # One special feature is that this script can use a pre-existing + # partition if one is present. It uses the environment variable + # MPI_PARTITION to indicate a file that contains a list of nodes to + # use, one per line. If this file is found, then the partition is + # assumed to already be available. + # + # This is the copy program + spxcp=$MPIR_HOME/lib/rs6000/ch_mpl/spxcp + # # Check to see if we need to move the file firstchar=`expr "$localpgm" : '\(.\)'` if [ $mvhome = 0 -a "$firschar" != "/" ] ; then # May need to set mvhome. This looks for /bonnie or /clyde in the *************** *** 65,79 **** rmhome=0 localpgm=$progname PWD_LOCAL=$PWD_TRIAL fi ! /bin/rm -f $PWD_LOCAL/PIrun.$$ /bin/rm -f /sphome/$LOGNAME/job.output.$$ if [ -z "$stdinfile" ] ; then stdinfile=/dev/null fi ! cat >$PWD_LOCAL/PIrun.$$ <<. #! /bin/sh JID=\`/usr/local/bin/getjid\` trap "sprelease \$JID" cd $PWD_LOCAL MP_EUILIB=us --- 74,176 ---- rmhome=0 localpgm=$progname PWD_LOCAL=$PWD_TRIAL fi ! # ! # See if we can write in $PWD_LOCAL. If not, try $HOME. ! SCRIPT_DIR=$PWD_LOCAL ! /bin/rm -f $PWD_LOCAL/PItest$$ ! echo "Test" > $PWD_LOCAL/PItest$$ ! if [ ! -s $PWD_LOCAL/PItest$$ ] ; then ! SCRIPT_DIR=$HOME ! fi ! /bin/rm -f $PWD_LOCAL/PItest$$ ! /bin/rm -f $SCRIPT_DIR/PIrun.$$ /bin/rm -f /sphome/$LOGNAME/job.output.$$ if [ -z "$stdinfile" ] ; then stdinfile=/dev/null fi ! # ! # The actual script depends on how we're running ! # ! # If a partition is available, use it. Otherwise, get time from the scheduler ! # ! if [ -n "$MPI_PARTITION" -a -s "$MPI_PARTITION" ] ; then ! cat >> $SCRIPT_DIR/PIrun.$$ <&1 + if [ $mpirun_verbose = 1 ] ; then + echo "Poe exited ..." + fi + # Attempt to fix file cache problems + #SYNCLOC# + #sleep 2 + exit 0 + EOF + # End of script for running progrma + chmod a+x $SCRIPT_DIR/PIrun.$$ + # Get the home node + homenode=`head -1 $MPI_PARTITION` + if [ $just_testing = 1 ] ; then + echo rsh $homenode -n $SCRIPT_DIR/PIrun.$$ + else + rsh $homenode -n $SCRIPT_DIR/PIrun.$$ + fi + if [ $rmhome = 1 ] ; then + /bin/rm $localpgm + fi + /bin/rm -f $SCRIPT_DIR/PIrun.$$ + if [ "$mvback" != "" ] ; then + (cd $PWD_LOCAL ; for file in $mvback ; do \ + if [ -f $file ] ; then cp $file $PWD_TRIAL ; /bin/rm $file ; \ + fi ; done ) + fi + exit 0 + fi + # + # If we reach here, there was no partition available. This script will be + # run in a partition that will be allocated and removed + # + cat >$SCRIPT_DIR/PIrun.$$ <<. + #! /bin/sh JID=\`/usr/local/bin/getjid\` trap "sprelease \$JID" cd $PWD_LOCAL MP_EUILIB=us *************** *** 100,107 **** --- 197,213 ---- fi /bin/rm -f /sphome/$LOGNAME/job.output.$$ # Wait for no-zero-sized SPnodes file while test \! -s \$MP_HOSTFILE ; do sleep 1 ; done + # + # If the spxcp program is available, use it and change localpgm + if [ $np -gt 2 -a -x "$spxcp" ] ; then + newlocalpgm=`basename $localpgm` + cp $localpgm /tmp/\$newlocalpgm + localpgm="/tmp/\$newlocalpgm" + eval $spxcp \$localpgm + fi + # if [ $mpirun_verbose = 1 ] ; then echo "About to run poe ... " >> /sphome/$LOGNAME/job.output.$$ fi poe $localpgm $cmdLineArgs < $stdinfile >> /sphome/$LOGNAME/job.output.$$ 2>&1 *************** *** 115,123 **** exit 0 . # # End of script for running progrma ! chmod a+x $PWD_LOCAL/PIrun.$$ # Determine CAC if [ "$CAC" = "" ] ; then CAC=`whatcac | head -1 | cut -d' ' -f 9 | sed -e s/\"//g -e s/://` fi --- 221,230 ---- exit 0 . # # End of script for running progrma ! chmod a+x $SCRIPT_DIR/PIrun.$$ ! # # Determine CAC if [ "$CAC" = "" ] ; then CAC=`whatcac | head -1 | cut -d' ' -f 9 | sed -e s/\"//g -e s/://` fi *************** *** 128,136 **** echo $np echo B echo M echo n ! echo $PWD_LOCAL/PIrun.$$ echo echo C echo . echo JID=\`/usr/local/bin/getjid\` --- 235,243 ---- echo $np echo B echo M echo n ! echo $SCRIPT_DIR/PIrun.$$ echo echo C echo . echo JID=\`/usr/local/bin/getjid\` *************** *** 156,172 **** # add some sleeps and syncs #SYNCLOC# > /dev/null 2>&1 sleep 2 JID=`sptest -cac $CAC -min $max_time -nodes $np -batch -mpl -us \ ! -path $PWD_LOCAL/PIrun.$$ -noemail` # spsubmit -nomail <<. > /dev/null 2>&1 #$CAC #$max_time #$np #B #M #n ! #$PWD_LOCAL/PIrun.$$ # #C #. # JID=`/usr/local/bin/getjid` --- 263,279 ---- # add some sleeps and syncs #SYNCLOC# > /dev/null 2>&1 sleep 2 JID=`sptest -cac $CAC -min $max_time -nodes $np -batch -mpl -us \ ! -path $SCRIPT_DIR/PIrun.$$ -noemail` # spsubmit -nomail <<. > /dev/null 2>&1 #$CAC #$max_time #$np #B #M #n ! #$SCRIPT_DIR/PIrun.$$ # #C #. # JID=`/usr/local/bin/getjid` *************** *** 185,193 **** #SYNCLOC# > /dev/null 2>&1 if [ $rmhome = 1 ] ; then /bin/rm $localpgm fi ! /bin/rm -f /sphome/$LOGNAME/SPnodes.$JID /sphome/$LOGNAME/PIrun.$$ if [ "$mvback" != "" ] ; then (cd $PWD_LOCAL ; for file in $mvback ; do \ if [ -f $file ] ; then cp $file $PWD_TRIAL ; /bin/rm $file ; \ fi ; done ) --- 292,300 ---- #SYNCLOC# > /dev/null 2>&1 if [ $rmhome = 1 ] ; then /bin/rm $localpgm fi ! /bin/rm -f /sphome/$LOGNAME/SPnodes.$JID $SCRIPT_DIR/PIrun.$$ if [ "$mvback" != "" ] ; then (cd $PWD_LOCAL ; for file in $mvback ; do \ if [ -f $file ] ; then cp $file $PWD_TRIAL ; /bin/rm $file ; \ fi ; done ) *************** *** 202,205 **** --- 309,314 ---- # else # echo "mpirun: No output file! Job did not run! " fi fi + + diff -rc4 /home/MPI/mpich/current/mpich/util/mpirun.args.in mpich/util/mpirun.args.in *** /home/MPI/mpich/current/mpich/util/mpirun.args.in Mon Jul 1 10:52:21 1996 --- mpich/util/mpirun.args.in Tue Oct 8 14:21:52 1996 *************** *** 168,176 **** CM-5s. ( Default $max_mem. ) -cpu time This is the the hard cpu limit used for some CM-5s in ! minutes. (Default $maxtime minutes.) Special Options for IBM SP2: -cac name --- 168,176 ---- CM-5s. ( Default $max_mem. ) -cpu time This is the the hard cpu limit used for some CM-5s in ! minutes. (Default $max_time minutes.) Special Options for IBM SP2: -cac name *************** *** 371,379 **** ;; -nopoll) polling_mode=0 ;; ! -maxtime|=cpu) max_time="$1" shift ;; -mem) --- 371,379 ---- ;; -nopoll) polling_mode=0 ;; ! -maxtime|-cpu) max_time="$1" shift ;; -mem) *************** *** 465,475 **** # with different command-line arguments. In particular, it needs # -c here (and that does not implement the remove part of the -sr). # # Turns out that this doesn't matter so much, because the dbx is terribly, ! # terribly crippled. # ! if [ "$debugger" = "dbx" -a "$arch" = "alpha" ] ; then commandfile="-c" rmcommandfile="/bin/rm -f" fi # --- 465,478 ---- # with different command-line arguments. In particular, it needs # -c here (and that does not implement the remove part of the -sr). # # Turns out that this doesn't matter so much, because the dbx is terribly, ! # terribly crippled (on Alpha). # ! larch=$arch ! if [ -z "$larch" ] ; then larch=$default_arch ; fi ! if [ "$debugger" = "dbx" -a \( "$larch" = "alpha" -o "$larch" = "IRIX" \ ! -o "$larch" = "SGI" -o "$larch" = "IRIX64" \) ] ; then commandfile="-c" rmcommandfile="/bin/rm -f" fi # diff -rc4 /home/MPI/mpich/current/mpich/util/mpirun.ch_p4.in mpich/util/mpirun.ch_p4.in *** /home/MPI/mpich/current/mpich/util/mpirun.ch_p4.in Sat Jun 8 07:36:46 1996 --- mpich/util/mpirun.ch_p4.in Mon Jul 29 11:15:54 1996 *************** *** 76,83 **** --- 76,88 ---- else if [ $nolocal = 0 ] ; then if [ -z "$MPI_HOST" ] ; then echo "No value for MPI_HOST!" + echo "MPI_HOST is set either from your environment or by" + echo "processing for an MPI machine type of ch_p4, ch_tcp, " + echo "ch_nexus, or sgi_mp. The machine type you used was $machine ." + echo "Use the -machine argument to select a " + echo "specific machine type." exit 1 fi echo "$MPI_HOST 0 $proginstance" > $p4pgfile else diff -rc4 /home/MPI/mpich/current/mpich/util/mpirun.sh.in mpich/util/mpirun.sh.in *** /home/MPI/mpich/current/mpich/util/mpirun.sh.in Fri Mar 15 19:41:30 1996 --- mpich/util/mpirun.sh.in Thu Sep 19 14:23:31 1996 *************** *** 6,13 **** --- 6,20 ---- # certain ways. The user can override this default from the command line. # # This sh script is designed to use other scripts to provide the commands # to run each system, using the . filename.sh mechanism + # + # Debuggers should be handled by running + # mpirun.db. + # e.g., mpirun.db.gdb or mpirun.db.xxgdb. + # This will allow users to add there own debuggers + # (with -debug=) + # #set verbose MPIR_HOME=#MPIR_HOME# if [ "$MPIR_HOME" = "#""MPIR_HOME""#" ] ; then *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/examples/test/coll/allredmany.c Fri Sep 27 16:59:54 1996 *************** *** 0 **** --- 1,29 ---- + #include + #include "mpi.h" + + /* + * This example should be run with 2 processes and tests the ability of the + * implementation to handle a flood of one-way messages. + */ + + int main( argc, argv ) + int argc; + char ** argv; + { + double wscale = 10.0, scale; + int numprocs, myid,i,namelen; + char processor_name[MPI_MAX_PROCESSOR_NAME]; + + MPI_Init(&argc,&argv); + MPI_Comm_size(MPI_COMM_WORLD,&numprocs); + MPI_Comm_rank(MPI_COMM_WORLD,&myid); + MPI_Get_processor_name(processor_name,&namelen); + + /* fprintf(stderr,"Process %d on %s\n", + myid, processor_name); */ + for ( i=0; i<10000; i++) { + MPI_Allreduce(&wscale,&scale,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); + } + MPI_Finalize(); + return 0; + } *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/examples/test/pt2pt/sendcplx.f Thu Oct 17 14:22:07 1996 *************** *** 0 **** --- 1,34 ---- + PROGRAM MAIN + INCLUDE 'mpif.h' + + INTEGER LDA + PARAMETER (LDA=2) + INTEGER myid,IERR,NPROCS + COMPLEX A(2,2) + + CALL MPI_INIT(IERR) + CALL MPI_COMM_RANK(MPI_COMM_WORLD,myid,IERR) + CALL MPI_COMM_SIZE(MPI_COMM_WORLD,NPROCS,IERR) + + J0 = 1 + J1 = 2 + + IF (myid .EQ. 0) THEN + A(1,1) = CMPLX(1,1) + A(2,1) = CMPLX(2,1) + A(1,2) = CMPLX(1,2) + A(2,2) = CMPLX(2,2) + CALL MPI_SEND(A(1,1),LDA*(J1-J0+1),MPI_COMPLEX,1, + + 0,MPI_COMM_WORLD,IERR) + ELSE + CALL MPI_RECV(A(1,1),LDA*(J1-J0+1),MPI_COMPLEX, + + 0,MPI_ANY_TAG,MPI_COMM_WORLD,stat,IERR) + PRINT *,'Received A' + PRINT *,'A(1,1) = ',A(1,1),' A(1,2) = ',A(1,2) + PRINT *,'A(2,1) = ',A(2,1),' A(2,2) = ',A(2,2) + ENDIF + + CALL MPI_FINALIZE(IERR) + + STOP + END *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/include/ptrcvt.h Tue Oct 15 08:55:58 1996 *************** *** 0 **** --- 1,19 ---- + #ifndef __PTRCVT + #define __PTRCVT + + /* + * Definitions for the index <-> pointer conversion code + */ + + void MPIR_PointerPerm ANSI_ARGS(( int )); + void *MPIR_ToPointer ANSI_ARGS(( int )); + int MPIR_FromPointer ANSI_ARGS(( void * )); + void MPIR_RmPointer ANSI_ARGS(( int )); + int MPIR_UsePointer ANSI_ARGS(( FILE * )); + void MPIR_RegPointerIdx ANSI_ARGS(( int, void * )); + + /* + * Eventually, this should include a shortcut for ToPointer that takes the + * low numbered indices directly to the pointer by direct lookup. + */ + #endif *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpe/config.status Sun Oct 6 16:27:01 1996 *************** *** 0 **** --- 1,144 ---- + #!/bin/sh + # Generated automatically by configure. + # Run this file to recreate the current configuration. + # This directory was configured as follows, + # on host godzilla.mcs.anl.gov: + # + # ./configure -cc=mpicc -fc=mpif77 + + for arg + do + case "$arg" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo running ${CONFIG_SHELL-/bin/sh} ./configure -cc=mpicc -fc=mpif77 + exec ${CONFIG_SHELL-/bin/sh} ./configure -cc=mpicc -fc=mpif77 ;; + *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; + esac + done + + trap 'rm -f Makefile; exit 1' 1 3 15 + RANLIB='ranlib' + CPP='' + FINC='' + wishloc='' + TK_DIR='' + TCL_DIR='' + TK_VERSION='' + AR='ar crl' + ARCH='' + CC='mpicc' + CFLAGS='' + CLINKER='' + COMM='' + CPRP='cp' + DEFAULT_MACHINE='' + DEVICE='' + F77='mpif77' + FFLAGS='' + FLIB_PATH='' + FLIB_PATH_LEADER='' + FLINKER='' + GETNAME_DEFS=' -DHAVE_UNAME=1 -DHAVE_GETHOSTBYNAME=1' + HAS_FORTRAN='1' + INCLUDE_PATH='' + LIB_LIST='' + LIB_PATH='' + MAKE='make' + MPEGRAPHICS_FOBJS='mpe_graphicsf.o' + MPEGRAPHICS_FSOURCE='mpe_graphicsf.c' + MPEGRAPHICS_OBJS='mpe_graphics.o xcolor.o xframe.o xinit.o xwmap.o xmouse.o' + MPEGRAPHICS_SOURCE='mpe_graphics.c xcolor.c xframe.c xinit.c xwmap.c xmouse.c' + MPE_CFLAGS='' + MPE_DIR='/home/gropp/mpich/mpe/.' + MPE_GRAPHICS='-DMPE_GRAPHICS' + MPE_LIBS='-L/usr/local/X11R5/lib -lmpe -lX11 -lm' + MPIR_HOME='/home/gropp/mpich/mpe' + MPI_FOBJECTS='$(MPI_FOBJECTS)' + MPILIBNAME='mpi' + MPICC='mpicc' + MPIF77='mpif77' + OPTFLAGS='' + OPTFLAGSC='' + OPTFLAGSF='' + PREFIX='' + X_INC='-I/usr/local/X11R5/include' + X_LIB='-L/usr/local/X11R5/lib' + LIBS='' + srcdir='.' + DEFS='' + prefix='' + exec_prefix='' + prsub='' + extrasub='' + + top_srcdir=$srcdir + + CONFIG_FILES=${CONFIG_FILES-"Makefile"} + for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then + srcdir=$top_srcdir + # Remove last slash and all that follows it. Not all systems have dirname. + dir=`echo $file|sed 's%/[^/][^/]*$%%'` + if test "$dir" != "$file"; then + test "$top_srcdir" != . && srcdir=$top_srcdir/$dir + test ! -d $dir && mkdir $dir + fi + echo creating $file + rm -f $file + echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file + sed -e " + $prsub + $extrasub + s%@RANLIB@%$RANLIB%g + s%@CPP@%$CPP%g + s%@FINC@%$FINC%g + s%@wishloc@%$wishloc%g + s%@TK_DIR@%$TK_DIR%g + s%@TCL_DIR@%$TCL_DIR%g + s%@TK_VERSION@%$TK_VERSION%g + s%@AR@%$AR%g + s%@ARCH@%$ARCH%g + s%@CC@%$CC%g + s%@CFLAGS@%$CFLAGS%g + s%@CLINKER@%$CLINKER%g + s%@COMM@%$COMM%g + s%@CPRP@%$CPRP%g + s%@DEFAULT_MACHINE@%$DEFAULT_MACHINE%g + s%@DEVICE@%$DEVICE%g + s%@F77@%$F77%g + s%@FFLAGS@%$FFLAGS%g + s%@FLIB_PATH@%$FLIB_PATH%g + s%@FLIB_PATH_LEADER@%$FLIB_PATH_LEADER%g + s%@FLINKER@%$FLINKER%g + s%@GETNAME_DEFS@%$GETNAME_DEFS%g + s%@HAS_FORTRAN@%$HAS_FORTRAN%g + s%@INCLUDE_PATH@%$INCLUDE_PATH%g + s%@LIB_LIST@%$LIB_LIST%g + s%@LIB_PATH@%$LIB_PATH%g + s%@MAKE@%$MAKE%g + s%@MPEGRAPHICS_FOBJS@%$MPEGRAPHICS_FOBJS%g + s%@MPEGRAPHICS_FSOURCE@%$MPEGRAPHICS_FSOURCE%g + s%@MPEGRAPHICS_OBJS@%$MPEGRAPHICS_OBJS%g + s%@MPEGRAPHICS_SOURCE@%$MPEGRAPHICS_SOURCE%g + s%@MPE_CFLAGS@%$MPE_CFLAGS%g + s%@MPE_DIR@%$MPE_DIR%g + s%@MPE_GRAPHICS@%$MPE_GRAPHICS%g + s%@MPE_LIBS@%$MPE_LIBS%g + s%@MPIR_HOME@%$MPIR_HOME%g + s%@MPI_FOBJECTS@%$MPI_FOBJECTS%g + s%@MPILIBNAME@%$MPILIBNAME%g + s%@MPICC@%$MPICC%g + s%@MPIF77@%$MPIF77%g + s%@OPTFLAGS@%$OPTFLAGS%g + s%@OPTFLAGSC@%$OPTFLAGSC%g + s%@OPTFLAGSF@%$OPTFLAGSF%g + s%@PREFIX@%$PREFIX%g + s%@X_INC@%$X_INC%g + s%@X_LIB@%$X_LIB%g + s%@LIBS@%$LIBS%g + s%@srcdir@%$srcdir%g + s%@DEFS@%$DEFS% + " $top_srcdir/${file}.in >> $file + fi; done + + + exit 0 *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpe/configure Wed Oct 16 14:21:52 1996 *************** *** 0 **** --- 1,2104 ---- + #!/bin/sh + # Guess values for system-dependent variables and create Makefiles. + # Generated automatically using autoconf. + # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + progname="`echo $0 | sed 's:^\./\./:\./:'`" + print_error() { + echo "*# $*" 2>&1 ; + } + print_usage() { + cat <<. + Usage: ${progname} -arch=ARCH_TYPE [-prefix=INSTALL_DIR] + [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] + [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] + [-nof77] [-opt=OPTFLAGS] + [-make=MAKEPGM] + [-cflags=CFLAGS] [-fflags=FFLAGS] + [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] + [-lib=LIBRARY] [-mpilibname=MPINAME] + [-no_mpegraphics] + [-x11_lib=X11LIB] [-x11_inc=X11INC] + [-cross] + [-wish=WISH] [-tcldir=TCLDIR] [-tkdir=TKDIR] + [-fortnames=FORTRANNAMES] + [-ar_nolocal] + [-noranlib] + where + ARCH_TYPE = the type of machine that MPI is to be configured for + INSTALL_DIR = directory where MPE will be installed (optional) + OPTFLAGS = optimization flags to give the compilers (e.g. -g) + CFLAGS = flags to give C compiler + FFLAGS = flags to give Fortran compiler + MAKEPGM = version of make to use + WISH = Name of tcl/tk wish executable. Configure will attempt + to find a version of wish for you, but if there is + no wish in your path or you need to use a different version, + use this option. Used only for the display tools + (nupshot and upshot). tk 3.x required for nupshot; + tk 3.x or 4.x for upshot. + TCLDIR = Directory containing tcl. Must have lib/libtcl.a and + include/tcl.h . Used only for nupshot. + TKDIR = Directory containing tk 3.3, 3.4, 3.5, or 3.6. Must have + lib/libtk.a and include/tk.h . Used only for nupshot. + May be the same as TCLDIR. + FORTRANNAMES = Form of the Fortran names. See below. + X11LIB = Full path name for libX11.a + X11INC = Full path name for X11.h + + One and only one 'arch', and 'prefix' argument should be provided. + + You can select a different C and Fortran compiler by using the '-cc' and 'fc' + switches. The environment variables 'CC' and 'FC' can also provide values for + these but their settings may be overridden by the configure script. Using + '-cc=\$CC -fc=\$FC' will force configure to use those compilers. + These should be the compilers that you use for MPI programs. + + If '-cross' is given, configure assumes that you are cross-compiling. If it + is not given, configure expects to be able to run programs. Even if '-cross' + is not selected, configure will try to determine if you are cross-compiling; + this switch is needed only on systems where attempting to run a cross-compiled + program causes the configure script to hang. + + If '-no_mpegraphics' is used, then the MPE routines that make use of + X11 graphics will NOT be built; this is appropriate for systems that either do + not have the X11 include files or that do not support X11 graphics (some + message-passing systems cannot interoperate with X11). The options -x11_inc + and -x11_lib may be used to specify the locations of the X11 include files and + libraries in the event that configure cannot find them (they should both be + specified in that case). + + The option '-nof77' prevents the compilation of routines that require a + Fortran compiler. If this option is selected, you may not use the Fortran + interface to MPI. + + The option '-opt' allows you to specify options for the compilers (both C and + Fortran). For example, '-opt=-O' chooses optimized code generation on many + systems. '-optcc' and '-optf77' allow you to specify options for just the C + or Fortran compilers + + The option '-make' may be used to select an alternate make program. For + example, on FreeBSD systems, -make=gnumake may be required because of bugs in + the system make. + + The option '-fortnames=FORTRANNAMES' allows you to specify the form of the + Fortran names. This is used primarily to generate names with and without + trailing underscores for those systems that support both. Possible values are + FORTRANNAMES value if Fortran MPI_SEND looks like + DOUBLEUNDERSCORE mpi_send__ + UNDERSCORE mpi_send_ + CAPS MPI_SEND + NOUNDERSCORE mpi_send + This option should normally NOT be used; configure determines what the Fortran + compiler generates. This can be used to override that choice. + + The option '-ar_nolocal' prevents the library archive command from attempting + to use the local directory for temporary space. This option should be used + when (a) there isn't much space (less than 20 MB) available in the partition + where MPICH resides and (b) there is enough space in /tmp (or wherever ar + places temporary files by default). + + The option '-noranlib' causes the 'ranlib' step (needed on some systems to + build an object library) to be skipped. This is particularly useful on + systems where 'ranlib' is optional (allowed but not needed; because it is + allowed, configure chooses to use it just in case) but can fail (some + 'ranlib's are implemented as scripts using 'ar'; if they don't use the local + directory, they can fail (destroying the library in the process) if the + temporary directory (usually '/tmp') does not have enough space. This has + occured on some OSF systems. + + Sample Configure Usage: + + To make for an MPI with the MPI compile commands in your path: + + ./configure -cc=mpicc -f77=mpif77 + make + . + } + # + ARCH="" + LIB_PATH="" + FLIB_PATH="" + OPTFLAGS="" + OPTFLAGSF="" + NOF77=0 + AR_LOCAL=l + HAS_FORTRAN=1 + MPILIBNAME=mpi + MPI_FOBJECTS="\$(MPI_FOBJECTS)" + CFLAGS="" + # + # By not setting FFLAGS, we get the values from the environment + MPE_GRAPHICS="-DMPE_GRAPHICS" + MAKE=make + PREFIX="" + DEVCFLAGS="" + CONFIGURE_ARGS="$*" + DEFAULT_MACHINE='' + DEVICE_KIND=MPP + cross_compiling=0 + # + # This next variable is a version without quotes. + # We could also consider `echo $a | sed -e 's/"/\\"/g'` + CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '` + if test -n "$CONFIGURE_ARGS" ; then + echo "Configuring with args $CONFIGURE_ARGS" + fi + # + for arg + do + # Handle --exec-prefix with a space before the argument. + if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix= + # Handle --host with a space before the argument. + elif test x$next_host = xyes; then next_host= + # Handle --prefix with a space before the argument. + elif test x$next_prefix = xyes; then prefix=$arg; next_prefix= + # Handle --srcdir with a space before the argument. + elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= + else + case $arg in + # For backward compatibility, also recognize exact --exec_prefix. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) + exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) + next_exec_prefix=yes ;; + + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + PREFIX=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + next_prefix=yes ;; + + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) + srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) + next_srcdir=yes ;; + + -arch=* | --arch=*) + package=`echo $arg|sed 's/-*arch=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid architecture name"; exit 1 + fi + ARCH=`echo $package|sed s/-/_/g` + eval "arch_`echo $package|sed s/-/_/g`=1" + ;; + + -comm=* | --comm=*) + package=`echo $arg|sed 's/-*comm=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid communications layer name"; + exit 1 + fi + COMM=`echo $package|sed s/-/_/g` + eval "comm_`echo $package|sed s/-/_/g`=1" + # Handle possible synonyms + if test -n "$comm_ch_eui" ; then + comm_ch_mpl=1 + COMM=ch_mpl + fi + ;; + + -device=* | --device=*) + package=`echo $arg|sed 's/-*device=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid device name" ; exit 1 + fi + DEVICE=$package #|sed s/-/_/g` + # Can't have - in variable names + package=`echo $package | sed s/-/_/g` + eval "device_$package=1" + # Handle possible synonyms + if test -n "$device_ch_eui"; then + device_ch_mpl=1 + DEVICE=ch_mpl + fi + ;; + + -ar_nolocal | --ar_nolocal) + AR_LOCAL='' + ;; + + -noranlib | -no_ranlib) + RANLIB=':' + ;; + + -mpilibname=*) + MPILIBNAME=`echo A$arg|sed 's/A-*mpilibname=//'` + ;; + + -cross) + cross_compiling=1 + ;; + + -f77idx) + # Force POINTER_64_BITS definition + F77IDX=1 + ;; + + -cc=* | --cc=*) + MPICC=`echo $arg|sed 's/-*cc=//'` + CC="$MPICC" + USERCC=1 + ;; + + -fc=* | --fc=*) + MPIF77=`echo $arg|sed 's/-*fc=//'` + FC=$MPIF77 + USERF77=1 + ;; + + -fortnames=*) + # Valid values are + # FORTRANDOUBLEUNDERSCORE + # FORTRANUNDERSCORE + # FORTRANCAPS + # FORTRANNOUNDERSCORE + FORTRANNAMES="FORTRAN`echo $arg|sed 's/-*fortnames=//'`" + ;; + + -clinker=* | --clinker=*) + CLINKER=`echo $arg|sed 's/-*clinker=//'` + USERCLINKER=1 + ;; + + -flinker=* | --flinker=*) + FLINKER=`echo $arg|sed 's/-*flinker=//'` + USERFLINKER=1 + ;; + + -lib=* | --lib=*) + package="`echo $arg|sed 's/-*lib=//'`" + USERLIB="$package" ;; + + -opt=* | --opt=*) + package="`echo $arg|sed 's/-*opt=//'`" + OPTFLAGS="$package" ;; + + -optcc=* | --optcc=*) + package="`echo $arg|sed 's/-*optcc=//'`" + OPTFLAGSC="$package" ;; + + -optf77=* | --optf77=*) + package="`echo $arg|sed 's/-*optf77=//'`" + OPTFLAGSF="$package" ;; + + -cflags=* | --cflags=*) + package="`echo $arg|sed 's/-*cflags=//'`" + USER_CFLAGS="$package" + CFLAGS="$CFLAGS $package" ;; + + -fflags=* | --fflags=*) + package="`echo $arg|sed 's/-*fflags=//'`" + FFLAGS="$package" ;; + + -no_mpegraphics | --no_mpegraphics) + MPE_GRAPHICS="" + echo "Make will not build MPE graphics routines" ;; + + -x11_lib=* | --x11_lib=* ) + USERXLIB=1 + X11LIB="`echo $arg|sed 's/-*x11_lib=//'`" + ;; + + -x11_inc=* | --x11_inc=* ) + USERXLIB=1 + X11INC="`echo $arg|sed 's/-*x11_inc=//'`" + ;; + + -make=* | --make=*) + package=`echo $arg|sed 's/-*make=//'` + MAKE="$package" + ;; + + -nof77 | --nof77) + echo "Don't build the Fortran interfaces" + NOF77=1 + HAS_FORTRAN=0 + FC=true + CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" + MPI_FOBJECTS="" ;; + + -wish=* | --wish=*) + wishloc="`echo $arg|sed 's/-*wish=//'`" + ;; + + -tkdir=* | --tkdir=*) + TK_DIR="`echo $arg|sed 's/-*tkdir=//'`" + ;; + + -tcldir=* | --tcldir=*) + TCL_DIR="`echo $arg|sed 's/-*tcldir=//'`" + ;; + + -nobanner) + nobanner=1 + ;; + + -echo ) + set -x + configure_echo=1 + ;; + + -u | -usage | --usage | --usag | --usa | --us | --u | -help | --help ) + print_usage >& 2 + exit 1 ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) + verbose=yes ;; + + *) + print_error "Unrecognized configure option $arg" + ;; + esac + fi + done + + trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15 + trap 'rm -f confdefs*' 0 + + # NLS nuisances. + # These must not be set unconditionally because not all systems understand + # e.g. LANG=C (notably SCO). + if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi + if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi + + rm -f conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. + echo > confdefs.h + compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1' + + # A filename unique to this package, relative to the directory that + # configure is in, which we can look for to find out if srcdir is correct. + unique_file= + + # Find the source files, if location was not specified. + if test -z "$srcdir"; then + srcdirdefaulted=yes + # Try the directory containing this script, then `..'. + prog=$0 + confdir=`echo $prog|sed 's%/[^/][^/]*$%%'` + test "X$confdir" = "X$prog" && confdir=. + srcdir=$confdir + if test ! -r $srcdir/$unique_file; then + srcdir=.. + fi + fi + if test ! -r $srcdir/$unique_file; then + if test x$srcdirdefaulted = xyes; then + echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2 + else + echo "configure: Can not find sources in \`${srcdir}'." 1>&2 + fi + exit 1 + fi + # Preserve a srcdir of `.' to avoid automounter screwups with pwd. + # But we can't avoid them for `..', to make subdirectories work. + case $srcdir in + .|/*|~*) ;; + *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute. + esac + + + # Save the original args to write them into config.status later. + configure_args="$*" + + # + # + + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for current directory name""... $ac_c" + else + echo $ac_n "checking for current directory name""... $ac_c" 1>&1 + fi + MPIR_TRIAL=$PWD + if test "${MPIR_TRIAL}" != "" -a -d "${MPIR_TRIAL}" ; then + if test -r ${MPIR_TRIAL}/.foo$$ ; then + /bin/rm -f ${MPIR_TRIAL}/.foo$$ + /bin/rm -f .foo$$ + fi + if test -r ${MPIR_TRIAL}/.foo$$ -o -r .foo$$ ; then + MPIR_TRIAL= + else + echo "test" > ${MPIR_TRIAL}/.foo$$ + if test ! -r .foo$$ ; then + /bin/rm -f ${MPIR_TRIAL}/.foo$$ + MPIR_TRIAL= + else + /bin/rm -f ${MPIR_TRIAL}/.foo$$ + fi + fi + fi + if test "${MPIR_TRIAL}" = "" ; then + MPIR_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'` + fi + if test ! -r ${MPIR_TRIAL}/Makefile.in ; then + MPIR_TRIAL=`pwd` + if test ! -r ${MPIR_TRIAL}/Makefile.in ; then + print_error "Cannot determine the root directory!" + exit 1 + fi + MPIR_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'` + if test ! -d ${MPIR_TRIAL} ; then + print_error "Warning: your default path uses the automounter; this may" + print_error "cause some problems if you use other NFS-connected systems." + MPIR_TRIAL=`pwd` + fi + fi + if test -z "${MPIR_TRIAL}" ; then + MPIR_TRIAL=`pwd | sed -e 's%/tmp_mnt/%/%g'` + if test ! -d ${MPIR_TRIAL} ; then + print_error "Warning: your default path uses the automounter; this may" + print_error "cause some problems if you use other NFS-connected systems." + MPIR_TRIAL=`pwd` + fi + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""${MPIR_TRIAL}" + else + echo "$ac_t""${MPIR_TRIAL}" 1>&1 + fi + + MPIR_HOME=$MPIR_TRIAL + # + F77="$FC" + MPEGRAPHICS_SOURCE="" + MPEGRAPHICS_OBJS="" + MPEGRAPHICS_FSOURCE="" + MPEGRAPHICS_FOBJS="" + X_INC="" + X_LIB="" + MPE_DIR="." + # + # Should eventually use a file like $file.run to see if the program should + # be run or just compiled. And eventually, this should be run EARLY, + # before checking for things like functions and include files. + # + + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking that the compiler $CC runs""... $ac_c" + else + echo $ac_n "checking that the compiler $CC runs""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c <&1 + fi + if test $ac_cv_ccworks = "yes" ; then + cc_works=1 + else + # Generate output from failed test. See COMPILE_CHECK code + # It really would be better if the compile tests put the output into + # a file for later analysis, like conftest.out + # + cat > conftest.c </dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking that the compiler $F77 runs""... $ac_c" + else + echo $ac_n "checking that the compiler $F77 runs""... $ac_c" 1>&1 + fi + cat >conftest.f < conftest.out 2>&1 + if test $? != 0 ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + echo "Fortran compiler returned non-zero return code" + if test -s conftest.out ; then + echo "Output from test was" + cat conftest.out + fi + NOF77=1;HAS_FORTRAN=0;HAS_F77=0; + CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" + F77="echo no Fortran compiler" + FLINKER="$F77" + MPI_FOBJECTS="" + elif test ! -s conftest.o ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + echo "Fortran compiler did not produce object file" + if test -s conftest.out ; then + echo "Output from test was" + cat conftest.out + fi + NOF77=1;HAS_FORTRAN=0;HAS_F77=0; + CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" + F77="echo no Fortran compiler" + FLINKER="$F77" + MPI_FOBJECTS="" + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + : + fi + rm -f conftest* + + fi + + # + AR="ar cr$AR_LOCAL" + # + # Using this autoconf macro for ranlib doesn't handle the problem + # of 'helpful' ranlib's that issue error messages (!). Once + # we've identified the proper compiler etc, we'll try this + # ranlib below; if it fails, we'll replace it with ':' + # + if test -z "$RANLIB" ; then + if test -z "$RANLIB"; then + # Extract the first word of `ranlib', so it can be a program name with args. + set dummy ranlib; word=$2 + echo checking for $word + IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/$word; then + RANLIB="ranlib" + break + fi + done + IFS="$saveifs" + fi + test -z "$RANLIB" && RANLIB=":" + test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB" + + fi + # + if test "$RANLIB" != ":" ; then + + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking that ranlib works""... $ac_c" + else + echo $ac_n "checking that ranlib works""... $ac_c" 1>&1 + fi + cat <conftest.c + int a(){return 1;} + EOF + compileonly='$CC -c $CFLAGS conftest.c >/dev/null 2>&1' + if eval $compileonly ; then + broken=0; + else + broken=1; + fi + if test $broken = 1 ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + print_error "Error in creating test object for ranlib!" + else + arcmd='$AR foo.a conftest.o >/dev/null 2>&1' + eval $arcmd + ranlibtest='$RANLIB foo.a >/dev/null 2>&1' + if eval $ranlibtest ; then + broken=0; + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + else + broken=1; + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + /bin/rm -f foo.a + if test $broken = 1 ; then + print_error "RANLIB ($RANLIB) failed!" + print_error "Assuming that ranlib is a stub returning non-zero" + print_error "condition code" + RANLIB=':' + fi + fi + rm -f conftest.o conftest.c + + fi + # + # Some Sun SOLARIS systems don't have AR (at least, not in a typical user + # path) + # Remove any arguments from the string AR + ARTEST=`expr "$AR" : "\(.*\) "` + # Extract the first word of "$ARTEST", so it can be a program name with args. + set dummy $ARTEST; ac_word=$2 + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_word""... $ac_c" + else + echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 + fi + ac_prog_where="" + if test -n "$ARFOUND"; then + ac_pg_ARFOUND="$ARFOUND" # Let the user override the test. + else + ac_first_char=`expr "$ARTEST" : "\(.\)"` + if test "$ac_first_char" = "/" -a -x "$ARTEST" ; then + ac_pg_ARFOUND="1" + ac_prog_where=$ARTEST + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_pg_ARFOUND="1" + ac_prog_where=$ac_dir/$ac_word + break + fi + done + IFS="$ac_save_ifs" + fi + fi;ARFOUND="$ac_pg_ARFOUND" + if test -n "$ac_prog_where" ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""found $ac_prog_where ($ARFOUND)" + else + echo "$ac_t""found $ac_prog_where ($ARFOUND)" 1>&1 + fi + ARLOC=$ac_prog_where + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + + if test -z "$ARLOC" ; then + # Check for /usr/ccs/bin/ar ; Solaris likes to hide anything remotely + # useful in this directory + print_error "The library archiver $AR is not in your path" + print_error "MPICH cannot be built without this program, which" + print_error "should be part of ANY program development environment." + if test -x /usr/ccs/bin/ar ; then + print_error "You need /usr/ccs/bin in your path." + else + print_error "Check your path; contact your system vendor if your" + print_error "path appears to be ok." + fi + exit 1 + fi + # + # CPRP is the version of cp that accepts -r and -p arguments. + # See CRAY below + CPRP="cp" + INCLUDE_PATH="" + USER_INCLUDE_PATH="" + USER_DEFS="" + LIB_LIST="" + MPE_LIBS="" + + if test -n "$MPE_DIR"; then + MPE_DIR="$MPIR_HOME/$MPE_DIR" + if test -n "$MPE_GRAPHICS"; then + # FIND_X doesn't always work correctly when cross compiling, so we + # try to be more careful and conservative + + # FIND_X doesn't always work correctly when cross compiling, so we + # try to be more careful and conservative + if test -z "$USERXLIB" ; then + # The user has specified the libraries/include paths; pick them up + # below.... + if test -z "$cross_compiling" -o "$cross_compiling" = 0 ; then + # If we find X, set shell vars x_includes and x_libraries to the paths. + no_x=true + echo checking for X include and library files with xmkmf + rm -fr conftestdir + if mkdir conftestdir; then + cd conftestdir + cat > Imakefile <<\EOF + acfindx: + @echo "im_incroot=$(INCROOT); im_usrlibdir=$(USRLIBDIR); im_libdir=$(LIBDIR)" + EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + no_x= + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `make acfindx | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + if test ! -f $im_usrlibdir/libX11.a && test -f $im_libdir/libX11.a; then + im_usrlibdir=$im_libdir + fi + case "$im_incroot" in + /usr/include) ;; + *) x_includes="$im_incroot" ;; + esac + case "$im_usrlibdir" in + /usr/lib | /lib) ;; + *) x_libraries="$im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir + fi + + if test -z "$im_usrlibdir"; then + echo checking for X include and library files directly + echo checking how to run the C preprocessor + if test -z "$CPP"; then + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and ``${CC-cc}'' will simply confuse + # make. It must be expanded now. + CPP="${CC-cc} -E" + cat > conftest.c < + Syntax Error + EOF + err=`eval "($CPP conftest.c >/dev/null) 2>&1"` + if test -z "$err"; then + : + else + rm -rf conftest* + CPP=/lib/cpp + fi + rm -f conftest* + fi + test ".${verbose}" != "." && echo " setting CPP to $CPP" + + cat > conftest.c < + EOF + err=`eval "($CPP conftest.c >/dev/null) 2>&1"` + if test -z "$err"; then + rm -rf conftest* + no_x= + + else + rm -rf conftest* + for dir in \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/x386/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/x11r6/include \ + /usr/local/x11r5/include \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11/include \ + /usr/openwin/include \ + /usr/openwin/share/include \ + /usr/lpp/Xamples/include \ + ; \ + do + if test -r $dir/X11/Intrinsic.h; then + x_includes=$dir; no_x= + break + fi + done + fi + rm -f conftest* + + # Check for the libraries. First see if replacing the `include' by + # `lib' works. + LIBS_save="${LIBS}" + LIBS="${LIBS} -lXt" + have_lib="" + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for -lXt""... $ac_c" + else + echo $ac_n "checking for -lXt""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c <&1 + fi + rm -rf conftest* + have_lib="1" + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + LIBS="${LIBS_save}" + if test -n "${have_lib}"; then + :; no_x= + else + :; for dir in `echo "$x_includes" | sed s/include/lib/` \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/x386/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/x11r6/lib \ + /usr/local/x11r5/lib \ + /usr/lib/X11 \ + /usr/lib/X11R4 \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11/lib \ + /usr/openwin/lib \ + /usr/lpp/Xamples/lib \ + ; \ + do + for extension in a so sl; do + if test -r $dir/libXt.$extension; then + x_libraries=$dir; no_x= + break 2 + fi + done + done + fi + + fi + if test -n "$verbose"; then + test -n "$x_includes" && echo " found X11 headers in $x_includes" + test -n "$x_libraries" && echo " found X11 libraries in $x_libraries" + fi + if test -n "$no_x" ; then + print_error "Did not find X11 libraries and/or include files" + fi + else + # Try to compile a program with an include file. + # I didn't use HEADER_CHECK because I want to insist that the + # code try to compile with the header + no_x=true + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for X11 headers""... $ac_c" + else + echo $ac_n "checking for X11 headers""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { } + EOF + if eval $compile; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + rm -rf conftest* + no_x="" + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + + if test -z "$no_x" ; then + # Try to link a simple X program + LIBS_save="${LIBS}" + LIBS="${LIBS} -lX11" + have_lib="" + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for -lX11""... $ac_c" + else + echo $ac_n "checking for -lX11""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c <&1 + fi + rm -rf conftest* + have_lib="1" + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + LIBS="${LIBS_save}" + if test -n "${have_lib}"; then + :; no_x="" + else + :; no_x="true" + fi + + fi + if test -n "$no_x" ; then + print_error " " + print_error "X11 is not used when cross compiling (because of the" + print_error "difficulties in finding the correct libraries)" + print_error " " + fi + fi + else + # Pick up the paths from the user if possible + if test -z "$x_includes" -a -n "$X11INC" ; then + x_includes="$X11INC" + XINCLUDES="-Ix_includes" + fi + if test -z "$x_libraries" -a -n "$X11LIB" ; then + x_libraries="$X11LIB" + fi + fi + if test -n "$x_includes" ; then + XINCLUDES="-I$x_includes" + fi + if test -z "$no_x" ; then + # may STILL not have x if the include files aren't around + if test -n "$x_includes" ; then + f_test=$x_includes/X11/Xlib.h + else + f_test=/usr/include/X11/Xlib.h + fi + if test ! -f $f_test ; then + no_x=yes + print_error "X11 include files were not found in $f_test!" + fi + fi + + fi + if test -n "$MPE_GRAPHICS" -a -z "$no_x" ; then + MPE_LIBS="-lmpe -lX11 -lm" + MPEGRAPHICS_SOURCE="mpe_graphics.c xcolor.c xframe.c xinit.c xwmap.c xmouse.c" + MPEGRAPHICS_OBJS="mpe_graphics.o xcolor.o xframe.o xinit.o xwmap.o xmouse.o" + MPEGRAPHICS_FSOURCE="mpe_graphicsf.c" + MPEGRAPHICS_FOBJS="mpe_graphicsf.o" + if test -z "$x_includes" ; then + X_INC="" + else + X_INC="-I$x_includes" + fi + if test -z "$x_libraries" ; then + X_LIB="" + else + X_LIB="-L$x_libraries" + MPE_LIBS="$X_LIB -lmpe -lX11 -lm" + fi + # On the Meiko CS2, you have to add additional libraries to satisfy + # the externals needed by -X11. + if test -n "$arch_meiko" ; then + MPE_LIBS="$MPE_LIBS -lsocket -lnsl" + fi + else + MPE_GRAPHICS="" + MPE_LIBS="-lmpe" + fi + else + MPE_GRAPHICS="" + fi + # + # Check for the functions that may be needed by the ADI to implement + # Processor_name. Save these defines in a special place. + SAVEDEFS="$DEFS" + DEFS="" + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for uname""... $ac_c" + else + echo $ac_n "checking for uname""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_uname) || defined (__stub___uname) + choke me + #else + /* Override any gcc2 internal prototype to avoid an error. */ + extern char uname(); uname(); + #endif + } + EOF + if eval $compile; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + rm -rf conftest* + { + test -n "$verbose" && \ + echo " defining HAVE_UNAME" + echo "#define" HAVE_UNAME 1 >> confdefs.h + DEFS="$DEFS -DHAVE_UNAME=1" + } + haveuname=1 + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for gethostbyname""... $ac_c" + else + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) + choke me + #else + /* Override any gcc2 internal prototype to avoid an error. */ + extern char gethostbyname(); gethostbyname(); + #endif + } + EOF + if eval $compile; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + rm -rf conftest* + { + test -n "$verbose" && \ + echo " defining HAVE_GETHOSTBYNAME" + echo "#define" HAVE_GETHOSTBYNAME 1 >> confdefs.h + DEFS="$DEFS -DHAVE_GETHOSTBYNAME=1" + } + havegethostbyname=1 + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + + # If we have uname and gethostbyname, we can skip getdomainname ... + if test "$haveuname" != 1 -o "$havegethostbyname" != 1 ; then + for func in gethostname sysinfo + do + trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'` + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for ${func}""... $ac_c" + else + echo $ac_n "checking for ${func}""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_${func}) || defined (__stub___${func}) + choke me + #else + /* Override any gcc2 internal prototype to avoid an error. */ + extern char ${func}(); ${func}(); + #endif + } + EOF + if eval $compile; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + rm -rf conftest* + { + test -n "$verbose" && \ + echo " defining ${trfunc}" + echo "#define" ${trfunc} 1 >> confdefs.h + DEFS="$DEFS -D${trfunc}=1" + } + + + else if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + rm -f conftest* + done + + # + # systeminfo is needed for sysinfo + for ac_hdr in sys/systeminfo.h + do + ac_safe=`echo "$ac_hdr" | tr '[a-z]./' '[A-Z]__'` + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_hdr""... $ac_c" + else + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&1 + fi + if test ! -f confdefs.h ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t"""!! SHELL ERROR !!"" + else + echo "$ac_t"""!! SHELL ERROR !!"" 1>&1 + fi + echo "The file confdefs.h created by configure has been removed" + echo "This may be a problem with your shell; some versions of LINUX" + echo "have this problem. See the Installation guide for more" + echo "information." + exit 1 + fi + cat > conftest.c < + int main() { exit(0); } + int t() { main(); } + EOF + if eval $compile; then + + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" + + else + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" + + fi + rm -f conftest* + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` + + { + test -n "$verbose" && \ + echo " defining $ac_tr_hdr" + echo "#define" $ac_tr_hdr 1 >> confdefs.h + DEFS="$DEFS -D$ac_tr_hdr=1" + } + + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + done + + # + # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing + # indeed - stuff like this is why Windows95/NT WILL WIN). + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for getdomainname""... $ac_c" + else + echo $ac_n "checking for getdomainname""... $ac_c" 1>&1 + fi + cat > conftest.$ac_ext < /* Arbitrary system header to define __stub macros. */ + #ifdef __cplusplus + extern "C" { char getdomainname(); }; + #else + char getdomainname(); + #endif + int main() { return 0; } + int t() { + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_getdomainname) || defined (__stub___getdomainname) + choke me + #else + /* Override any gcc2 internal prototype to avoid an error. */ + getdomainname(); + #endif + + ; return 0; } + EOF + if eval $ac_link; then + rm -rf conftest* + eval "ac_cv_func_getdomainname=yes" + else + rm -rf conftest* + eval "ac_cv_func_getdomainname=no" + fi + rm -f conftest* + if eval "test \"`echo '$ac_cv_func_'getdomainname`\" = yes"; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""yes" + else + echo "$ac_t""yes" 1>&1 + fi + has_getdomainname=1 + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + has_getdomainname=0 + fi + + if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then + # Extract the first word of "domainname", so it can be a program name with args. + set dummy domainname; ac_word=$2 + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_word""... $ac_c" + else + echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 + fi + ac_prog_where="" + if test -n "$has_domainname"; then + ac_pg_has_domainname="$has_domainname" # Let the user override the test. + else + ac_first_char=`expr "domainname" : "\(.\)"` + if test "$ac_first_char" = "/" -a -x "domainname" ; then + ac_pg_has_domainname="1" + ac_prog_where=domainname + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_pg_has_domainname="1" + ac_prog_where=$ac_dir/$ac_word + break + fi + done + IFS="$ac_save_ifs" + fi + test -z "$ac_pg_has_domainname" && ac_pg_has_domainname="0" + fi;has_domainname="$ac_pg_has_domainname" + if test -n "$ac_prog_where" ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""found $ac_prog_where ($has_domainname)" + else + echo "$ac_t""found $ac_prog_where ($has_domainname)" 1>&1 + fi + d_domainname=$ac_prog_where + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + + # Extract the first word of "hostname", so it can be a program name with args. + set dummy hostname; ac_word=$2 + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_word""... $ac_c" + else + echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 + fi + ac_prog_where="" + if test -n "$has_hostname"; then + ac_pg_has_hostname="$has_hostname" # Let the user override the test. + else + ac_first_char=`expr "hostname" : "\(.\)"` + if test "$ac_first_char" = "/" -a -x "hostname" ; then + ac_pg_has_hostname="1" + ac_prog_where=hostname + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_pg_has_hostname="1" + ac_prog_where=$ac_dir/$ac_word + break + fi + done + IFS="$ac_save_ifs" + fi + test -z "$ac_pg_has_hostname" && ac_pg_has_hostname="0" + fi;has_hostname="$ac_pg_has_hostname" + if test -n "$ac_prog_where" ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""found $ac_prog_where ($has_hostname)" + else + echo "$ac_t""found $ac_prog_where ($has_hostname)" 1>&1 + fi + d_hostname=$ac_prog_where + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + + # Extract the first word of "rup", so it can be a program name with args. + set dummy rup; ac_word=$2 + if test -z "$ac_echo_n" ; then + ac_echo_n=yes + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' + ' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi + else + ac_n= ac_c='\c' ac_t= + fi + ac_echo_test=`echo foo 1>&1` + if test -z "$ac_echo_test" ; then + print_error "Your sh shell does not handle the output redirection" + print_error "1>&1 correctly. Configure will work around this problem," + print_error "but you should report the problem to your vendor." + fi + + fi + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo $ac_n "checking for $ac_word""... $ac_c" + else + echo $ac_n "checking for $ac_word""... $ac_c" 1>&1 + fi + ac_prog_where="" + if test -n "$has_rup"; then + ac_pg_has_rup="$has_rup" # Let the user override the test. + else + ac_first_char=`expr "rup" : "\(.\)"` + if test "$ac_first_char" = "/" -a -x "rup" ; then + ac_pg_has_rup="1" + ac_prog_where=rup + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_pg_has_rup="1" + ac_prog_where=$ac_dir/$ac_word + break + fi + done + IFS="$ac_save_ifs" + fi + test -z "$ac_pg_has_rup" && ac_pg_has_rup="0" + fi;has_rup="$ac_pg_has_rup" + if test -n "$ac_prog_where" ; then + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""found $ac_prog_where ($has_rup)" + else + echo "$ac_t""found $ac_prog_where ($has_rup)" 1>&1 + fi + d_rup=$ac_prog_where + else + if test -z "$ac_echo_test" -a 1 = 1 ; then + echo "$ac_t""no" + else + echo "$ac_t""no" 1>&1 + fi + fi + + # Form hostname.domainname, do rup to it + # rup may not be enabled, but short of running a program to lookup the + # local host, there does not seem to be a better alternative. + # + if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then + + fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` + + # echo $fullhost + fullhost="${fullhost}.`$d_domainname`" + response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` + # echo $fullhost + if test -n "$response" ; then + print_error "The getdomainname system routine has been rendered USELESS" + print_error "on your system. This is not a bug and will not affect" + print_error "MPICH. Some MPE routines (particularly those that" + print_error "interact with X Windows) may not work." + else + + { + test -n "$verbose" && \ + echo " defining HAVE_GETDOMAINNAME" + echo "#define" HAVE_GETDOMAINNAME 1 >> confdefs.h + DEFS="$DEFS -DHAVE_GETDOMAINNAME=1" + } + + fi + fi + fi + fi + GETNAME_DEFS="$DEFS" + DEFS="$SAVEDEFS" + # + # Generate the name for the MPI-C, MPI-CC, and MPI-F77 compilers (for use + # in Makefiles that should not be MPICH dependent + # MPICC etc should be set on the configure line + if test -z "$MPICC" ; then + MPICC=$MPIR_HOME/lib/$ARCH/$COMM/mpicc + fi + if test -z "$MPIF77" ; then + MPIF77=$MPIR_HOME/lib/$ARCH/$COMM/mpif77 + fi + if test -z "$LIB_DIR" ; then + LIB_DIR="." + fi + # + # + # Substitute variables + # Variables used in scripts only + # FINC contains an @MPIR_HOME@, so it needs to come first + # Variables used by Makefile.in's: + # End configuration file + # Set default prefixes. + if test -n "$prefix"; then + test -z "$exec_prefix" && exec_prefix='${prefix}' + prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" + fi + if test -n "$exec_prefix"; then + prsub="$prsub + s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%" + fi + # Quote sed substitution magic chars in DEFS. + cat >conftest.def < config.status </dev/null | sed 1q`: + # + # $0 $configure_args + + for arg + do + case "\$arg" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args + exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;; + *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; + esac + done + + trap 'rm -f Makefile contrib/mandel/Makefile contrib/mastermind/Makefile contrib/life/Makefile test/Makefile; exit 1' 1 3 15 + RANLIB='$RANLIB' + CPP='$CPP' + FINC='$FINC' + wishloc='$wishloc' + TK_DIR='$TK_DIR' + TCL_DIR='$TCL_DIR' + TK_VERSION='$TK_VERSION' + AR='$AR' + ARCH='$ARCH' + CC='$CC' + CFLAGS='$CFLAGS' + CLINKER='$CLINKER' + COMM='$COMM' + CPRP='$CPRP' + DEFAULT_MACHINE='$DEFAULT_MACHINE' + DEVICE='$DEVICE' + F77='$F77' + FFLAGS='$FFLAGS' + FLIB_PATH='$FLIB_PATH' + FLIB_PATH_LEADER='$FLIB_PATH_LEADER' + FLINKER='$FLINKER' + GETNAME_DEFS='$GETNAME_DEFS' + HAS_FORTRAN='$HAS_FORTRAN' + INCLUDE_PATH='$INCLUDE_PATH' + LIB_LIST='$LIB_LIST' + LIB_PATH='$LIB_PATH' + LIB_DIR='$LIB_DIR' + MAKE='$MAKE' + MPEGRAPHICS_FOBJS='$MPEGRAPHICS_FOBJS' + MPEGRAPHICS_FSOURCE='$MPEGRAPHICS_FSOURCE' + MPEGRAPHICS_OBJS='$MPEGRAPHICS_OBJS' + MPEGRAPHICS_SOURCE='$MPEGRAPHICS_SOURCE' + MPE_CFLAGS='$MPE_CFLAGS' + MPE_DIR='$MPE_DIR' + MPE_GRAPHICS='$MPE_GRAPHICS' + MPE_LIBS='$MPE_LIBS' + MPIR_HOME='$MPIR_HOME' + MPI_FOBJECTS='$MPI_FOBJECTS' + MPILIBNAME='$MPILIBNAME' + MPICC='$MPICC' + MPIF77='$MPIF77' + OPTFLAGS='$OPTFLAGS' + OPTFLAGSC='$OPTFLAGSC' + OPTFLAGSF='$OPTFLAGSF' + PREFIX='$PREFIX' + X_INC='$X_INC' + X_LIB='$X_LIB' + LIBS='$LIBS' + srcdir='$srcdir' + DEFS='$DEFS' + prefix='$prefix' + exec_prefix='$exec_prefix' + prsub='$prsub' + extrasub='$extrasub' + EOF + cat >> config.status <<\EOF + + top_srcdir=$srcdir + + CONFIG_FILES=${CONFIG_FILES-"Makefile contrib/mandel/Makefile contrib/mastermind/Makefile contrib/life/Makefile test/Makefile"} + for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then + srcdir=$top_srcdir + # Remove last slash and all that follows it. Not all systems have dirname. + dir=`echo $file|sed 's%/[^/][^/]*$%%'` + if test "$dir" != "$file"; then + test "$top_srcdir" != . && srcdir=$top_srcdir/$dir + test ! -d $dir && mkdir $dir + fi + echo creating $file + rm -f $file + echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file + sed -e " + $prsub + $extrasub + s%@RANLIB@%$RANLIB%g + s%@CPP@%$CPP%g + s%@FINC@%$FINC%g + s%@wishloc@%$wishloc%g + s%@TK_DIR@%$TK_DIR%g + s%@TCL_DIR@%$TCL_DIR%g + s%@TK_VERSION@%$TK_VERSION%g + s%@AR@%$AR%g + s%@ARCH@%$ARCH%g + s%@CC@%$CC%g + s%@CFLAGS@%$CFLAGS%g + s%@CLINKER@%$CLINKER%g + s%@COMM@%$COMM%g + s%@CPRP@%$CPRP%g + s%@DEFAULT_MACHINE@%$DEFAULT_MACHINE%g + s%@DEVICE@%$DEVICE%g + s%@F77@%$F77%g + s%@FFLAGS@%$FFLAGS%g + s%@FLIB_PATH@%$FLIB_PATH%g + s%@FLIB_PATH_LEADER@%$FLIB_PATH_LEADER%g + s%@FLINKER@%$FLINKER%g + s%@GETNAME_DEFS@%$GETNAME_DEFS%g + s%@HAS_FORTRAN@%$HAS_FORTRAN%g + s%@INCLUDE_PATH@%$INCLUDE_PATH%g + s%@LIB_LIST@%$LIB_LIST%g + s%@LIB_PATH@%$LIB_PATH%g + s%@LIB_DIR@%$LIB_DIR%g + s%@MAKE@%$MAKE%g + s%@MPEGRAPHICS_FOBJS@%$MPEGRAPHICS_FOBJS%g + s%@MPEGRAPHICS_FSOURCE@%$MPEGRAPHICS_FSOURCE%g + s%@MPEGRAPHICS_OBJS@%$MPEGRAPHICS_OBJS%g + s%@MPEGRAPHICS_SOURCE@%$MPEGRAPHICS_SOURCE%g + s%@MPE_CFLAGS@%$MPE_CFLAGS%g + s%@MPE_DIR@%$MPE_DIR%g + s%@MPE_GRAPHICS@%$MPE_GRAPHICS%g + s%@MPE_LIBS@%$MPE_LIBS%g + s%@MPIR_HOME@%$MPIR_HOME%g + s%@MPI_FOBJECTS@%$MPI_FOBJECTS%g + s%@MPILIBNAME@%$MPILIBNAME%g + s%@MPICC@%$MPICC%g + s%@MPIF77@%$MPIF77%g + s%@OPTFLAGS@%$OPTFLAGS%g + s%@OPTFLAGSC@%$OPTFLAGSC%g + s%@OPTFLAGSF@%$OPTFLAGSF%g + s%@PREFIX@%$PREFIX%g + s%@X_INC@%$X_INC%g + s%@X_LIB@%$X_LIB%g + s%@LIBS@%$LIBS%g + s%@srcdir@%$srcdir%g + s%@DEFS@%$DEFS% + " $top_srcdir/${file}.in >> $file + fi; done + + + exit 0 + EOF + chmod +x config.status + ${CONFIG_SHELL-/bin/sh} config.status + *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpe/configure.in Wed Oct 16 14:34:06 1996 *************** *** 0 **** --- 1,607 ---- + dnl This is an autoconf script. + dnl To rebuild the `configure' script from this, execute the command + dnl autoconf + dnl in the directory containing this script. You must have autoconf + dnl version 1.4 or later (but NOT version 2.0 or later) + dnl + dnl The following text appears in the resulting `configure' script, + dnl explaining how to rebuild it. + [#!/bin/sh + # Guess values for system-dependent variables and create Makefiles. + # Generated automatically using autoconf. + # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + progname="`echo $0 | sed 's:^\./\./:\./:'`" + print_error() { + echo "*# $*" 2>&1 ; + } + print_usage() { + cat <<. + Usage: ${progname} -arch=ARCH_TYPE [-prefix=INSTALL_DIR] + [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] + [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] + [-nof77] [-opt=OPTFLAGS] + [-make=MAKEPGM] + [-cflags=CFLAGS] [-fflags=FFLAGS] + [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] + [-lib=LIBRARY] [-mpilibname=MPINAME] + [-no_mpegraphics] + [-x11_lib=X11LIB] [-x11_inc=X11INC] + [-cross] + [-wish=WISH] [-tcldir=TCLDIR] [-tkdir=TKDIR] + [-fortnames=FORTRANNAMES] + [-ar_nolocal] + [-noranlib] + where + ARCH_TYPE = the type of machine that MPI is to be configured for + INSTALL_DIR = directory where MPE will be installed (optional) + OPTFLAGS = optimization flags to give the compilers (e.g. -g) + CFLAGS = flags to give C compiler + FFLAGS = flags to give Fortran compiler + MAKEPGM = version of make to use + WISH = Name of tcl/tk wish executable. Configure will attempt + to find a version of wish for you, but if there is + no wish in your path or you need to use a different version, + use this option. Used only for the display tools + (nupshot and upshot). tk 3.x required for nupshot; + tk 3.x or 4.x for upshot. + TCLDIR = Directory containing tcl. Must have lib/libtcl.a and + include/tcl.h . Used only for nupshot. + TKDIR = Directory containing tk 3.3, 3.4, 3.5, or 3.6. Must have + lib/libtk.a and include/tk.h . Used only for nupshot. + May be the same as TCLDIR. + FORTRANNAMES = Form of the Fortran names. See below. + X11LIB = Full path name for libX11.a + X11INC = Full path name for X11.h + + One and only one 'arch', and 'prefix' argument should be provided. + + You can select a different C and Fortran compiler by using the '-cc' and 'fc' + switches. The environment variables 'CC' and 'FC' can also provide values for + these but their settings may be overridden by the configure script. Using + '-cc=\$CC -fc=\$FC' will force configure to use those compilers. + These should be the compilers that you use for MPI programs. + + If '-cross' is given, configure assumes that you are cross-compiling. If it + is not given, configure expects to be able to run programs. Even if '-cross' + is not selected, configure will try to determine if you are cross-compiling; + this switch is needed only on systems where attempting to run a cross-compiled + program causes the configure script to hang. + + If '-no_mpegraphics' is used, then the MPE routines that make use of + X11 graphics will NOT be built; this is appropriate for systems that either do + not have the X11 include files or that do not support X11 graphics (some + message-passing systems cannot interoperate with X11). The options -x11_inc + and -x11_lib may be used to specify the locations of the X11 include files and + libraries in the event that configure cannot find them (they should both be + specified in that case). + + The option '-nof77' prevents the compilation of routines that require a + Fortran compiler. If this option is selected, you may not use the Fortran + interface to MPI. + + The option '-opt' allows you to specify options for the compilers (both C and + Fortran). For example, '-opt=-O' chooses optimized code generation on many + systems. '-optcc' and '-optf77' allow you to specify options for just the C + or Fortran compilers + + The option '-make' may be used to select an alternate make program. For + example, on FreeBSD systems, -make=gnumake may be required because of bugs in + the system make. + + The option '-fortnames=FORTRANNAMES' allows you to specify the form of the + Fortran names. This is used primarily to generate names with and without + trailing underscores for those systems that support both. Possible values are + FORTRANNAMES value if Fortran MPI_SEND looks like + DOUBLEUNDERSCORE mpi_send__ + UNDERSCORE mpi_send_ + CAPS MPI_SEND + NOUNDERSCORE mpi_send + This option should normally NOT be used; configure determines what the Fortran + compiler generates. This can be used to override that choice. + + The option '-ar_nolocal' prevents the library archive command from attempting + to use the local directory for temporary space. This option should be used + when (a) there isn't much space (less than 20 MB) available in the partition + where MPICH resides and (b) there is enough space in /tmp (or wherever ar + places temporary files by default). + + The option '-noranlib' causes the 'ranlib' step (needed on some systems to + build an object library) to be skipped. This is particularly useful on + systems where 'ranlib' is optional (allowed but not needed; because it is + allowed, configure chooses to use it just in case) but can fail (some + 'ranlib's are implemented as scripts using 'ar'; if they don't use the local + directory, they can fail (destroying the library in the process) if the + temporary directory (usually '/tmp') does not have enough space. This has + occured on some OSF systems. + + Sample Configure Usage: + + To make for an MPI with the MPI compile commands in your path: + + ./configure -cc=mpicc -f77=mpif77 + make + . + } + # + ARCH="" + LIB_PATH="" + FLIB_PATH="" + OPTFLAGS="" + OPTFLAGSF="" + NOF77=0 + AR_LOCAL=l + HAS_FORTRAN=1 + MPILIBNAME=mpi + MPI_FOBJECTS="\$(MPI_FOBJECTS)" + CFLAGS="" + # + # By not setting FFLAGS, we get the values from the environment + MPE_GRAPHICS="-DMPE_GRAPHICS" + MAKE=make + PREFIX="" + DEVCFLAGS="" + CONFIGURE_ARGS="$*" + DEFAULT_MACHINE='' + DEVICE_KIND=MPP + cross_compiling=0 + # + # This next variable is a version without quotes. + # We could also consider `echo $a | sed -e 's/"/\\"/g'` + CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '` + if test -n "$CONFIGURE_ARGS" ; then + echo "Configuring with args $CONFIGURE_ARGS" + fi + # + for arg + do + # Handle --exec-prefix with a space before the argument. + if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix= + # Handle --host with a space before the argument. + elif test x$next_host = xyes; then next_host= + # Handle --prefix with a space before the argument. + elif test x$next_prefix = xyes; then prefix=$arg; next_prefix= + # Handle --srcdir with a space before the argument. + elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= + else + case $arg in + # For backward compatibility, also recognize exact --exec_prefix. + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*) + exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e) + next_exec_prefix=yes ;; + + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + PREFIX=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + next_prefix=yes ;; + + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) + srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) + next_srcdir=yes ;; + + -arch=* | --arch=*) + package=`echo $arg|sed 's/-*arch=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid architecture name"; exit 1 + fi + ARCH=`echo $package|sed s/-/_/g` + eval "arch_`echo $package|sed s/-/_/g`=1" + ;; + + -comm=* | --comm=*) + package=`echo $arg|sed 's/-*comm=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid communications layer name"; + exit 1 + fi + COMM=`echo $package|sed s/-/_/g` + eval "comm_`echo $package|sed s/-/_/g`=1" + # Handle possible synonyms + if test -n "$comm_ch_eui" ; then + comm_ch_mpl=1 + COMM=ch_mpl + fi + ;; + + -device=* | --device=*) + package=`echo $arg|sed 's/-*device=//'` + # Delete all the valid chars; see if any are left. + if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then + print_error "configure: $package: invalid device name" ; exit 1 + fi + DEVICE=$package #|sed s/-/_/g` + # Can't have - in variable names + package=`echo $package | sed s/-/_/g` + eval "device_$package=1" + # Handle possible synonyms + if test -n "$device_ch_eui"; then + device_ch_mpl=1 + DEVICE=ch_mpl + fi + ;; + + -ar_nolocal | --ar_nolocal) + AR_LOCAL='' + ;; + + -noranlib | -no_ranlib) + RANLIB=':' + ;; + + -mpilibname=*) + MPILIBNAME=`echo A$arg|sed 's/A-*mpilibname=//'` + ;; + + -cross) + cross_compiling=1 + ;; + + -f77idx) + # Force POINTER_64_BITS definition + F77IDX=1 + ;; + + -cc=* | --cc=*) + MPICC=`echo $arg|sed 's/-*cc=//'` + CC="$MPICC" + USERCC=1 + ;; + + -fc=* | --fc=*) + MPIF77=`echo $arg|sed 's/-*fc=//'` + FC=$MPIF77 + USERF77=1 + ;; + + -fortnames=*) + # Valid values are + # FORTRANDOUBLEUNDERSCORE + # FORTRANUNDERSCORE + # FORTRANCAPS + # FORTRANNOUNDERSCORE + FORTRANNAMES="FORTRAN`echo $arg|sed 's/-*fortnames=//'`" + ;; + + -clinker=* | --clinker=*) + CLINKER=`echo $arg|sed 's/-*clinker=//'` + USERCLINKER=1 + ;; + + -flinker=* | --flinker=*) + FLINKER=`echo $arg|sed 's/-*flinker=//'` + USERFLINKER=1 + ;; + + -lib=* | --lib=*) + package="`echo $arg|sed 's/-*lib=//'`" + USERLIB="$package" ;; + + -opt=* | --opt=*) + package="`echo $arg|sed 's/-*opt=//'`" + OPTFLAGS="$package" ;; + + -optcc=* | --optcc=*) + package="`echo $arg|sed 's/-*optcc=//'`" + OPTFLAGSC="$package" ;; + + -optf77=* | --optf77=*) + package="`echo $arg|sed 's/-*optf77=//'`" + OPTFLAGSF="$package" ;; + + -cflags=* | --cflags=*) + package="`echo $arg|sed 's/-*cflags=//'`" + USER_CFLAGS="$package" + CFLAGS="$CFLAGS $package" ;; + + -fflags=* | --fflags=*) + package="`echo $arg|sed 's/-*fflags=//'`" + FFLAGS="$package" ;; + + -no_mpegraphics | --no_mpegraphics) + MPE_GRAPHICS="" + echo "Make will not build MPE graphics routines" ;; + + -x11_lib=* | --x11_lib=* ) + USERXLIB=1 + X11LIB="`echo $arg|sed 's/-*x11_lib=//'`" + ;; + + -x11_inc=* | --x11_inc=* ) + USERXLIB=1 + X11INC="`echo $arg|sed 's/-*x11_inc=//'`" + ;; + + -make=* | --make=*) + package=`echo $arg|sed 's/-*make=//'` + MAKE="$package" + ;; + + -nof77 | --nof77) + echo "Don't build the Fortran interfaces" + NOF77=1 + HAS_FORTRAN=0 + FC=true + CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" + MPI_FOBJECTS="" ;; + + -wish=* | --wish=*) + wishloc="`echo $arg|sed 's/-*wish=//'`" + ;; + + -tkdir=* | --tkdir=*) + TK_DIR="`echo $arg|sed 's/-*tkdir=//'`" + ;; + + -tcldir=* | --tcldir=*) + TCL_DIR="`echo $arg|sed 's/-*tcldir=//'`" + ;; + + -nobanner) + nobanner=1 + ;; + + -echo ) + set -x + configure_echo=1 + ;; + + -u | -usage | --usage | --usag | --usa | --us | --u | -help | --help ) + print_usage >& 2 + exit 1 ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v) + verbose=yes ;; + + *) + print_error "Unrecognized configure option $arg" + ;; + esac + fi + done] + + dnl Finish the initalization + AC_PREPARE() + # + # + PAC_GETWD(MPIR_TRIAL,Makefile.in) + MPIR_HOME=$MPIR_TRIAL + # + F77="$FC" + MPEGRAPHICS_SOURCE="" + MPEGRAPHICS_OBJS="" + MPEGRAPHICS_FSOURCE="" + MPEGRAPHICS_FOBJS="" + X_INC="" + X_LIB="" + MPE_DIR="." + # + # Should eventually use a file like $file.run to see if the program should + # be run or just compiled. And eventually, this should be run EARLY, + # before checking for things like functions and include files. + # + PAC_CHECK_COMPILER_OK(cc_works=1,cc_works=0) + if test $cc_works = 0 ; then + print_error "Could not compile a simple file with $CC!" + print_error "Check for license and path restrictions on $CC." + exit 1 + fi + if test $NOF77 = 0 ; then + PAC_CHECK_F77_COMPILER_OK(,NOF77=1;HAS_FORTRAN=0;HAS_F77=0; + CFLAGS="-DMPID_NO_FORTRAN $CFLAGS" + F77="echo no Fortran compiler" + FLINKER="$F77" + MPI_FOBJECTS="") + fi + + # + AR="ar cr$AR_LOCAL" + # + # Using this autoconf macro for ranlib doesn't handle the problem + # of 'helpful' ranlib's that issue error messages (!). Once + # we've identified the proper compiler etc, we'll try this + # ranlib below; if it fails, we'll replace it with ':' + # + if test -z "$RANLIB" ; then + AC_PROG_RANLIB + fi + # + if test "$RANLIB" != ":" ; then + PAC_RANLIB_WORKS + fi + # + # Some Sun SOLARIS systems don't have AR (at least, not in a typical user + # path) + # Remove any arguments from the string AR + ARTEST=`expr "$AR" : "\(.*\) "` + PAC_PROGRAM_CHECK(ARFOUND,$ARTEST,1,,ARLOC) + if test -z "$ARLOC" ; then + # Check for /usr/ccs/bin/ar ; Solaris likes to hide anything remotely + # useful in this directory + print_error "The library archiver $AR is not in your path" + print_error "MPICH cannot be built without this program, which" + print_error "should be part of ANY program development environment." + if test -x /usr/ccs/bin/ar ; then + print_error "You need /usr/ccs/bin in your path." + else + print_error "Check your path; contact your system vendor if your" + print_error "path appears to be ok." + fi + exit 1 + fi + # + # CPRP is the version of cp that accepts -r and -p arguments. + # See CRAY below + CPRP="cp" + INCLUDE_PATH="" + USER_INCLUDE_PATH="" + USER_DEFS="" + LIB_LIST="" + MPE_LIBS="" + + if test -n "$MPE_DIR"; then + MPE_DIR="$MPIR_HOME/$MPE_DIR" + if test -n "$MPE_GRAPHICS"; then + # FIND_X doesn't always work correctly when cross compiling, so we + # try to be more careful and conservative + PAC_FIND_X11 + fi + if test -n "$MPE_GRAPHICS" -a -z "$no_x" ; then + MPE_LIBS="-lmpe -lX11 -lm" + MPEGRAPHICS_SOURCE="mpe_graphics.c xcolor.c xframe.c xinit.c xwmap.c xmouse.c" + MPEGRAPHICS_OBJS="mpe_graphics.o xcolor.o xframe.o xinit.o xwmap.o xmouse.o" + MPEGRAPHICS_FSOURCE="mpe_graphicsf.c" + MPEGRAPHICS_FOBJS="mpe_graphicsf.o" + if test -z "$x_includes" ; then + X_INC="" + else + X_INC="-I$x_includes" + fi + if test -z "$x_libraries" ; then + X_LIB="" + else + X_LIB="-L$x_libraries" + MPE_LIBS="$X_LIB -lmpe -lX11 -lm" + fi + # On the Meiko CS2, you have to add additional libraries to satisfy + # the externals needed by -X11. + if test -n "$arch_meiko" ; then + MPE_LIBS="$MPE_LIBS -lsocket -lnsl" + fi + else + MPE_GRAPHICS="" + MPE_LIBS="-lmpe" + fi + else + MPE_GRAPHICS="" + fi + # + # Check for the functions that may be needed by the ADI to implement + # Processor_name. Save these defines in a special place. + SAVEDEFS="$DEFS" + DEFS="" + AC_FUNC_CHECK(uname,AC_DEFINE(HAVE_UNAME)haveuname=1) + AC_FUNC_CHECK(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME)havegethostbyname=1) + dnl AC_HAVE_FUNCS(uname gethostbyname) + # If we have uname and gethostbyname, we can skip getdomainname ... + if test "$haveuname" != 1 -o "$havegethostbyname" != 1 ; then + AC_HAVE_FUNCS(gethostname sysinfo) + # + # systeminfo is needed for sysinfo + PAC_CHECK_HEADERS(sys/systeminfo.h) + # + # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing + # indeed - stuff like this is why Windows95/NT WILL WIN). + AC_CHECK_FUNC(getdomainname,has_getdomainname=1,has_getdomainname=0) + if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then + PAC_PROGRAM_CHECK(has_domainname,domainname,1,0,d_domainname) + PAC_PROGRAM_CHECK(has_hostname,hostname,1,0,d_hostname) + PAC_PROGRAM_CHECK(has_rup,rup,1,0,d_rup) + # Form hostname.domainname, do rup to it + # rup may not be enabled, but short of running a program to lookup the + # local host, there does not seem to be a better alternative. + # + if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then + changequote(,) + fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'` + changequote([,]) + # echo $fullhost + fullhost="${fullhost}.`$d_domainname`" + response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'` + # echo $fullhost + if test -n "$response" ; then + print_error "The getdomainname system routine has been rendered USELESS" + print_error "on your system. This is not a bug and will not affect" + print_error "MPICH. Some MPE routines (particularly those that" + print_error "interact with X Windows) may not work." + else + AC_DEFINE(HAVE_GETDOMAINNAME) + fi + fi + fi + fi + GETNAME_DEFS="$DEFS" + DEFS="$SAVEDEFS" + # + # Generate the name for the MPI-C, MPI-CC, and MPI-F77 compilers (for use + # in Makefiles that should not be MPICH dependent + # MPICC etc should be set on the configure line + if test -z "$MPICC" ; then + MPICC=$MPIR_HOME/lib/$ARCH/$COMM/mpicc + fi + if test -z "$MPIF77" ; then + MPIF77=$MPIR_HOME/lib/$ARCH/$COMM/mpif77 + fi + if test -z "$LIB_DIR" ; then + LIB_DIR="." + fi + # + # + # Substitute variables + # Variables used in scripts only + # FINC contains an @MPIR_HOME@, so it needs to come first + AC_SUBST(FINC)dnl + AC_SUBST(wishloc)dnl + AC_SUBST(TK_DIR)dnl + AC_SUBST(TCL_DIR)dnl + AC_SUBST(TK_VERSION)dnl + # Variables used by Makefile.in's: + AC_SUBST(AR)dnl + AC_SUBST(ARCH)dnl + AC_SUBST(CC)dnl + AC_SUBST(CFLAGS)dnl + AC_SUBST(CLINKER)dnl + AC_SUBST(COMM)dnl + AC_SUBST(CPRP)dnl + AC_SUBST(DEFAULT_MACHINE)dnl + AC_SUBST(DEVICE)dnl + AC_SUBST(F77)dnl + AC_SUBST(FFLAGS)dnl + AC_SUBST(FLIB_PATH)dnl + AC_SUBST(FLIB_PATH_LEADER)dnl + AC_SUBST(FLINKER)dnl + AC_SUBST(GETNAME_DEFS)dnl + AC_SUBST(HAS_FORTRAN)dnl + AC_SUBST(INCLUDE_PATH)dnl + AC_SUBST(LIB_LIST)dnl + AC_SUBST(LIB_PATH)dnl + AC_SUBST(LIB_DIR)dnl + AC_SUBST(MAKE)dnl + AC_SUBST(MPEGRAPHICS_FOBJS)dnl + AC_SUBST(MPEGRAPHICS_FSOURCE)dnl + AC_SUBST(MPEGRAPHICS_OBJS)dnl + AC_SUBST(MPEGRAPHICS_SOURCE)dnl + AC_SUBST(MPE_CFLAGS)dnl + AC_SUBST(MPE_DIR)dnl + AC_SUBST(MPE_GRAPHICS)dnl + AC_SUBST(MPE_LIBS)dnl + AC_SUBST(MPIR_HOME)dnl + AC_SUBST(MPI_FOBJECTS)dnl + AC_SUBST(MPILIBNAME)dnl + AC_SUBST(MPICC)dnl + AC_SUBST(MPIF77)dnl + AC_SUBST(OPTFLAGS)dnl + AC_SUBST(OPTFLAGSC)dnl + AC_SUBST(OPTFLAGSF)dnl + AC_SUBST(PREFIX)dnl + AC_SUBST(RANLIB)dnl + AC_SUBST(X_INC)dnl + AC_SUBST(X_LIB)dnl + # End configuration file + AC_OUTPUT(Makefile Makefile_nompi contrib/mandel/Makefile contrib/mastermind/Makefile contrib/life/Makefile test/Makefile) *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpe/maketar Wed Oct 16 14:22:54 1996 *************** *** 0 **** --- 1,32 ---- + #! /bin/sh + # + # Make a tar file of the MPE code, removing the RCS files etc. + # + set -x + # + # Use tar to copy to /tmp + if [ ! -d /tmp/mpecopy ] ; then + mkdir /tmp/mpecopy + fi + cd /tmp/mpecopy + tar cf - -C /home/MPI/mpich mpe | tar xf - + # + # Update a few files + rm /tmp/mpecopy/mpe/requests.h + cp /home/MPI/mpich/profiling/lib/requests.h /tmp/mpecopy/mpe + rm /tmp/mpecopy/mpe/point.h + cp /home/MPI/mpich/profiling/lib/point.h /tmp/mpecopy/mpe + cp /home/MPI/mpich/include/mpiprof.h /tmp/mpecopy/mpe + # + # Remove the RCS files, old executables, and debris + cd /tmp/mpecopy/mpe + find . \( -name 'RCS' -o -name '*.o' -o -name '#*#' -o \ + -name '*~' -o -name 'mputil.mp*' -o -name Makefile -o \ + -name makefile -o -name 'PI*' \) -print | \ + sed 's%^%/bin/rm -rf %g' | sh + # + # rebuild the tar file + cd /tmp/mpecopy + tar cf - mpe | gzip > /tmp/mpe.tar.gz + /bin/rm -rf /tmp/mpecopy & + echo "tar file in /tmp/mpe.tar.gz" *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpid/ch2/chstartdb.c Thu Sep 19 17:33:34 1996 *************** *** 0 **** --- 1,74 ---- + + /* The following code has been added to start the debugger (ddd). To do this, + the process forks a second (child) process. This child process execs the + debugger, giving the debugger the PID of the parent (the MPI program). + The debugger starts, attaches to and gains control of the parent. + + Lloyd Lewins, Hughes Aircraft Co. + */ + { int i, j; + int startddd = 0; + int pid; + int rc; + int sig; + char masterpid[256]; + char *display; + + /* Check for the command line argument "-ddd " */ + for (i = 1; i < *argc; ) { + if (strcmp ((*argv)[i], "-ddd") == 0) { + startddd = 1; + for (j = i; j < *argc - 1; j++) + (*argv)[j] = (*argv)[j+1]; + (*argc)--; + if (i < *argc) { + display = (*argv)[i]; + for (j = i; j < *argc - 1; j++) + (*argv)[j] = (*argv)[j+1]; + (*argc)--; + } else + p4_error( "Display value missing after '-ddd'", 0 ); + } else + i++; + + } + + /* Start the debugger (ddd) if required */ + if (startddd) { + + /* Fork a new process for the debugger */ + pid = fork (); + + /* If pid is zero, we are the new process, otherwise we are the MPI + program */ + if (pid == 0) { + + /* Create a new group, and make the debugger part of this group */ + setpgid (getpid(), getpid()); + + /* Create a string containing the pid of the MPI program */ + + sprintf (masterpid, "%u", getppid()); + + /* Exec the debugger */ + rc = execlp (DDD, DDD, "-attach-source-window", "-debugger", + "/home/9519/local/bin/gdb", + "-display", display, (*argv)[0], + masterpid, NULL); + + /* We should never get to here!! */ + if (rc < 0) + perror("execlp"); + exit (1); + + } else { + /* Wait for the debugger to resume us. We require the user to + enter the command "signal SIGINT" instead of the usual + command "continue". + */ + signal (SIGINT, intrhandler); + sig = pause (); + signal (SIGINT, SIG_DFL); + } + } + } *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/mpid/ch_mpl/spxcp.c Mon Oct 7 20:52:37 1996 *************** *** 0 **** --- 1,186 ---- + /* + * This code was provided by "Robert J. Harrison" + * + * It has been SLIGHTLY modified by William Gropp. + * + * The purpose is to speed job startup on the SP by running jobs from + * the /tmp disks rather than from the same overburdened server. + * This shouldn't be necessary, but it is. + * + * Usage: + * node 0 copies the executable to local disk + * cp /sphome/harrison/nwchem /tmp/nwchem + * + * copy to all other nodes and mark as executable on all nodes + * spxcp /tmp/nwchem + * + * fire up parallel task + * /tmp/nwchem ... + * + * Compile and link with "mpcc -o copyexe copyexe.c". + * + */ + + #include + #include + #include + + static long dontcare, allmsg, nulltask, allgrp; + + static void Error(const char *string, long code) + { + (void) fflush(stdout); + (void) fflush(stderr); + + (void) fprintf(stderr, "%3d:%s %ld(%x)\n", NODEID_(), string, code, code); + (void) perror("system message"); + + (void) fflush(stdout); + (void) fflush(stderr); + + mpc_stopall(1L); + } + + static void wildcards() + { + long buf[4], qtype, nelem, status; + qtype = 3; + nelem = 4; + status = mpc_task_query(buf,nelem,qtype); + if(status==-1) + Error("docopy: wildcards: mpc_task_query error", -1L); + + dontcare = buf[0]; + allmsg = buf[1]; + nulltask = buf[2]; + allgrp = buf[3]; + } + + static long NODEID_() + /*\ Return number of the calling process ... at the moment this is + * just the same as the EUIH task numbering in allgrp + \*/ + { + long numtask, taskid, r; + r= mpc_environ(&numtask, &taskid); + return (taskid); + } + + void BRDCST_(type, buf, lenbuf, originator) + long *type; + char *buf; + long *lenbuf; + long *originator; + /* + broadcast buffer to all other processes from process originator + ... all processes call this routine specifying the same + orginating process. + */ + { + long status; + long me = NODEID_(); + long ttype = *type; + + status = mpc_bcast(buf, *lenbuf, *originator, allgrp); + if(status == -1) + Error("BRDCST failed: mperrno error code ", mperrno); + } + + static void docopy(const char *filename) + /* + Process 0 has access to an executable named filename ... copy it + to all other processes with the SAME name. + (presumably fileout is in /tmp so the fixed path makes sense) + */ + { + char *buffer; + FILE *file; + long length, nread=32768, len_nread=sizeof(long); + long typenr = 1; + long typebuf = 2; + + if (!(buffer = malloc((unsigned) nread))) + Error("docopy: failed to allocate the I/O buffer",nread); + + if (NODEID_() == 0) { + + /* I have the original file ... open and check its size */ + + if ((file = fopen(filename,"r")) == (FILE *) NULL) { + (void) fprintf(stderr,"me=%ld, filename = %s.\n",NODEID_(),filename); + Error("docopy: 0 failed to open original file", 0L); + } + + /* Quick sanity check on the length */ + + (void) fseek(file, 0L, (int) 2); /* Seek to end of file */ + length = ftell(file); /* Find the length of file */ + (void) fseek(file, 0L, (int) 0); /* Seek to beginning of file */ + if ( (length<0) || (length>1e9) ) + Error("docopy: the file length is -ve or very big", length); + + /* Send the file in chunks of nread bytes */ + + while (nread) { + nread = fread(buffer, 1, (int) nread, file); + BRDCST_(&typenr, (char *) &nread, &len_nread, 0L); + typenr++; + if (nread) { + BRDCST_(&typebuf, buffer, &nread, 0L); + typebuf++; + } + } + } + else { + + /* Open the file for the duplicate */ + + if ((file = fopen(filename,"w+")) == (FILE *) NULL) { + (void) fprintf(stderr,"me=%ld, filename = %s.\n",NODEID_(),filename); + Error("docopy: failed to open duplicate file", 0L); + } + + /* Receive data and write to file */ + + while (nread) { + BRDCST_(&typenr, (char *) &nread, &len_nread, 0L); + typenr++; + if (nread) { + BRDCST_(&typebuf, buffer, &nread, 0L); + typebuf++; + if (nread != fwrite(buffer, 1, (int) nread, file)) + Error("docopy: error data to duplicate file", nread); + } + } + } + + /* Tidy up the stuff we have been using */ + + (void) fflush(file); + (void) fclose(file); + (void) free(buffer); + } + + int main(int argc, char **argv) + { + + wildcards(); /* get the system wildcards */ + + if (argc != 2) + Error("usage: spxcp filename\n", 0L); + + docopy(argv[1]); + + if (chmod(argv[1], (mode_t) 0755)) + Error("copyexe: chmod failed\n", 0L); + + mpc_sync(allgrp); + + return 0; + } + + + + + + *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/src/env/handle2int.c Tue Sep 24 16:50:31 1996 *************** *** 0 **** --- 1,37 ---- + /* + * $Id$ + * + * (C) 1996 by Argonne National Laboratory and Mississipi State University. + * See COPYRIGHT in top-level directory. + */ + + #include "mpiimpl.h" + + /*@C + MPI_Handle2int - Convert a C handle to an integer (Fortran) MPI handle + + Input Parameters: + . c_handle - C handle + . handle_kind - Type of handle + + Return value: + . f_handle - Fortran version of handle. + + Notes for Fortran users: + There is no Fortran version of this routine. + + .N MPI2 + @*/ + MPI_Fint MPI_Handle2int( c_handle, handle_kind ) + MPI_Handle_type c_handle; + MPI_Handle_enum handle_kind; + { + switch (handle_kind) { + case MPI_DATATYPE_HANDLE: + case MPI_ERRHANDLE_HANDLE: + return (MPI_Fint) c_handle; + break; + default: + return (MPI_Fint)MPIR_FromPointer( c_handle ); + } + } *** /dev/null Thu Oct 17 13:02:21 1996 --- mpich/src/env/int2handle.c Tue Sep 24 16:50:01 1996 *************** *** 0 **** --- 1,40 ---- + /* + * $Id$ + * + * (C) 1996 by Argonne National Laboratory and Mississipi State University. + * See COPYRIGHT in top-level directory. + */ + + #include "mpiimpl.h" + + /*@C + MPI_Int2handle - Convert an integer (Fortran) MPI handle to a C handle + + Input Parameters: + . f_handle - Fortran integer handle + . handle_kind - Type of handle + + Return value: + . c_handle - C version of handle; should be cast to the correct type. + + Notes: + The returned handle should be cast to the correct type by the user. + + Notes for Fortran users: + There is no Fortran version of this routine. + + .N MPI2 + @*/ + MPI_Handle_type MPI_Int2handle( f_handle, handle_kind ) + MPI_Fint f_handle; + MPI_Handle_enum handle_kind; + { + switch (handle_kind) { + case MPI_DATATYPE_HANDLE: + case MPI_ERRHANDLE_HANDLE: + return (MPI_Handle_type) f_handle; + break; + default: + return (MPI_Handle_type)MPIR_ToPointer( f_handle ); + } + }