diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2009-01-18 21:55:00 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2009-01-18 21:55:00 +0000 |
commit | 8bbef3255c07941d17637329c974b6d25bb981ed (patch) | |
tree | cb3e8bc28e618e4b7b3f553358d80561b8041847 /sys-cluster/mpich2 | |
parent | Bump to 3.5.1. Fix python xml module dependency problem, bug #233166. (diff) | |
download | gentoo-2-8bbef3255c07941d17637329c974b6d25bb981ed.tar.gz gentoo-2-8bbef3255c07941d17637329c974b6d25bb981ed.tar.bz2 gentoo-2-8bbef3255c07941d17637329c974b6d25bb981ed.zip |
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.
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo-r2 x86_64)
Diffstat (limited to 'sys-cluster/mpich2')
-rw-r--r-- | sys-cluster/mpich2/ChangeLog | 16 | ||||
-rw-r--r-- | sys-cluster/mpich2/files/mpich2-1.0.8-gforker-install-alt-fix.patch | 12 | ||||
-rw-r--r-- | sys-cluster/mpich2/files/mpich2-1.0.8-mpdconf-env.patch | 108 | ||||
-rw-r--r-- | sys-cluster/mpich2/files/mpich2-1.0.8-site-packages-py.patch | 161 | ||||
-rw-r--r-- | sys-cluster/mpich2/files/mpich2.envd | 1 | ||||
-rw-r--r-- | sys-cluster/mpich2/metadata.xml | 5 | ||||
-rw-r--r-- | sys-cluster/mpich2/mpich2-1.0.8.ebuild | 203 |
7 files changed, 502 insertions, 4 deletions
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 <jsbronder@gentoo.org> + +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 <opfer@gentoo.org> mpich2-1.0.3.ebuild, mpich2-1.0.3-r1.ebuild, mpich2-1.0.6.ebuild: 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 @@ <pkgmetadata> <herd>hp-cluster</herd> <maintainer> - <email>kanaka@gentoo.org</email> - <name>Joel Martin</name> + <email>jsbronder@gentoo.org</email> + <name>Justin Bronder</name> </maintainer> <use> <flag name='fast'>Enabling fast turns off error checking and timing @@ -14,5 +14,6 @@ <flag name='pvfs2'>Add pvfs2 support</flag> <flag name='romio'>Enable romio, a high-performance portable MPI-IO implementation</flag> + <flag name='mpi-threads'>Enable MPI_THREAD_MULTIPLE</flag> </use> </pkgmetadata> 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} +} + |