#!/bin/sh
#
#  Returns the default device for architecture
#  Usage: tdevice <architecture>
#
ARCH="$1"
DEVICE=""

# ch_p4 
case "$ARCH" in 
   sun4|solaris|IRIX|IRIX64|alpha|freebsd|LINUX|solaris86) DEVICE=ch_p4 ;;
   hpux)
       # Suggested by Gary Applegate (bigapple@wagner.convex.com)
       # Another possibility is to look at /lib/libail.sl
       if test -f /bin/sysinfo ; then
           DEVICE="ch_shmem"
       else
           DEVICE="ch_p4"
       fi
       ;;
   rs6000)
	# Now that IBM has an MPI, make that the default.
#       if test -f /usr/lpp/poe/bin/mpcc ; then
#           DEVICE="ch_mpl"
#       else
           DEVICE="ch_p4"
#       fi
       ;;
   paragon) DEVICE=nx ;;
   intelnx) DEVICE=ch_nx ;;
   meiko)   DEVICE=meiko ;;
   ncube)   DEVICE=ch_nc ;;
   *)       DEVICE=ch_p4 ;;
esac
echo $DEVICE
exit 0
