source: git/MP/pvmgetarch @ e4e36c

spielwiese
Last change on this file since e4e36c was 5f32e0b, checked in by Hans Schönemann <hannes@…>, 21 years ago
*hannes: ports git-svn-id: file:///usr/local/Singular/svn/trunk@6813 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 4.5 KB
Line 
1#!/bin/sh
2#
3# pvmgetarch.sh
4#
5# Generate PVM architecture string.
6#
7# This is a heuristic thing that may need to be tuned from time
8# to time.  I don't know of a real solution to determining the
9# machine type.
10#
11# Notes:
12#   1. Local people mess with things.
13#   2. It's good to try a few things for robustness.
14#   3. Don't use test -x
15#
16# 08 Apr 1993  Robert Manchek  manchek@CS.UTK.EDU.
17# 24 Aug 1994  last revision
18# 28 Jul 1995  release 3.3.8
19#
20
21#
22# begin section that may need to be tuned.
23#
24ARCH=UNKNOWN
25
26if [ -f /bin/uname -o -f /usr/bin/uname ]; then
27        if [ -f /bin/uname ]; then
28                os="`/bin/uname -s`"
29                ht="`/bin/uname -m`"
30        else
31                os="`/usr/bin/uname -s`"
32                ht="`/usr/bin/uname -m`"
33        fi
34
35        case "$os,$ht" in
36        SunOS,sun3* )           ARCH=SUN3 ;;
37        SunOS,sun4* )           ARCH=SUN4 ;;
38        ULTRIX,RISC )           ARCH=PMAX ;;
39        ULTRIX,VAX )            ARCH=UVAX ;;
40        AIX*,* )                ARCH=RS6K ;;
41        *HP*,9000/[2345]* )     ARCH=HP300 ;;
42        *HP*,9000/[78]* )       ARCH=HPPA ;;
43        IRIX,* )                ARCH=SGI ;;
44        *,alpha )               ARCH=ALPHA ;;
45        CRSOS,smp )             ARCH=CRAYSMP ;;
46        *,paragon )             ARCH=PGON ;;
47        dgux,AViiON )           ARCH=DGAV ;;
48        *,88k )                 ARCH=E88K ;;
49        *,mips )                ARCH=MIPS ;;
50        *,CRAY-2 )              ARCH=CRAY2 ;;
51        Linux,i[3456]86 )       ARCH=LINUX ;;
52        BSD/OS,i[3456]86 )      ARCH=BSD386 ;;
53        FreeBSD,i386 )          ARCH=FREEBSD ;;
54        SUPER-UX,SX-3 )         ARCH=SX3 ;;
55        Darwin,*)               ARCH=PPCMAC ;;
56        uts,* )                 ARCH=UTS2 ;;
57        esac
58fi
59
60# fix suggested by Paul Wang to distinguish between hpux 9.xx and 10.xx
61if [ "$ARCH" = HPPA ]; then
62     case "`/bin/uname -r`" in
63        A.09.* )    ARCH=HPPA9 ;;
64        B.10.* )    ARCH=HPPA10 ;;
65     esac
66fi
67
68if [ "$ARCH" = UNKNOWN ]; then
69        if [ -f /bin/arch ]; then
70                case "`/bin/arch`" in
71                ksr1 ) ARCH=KSR1 ;;
72                sun2 ) ARCH=SUN2 ;;
73                sun3 ) ARCH=SUN3 ;;
74                sun4 ) ARCH=SUN4 ;;
75                esac
76        fi
77fi
78
79if [ "$ARCH" = UNKNOWN ]; then
80
81        if [ -f /ultrixboot ]; then
82                if [ -f /pcs750.bin ]; then
83                        ARCH=UVAX
84                else
85                        ARCH=PMAX
86                fi
87        else
88                if [ -f /pcs750.bin ]; then ARCH=VAX; fi
89        fi
90
91        if [ -d /usr/alliant ]; then ARCH=AFX8; fi
92        if [ -f /usr/bin/cluster ]; then ARCH=BFLY; fi
93        if [ -d /usr/convex ]; then ARCH=CNVX; fi
94        if [ -f /unicos ]; then ARCH=CRAY; fi
95        if [ -f /hp-ux ]; then ARCH=HP300; fi
96        if [ -f /usr/bin/getcube ]; then ARCH=I860; fi
97        if [ -f /usr/bin/asm56000 ]; then ARCH=NEXT; fi
98        if [ -f /etc/vg ]; then ARCH=RS6K; fi
99        if [ -d /usr/include/caif ]; then ARCH=RT; fi
100        if [ -f /bin/4d ]; then ARCH=SGI; fi
101        if [ -f /dynix ]; then ARCH=SYMM; fi
102        if [ -f /bin/titan ]; then ARCH=TITN; fi
103
104        if [ -f /netbsd ]; then
105                case "`/usr/bin/machine`" in
106                i386)   ARCH=NETBSDI386 ;;
107                amiga)  ARCH=NETBSDAMIGA ;;
108                hp300)  ARCH=NETBSDHP300 ;;
109                mac68k) ARCH=NETBSDMAC68K ;;
110                pmax)   ARCH=NETBSDPMAX ;;
111                sparc)  ARCH=NETBSDSPARC ;;
112                sun3)   ARCH=NETBSDSUN3 ;;
113                esac
114        elif [ -f /usr/bin/machine ]; then
115                case "`/usr/bin/machine`" in
116                i386 ) ARCH=BSD386 ;;
117                esac
118        fi
119        if [ -f /usr/bin/uxpm ] && /usr/bin/uxpm ; then
120                ARCH=UXPM
121        fi
122fi
123
124if [ "$ARCH" = UNKNOWN ]; then
125        if [ -f /bin/uname -o -f /usr/bin/uname ]; then
126                if [ -f /bin/uname ]; then
127                        os="`/bin/uname -s`"
128                        ht="`/bin/uname -m`"
129                else
130                        os="`/usr/bin/uname -s`"
131                        ht="`/usr/bin/uname -m`"
132                fi
133
134                case "$os,$ht" in
135                *,i[345]86 )            ARCH=SCO ;;
136                esac
137        fi
138fi
139
140if [ "$ARCH" = SUN4 ]; then
141        rel="`/bin/uname -r`"
142        case "$rel" in
143        5.* )   ARCH=SUN4SOL2 ;;
144        esac
145fi
146if [ "$ARCH" = SUN4SOL2 ]; then
147        nproc="`/bin/mpstat | wc -l`"
148        if [ $nproc -gt 2 ]; then ARCH=SUNMP; fi
149fi
150if [ "$ARCH" = ALPHA ]; then
151        rel="`/usr/bin/uname -r`"
152        case "$rel" in
153        *3.*)
154                nproc="`/usr/sbin/sizer -p`"
155                if [ $nproc -gt 1 ]; then ARCH=ALPHAMP; fi ;;
156        esac
157fi
158if [ "$ARCH" = SGI ]; then
159        rel="`/bin/uname -r`"
160        case "$rel" in
161        5.* )   ARCH=SGI5 ;;
162        6.* )   ARCH=SGI64 ;;
163        esac
164fi
165if [ "$ARCH" = SGI64 ]; then
166        nproc="`/usr/sbin/mpadmin -n | wc -w`"
167        if [ $nproc -gt 1 -a "$SGIMP" = ON ]; then ARCH=SGIMP64; fi
168fi
169if [ "$ARCH" = SGI5 ]; then
170        nproc="`/usr/sbin/mpadmin -n | wc -w`"
171        if [ $nproc -gt 1 -a "$SGIMP" = ON ]; then ARCH=SGIMP; fi
172fi
173if [ "$ARCH" = SUN4 -a -f /dev/cm ]; then ARCH=CM2; fi
174if [ "$ARCH" = SUN4 -a -f /dev/cmni ]; then ARCH=CM5; fi
175if [ "$ARCH" = CNVX ]; then
176        if /usr/convex/getsysinfo -f native_default; then
177                ARCH=CNVXN
178        fi
179fi
180if [ "$ARCH" = PMAX -a -d /usr/maspar ]; then ARCH=MASPAR; fi
181if [ "$ARCH" = RS6K ]; then 
182        nproc="`/usr/sbin/lsdev -C | grep proc | wc -l`"
183        if [ $nproc -gt 2 ]; then ARCH=RS6KMP; fi
184fi
185if [ "$ARCH" = HPPA -a -f /bin/sysinfo ]; then ARCH=CSPP; fi
186
187#
188# ugh, done.
189#
190
191echo $ARCH
192exit
193
Note: See TracBrowser for help on using the repository browser.