Compilation of FORTRAN/C/C++ Serial Codes on Gibbs



The Linux cluster gibbs has installed PGC (Portland Group  Ccompilers, v.4.0) for compiling FORTRAN77/90 and ASNI C/C++ codes  as well as GNU FORTRAN/C/C++ Compilers (v. 3.2.7)



EXAMPLES

To Use the GNU Compilers

For more details, logon to gibbs and type man g77 or man gcc and hit Enter to read the manual page of GNU compilers.

To Use the Portland Group Compilers

For more details, please click man pgf77, man pgf90 or man pgcc.
For user manuals, please click  pgf77 , pgf90 or pgcc


RECOMMENDATIONS:

The use of commercial compiler: Portland Group Compilers are very strongly recommended
as indicated by computing the PI values via function:  acos().


The FORTRAN codes:

      program test
C   
C A test program for double precision of PI
        real*8 a,b
        real dummy,start,totaltime
        dummy = 0.0
      start = secnds(dummy)
      a=-1.0D0
      do n=1,10000
        b=acos(a*n/(n*1.))
        write(*,*)'Number of iterations:', n, ',  PI =', b
      enddo
C        write(*,*)'Number of iterations:', n, ',  PI =', b
C Get the seconds since midnight minus when we started
      totaltime = secnds(start)
      write(*,*)' '
        write(*,*)'The total CPU time is', totaltime, ' seconds'
        stop
        end
#########################################################################


Using g77:     PI = 3.14159265

Using pgf77:  PI = 3.141592653589793 (It has 7 more significant numbers !!!)