From 44848c8fbb927bd1838e18f5fad6af8c543c2b42 Mon Sep 17 00:00:00 2001 From: Justin Bronder Date: Sun, 18 Jan 2009 21:55:00 +0000 Subject: Bump mpich2-1.0.8. Fixes #221193, #221635, #242180 as well as some other cleanup. Also removed mpe2 from this ebuild so it can also be used with openmpi, see the science overlay for now. Taking over as maintainer after talking to kanaka. Package-Manager: portage-2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64 --- sys-cluster/mpich2/ChangeLog | 16 +- sys-cluster/mpich2/Manifest | 16 +- .../mpich2-1.0.8-gforker-install-alt-fix.patch | 12 ++ .../mpich2/files/mpich2-1.0.8-mpdconf-env.patch | 108 +++++++++++ .../files/mpich2-1.0.8-site-packages-py.patch | 161 ++++++++++++++++ sys-cluster/mpich2/files/mpich2.envd | 1 + sys-cluster/mpich2/metadata.xml | 5 +- sys-cluster/mpich2/mpich2-1.0.8.ebuild | 203 +++++++++++++++++++++ 8 files changed, 513 insertions(+), 9 deletions(-) create mode 100644 sys-cluster/mpich2/files/mpich2-1.0.8-gforker-install-alt-fix.patch create mode 100644 sys-cluster/mpich2/files/mpich2-1.0.8-mpdconf-env.patch create mode 100644 sys-cluster/mpich2/files/mpich2-1.0.8-site-packages-py.patch create mode 100644 sys-cluster/mpich2/files/mpich2.envd create mode 100644 sys-cluster/mpich2/mpich2-1.0.8.ebuild (limited to 'sys-cluster/mpich2') diff --git a/sys-cluster/mpich2/ChangeLog b/sys-cluster/mpich2/ChangeLog index ccae77d37372..74bb9a5122ea 100644 --- a/sys-cluster/mpich2/ChangeLog +++ b/sys-cluster/mpich2/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sys-cluster/mpich2 -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.31 2008/09/03 07:33:41 opfer Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/ChangeLog,v 1.32 2009/01/18 21:54:59 jsbronder Exp $ + +*mpich2-1.0.8 (18 Jan 2009) + + 18 Jan 2009; Justin Bronder + +files/mpich2-1.0.8-gforker-install-alt-fix.patch, + +files/mpich2-1.0.8-mpdconf-env.patch, + +files/mpich2-1.0.8-site-packages-py.patch, +files/mpich2.envd, + metadata.xml, +mpich2-1.0.8.ebuild: + Bump mpich2-1.0.8. Fixes #221193, #221635, #242180 as well as some other + cleanup. Also removed mpe2 from this ebuild so it can also be used with + openmpi, see the science overlay for now. Taking over as maintainer after + talking to kanaka. 03 Sep 2008; Christian Faulhammer mpich2-1.0.3.ebuild, mpich2-1.0.3-r1.ebuild, mpich2-1.0.6.ebuild: diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest index aae9f799990a..cfac262b5054 100644 --- a/sys-cluster/mpich2/Manifest +++ b/sys-cluster/mpich2/Manifest @@ -11,17 +11,23 @@ AUX mpich2-1.0.6-fPIC.patch 4264 RMD160 c4858486a513c86e4737eddea05a79c9c3f084fb AUX mpich2-1.0.6-makefile.patch 1758 RMD160 af1eafc2e65d7ef33206c945c947418920704268 SHA1 c81be875e94a8b298fc10b7b7370393003151fd4 SHA256 4ab34c5dc07322dc71df29d27ae96c9e88f1af444f980547dc5d3a055fdd2577 AUX mpich2-1.0.6-no-pvfs2.patch 1014 RMD160 627224ce6f4093ef5624107d53211b4de9c43b62 SHA1 846e9fe09153e9a6e6cd87b13b021d176b16631a SHA256 d69529a23626af31143945557a71ad7690169b7db0b8446183b4d8703b220e76 AUX mpich2-1.0.6-shlib.patch 1576 RMD160 b68da396b97cfce783e5439eb53388c96ee74bef SHA1 0f6f7f929d69ec70c5ec14a785c4388a032166b7 SHA256 32ed3e4fa4048b3efcea3db55326c89ccb50bf86d0928e6fc8b0b3e715702089 +AUX mpich2-1.0.8-gforker-install-alt-fix.patch 621 RMD160 5b9904ae02f1c1098fdfd2dc4717610f89469afd SHA1 a33bcefa87d990a678436ebfac70976069a7f90d SHA256 a79e469b08e0a3f6c17ec7ec7ea01d3a56a553803fefd24f3794237eead36ced +AUX mpich2-1.0.8-mpdconf-env.patch 5041 RMD160 c3d9f6ebd43443a24614da030253cf8c503afd59 SHA1 5b453a171f8b1dce93e3c2e675e5b3d4f05514e8 SHA256 b8c81614bba8c748db2ec24a7683d27b3a0430950fecd5644fd1f97f8e5ab2f9 +AUX mpich2-1.0.8-site-packages-py.patch 7534 RMD160 93b2cab20620da379615eaf3bfc7279384987722 SHA1 706313c20e1d4d6a4a060c8ac36befdb5ee3b926 SHA256 a857e7c0effa7cdd62c1bc1bd054b4746764246410062d373e7e0892bcd20df8 +AUX mpich2.envd 45 RMD160 e29a0d617bbc15cc42d3088f8a79c1c715b353fa SHA1 765b885d0e1d65fe7ba845cf72e3e923613d6514 SHA256 d6f128f84e1d015922af42e1280586b84737740b2517cc0b35f498b571f252f9 DIST mpich2-1.0.3.tar.gz 12166368 RMD160 5e7cd42f8359d81e6578d1fffca4708471e03cec SHA1 0ca48abaa98e98f0136508463886aad39ecefccb SHA256 294717fc05e9d509ed0e45c99709ddba696ad6919c47fc0801a410fe129623df DIST mpich2-1.0.6p1.tar.gz 15437620 RMD160 c3249bec1936bd9f3de9a8bb83f29bd32b06c191 SHA1 f8acd360df0380774d74804a706ffc1022acd62e SHA256 38808f96071965c79451a8d975fe4f28454f56f27a19ce13b2aec85012521fcc +DIST mpich2-1.0.8.tar.gz 17237476 RMD160 646cf50fbdc60a49809f4d0a6bcaf2835844db1f SHA1 41d6f6ce1034ecec5c14fb03592730ae2dd071e5 SHA256 7551ce20f3ef366567c566d08782323360b5dbd2d15d816e41c10b5f96eaf369 EBUILD mpich2-1.0.3-r1.ebuild 6000 RMD160 567b0c8a1490cf027360f64922bb1c7b790febfe SHA1 c3f299110632a25b820fe535523c82ef5916751e SHA256 53a1eb944df4cd7e3298c517ea9d5cd75def1630e6f5fd307d66f01b3295025c EBUILD mpich2-1.0.3.ebuild 2809 RMD160 2b55e1f9737baa86305da05949dbab67d47352a3 SHA1 4c1c76a39202f91f859c43647900060fba9328f4 SHA256 65b88fa53a8d68d7f8db72c74badf5f4e8925f700d9affb7c5555562b4bf3ff3 EBUILD mpich2-1.0.6.ebuild 10906 RMD160 2352bb02c24166018cbbcd4bad9eba9ffa86597b SHA1 c9ba43c633a7bbbe0f29ceba085252ab2d1f7763 SHA256 930a4d98329b2daac7d8ea8f15299125a3c4a8c311a446e831b80aa7eade5c17 -MISC ChangeLog 7425 RMD160 66b8691c8dd21682612de3d0b57503054e7cf876 SHA1 63604b7ff5ec5adbc29a907349765419b6474cfe SHA256 b82c91b88ce0ea330660ce2f896700ebfcf01d2678119826fcd1fc0956eb17b7 -MISC metadata.xml 602 RMD160 2c09f3b335878d86131b3b7a21d814ca8cb5bb8d SHA1 fca12bc927cc757301ea8050cb8d0ebe833fd655 SHA256 266b1d2fbd854e268f0c7c8e0a970cd5541e31440368e847ce971dc817799796 +EBUILD mpich2-1.0.8.ebuild 5346 RMD160 77305d509c62339cb67d09b7b0d59f068b68667a SHA1 de94fdec9adb5f33bdef1ddc90d35e3551585b37 SHA256 a23bd19390dc9a43a426371f0f3262c4261bf000560ea0048cebf3b635c4df8e +MISC ChangeLog 7956 RMD160 fe292f7c1ad1f980caf57d80684485039aa792dd SHA1 44f8e644807840e4f6d19fc3a17e8339deee4e29 SHA256 3f9313bc63fa678867b3b3f5203fb1b85a148636bc42df45f5ccdf53e2e7ee04 +MISC metadata.xml 668 RMD160 f56f9c5c751af5fa65c848c16dae61f11ad40de6 SHA1 9e5221933dd0c7bd918fa7a4791bb6e0017fba27 SHA256 843b215b79e31646bb4f205a62a612c5a98224845288fadcb8a2e25ecf1d5668 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAki+Pg0ACgkQNQqtfCuFneOeDgCfQWwTl5LukpaVRN4ykqTfbIE0 -Co4AoJnhFoT1AmOV7iESrAgfRrFKccOh -=VOts +iEYEARECAAYFAklzpTkACgkQ4MrvBE1wQ8kcjQCfSG24CR3IE6SknaP00Q7pkPX7 +QUcAoI8JEbcBPlJiWiWuv+M7tldMHEPl +=7CLq -----END PGP SIGNATURE----- diff --git a/sys-cluster/mpich2/files/mpich2-1.0.8-gforker-install-alt-fix.patch b/sys-cluster/mpich2/files/mpich2-1.0.8-gforker-install-alt-fix.patch new file mode 100644 index 000000000000..00774049fa32 --- /dev/null +++ b/sys-cluster/mpich2/files/mpich2-1.0.8-gforker-install-alt-fix.patch @@ -0,0 +1,12 @@ +--- mpich2-1.0.8/src/pm/gforker/Makefile.in-orig 2008-11-01 13:18:37.685990975 -0400 ++++ mpich2-1.0.8/src/pm/gforker/Makefile.in 2008-11-01 13:19:03.584804978 -0400 +@@ -176,6 +176,9 @@ + + # A special alternate installation target when using multiple process managers + install-alt: mpiexec ++ if [ ! -d ${DESTDIR}${exec_prefix} ] ; then $(MKDIR_P) ${DESTDIR}${exec_prefix} ; fi ++ if [ ! -d ${DESTDIR}${prefix} ] ; then $(MKDIR_P) ${DESTDIR}${prefix} ; fi ++ if [ ! -d ${DESTDIR}${bindir} ] ; then $(MKDIR_P) ${DESTDIR}${bindir} ; fi + $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) mpiexec $(DESTDIR)${bindir}/mpiexec.gforker + + diff --git a/sys-cluster/mpich2/files/mpich2-1.0.8-mpdconf-env.patch b/sys-cluster/mpich2/files/mpich2-1.0.8-mpdconf-env.patch new file mode 100644 index 000000000000..f29682ad950a --- /dev/null +++ b/sys-cluster/mpich2/files/mpich2-1.0.8-mpdconf-env.patch @@ -0,0 +1,108 @@ +diff -urN mpich2-1.0.8/src/pm/mpd/Makefile.in mpich2-1.0.8_p/src/pm/mpd/Makefile.in +--- mpich2-1.0.8/src/pm/mpd/Makefile.in 2008-11-01 16:55:07.409787116 -0400 ++++ mpich2-1.0.8_p/src/pm/mpd/Makefile.in 2008-11-04 20:37:19.510506041 -0500 +@@ -78,7 +78,7 @@ + $(C_LINK) -o mpdroot ${mpdroot_OBJECTS} $(LIBS) + + mpdroot.o: ${srcdir}/mpdroot.c ${srcdir}/mpdroot.h mpdconf.h +- ${C_COMPILE} -c $< ++ ${C_COMPILE} -DSYSCONFDIR=\"@sysconfdir@\" -c $< + + # The following lines provide the right libraries for all example programs + .c: +@@ -136,7 +136,10 @@ + fi + -@for cmd in ${PYTHON_SOURCE} ; do \ + if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ +- sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ ++ sed \ ++ -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' \ ++ -e 's,/etc/mpd.conf,@sysconfdir@/mpd.conf,g' \ ++ ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ + ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ + ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ + done +@@ -218,7 +221,7 @@ + + mpich2-mpdroot.o: ${srcdir}/mpdroot.c ${srcdir}/mpdroot.h mpdconf.h + ${INSTALL} -m 644 ${srcdir}/mpdroot.c mpich2-mpdroot.c +- ${C_COMPILE} -c mpich2-mpdroot.c ++ ${C_COMPILE} -DSYSCONFDIR=\"@sysconfdir@\" -c mpich2-mpdroot.c + rm -f mpich2-mpdroot.c + + # A special alternate installation target when using multiple process managers +@@ -238,7 +241,10 @@ + fi + for cmd in ${PYTHON_SOURCE} ; do \ + if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ +- sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ ++ sed \ ++ -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' \ ++ -e 's,/etc/mpd.conf,@sysconfdir@/mpd.conf,g' \ ++ ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ + ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ + ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ + done +diff -urN mpich2-1.0.8/src/pm/mpd/mpdlib.py mpich2-1.0.8_p/src/pm/mpd/mpdlib.py +--- mpich2-1.0.8/src/pm/mpd/mpdlib.py 2007-11-08 18:47:44.000000000 -0500 ++++ mpich2-1.0.8_p/src/pm/mpd/mpdlib.py 2008-11-04 20:40:36.812894529 -0500 +@@ -1341,11 +1341,11 @@ + if os.environ.has_key(k): + self[('env',k)] = os.environ[k] + def get_parms_from_rcfile(self,parmsToOverride,errIfMissingFile=0): +- if os.environ.has_key('MPD_CONF_FILE'): ++ if os.environ.has_key('MPD_CONF_FILE') and os.access(os.environ['MPD_CONF_FILE'], os.R_OK): + parmsRCFilename = os.environ['MPD_CONF_FILE'] + elif hasattr(os,'getuid') and os.getuid() == 0: # if ROOT + parmsRCFilename = os.path.abspath('/etc/mpd.conf') +- elif os.environ.has_key('HOME'): ++ elif os.environ.has_key('HOME') and os.access(os.path.join(os.environ['HOME'],'.mpd.conf'), os.R_OK): + parmsRCFilename = os.path.join(os.environ['HOME'],'.mpd.conf') + elif os.environ.has_key('HOMEPATH'): # e.g. win32 + parmsRCFilename = os.path.join(os.environ['HOMEPATH'],'.mpd.conf') +diff -urN mpich2-1.0.8/src/pm/mpd/mpdroot.c mpich2-1.0.8_p/src/pm/mpd/mpdroot.c +--- mpich2-1.0.8/src/pm/mpd/mpdroot.c 2007-11-02 18:50:19.000000000 -0400 ++++ mpich2-1.0.8_p/src/pm/mpd/mpdroot.c 2008-11-07 13:45:10.560017904 -0500 +@@ -19,6 +19,7 @@ + struct passwd *pwent; + char input_line[NAME_LEN+1], secretword[NAME_LEN+1]; + FILE *conf_file; ++ char *mpdconf_path = NULL; + + if ((pwent = getpwuid(getuid())) == NULL) /* for real id */ + { +@@ -26,10 +27,32 @@ + exit(-1); + } + +- conf_file = fopen("/etc/mpd.conf","r"); ++ /* ++ * We look for a readable mpd.conf in the following order. ++ * - MPD_CONF_FILE set in environment ++ * - .mpd.conf in the user's home directory ++ * - The system wide default in SYSCONFDIR/mpd.conf ++ */ ++ mpdconf_path = getenv("MPD_CONF_FILE"); ++ if ( ! (mpdconf_path && access( mpdconf_path, R_OK ) == 0) ){ ++ /* By far, the largest we'll need */ ++ size_t mpdconf_path_len = strlen(pwent->pw_dir) \ ++ + strlen(SYSCONFDIR) + strlen("/.mpd.conf"); ++ ++ mpdconf_path = (char*) malloc( sizeof(char) * mpdconf_path_len ); ++ if ( ! mpdconf_path ){ ++ fprintf( stderr, "%s: Failed to allocate a buffer for path to mpd.conf\n", argv[0]); ++ exit(-1); ++ } ++ snprintf( mpdconf_path, mpdconf_path_len-1, "%s/.mpd.conf", pwent->pw_dir ); ++ if ( access( mpdconf_path, R_OK ) != 0 ) ++ snprintf( mpdconf_path, mpdconf_path_len-1, "%s/mpd.conf", SYSCONFDIR ); ++ } ++ conf_file = fopen( mpdconf_path, "r"); ++ + if (conf_file == NULL) + { +- printf("%s: open failed for root's mpd conf file",argv[0]); ++ printf("%s: open failed for root's mpd conf file\n",argv[0]); + exit(-1); + } + secretword[0] = '\0'; diff --git a/sys-cluster/mpich2/files/mpich2-1.0.8-site-packages-py.patch b/sys-cluster/mpich2/files/mpich2-1.0.8-site-packages-py.patch new file mode 100644 index 000000000000..a3e894e740de --- /dev/null +++ b/sys-cluster/mpich2/files/mpich2-1.0.8-site-packages-py.patch @@ -0,0 +1,161 @@ +diff -urN mpich2-1.0.8/src/pm/mpd/Makefile.in mpich2-1.0.8_p/src/pm/mpd/Makefile.in +--- mpich2-1.0.8/src/pm/mpd/Makefile.in 2008-09-17 16:40:53.000000000 -0400 ++++ mpich2-1.0.8_p/src/pm/mpd/Makefile.in 2008-11-01 13:17:08.518285830 -0400 +@@ -20,6 +20,10 @@ + INSTALL = @INSTALL@ + CFLAGS = @CFLAGS@ + ++LIBDIRNAME = `echo @libdir@ | sed 's:.*@prefix@/::'` ++PYTHONDIR = ${prefix}/${LIBDIRNAME}/${PYTHON}/site-packages/mpich2 ++PYTHONLINK = ../${LIBDIRNAME}/${PYTHON}/site-packages/mpich2 ++ + C_COMPILE = ${CC} ${INCLUDES} ${CFLAGS} ${COPTIONS} + C_LINK = ${CLINKER} ${CFLAGS} ${COPTIONS} ${LDFLAGS} + +@@ -125,29 +129,33 @@ + else \ + ${INSTALL} -m 755 mpdroot $(DESTDIR)${bindir}/mpdroot ;\ + fi +- @echo "copying python files/links into " $(DESTDIR)${bindir} ++ @echo "copying python files/links into " $(DESTDIR)${PYTHONDIR} ++ @if [ ! -d $(DESTDIR)${PYTHONDIR} ] ; then \ ++ echo "mkdir -p $(DESTDIR)${PYTHONDIR} " ;\ ++ mkdir -p $(DESTDIR)${PYTHONDIR} ; \ ++ fi + -@for cmd in ${PYTHON_SOURCE} ; do \ + if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ + sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ +- ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${bindir}/$$cmd.py; \ ++ ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ + ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ + done + -@cd $(DESTDIR)${bindir} && rm -f mpd +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpd.py mpd ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpd.py mpd + -@cd $(DESTDIR)${bindir} && rm -f mpdboot +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpdboot.py mpdboot ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpdboot.py mpdboot + -@for cmd in ${CMDS} ; do \ + ( cd $(DESTDIR)${bindir} && rm -f $$cmd ; ) ; \ +- ( cd $(DESTDIR)${bindir} && @LN_S@ $$cmd.py $$cmd ; ) \ ++ ( cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/$$cmd.py $$cmd ; ) \ + done + -@( rm -f $(DESTDIR)${bindir}/mpdrun >/dev/null 2>&1 || exit 0 ) +- -@( rm -f $(DESTDIR)${bindir}/mpdrun.py >/dev/null 2>&1 || exit 0 ) ++ -@( rm -f $(DESTDIR)${PYTHONDIR}/mpdrun.py >/dev/null 2>&1 || exit 0 ) + -@( rm -f $(DESTDIR)${bindir}/mpirun >/dev/null 2>&1 || exit 0 ) +- -@( rm -f $(DESTDIR)${bindir}/mpirun.py >/dev/null 2>&1 || exit 0 ) +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec mpdrun +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.py mpdrun.py +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec mpirun +- -@cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.py mpirun.py ++ -@( rm -f $(DESTDIR)${PYTHONDIR}/mpirun.py >/dev/null 2>&1 || exit 0 ) ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpdrun ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpdrun.py ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpirun ++ -@cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpiexec.py mpirun.py + -@if [ "${DO_MTV}" = "yes" ] ; then \ + ${INSTALL} -m 755 mtv.so $(DESTDIR)${bindir}/mtv.so ;\ + fi +@@ -166,43 +174,43 @@ + -rm -f $(DESTDIR)${bindir}/mpdroot + -rm -f $(DESTDIR)${bindir}/Zeroconf.py + -rm -f $(DESTDIR)${bindir}/mpd +- -rm -f $(DESTDIR)${bindir}/mpd.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpd.py + -rm -f $(DESTDIR)${bindir}/mpdallexit +- -rm -f $(DESTDIR)${bindir}/mpdallexit.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdallexit.py + -rm -f $(DESTDIR)${bindir}/mpdboot +- -rm -f $(DESTDIR)${bindir}/mpdboot.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdboot.py + -rm -f $(DESTDIR)${bindir}/mpdcheck +- -rm -f $(DESTDIR)${bindir}/mpdcheck.py +- -rm -f $(DESTDIR)${bindir}/mpdchkpyver.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdcheck.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdchkpyver.py + -rm -f $(DESTDIR)${bindir}/mpdcleanup +- -rm -f $(DESTDIR)${bindir}/mpdcleanup.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdcleanup.py + -rm -f $(DESTDIR)${bindir}/mpdexit +- -rm -f $(DESTDIR)${bindir}/mpdexit.py +- -rm -f $(DESTDIR)${bindir}/mpdgdbdrv.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdexit.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdgdbdrv.py + -rm -f $(DESTDIR)${bindir}/mpdhelp +- -rm -f $(DESTDIR)${bindir}/mpdhelp.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdhelp.py + -rm -f $(DESTDIR)${bindir}/mpdkilljob +- -rm -f $(DESTDIR)${bindir}/mpdkilljob.py +- -rm -f $(DESTDIR)${bindir}/mpdlib.py +- -rm -f $(DESTDIR)${bindir}/mpdlib.pyc ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdkilljob.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdlib.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdlib.pyc + -rm -f $(DESTDIR)${bindir}/mpdlistjobs +- -rm -f $(DESTDIR)${bindir}/mpdlistjobs.py +- -rm -f $(DESTDIR)${bindir}/mpdman.py +- -rm -f $(DESTDIR)${bindir}/mpdman.pyc ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdlistjobs.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdman.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdman.pyc + -rm -f $(DESTDIR)${bindir}/mpdringtest +- -rm -f $(DESTDIR)${bindir}/mpdringtest.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdringtest.py + -rm -f $(DESTDIR)${bindir}/mpdrun +- -rm -f $(DESTDIR)${bindir}/mpdrun.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdrun.py + -rm -f $(DESTDIR)${bindir}/mpdsigjob +- -rm -f $(DESTDIR)${bindir}/mpdsigjob.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdsigjob.py + -rm -f $(DESTDIR)${bindir}/mpdtrace +- -rm -f $(DESTDIR)${bindir}/mpdtrace.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpdtrace.py + -rm -f $(DESTDIR)${bindir}/mpecc.in + -rm -f $(DESTDIR)${bindir}/mpefc.in + -rm -f $(DESTDIR)${bindir}/mpiexec +- -rm -f $(DESTDIR)${bindir}/mpiexec.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpiexec.py + -rm -f $(DESTDIR)${bindir}/mpirun +- -rm -f $(DESTDIR)${bindir}/mpirun.py ++ -rm -f $(DESTDIR)${PYTHONDIR}/mpirun.py + + mpich2-mpdroot: mpich2-mpdroot.o + $(C_LINK) -o mpich2-mpdroot mpich2-mpdroot.o $(LIBS) +@@ -224,25 +232,29 @@ + echo "mkdir -p $(DESTDIR)${bindir} " ;\ + mkdir -p $(DESTDIR)${bindir} ;\ + fi ++ @if [ ! -d $(DESTDIR)${PYTHONDIR} ] ; then \ ++ echo "mkdir -p $(DESTDIR)${PYTHONDIR} " ;\ ++ mkdir -p $(DESTDIR)${PYTHONDIR} ; \ ++ fi + for cmd in ${PYTHON_SOURCE} ; do \ + if [ ! -s $(srcdir)/$$cmd.py ] ; then continue ; fi ; \ + sed -e 's#/usr/bin/env python.*#/usr/bin/env ${PYTHON}#' ${srcdir}/$$cmd.py > $(DESTDIR)${bindir}/temp$$cmd.py ; \ +- ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${bindir}/$$cmd.py; \ ++ ${INSTALL} -m 755 $(DESTDIR)${bindir}/temp$$cmd.py $(DESTDIR)${PYTHONDIR}/$$cmd.py; \ + ( rm -f $(DESTDIR)${bindir}/temp$$cmd.py >/dev/null 2>&1 || exit 0 ) ; \ + done + cd $(DESTDIR)${bindir} && rm -f mpd +- cd $(DESTDIR)${bindir} && @LN_S@ mpd.py mpd ++ cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpd.py mpd + cd $(DESTDIR)${bindir} && rm -f mpdboot +- cd $(DESTDIR)${bindir} && @LN_S@ mpdboot.py mpdboot ++ cd $(DESTDIR)${bindir} && @LN_S@ ${PYTHONLINK}/mpdboot.py mpdboot + for cmd in ${CMDS} ; do \ + if [ $$cmd = "mpiexec" ] ; then continue ; fi ; \ + ( cd $(DESTDIR)${bindir} && rm -f $$cmd ; ) ; \ +- ( cd $(DESTDIR)${bindir} && @LN_S@ $$cmd.py $$cmd ; ) \ ++ ( cd $(DESTDIR)${bindir} && @LN_S@ )${PYTHONLINK}/$$cmd.py $$cmd ; ) \ + done +- ( rm -f $(DESTDIR)${bindir}/mpdrun >/dev/null 2>&1 || exit 0 ) ++ ( rm -f $(DESTDIR)${PYTHONDIR}/mpdrun >/dev/null 2>&1 || exit 0 ) + ( rm -f $(DESTDIR)${bindir}/mpdrun.py >/dev/null 2>&1 || exit 0 ) +- mv -f $(DESTDIR)${bindir}/mpiexec.py $(DESTDIR)${bindir}/mpiexec.mpd +- cd $(DESTDIR)${bindir} && @LN_S@ mpiexec.mpd mpdrun ++ mv -f $(DESTDIR)${PYTHONDIR}/mpiexec.py $(DESTDIR)${PYTHONDIR}/mpiexec.mpd ++ cd $(DESTDIR)${bindir} && @LN_S@ )${PYTHONLINK}/mpiexec.mpd mpdrun + + # Empty dependencies target (MPICH2 wants this target) + dependencies: diff --git a/sys-cluster/mpich2/files/mpich2.envd b/sys-cluster/mpich2/files/mpich2.envd new file mode 100644 index 000000000000..624fedede93d --- /dev/null +++ b/sys-cluster/mpich2/files/mpich2.envd @@ -0,0 +1 @@ +MPD_CONF_FILE="@MPD_CONF_FILE_DIR@/mpd.conf" diff --git a/sys-cluster/mpich2/metadata.xml b/sys-cluster/mpich2/metadata.xml index 960c99ff5446..6810bfdc103a 100644 --- a/sys-cluster/mpich2/metadata.xml +++ b/sys-cluster/mpich2/metadata.xml @@ -3,8 +3,8 @@ hp-cluster - kanaka@gentoo.org - Joel Martin + jsbronder@gentoo.org + Justin Bronder Enabling fast turns off error checking and timing @@ -14,5 +14,6 @@ Add pvfs2 support Enable romio, a high-performance portable MPI-IO implementation + Enable MPI_THREAD_MULTIPLE diff --git a/sys-cluster/mpich2/mpich2-1.0.8.ebuild b/sys-cluster/mpich2/mpich2-1.0.8.ebuild new file mode 100644 index 000000000000..4298d977fbc1 --- /dev/null +++ b/sys-cluster/mpich2/mpich2-1.0.8.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpich2/mpich2-1.0.8.ebuild,v 1.1 2009/01/18 21:54:59 jsbronder Exp $ + +EAPI=1 +inherit python eutils fortran + +DESCRIPTION="MPICH2 - A portable MPI implementation" +HOMEPAGE="http://www-unix.mcs.anl.gov/mpi/mpich2" +SRC_URI="http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${PV}/${P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="+cxx debug doc fortran pvfs2 threads romio mpi-threads" + +COMMON_DEPEND="dev-lang/perl + >=dev-lang/python-2.3 + romio? ( net-fs/nfs-utils ) + pvfs2? ( >=sys-cluster/pvfs2-2.7.0 ) + dev-libs/libaio + !media-sound/mpd + !sys-cluster/mpiexec + !sys-cluster/openmpi + !sys-cluster/lam-mpi + !sys-cluster/mpich" + +DEPEND="${COMMON_DEPEND} + sys-devel/libtool" + +RDEPEND="${COMMON_DEPEND} + net-misc/openssh" + +pkg_setup() { + if [ -n "${MPICH_CONFIGURE_OPTS}" ]; then + elog "User-specified configure options are ${MPICH_CONFIGURE_OPTS}." + else + elog "User-specified configure options are not set." + elog "If needed, see the docs and set MPICH_CONFIGURE_OPTS." + fi + + if use fortran ; then + FORTRAN="g77 gfortran ifort ifc" + fortran_pkg_setup + fi + + if use mpi-threads && ! use threads; then + die "USE=mpi-threads requires USE=threads" + fi + + MPD_CONF_FILE_DIR=/etc/${PN} + python_version +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # A lot of these patches touch Makefile.in and configure files. + # While it would be nice to regenerate everything, mpich2 uses + # simplemake instead of automake, so we're doing this for now + # and hoping for a receptive upstream. + + # #220877 + sed -i 's/-fpic/-fPIC/g' \ + $(grep -lr -e '-fpic' "${S}/") || die "failed to change -fpic to -fPIC" + + # Put python files in site-packages where they belong. + # This isn't the prettiest little patch, but it does + # move python files out of /usr/bin/ + epatch "${FILESDIR}"/${P}-site-packages-py.patch + + # Respect the env var MPD_CONF_FILE + epatch "${FILESDIR}"/${P}-mpdconf-env.patch + + # Fix gforker instal-alt + epatch "${FILESDIR}"/${P}-gforker-install-alt-fix.patch + + # We need f90 to include the directory with mods, and to + # fix hardcoded paths for src_test() + sed -i \ + -e "s,F90FLAGS\( *\)=,F90FLAGS\1?=," \ + -e "s,\$(bindir)/,${S}/bin/,g" \ + -e "s,@MPIEXEC@,${S}/bin/mpiexec,g" \ + $(find ./test/ -name 'Makefile.in') || die + + if ! use romio; then + # These tests in errhan/ rely on MPI::File ...which is in romio + echo "" > test/mpi/errors/cxx/errhan/testlist + fi +} + +src_compile() { + local c="${MPICH_CONFIGURE_OPTS} --enable-sharedlibs=gcc" + local romio_conf + + # The configure statements can be somewhat confusing, as they + # don't all show up in the top level configure, however, they + # are picked up in the children directories. + + use debug && c="${c} --enable-g=all --enable-debuginfo" + + if use threads ; then + c="${c} --with-thread-package=pthreads" + else + c="${c} --with-thread-package=none" + fi + + # enable f90 support for appropriate compilers + case "${FORTRANC}" in + gfortran|if*) + c="${c} --enable-f77 --enable-f90";; + g77) + c="${c} --enable-f77 --disable-f90";; + esac + + if use mpi-threads; then + c="${c} --enable-threads=multiple" + else + c="${c} --enable-threads=single" + fi + + if use pvfs2; then + # nfs and ufs are defaults in 1.0.8 at least. + romio_conf="--with-file-system=pvfs2+nfs+ufs --with-pvfs2=/usr" + fi + + c="${c} --sysconfdir=/etc/${PN}" + econf ${c} ${romio_conf} \ + --with-pm=mpd:gforker \ + --disable-mpe \ + $(use_enable romio) \ + $(use_enable cxx) \ + || die + # Oh, the irony. + # http://www.mcs.anl.gov/research/projects/mpich2/support/index.php?s=faqs#parmake + # https://trac.mcs.anl.gov/projects/mpich2/ticket/297 + emake -j1 || die +} + +src_test() { + local rc + + cp "${FILESDIR}"/mpd.conf "${T}"/mpd.conf || die + chmod 600 "${T}"/mpd.conf + export MPD_CONF_FILE="${T}/mpd.conf" + "${S}"/bin/mpd --daemon --pid="${T}"/mpd.pid + + make \ + CC="${S}"/bin/mpicc \ + CXX="${S}"/bin/mpicxx \ + FC="${S}"/bin/mpif77 \ + F90="${S}"/bin/mpif90 \ + F90FLAGS="${F90FLAGS} -I${S}/src/binding/f90/" \ + testing + rc=$? + + "${S}"/bin/mpdallexit || kill $(<"${T}"/mpd.pid) + return ${rc} +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodir ${MPD_CONF_FILE_DIR} + insinto ${MPD_CONF_FILE_DIR} + doins "${FILESDIR}"/mpd.conf || die + + dodir /usr/share/doc/${PF} + dodoc COPYRIGHT README README.romio README.testing \ + CHANGES README.developer RELEASE_NOTES || die + newdoc src/pm/mpd/README README.mpd || die + + if ! use doc; then + rm -rf "${D}"/usr/share/doc/www* + else + dodir /usr/share/doc/${PF}/www + mv "${D}"/usr/share/doc/www*/* "${D}"/usr/share/doc/${PF}/www/ + fi + + cp "${FILESDIR}"/${PN}.envd "${T}"/ + sed -i "s,@MPD_CONF_FILE_DIR@,${MPD_CONF_FILE_DIR}," \ + "${T}"/${PN}.envd + + newenvd "${FILESDIR}"/${PN}.envd 25mpich2 +} + +pkg_postinst() { + # Here so we can play with ebuild commands as a normal user + chown root:root "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf + chmod 600 "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf + + python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/${PN} + elog "" + elog "MPE2 has been removed from this ebuild and now stands alone" + elog "as sys-cluster/mpe2." + elog "" +} + +pkg_postrm() { + python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages/${PN} +} + -- cgit v1.2.3-65-gdbad