[updated 23.Apr.2004]

Librairie utiliter > Fichier osarnm.f

Qui appelle osarnm ?

line
      SUBROUTINE OSARNM (OSARCH,NAME,F77CMP,AUTODP)
line
  Auteur : D.Martin (Novembre 1995)  
  Derniere modification : D.Martin (2 septembre 2002)
  Version 1.0.9
   
  Retourne le type de machine et de son nom (utilise 'uname'), 
  le nom du compilateur Fortran et un indicateur d'utilisation de l'option de
  compilation 'Double Precision' implicite.
 
         | Processor|      OS      | Fortran77 |
  Vendor | uname -p |  uname -sr   | compilers*| machine 'name'      
  -------|----------|--------------|-----------|---------------------
  apple  | powerpc  | MacOSX 10.3.*| g77 & xlf | PowerMac G5/G4/G3/iMac
         |          | MacOSX 10.2.*| g77 & xlf | PowerMac G4/iMac
         |          | MacOSX 10.1.*| g77       | PowerMac G4/G3/iMac
         |          | Linux  2.2.* | g77       | PowerMac G4/G3/iMac
  dec    | alpha    | Linux  2.2.* | g77       | DEC DS20E
         |          | OSF1   V4.0  | g77 & f77 | DEC AlphaStation600
  IBM    | powerIV  | AIX    5.1   | xlf       | RS6000
         | powerIII | AIX    5.1   | xlf       | RS6000(9076-270)
         |          | AIX    4.3   | xlf       | RS6000(9076-270)
  intel  | i686     | CYGWIN 1.3   | g77       | intel80*86
         |          | Linux  2.4.* | g77 & ifc |         
  sgi    | mips-2   | IRIX64 6.5   | f77       | SGI-IP25/IP27
         |          | IRIX64 6.2   | f77       | SGI-IP32
  sgi    | mips     | IRIX   5.3   | f77       | SGI-IP22
  sun    | sparc    | SunOS  5.9.* | g77 & f77 | Sun Ultra-1/2/4/5_10
         |          | SunOS  5.7.* | g77 & f77 | Sun Ultra-1/2/4/5_10
         |          | SunOS  5.5.* | g77 & f77 | 
         |          | SunOS  4.1.* | g77 & f77 | Sun SS 4/5/10
  -------|----------|--------------|-----------|---------------------
  f77 stands for native (sgi, sun, dec) Fortran77 compiler
  g77 stands for GNU Fortran77 compiler
  ifc stands for intel Fortran compiler
  xlf stands for IBM XL Fortran compiler
 
 -- Arguments de sortie --
  OSARCH OS and architecture as the string : `uname`//`uname -m`
  NAME   machine's name : `uname -n`
  F77CMP f77 compiler name according to Melina (output of options_machine)
  AUTODP 'Yes' is one uses compiler options to promote REAL computations
         to DOUBLE PRECISION computations (else 'No')
 -- Procedures appelees --
  csystm_ function c executant une commande du systeme
  STRF2C  function f77 transformant une chaine Fortran en chaine C
line
      IMPLICIT NONE
      CHARACTER*(*) OSARCH,NAME,F77CMP,AUTODP
 
      CHARACTER*80 STRF2C
      INTEGER OSNO,LNARCH
      For memory alignement in case of '-i8 -r8/ 'autodbl' compiler option
      to implicitely promote REAL computations to DOUBLE PRECISION computations
      INTEGER*4 CSTATU
line
      LNARCH=0
 
      CALL CSYSTM (STRF2C('(uname; options_machine FC_name;'
     &                  //'options_machine AUTODBL) > "tmp'),CSTATU)
 
      OPEN  (UNIT=99,FILE='"tmp',STATUS='UNKNOWN')
      READ  (UNIT=99,FMT='(A)') OSARCH,F77CMP,AUTODP
      CLOSE (UNIT=99,STATUS='DELETE')
 
      IF (OSARCH(1:6).EQ.'Darwin') THEN
 
 --      Version Darwin 5.*, 6.* (Mac OS X)
 
         LNARCH=6
         CALL CSYSTM (STRF2C ('(uname -m; uname -n | cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ELSEIF (OSARCH(1:5).EQ.'Linux') THEN
 
 --      Version Linux 2.2.* & 2.4.*
 
         LNARCH=5
         CALL CSYSTM (STRF2C ('(uname -m; uname -n| cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ELSEIF (OSARCH(1:3).EQ.'AIX') THEN
 
 --      Version AIX 4.3, 5.1 / IBM
 
         LNARCH=3
         CALL CSYSTM (STRF2C ('(uname -M; uname -n| cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ELSEIF (OSARCH(1:3).EQ.'OSF') THEN
 
 --       Version OSF1 V3 & V4 / DEC_Alpha
 
         LNARCH=4
         CALL CSYSTM (STRF2C ('(uname -m; uname -n| cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ELSEIF (OSARCH(1:4).EQ.'IRIX') THEN
 
 --      Version IRIX & IRIX64 / Silicon Graphics
 
         LNARCH=4
         CALL CSYSTM (STRF2C ('(uname -mp; uname -n| cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ELSEIF (OSARCH(1:5).EQ.'SunOS') THEN
 
 --      Version SunOS 4.1.x, 5.4, 5.5, 5.5.1 / Sun
         
         Numero de version de l'OS
         LNARCH=5
         CALL CSYSTM (STRF2C ('uname -r > "tmp'),CSTATU)
 
         OPEN  (UNIT=99,FILE='"tmp',STATUS='UNKNOWN')
         READ  (UNIT=99,FMT='(F3.1)') OSNO
         CLOSE (UNIT=99,STATUS='DELETE')
         IF (OSNO.LT.5.5) THEN
            SunOS 4.1.x & 5.4
            CALL CSYSTM (STRF2C ('(uname -m ; uname -n| cut -f1 -d.)'
     &                        //' > Arch.tmp'),CSTATU)
         ELSE
            SunOS 5.5 & 5.5.1
            CALL CSYSTM (STRF2C ('(uname -i ; uname -n| cut -f1 -d.)'
     &                        //' > Arch.tmp'),CSTATU)
         ENDIF
 
      ELSEIF (OSARCH(1:6).EQ.'CYGWIN') THEN
 
 --      Version CYGWIN / Intel 80686
 
         LNARCH=6
         CALL CSYSTM (STRF2C ('(uname -m; uname -n| cut -f1 -d.)'
     &                     //' > Arch.tmp'),CSTATU)
 
      ENDIF
 
      IF (LNARCH.GT.0) THEN
         OSARCH(LNARCH+1:)='-'
         OPEN  (UNIT=99,FILE='Arch.tmp',STATUS='UNKNOWN')
         READ  (UNIT=99,FMT='(A)') OSARCH(LNARCH+2:),NAME
         CLOSE (UNIT=99,STATUS='DELETE')
      ENDIF
line
                                                                    END !OSarnm
line
top

osarnm est appelé dans (2 procédures)

top