PGI Fortran90+MPICH install questions on Scyld

Florent Calvayrac fcalvay at aviion.univ-lemans.fr
Wed Oct 10 02:22:08 PDT 2001


Hi

just make sure you recompile the source of the modified mpich1.2
given on Scyld's ftp site (beompi... according to your version of
Beowulf2)

do it twice with different installation prefixes
to get an mpicc using gcc and mpif90 using 
pgf90 (else, there is always a simple or
double underscore problem one way or another).

I include a modified Makefile for
beompi-1.0.14 below :




-- 
Florent Calvayrac                          | Tel : 02 43 83 26 26 
Laboratoire de Physique de l'Etat Condense | Fax : 02 43 83 35 18
UMR-CNRS 6087         | http://www.univ-lemans.fr/~fcalvay 
Universite du Maine-Faculte des Sciences   |
72085 Le Mans Cedex 9
-------------- next part --------------
# beompi -- wrapper package to build and patch MPICH for Beowulf

#
# versioning information
#
PKG_NAME = beompi
VERSION = 1
PATCHLEVEL = 0.14
BUILD_DATE = $(shell date +%D)
AUTHOR = "newt at scyld.com - modified for pgf90 by Florent.Calvayrac at univ-lemans.fr"

#
# installation directories
#
USRDIR = /usr/local
BINDIR = $(USRDIR)/bin
LIBDIR = $(USRDIR)/lib
INCDIR = $(USRDIR)/include
MANDIR = $(USRDIR)/man

#
# build-time helper directories
#
MPP_LDFLAGS = 		# place a '-L' here for non-standard mpprun libs
MPP_BUILDDIR = 		# place a dirname here to have mpi build mpprun

# top of build dir
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

.EXPORT_ALL_VARIABLES:

all: mpich-1.2.0 mpprun

.unpack: contrib_sources/mpich.tar.gz
	# unpack distribution sources from ANL
	tar -xvzf $^
	mv mpich-1.2.0/mpid/server mpich-1.2.0/mpid/server.unused
	touch .unpack

.patch: .unpack
	# add the beowulf90 patches
	cd mpich-1.2.0 && patch -p1 < $(TOPDIR)/patches/beowulf-mpich.patch
	cd mpich-1.2.0/mpid/ch_p4 && patch -p1 < $(TOPDIR)/patches/beowulf-ch.patch
	cd mpich-1.2.0/mpid/ch_p4/p4 && patch -p1 < $(TOPDIR)/patches/beowulf-p4.patch
	cd mpich-1.2.0/mpid/ch_p4/p4 && patch -p1 < $(TOPDIR)/patches/beowulf-p4-sigint.patch
	touch .patch
	
mpich-1.2.0: .patch
	cd mpich-1.2.0/ && BINDIR="" LIBDIR="" ./configure -opt=-O2 -f90="pgf90" -fc="pgf77" --with-device=ch_p4 --lib=-lbproc -rsh=/bin/true
	cd mpich-1.2.0/ && BINDIR="" LIBDIR="" make

mpprun: dummy
	if [ -n "$(MPP_BUILDDIR)" ] ; then $(MAKE) -C $(MPP_BUILDDIR) ; fi

mpirun-stub.o: dummy

install: install-mpich mpprun mpirun-stub.o
	if [ -n "$(MPP_BUILDDIR)" ] ; then $(MAKE) -C $(MPP_BUILDDIR) install ; fi
	#
	# C libraries, static and dynamic 
	ld -L/usr/lib -shared -soname libmpi.so.1 -lbproc $(MPP_LDFLAGS) -lmpirun --whole-archive -L$(USRDIR)/mpi-beowulf90/lib -lmpich -lslog -defsym getarg_=1 -defsym f__xargc=1 mpirun-stub.o -o $(LIBDIR)/libmpi.so
	ld -L/usr/lib -Bstatic -i -lbproc --whole-archive $(MPP_LDFLAGS) -lmpirun -L$(USRDIR)/mpi-beowulf90/lib -lmpich -lslog -defsym getarg_=1 -defsym f__xargc=1 -o $(LIBDIR)/libmpi.a
	#
	# Fortran libraries, static and dynamic
	ld -L/usr/lib -shared -soname libmpif.so.1 -lbproc $(MPP_LDFLAGS) -lmpirun --whole-archive -L$(USRDIR)/mpi-beowulf90/lib -lmpich mpirun-stub.o -o $(LIBDIR)/libmpif.so
	ld -L/usr/lib -Bstatic -i -lbproc --whole-archive $(MPP_LDFLAGS) -lmpirun -L$(USRDIR)/mpi-beowulf90/lib -lmpich -o $(LIBDIR)/libmpif.a

install-mpich: mpich-1.2.0
	# clean out the old stuff
	rm -rf $(USRDIR)/mpi-beowulf90
	# install the base system
	cd mpich-1.2.0 && PREFIX=$(USRDIR)/mpi-beowulf90 make -e install
	# whip up the installation copy of the header
	rm -rf $(INCDIR)/mpi-beowulf90
	mkdir $(INCDIR)/mpi-beowulf90
	cp -R $(USRDIR)/mpi-beowulf90/include/*.h $(INCDIR)/mpi-beowulf90
	cp -R $(USRDIR)/mpi-beowulf90/include/c++ $(INCDIR)/mpi-beowulf90/
	find $(INCDIR)/mpi-beowulf90 -name '*.h' -exec sh -c 'echo -e ",s/#include[[:space:]]*\"/#include <mpi-beowulf90\//g\n,s/[.]h\"/.h>/g\nw" | ed {}' \;
	if [ -f $(INCDIR)/mpi.h ] ; then mv -f $(INCDIR)/mpi.h $(INCDIR)/mpi.h.old ; fi
	if [ -f $(INCDIR)/mpif.h ] ; then mv -f $(INCDIR)/mpif.h $(INCDIR)/mpif.h.old ; fi
	ln -s $(INCDIR)/mpi-beowulf90/mpi.h $(INCDIR)/mpi.h
	ln -s $(INCDIR)/mpi-beowulf90/mpif.h $(INCDIR)/mpif.h
	# copy the man pages into the right directories
	cp -ap mpich-1.2.0/man/man1/* $(MANDIR)/man1
	cp -ap mpich-1.2.0/man/man3/* $(MANDIR)/man3
	cp -ap mpich-1.2.0/man/man4/* $(MANDIR)/man4
	rm -rf $(USRDIR)/mpi-beowulf90/man
	
clean:
	# clean out out stubs
	rm -f *.[oas]
	# clean out our freindly packages.
	if [ -n "$(MPP_BUILDDIR)" ] ; then $(MAKE) -C $(MPP_BUILDDIR) clean ; fi
	# whack unfreindly packages
	rm -rf mpich-1.2.0
	rm -f .unpack
	rm -f .patch

release: clean
	cvs commit -m "see README" && cvs rtag ${PKG_NAME}-release-"${VERSION}-`echo ${PATCHLEVEL} | tr . - `" ${PKG_NAME}

dummy:


More information about the Beowulf mailing list