/usr/lib/mpich-mpd/bin/tarch is in mpich-mpd-bin 1.2.7-10ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | #! /bin/sh
# set -x
#
if [ "$1" = "-echo" ] ; then
set -x
shift
fi
# Returns the arch of the machine. This file is from MPICH.
#
# First, try some special cases:
if [ -d "/dev/elan" ] ; then
FARCH="meiko"
elif [ -f /usr/bin/uxpm ] && /usr/bin/uxpm ; then
FARCH="UXPM"
elif [ -f /usr/bin/uxpv ] && /usr/bin/uxpv ; then
FARCH="uxpv"
fi
if [ -n "$FARCH" ] ; then
echo $FARCH
exit 0
fi
#
# Try to find uname
for dir in /bin /usr/bin /usr/local/bin ; do
if [ -x $dir/uname ] ; then
UNAME="$dir/uname"
break
fi
done
#
# Get uname -s, uname -m, and arch values
#
if [ -n "$UNAME" ] ; then
ARCHLIST="`uname -s`"
ARCHLIST="$ARCHLIST `uname -m`"
fi
#
# Get ARCH variable name
if [ -n "$ARCH" ] ; then
ARCHLIST="$ARCHLIST $ARCH"
fi
#
# Get arch command
if [ -x /bin/arch ] ; then
ARCHLIST="$ARCHLIST `/bin/arch`"
elif [ -x /usr/local/bin/arch ] ; then
ARCHLIST="$ARCHLIST `/usr/local/bin/arch`"
fi
#
# GARCH is a guess if we don't find something better
GARCH=
# Now, weed through all of these values until we find something useful.
for LARCH in $ARCHLIST ; do
# Remove blanks
LARCH=`echo $LARCH | sed 's/ //g'`
# Get the first 4 characters (you'd be surprised)
# LARCH4=`expr "$LARCH" : "\(....\)"`
# LARCH6=`expr "$LARCH" : "\(......\)"`
case $LARCH in
SUPER-UX) FARCH=SX4; break ;;
AIX|RIOS) FARCH=rs6000; break ;;
HP-UX)
if [ -a /dev/kmem ] ; then
FARCH=hpux ;
else
FARCH=sppux ;
fi
break ;;
IRIX64|IRIX) FARCH=$LARCH ; break ;;
Linux|GNU)
# Pick between i86, alpha, and PowerPC LINUX
LINUXARCH=`$UNAME -m`
case $LINUXARCH in
*alpha*)
FARCH=LINUX_ALPHA ; break ;;
*Power*|*power*)
FARCH=LINUX_PPC ; break ;;
*86*)
FARCH=LINUX ; break ;;
*)
# Hope for the best
FARCH=LINUX ; break ;;
esac
break ;;
i586|i486|i686|i86pc)
GARCH=$LARCH
if [ -n "$UNAME" ] ; then
SysName=`$UNAME -s`
if [ "$SysName" = "SunOS" ] ; then
FARCH="solaris86"
else
# Try to get a short name (eliminate any numbers)
# (include the hyphen for any subsequent tests.
ShortSysName=`expr "$SysName" : "\([A-Za-z_-]*\)"`
if [ "$ShortSysName" = "CYGWIN_NT" -o \
"$ShortSysName" = "CYGWIN_NT-" ] ; then
FARCH="CYGWIN_NT"
fi
fi
fi
;;
sun4*|SunOS)
Version=`$UNAME -r`
# In "improving" SunOS, the useful feature of "substr" was withdrawn
# from expr. Can't let the users have life too easy, can we? This
# means that we can't just use
# set MajorVersion = `expr substr $Version 1 1`
# because it won't work on Solaris systems. The following should work
# on both:
MajorVersion=`expr "$Version" : "\(.\)"`
if [ "$MajorVersion" -ge 5 ] ; then
# Check for solaris86
if [ -n "$UNAME" ] ; then
hardware=`$UNAME -i`
case $hardware in
*86*) FARCH="solaris86" ;;
*) FARCH="solaris" ;;
esac
else
FARCH=solaris
fi
else
FARCH=sun4
fi
break ;;
hp9000*|hp7000*)
if [ -a /dev/kmem ] ; then
FARCH=hpux ;
else
FARCH=sppux ;
fi
break ;;
mips|dec-5000) FARCH=dec5000 ; break ;;
IP12|iris-4d) GARCH=IRIX ;;
cray|CRAY*) GARCH=CRAY ;;
next) FARCH=NeXT ; break ;;
KSR1|KSR2) FARCH=ksr ; break ;;
FreeBSD) FARCH=freebsd ; break ;;
GNU/kFreeBSD) FARCH=freebsd ; break ;;
NetBSD) FARCH=netbsd ; break ;;
i386) GARCH=ipsc2 ;;
ULTRIX|RISC) GARCH=dec5000 ;;
OSF*)
# Guess that this is a Compaq Alpha running some version of
# Tru64;
machtype=`uname -m`
if [ "$machtype" = "alpha" ] ; then
GARCH=ALPHA
fi
break;;
Darwin|Macintosh)
# We must distinquish the processor architecture
FARCH=freebsd_ppc ; break ;;
esac
LLARCH=$LARCH
done
if [ -z "$FARCH" ] ; then
FARCH=$GARCH
if [ -z "$FARCH" ] ; then
FARCH=$LLARCH
fi
if [ -z "$FARCH" ] ; then
FARCH=unknown
fi
fi
echo $FARCH
exit 0
|