📄 mpiinstall.in
字号:
echo "/bin/rm -f $dest" >> $UNINSTALLFILE fi else if [ $verbose = 1 ] ; then echo "Fixup $1.in and copy to $dest" ; fi fifiif [ -z "$3" ] ; then mode=$MODEelse mode=$3fi$Show chmod $mode $2rc=$?if [ $rc != 0 ] ; then echo "**Error setting mode on file $2**" errs=`expr $errs + 1` if [ $failmode = "hard" ] ; then exit $rc ; fifi}## This version merely replaces builddir versions with the master versions# FixupFile2() {if [ -d $2 ] ; then dest=$2/`basename $1`else dest=$2fiif [ $replace = 0 -a -f $dest ] ; then if [ $verbose = 1 ] ; then echo "$dest exists; not changed" ; fielif [ -d $1 ] ; then echo "$1 is a directory; not copied"else if [ -f $dest ] ; then $Show /bin/rm -f $dest ; fi if [ $just_testing = 0 ] ; then # The $ forms are for PERL programs sed -e "s%^prefix=.*%prefix=$prefix%g" \ -e "s%^includedir=.*%includedir=$includedir%g" \ -e "s%^mandir=.*%mandir=$mandir%g" \ -e "s%\$bindir=.*;%\$bindir=\"$bindir\";%"g \ -e "s%^bindir=.*%bindir=$bindir%"g \ -e "s%\$datadir=.*;%\$datadir=\"$datadir\";%"g \ -e "s%^datadir=.*%datadir=$datadir%"g \ -e "s%^libdir=.*%libdir=$libdir%g" \ -e "s%^sharedlibdir=.*%sharedlibdir=$sharedlib_dir%g" \ $1 > $dest rc=$? if [ $rc != 0 ] ; then echo "**Error fixing up file $dest**" errs=`expr $errs + 1` if [ $failmode = "hard" ] ; then exit $rc ; fi else echo "/bin/rm -f $dest" >> $UNINSTALLFILE fi else if [ $verbose = 1 ] ; then echo "Fixup $1 and copy to $dest" ; fi fifiif [ -z "$3" ] ; then mode=$MODEelse mode=$3fi$Show chmod $mode $2rc=$?if [ $rc != 0 ] ; then echo "**Error setting mode on file $2**" errs=`expr $errs + 1` if [ $failmode = "hard" ] ; then exit $rc ; fifi}################################################################################ End of routines###############################################################################if [ ! -s $libbuild_dir/lib@MPILIBNAME@.a ] ; then echo "You must make MPI before installing it!" echo "Could not find $libbuild_dir/lib@MPILIBNAME@.a !" exit 1fiif [ ! -n "$prefix" ] ; then echo "Set an installation location with -prefix=<location> ." exit 1fiif [ $verbose = 1 ] ; then echo "Install into $prefix on the $ARCH with $DEVICE"fiif [ -d $prefix ] ; then if [ $verbose = 1 ] ; then echo "using existing directory $prefix" ; fielse MkDir $prefix fi# # These build the default paths to libdir/bindir/includedir. # We need to replace this with code that picks apart the directories.#MkDir $libdirMkDir $sharedlib_dirif [ -n "$SHAREDLIB_LOCALDIR" ] ; then MkDir $SHAREDLIB_LOCALDIRfiMkDir $bindirMkDir $sbindirMkDir $includedirMkDir $datadirMkDir $docdirMkDir $sysconfdirMkDir $prefix/examplesif [ -n "$CPP_DIR" -a "$buildcpp" = 1 ] ; then MkDir $prefix/examples/$CPP_DIR MkDir $includedir/mpi2c++fi## Remove old uninstall file. We can't do this until we've created the# sbindir directory.if [ -x $UNINSTALLFILE ] ; then if [ -x ${UNINSTALLFILE}.old ] ; then rm -f ${UNINSTALLFILE}.old fi mv $UNINSTALLFILE ${UNINSTALLFILE}.oldfi/bin/rm -f $UNINSTALLFILEcat > $UNINSTALLFILE <<EOF#! /bin/shset -xEOFchmod +x $UNINSTALLFILEif [ -z "$libonly" ] ; then CopyFile ${top_srcdir}/bin/tarch $bindir $XMODE CopyFile ${top_srcdir}/bin/tdevice $bindir $XMODE CopyFile util/mpichlib.conf ${sysconfdir} # # mpiman $Show /bin/rm -f $bindir/mpiman FixupFile2 bin/mpiman $bindir/mpiman $XMODE # # mpirun et al. This would be a good place to identify # "partial" mpirun installations # mpirun.in requires: # mpirun.args.in # mpirun.<device>.in (some variations are mapped to different # devices) # ch_p4, execer also use # mpirun.pg.in # This needs to be modified to simply move the needed files, not # all of them. # Install should not execute a make. # See the install_$DEVICE script. # tstmachines is handled as part of the ch_p4 device code (and placed in # sbin) # This step relies on a clean bin build directory # Only mpirun really needs FixupFile2; all others just need copyfile #if [ -x mpid/${DEVICE}/mpirun_setup ] ; then # if [ -x bin/mpirun ] ; then for file in bin/mpirun* ; do bfile=`basename $file` FixupFile2 $file ${bindir}/$bfile $XMODE done fi #echo "/bin/rm -f $bindir/mpirun" >> $UNINSTALLFILE if [ ! -x $bindir/tarch ] ; then CopyFile $top_srcdir/bin/tarch $bindir $XMODE fi # $Show /bin/rm -f $bindir/mpireconfig if [ $verbose = 1 ] ; then echo "Creating mpireconfig from util/mpireconfig.in" fi FixupFile $top_srcdir/util/mpireconfig.in $bindir/mpireconfig $XMODE # # Updating the config.status file is trickier, since we need to edit # the directories that might have contained the original path. # It is important to update the CORRECT file, in the case that we are doing # a -libonly installation on a previously constructed version. # if [ $just_testing = 0 ] ; then # Be VERY careful to only change the assignments that begin a line, # since other asignments may be strings (arguments to configure) sed -e 's%$top_srcdir/$file%$file%g' \ -e 's%$top_srcdir/${file}%${file}%g' \ -e "s%^bindir=.*%bindir=$bindir%g" \ -e "s%^includedir=.*%includedir=$includedir%g" \ -e "s%^prefix=.*%prefix=$prefix%g" \ -e "s%^datadir=.*%datadir=$datatid%g" \ -e "s%^MPIR_HOME=.*\$%MPIR_HOME='$prefix'%g" \ -e "s%^LIB_PATH=\([^/ ]*\)/[^ ']*%LIB_PATH=\1$libdir%g" \ -e "s%^FINC=\([^/ ]*\)/[^ ']*%FINC=\1$includedir%g" \ -e "s%^FLIB_PATH=\([^/ ]*\)/[^ ']*%FLIB_PATH=\1$libdir%g" \ -e "s%^F90INC=\([^/ ]*\)/[^ ']*%F90INC=\1$includedir%g" \ -e "s%^F90LIB_PATH=\([^/ ]*\)/[^ ']*%F90LIB_PATH=\1$libdir%g" \ -e "s%^MPE_DIR=.*\$%MPE_DIR='$prefix/mpe'%g" \ -e "s%^MPICC=\([^/ ]*\)/.*\$%MPICC=$bindir/mpicc%g" \ -e "s%^MPIF77=\([^/ ]*\)/.*\$%MPIF77=$bindir/mpif77%g" \ -e "s%^MPIF90=\([^/ ]*\)/.*\$%MPIF90=$bindir/mpif90%g" \ -e "s%^MPICPLUSPLUS=\([^/ ]*\)/.*\$%MPICPLUSPLUS=$bindir/mpiCC%g" \ config.status > ${bindir}/mpireconfig.dat chmod $XMODE ${bindir}/mpireconfig.dat echo "/bin/rm -f ${bindir}/mpireconfig.dat" >> $UNINSTALLFILE else echo "Construct new ${bindir}/mpireconfig.dat from config.status" fi #$Show /bin/rm -f $bindir/execer #CopyFile $top_srcdir/util/execer $bindir/execer $XMODE # # mpicc, mpif77, mpif90 FixupFile2 bin/mpicc $bindir/mpicc $XMODE if [ -x src/fortran/src/mpif77 -a "@NOF77@" = "0" ] ; then CopyFile src/fortran/src/mpif77 $bindir/mpif77 $XMODE CopyFile src/fortran/src/mpif77.conf $sysconfdir CopyFile $includebuild_dir/mpif.h $includedir fi if [ -x src/fortran/src/mpif90 -a "@NO_F90@" = "0" ] ; then CopyFile src/fortran/src/mpif90 $bindir/mpif90 $XMODE CopyFile src/fortran/src/mpif90.conf $sysconfdir fi # # mpiCC, if C++ selected if [ -n "$CPP_COMPILER" ] ; then FixupFile2 bin/mpiCC $bindir/mpiCC $XMODE fi # If there is a device install script, use that. We # put this last in case it wants to update any of the scripts or # other files that are installed. This is executed as an included # script so that it has access to the various variables (e.g., # prefix and bindir). If you need to run a program, run it from # within the script # These should use MODE and XMODE if [ -x mpid/$DEVICE/install_$DEVICE ] ; then . mpid/$DEVICE/install_$DEVICE elif [ -x $top_srcdir/mpid/$DEVICE/install_$DEVICE ] ; then . $top_srcdir/mpid/$DEVICE/install_$DEVICE fielse # libonly # # mpirun et al. # Only mpirun really needs FixupFile2; all others just need copyfile if [ -x bin/mpirun ] ; then for file in bin/mpirun* ; do bfile=`basename $file` FixupFile2 $file $bindir/$bfile $XMODE done fi if [ ! -x $bindir/tarch ] ; then CopyFile $binbuild_dir/tarch $bindir/tarch $XMODE fi FixupFile2 bin/mpicc $bindir/mpicc $XMODE if [ -n "$CPP_COMPILER" ] ; then FixupFile2 bin/mpiCC $bindir/mpiCC $XMODE fi CopyFile util/mpichlib.conf ${sysconfdir} FixupFile $top_srcdir/util/mpireconfig.in $bindir/mpireconfig $XMODE # No user include uses mpichconf.h CopyFile $includebuild_dir/mpichconf.h $sysconfdir/mpichconf.h.dat CopyFile $includebuild_dir/mpidefs.h $includedir CopyFile $includebuild_dir/mpi.h $includedir if [ -s $includebuild_dir/mpif.h -a "@NOF77@" = "0" ] ; then CopyFile $includebuild_dir/mpi_fortdefs.h $includedir CopyFile src/fortran/src/mpif77 $bindir/mpif77 $XMODE CopyFile src/fortran/src/mpif77.conf $sysconfdir CopyFile $includebuild_dir/mpif.h $includedir fi if [ -x src/fortran/src/mpif90 -a "@NO_F90@" = "0" ] ; then CopyFile src/fortran/src/mpif90 $bindir/mpif90 $XMODE CopyFile src/fortran/src/mpif90.conf $sysconfdir fi if [ -s romio/include/mpio.h ] ; then CopyFile romio/include/mpio.h $includedir CopyFile romio/include/mpiof.h $includedir fi # Fortran 90 modules if [ -d $includebuild_dir/f90base -a "@NO_F90@" = "0" ] ; then MkDir $includedir/f90base for file in $includebuild_dir/f90base/* ; do CopyFile $file $includedir/f90base done if [ -s $includebuild_dir/f90base/mpimod.pcl ] ; then rm -f $includedir/f90base/mpimod.pcl echo "mpimod.pc" >$includedir/f90base/mpimod.pcl echo "$includedir/f90base/mpimod.pc" >> $includedir/f90base/mpimod.pcl echo "/bin/rm -f $includedir/f90base/mpimod.pcl" >> $UNINSTALLFILE fi fi if [ -d $includebuild_dir/f90choice -a "@NO_F90@" = "0" ] ; then MkDir $includedir/f90choice for file in $includebuild_dir/f90choice/* ; do CopyFile $file $includedir/f90choice done if [ -s $includebuild_dir/f90choice/mpimod.pcl ] ; then rm -f $includedir/f90choice/mpimod.pcl echo "mpimod.pc" >$includedir/f90choice/mpimod.pcl echo "$includedir/f90choice/mpimod.pc" >> $includedir/f90choice/mpimod.pcl echo "/bin/rm -f $includedir/f90choice/mpimod.pcl" >> $UNINSTALLFILE fi fifi## P4if [ "$DEVICE" = "ch_p4" ] ; then FixupFile2 util/tstmachines $sbindir/tstmachines $XMODE # Installs should not do builds if [ -x mpid/server/serv_p4 ] ; then CopyFile mpid/server/serv_p4 $bindir $XMODE $Show /bin/rm -f util/chp4_servs FixupFile $top_srcdir/util/chp4_servs.in $sbindir/chp4_servs $XMODE FixupFile2 util/chkserv $sbindir/chkserv $XMODE else echo "Server not available" fifi#if [ -z "$libonly" ] ; then # # Machines database # if [ ! -d $prefix/util/machines.anl ] ; then \ # mkdir $prefix/util/machines.anl ; fi # $CPRP -r util/machines $prefix/util/machines.anl for file in util/machines/machines* ; do if [ -s $file ] ; then CopyFile $file $datadir fi done # # Include files CopyFile $includebuild_dir/mpi.h $includedir if [ -s $includebuild_dir/mpif.h -a "@NOF77@" = "0" ] ; then CopyFile $includebuild_dir/mpi_fortdefs.h $includedir fi CopyFile $includebuild_dir/mpi_errno.h $includedir #CopyFile include/protofix.h $includedir #CopyFile include/patchlevel.h $includedir # No user include uses mpichconf.h CopyFile $includebuild_dir/mpichconf.h $sysconfdir/mpichconf.h.dat CopyFile $includebuild_dir/mpidefs.h $includedir # Install ROMIO files if [ -s romio/include/mpio.h ] ; then CopyFile romio/include/mpio.h $includedir CopyFile romio/include/mpiof.h $includedir fi # Fortran 90 modules if [ -d $includebuild_dir/f90base -a "@NO_F90@" = "0" ] ; then MkDir $includedir/f90base for file in $includebuild_dir/f90base/* ; do CopyFile $file $includedir/f90base done if [ -s $includebuild_dir/f90base/mpimod.pcl ] ; then rm -f $includedir/f90base/mpimod.pcl echo "mpimod.pc" >$includedir/f90base/mpimod.pcl echo "$includedir/f90base/mpimod.pc" >> $includedir/f90base/mpimod.pcl echo "/bin/rm -f $includedir/f90base/mpimod.pcl" >> $UNINSTALLFILE fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -