C------------------------------------------------------------------------------ subroutine ftarch(iword,jword,compid) C This routine looks at how integers and reals are internally C stored, to figure out what kind of machine it is running on. C compid = 0 - Big Endian (SUN, Mac, Next, SGI) C 1 - Little Endian (Dec Ultrix, OSF/1, PC) C 2 - Vax VMS C 3 - Alpha VMS C 4 - IBM mainframe C -1 - SUN F() compiler (maps I*2 variables into I*4) C (large neg number) - Cray supercomputer integer compid integer*2 iword(2) integer jword(2) C Look at the equivalent integer, to distinquish the machine type. C The machine type is needed when testing for NaNs. if (iword(1) .eq. 16270)then C looks like a SUN workstation (uses IEEE word format) compid=0 else if (iword(1) .eq. 14564)then C looks like a Decstation, alpha OSF/1, or IBM PC (byte swapped) compid=1 else if (iword(1) .eq. 16526)then if (jword(1) .eq. 954417294)then C looks like a VAX VMS system compid=2 else C looks like ALPHA VMS system compid=3 end if else if (iword(1) .eq. 16657)then C an IBM main frame (the test for NaNs is the same as on SUNs) compid=4 else if (iword(1) .eq. 1066285284)then C SUN F90 compiler maps I*2 variables into I*4 compid= (-1) else C unknown machine compid=0 end if end