Fortran 95 9.0 for 32-bit Linux Technical FAQs
Updated:
24-Feb-06

After installation I get the error message "cannot find license server"    24-Feb-06
I am trying to use subroutines but I get linker error messages?
01-Dec-05
Is there a built in function to test if a variable is a NAN or INF?  18-May-04
Linking objects or libraries compiled with older versions of Pro Fortran
18-May-04
Segmentation violation on Linux
18-May-04
IMSL documentation 18-May-04
Supporting -r8 flag in Fortran77 18-May-04
F90 cannot find functions in modules 18-May-04
F90 error message problems 18-May-04
Using the ABSOFT_RT_FLAGS environment variable 18-May-04 Fortran string lengths 18-May-04 Problems linking functions compiled with g77 18-May-04 Controlling the FPU in Linux 18-May-04
Static linking on Linux 18-May-04
Core dump with HUGE executables 18-May-04
Linking to g77 and gcc 18-May-04
Is there an F90 compiler option for big or little endian? 18-May-04
IMSL linking problem 18-May-04
I can't get the VMS (or Unix) libraries to link 18-May-04
Using more than 2GB of addressable memory 18-May-04
F90 error message problems 18-May-04
execv of /usr/bin/as failed 18-May-04

Platform: All

Problem Details:
OS Version: All
Product Version: All
Date: 01-Sep-02

Q. After installation I get the error message "cannot find license server" 
  
A.  This error message is returned when the license server is not found or 
cannot be started, there are two common reasons for this to happen.  

1. The license file has incorrect information. This is generally caused 
because a license file was given to the installer that does not have 
proper format. If you receive a license from Absoft that is plain text in an 
email it will look similar to the following: 
 
F95: XXXXXX-XXXX-XXXX-XXXX-XXXX-X 
FX2: XXXXXX-XXXX-XXXX-XXXX-XXXX-X  

The license manager does not recognize this format, as such you will need 
to manually type the licenses into the installation program. The installation 
program will then transform the licenses to the proper format, which will look 
something like this:  

LICENSE: XXXXXXXXXXXXXXXXXXXXXXX 
LICENSE: XXXXXXXXXXXXXXXXXXXXXXX  

The option asking if you already have a license file is meant for users with 
heterogeneous floating network licenses and had their actual license.dat file sent 
as an email attachment to them. Users with single or homogeneous floating network 
licenses will not be sent licenses in file form. Only users who have purchased a 
multiple operating system license () should answer Y here. If you do not have a 
multi-OS MaxFlex (or floating network) license please make sure to answer "N" to the 
question "Do you already have a license file? (Y/N):". If you did not enter the 
license information into the Absoft installation program you may run it again and 
answer "N" to the question described above.  Please make sure that any license server 
processes which might already be running are killed if any change is made to the 
license.dat file. Use the command "killall clmd_absoft" to stop all Absoft license 
manager processes. 

index



Platform: All

Problem Details:

OS Version: any
Product Version: any
Date: 01-Dec-05

Q. I am trying to use some subroutines such as DATE, TIME, GETARG, IARGC, etc, but I get linker error messages indicating that they cannot be found. Is there some library I should be using?

A. You need to use the VMS and Unix compatibility functions. If you are using Linux or OS X, the easiest solution is to add the compatibility libraries to your compile command line. For example:

f90 myprog.f -lU77 -lV77

From the Developer Tools Interface for Macintosh OS X 10.4, check the "Use UNIX Library" and "Use VAX/VMS Library" boxes (page 100 of the Pro Fortran Mac OS X User Guide).

If you are using Windows Development Command shell, the libraries to add are "unix.lib" and vms.lib" (pages 101 - 102 of the Windows Fortran & C/C++ User Guide). If you're using the "Developer Tools Interface", check the "Use VAX/VMS library" box on the Target tab, then click on the UNIX Lib drop-down menu and select UNIX library (LCS).

On Macintosh and Windows, we now also provide a module for accessing these functions. Simply add a USE statement to your Fortran 95 programs.

Example:

C:\Absoft90>type t.f95
use vax_library
character*20 thedate
call date(thedate)
print *,thedate
end

C:\Absoft90>f95 t.f95

C:\Absoft90>t
26-Oct-05

C:\Absoft90>

On Unix/Linux:

use unix_library
use unixlib_types
character*24 tim
tim = ctime(5)
write(*,*) tim
end

rmd@dingo rmd $ f90 -L/Applications/Absoft/examples/UnixAndVaxLibs/ -lU77 q.f90
rmd@dingo rmd $ ./a.out
Wed Dec 31 19:00:05 1969

For a list of available routines, please refer to the Absoft Support Library located in C:\Absoft90\DOCUMENTATION.

index
Platform: All

Problem Details:
OS Version: All
Product Version: All
Date: 01-Sep-02

Q. Libraries and object files compiled with previous versions of 
   Pro Fortran do not link with my newly compiled code.
   I receive errors such as:

     func.o: In function `func':
     func.o(.text+0x33): undefined reference to `___cdiv'
     func.o(.text+0x38): undefined reference to `___casgn'
     func.o(.text+0x3d): undefined reference to `___char'
     func.o(.text+0x42): undefined reference to `___con'
     ...
     collect2: ld returned 1 exit status

A. To avoid problems involving accidentally linking with C libraries,
Absoft has renamed all symbols in our I/O and math libraries so
that they contain an "_absoft_" preceding the name.
For compatibility reasons, we have provided an object file
(/opt/absoft/lib/f77_oldnames.o) which will resolve these references.
Add this object file to the end of your link command.
This file is provided for compatibility reasons only. If possible, it is highly recommended that you rebuild all object files and libraries with Pro Fortran 8.2.

      This file is provided for compatibility reasons only.
      If possible, it is highly recommended that you rebuild all object files and libraries with Pro             Fortran 8.2.

index

Platform: Intel/Linux

Problem Details:
OS Version: 2.0
Product Version: any
Date: 01-Sep-02
Q. When I declare large arrays (>8 MB of variables), I get a
   segmentation violation from Linux.

A. Use the "-s" compiler option (static storage) to move
   the data from the stack to the heap or use the ulimit
   command (ulimit is a bash command - the csh equivalent to
   'ulimit -s' is 'limit stack') to raise the stack size limit
   # ulimit -s
   8192
   # ulimit -s 32768
   # ulimit -s
   32768

   Once raised the limit applies to the current
   process and any children of that process.

index
Platform: All

Problem Details:

OS Version: any
Product Version: any
Date: 01-Sep-02

Q. Where can I find IMSL documentation.

A. The documentation for the IMSL libraries (7 volume set) may be
   purchased separately, or you can find it on line at:

   http://www.vni.com/products/imsl/alphabetized_functions.html

index

Platform: Intel/Linux

Problem Details:

OS Version: Any
Product Version: Fortran77
Date: 01-Sep-02

Q. Does FORTRAN 77 support the -r8 flag?

A. Use the -N113 compiler option.

index
Platform: Intel/Linux

Problem Details:

OS Version: any
Product Version: any
Date: 01-Sep-02

Q. I have a file which "uses" a precompiled module containing a
   function used by the main file. When I try to compile the main it
   says there is an unresolved reference.

A. Your module contains executable code. Precompiling it created both
   a module file and an object file. Present the object file to the linker
   and the reference will be resolved. If you're compiling from the
   command line, simply add the object file on the compiler invocation
   line.

index
Platform: Intel/Linux

Problem Details:

OS Version: any
Product Version: ProFortran 8.0
Date: 01-Sep-02

Q. When I try to compile a program with the Fortran 90
   compiler I get the following error message:

   cft90 INTERNAL: Cannot retrieve message 3 from the message system.

   What does this message mean?

A. The error message file is:

   /opt/absoft/nls/cf90

   This path is hard-wired into the compiler. However, if an
   environment variabled named NLSPATH is defined, the compiler
   will use it to attempt to locate the message file. Either
   unset this variable when you are using the Fortran 90 compiler,
   or add the path specified above to the variable:

   NLSPATH=/opt/absoft/lib/nls/cf90/
   export NLSPATH

index
Platform: all
OS version: any
           
Product Version: Pro Fortran 6.0 and later
Q. How can I modify the default behavior of the Absoft runtime library?
A. Starting with Absoft Pro Fortran 6.0 and Absoft Fortran SDK 4.5, the
           runtime library checks for an environment variable named ABSOFT_RT_FLAGS
           on entry to the first I/O statement in a program. 
          The following switches can be specified using this variable:
      -defaultcarriage:            
           
           Causes the units preconnected to standard output to interperet 
           carriage control characters as if they had been connected with
           ACTION='PRINT'.
       -fileprompt: 
           Causes the library to prompt the user for a filename when it 
           implicitly opens a file as the result of I/O to an unconnected
           unit number. By default, the library creates a filename based on
           the unit number.
       -vaxnames: 
           Causes the library to use 'vax style' names (FORnnn.DAT) when 
           creating a filename as the result of I/O to an unconnected
           unit number.
        -unixnames: 
           Causes the library to use 'unix style' names (fort.nnn) when 
           creating a filename as the result of I/O to an unconnected 
           unit number.
        -bigendian: 
           Causes the library to interpret all unformatted files using 
           big endian byte ordering.
         -littleendian:            
           Causes the library to interpret all unformatted files using 
           little endian byte ordering.
         -noleadzero: 
            Causes the library to surpress the printing of leading zeroes
            when processing an Fw.d edit descriptor. This only affects the 
            limited number of cases where the ANSI standard makes printing 
            of a leading zero implementation defined. 
         -reclen32: 
            Causes the library to interpret the value specified for RECL= 
            in an OPEN statement as 32-bit words instead of bytes.
          -f90nlexts:
            Allows f90 namelist reads to accept non-standard syntax for
            array elements. Without this flag, the following input results
            in a runtime error:
             $ONE
             A(1)=1,2,3,4
             $END
           
             When -f90nlexts is set, the values are assigned to the first
             four elements of A.
          -connectunit9
             Causes UNIT 9  to be preconnected to standard input and output.
          -maceol
              Formatted sequential files are in Classic Macintosh format where each
              record ends with a carriage return,
          -doseol
               Formatted sequential files are in Windows format where each record ends
               with a carriage return followed by a line feed.
          -unixeol
               Formatted sequential files are in Unix format where each record ends with a line feed.
          -hex_uppercase
                Data written with the Z edit descriptor will use upper case characters for A-F.
          To set ABSOFT_RT_FLAGS:
           On Windows:
           Open a command prompt window and enter:
           set ABSOFT_RT_FLAGS=-fileprompt
           On Mac OS 9:
           Open the MPW worksheet and enter:
           set -e ABSOFT_RT_FLAGS -fileprompt
           On Mac OS X(using tcsh):
           Open the terminal and enter:
           setenv ABSOFT_RT_FLAGS -fileprompt
           On Linux(using bash):
           export ABSOFT_RT_FLAGS=-fileprompt
           MRWE applications must be launched from the 
           command line so that the ABSOFT_RT_FLAGS
           will be used.
           Note: the leading minus sign is required for each switch and multiple            
           switches must be separated by one or more spaces.

 

index

Platform: All

Problem Details:
OS Version: All
Product Version: All
Date: 01-Sep-02

Q. Does Absoft Fortran pass the lengths of strings like most Unix
Fortran compilers I've used?
A. Yes, string lengths are passed as extra arguments (by value) at 
the end of the formal argument list: APF75SP:cat t.f subroutine Fcode(string, i, d)
   character*(*) string
   integer i
   value i
   double precision d
   print *, string, i, d, len(string)
   end
   APF75SP:cat c.c
   #include <string.h>
   void Fcode(char *, int, double *, int);
   int main()
   {
   char string[13] = {"hello, world"};
   int i = 1;
   double d = 2.0;
   Fcode(string, i, &d, strlen(string));
   return 0;
   }
   APF75SP:f77 t.f c.c
   FORTRAN 77 Compiler 7.5a, Copyright (c) 1987-2002, Absoft Corp.
   APF75SP:a.out
   hello, world 1 2.00000000000000 12
   For more information on mixed Fortran and C programming
   See chapter 4 in the Pro Fortran for Linux user guide on
   Interfacing with other languages.

   You can use the -YVF_CHAR f95 option to change the argument 
   passing convention from:
   call foo (string1, string2, ..., len1, len2, ...)
   to:
   call foo (string1,len1, string2, len2, ...)

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: Any
Date: 01-Sep-02

Q. I am trying to link to some functions compiled with g77. When I compile my
   program I get linker errors and undefined reference to any of the necessary
   functions.

A. Include the g77 runtime library libf2c.a in your compile line to make it an
   argument to the linker.

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: any
Date: 01-Sep-02

Q. How can I control the processor FPU?

A. You can use arm387 to control the FPU. This is an
   integer function built into the runtime library. Here
   are the definitions of the control arguments:

fenv.inc:

! Intel specific FPU control constants for use with fpcontrol

        integer*4 FE_TONEAREST
        parameter ( FE_TONEAREST  = (z'00000000'))

        integer*4 FE_TOWARDZERO
        parameter ( FE_TOWARDZERO = (z'00000C00'))

        integer*4 FE_UPWARD
        parameter ( FE_UPWARD     = (z'00000800'))

        integer*4 FE_DOWNWARD
        parameter ( FE_DOWNWARD   = (z'00000400'))

        integer*4 FE_INEXACT
        parameter ( FE_INEXACT    = (z'00000020'))

        integer*4 FE_DIVBYZERO
        parameter ( FE_DIVBYZERO  = (z'00000004'))

        integer*4 FE_UNDERFLOW
        parameter ( FE_UNDERFLOW  = (z'00000010'))

        integer*4 FE_OVERFLOW
        parameter ( FE_OVERFLOW   = (z'00000008'))

        integer*4 FE_INVALID
        parameter ( FE_INVALID    = (z'00000001'))


Then use arm387 as follows:

test.f:

        implicit none
        include "fenv.inc"
        integer arm387
        integer state

* first retrieve the current state of the FPU

        state = arm387(0)

* enable divide-by-zero exceptions (for example)

        state = arm387(state .and. .not. FE_DIVBYZERO)


        end

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: any
Date: 01-Sep-02

Q. If I want executable files to run on other linux systems
   which do not have the Absoft compiler installed, do I need
   to link the libraries statically or does that happen automatically?

A. In order to statically link the libraries you must pass
   an argument to the linker on the command line like this:

   -X -static

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: any
Date: 01-Sep-02

Q. I have a program with some very large arrays; 500 MB
   and more. I have plenty of memory in my computer, but
   the program still core dumps immediately.

A. First, be certain that you are using the '-s' (static
   storage) compiler option (f77 or f90). The default Linux
   stack size of 8 MB will not be sufficient.

   This is a problem with the Linux dynamic loader. You should
   be able to solve the problem by linking against static
   versions of the system libraries to avoid dynamic linking.
   Add this option to your compiler command line:

   -X -static

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: 8.0
Date: 01-Sep-02

Q. I am trying to use a compiled g77 object with Absoft
   f77 or f90 and I receive these errors:

    test.o(.text+0x9): undefined reference to `s_wsle'
    test.o(.text+0x22): undefined reference to `do_lio'
    test.o(.text+0x2a): undefined reference to `e_wsle'

A. You must link against the g77 runtime library f2c or g2c
   depending on your Linux distribution.

Q. Ok, I added -lg2c and I still get an unresolved reference
   to the g77 subroutine that I am trying to call in F77?

A. G77 folds all external names to lower case and appends
   a trailing underscore. You must add the -B108 and -f compiler
   options. Your compile line should look like this:

   f77 t.f test.o -lg2c -B108 -f

   For F90 you must also add -YEXT_NAMES="LCS"
   which folds all external symbolic names to lower case
   and -B108 that appends a trailing underscore.
   Your compile line should look like this:

   f90 t.f test.o -lg2c -B108 -YEXT_NAMES="LCS"

Q. I am trying to use F77 with gcc.  My C code compiles fine.  When
   I try to use the compiled gcc object code with F77, I receive unresolved
   references for every call to the C math library that is in my C code?

A. Add libm.a to your compile line like this:

       f77 t.f test.o -lm

Q. Is there an equivalent of -fno-second-underscore in your compiler?
   I need to be able to link g77/gcc produced code that is compiled with this option.

A. Do not use the -B108 f77/f90 compiler option. This is a back-end (code generator)
   option and has specific knowledge of the Linux environment; hence the double underscores.
   Instead, use a front-end option which is machine independent:

   f77: -N15
   f90: -YEXT_SFX='_'

index

Platform: All

Problem Details:
OS Version: Any
Product Version: Any
Date: 01-Sep-02

Q. Is there an F90 compiler option that will force the compiler to
   consider the byte ordering of all unformatted files to either big
   or little endian?

A. Use the F90 open statement specifier:
   convert ={"big_endian"|"little_endian"}

   For example:

   Open(10,file="filename",form="unformatted",convert="big_endian")

   Or, use the ABSOFT_RT_FLAGS as described in the technical FAQ on
   using the ABSOFT_RT_FLAGS environment variable which can
   be found here:

   linux75tfaq.html#anchor0058

index

Platform: Intel/Linux
Problem Details:
OS Version: Linux
Product Version: 8.0
Date: 01-Sep-02
Q. I can't get the VMS (or Unix) libraries to link.
A. The libraries contain three entry points for each function.
   One in all upper case, one in all upper case with a trailing underscore,
   and one in all lower case with a trailing underscore:
   DATE
   DATE_
   date_
   Be sure that your spelling matches one of these.
   The libraries are maintained in /opt/absoft/lib:
   /opt/absoft/lib/libV77.a VMS compatibility library
   /opt/absoft/lib/libU77.a Unix compatibility library
   For example:
   test.f:
   character*40 argument
   n = IARGC()
    do i=1,n
     call GETARG(i,argument)
     print *,trim(argument)
    end do
   end
   $ f77 -1U77 test.f


   The VMS and Unix libraries are documented in:
   /opt/absoft/doc/supportLibrary.pdf

index


 

Platform: All

Problem Details:
OS Version: Any
Product Version: 8.0
Date: 01-Sep-02

Q. Using more than 2GB of addressable memory

A. The following table shows the maximum process size (code+data)
on each operating system:
                     OS | Max process size
   ---------------------+--------------------
   x86 Linux kernel 2.4 | 3GB
   x86 Linux kernel 2.2 | 2GB
              PPC Linux | 2GB
                Windows | 2GB
                Mac OSX | 2GB, 64MB max stack
   F77 has a limit of 2GB for any single array, and 2,000,000,000 bytes
   for any single common block.
   To have the maximum amount of memory available for data on Linux,
   it is necessary to link your application statically. This is done
   by using the "-X -static" option for either f77 or f90.
   On x86 Linux there is also a limit in the GNU assembler that
   you can't have more than 2GB of static data (either save
   statements, or the -s switch) in a single file. If you try,
   you will get the following error: Error: attempt to .org backwards ignored
   To work around this, you can put some data into a common block.

index


Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: any
Date: 01-Sep-02

Q. I am trying to debug a mixed language program on Linux. Even though
my C files are compiled with -g, Fx can't see them. A. You need to compile the C files with -gdwarf instead of -g.

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: any
Date: 01-Sep-02

Q. When I try to compile a program with the Fortran 90 
compiler I get the following error message:

cft90 INTERNAL: Cannot retrieve message 3 from the message system.

What does this message mean?
A. The error message file is:
   NLSPATH=/usr/lib/absoft/nls/%N
   This path is hard-wired into the compiler. However, if an
   environment variabled named NLSPATH is defined, the compiler
   will use it to attempt to locate the message file. Either
   unset this variable when you are using the Fortran 90 compiler,
   or add the path specified above to the variable:
   NLSPATH=/usr/lib/absoft/nls/cf90/%N
   export NLSPATH

index

Platform: Intel/Linux

Problem Details:

OS Version: Suse Linux
Product Version: any
Date: 01-Sep-02
Q. Every time I compile a program I get a warning message like:
   "warning: multiple common of `_io_comm'"
   "warning: previous common is here"
A. You are probably using a SuSE implementation of Linux.   For 
unknown reasons, they configure the C compiler to use the
default option: "-warn-common". This causes the warnings you
are seeing.
   You can eliminate these warnings by reconfiguring your default
   options maintained in the "specs" file for gcc.
   On SuSE 6.0, edit the file:
   /usr/lib/gcc-lib/i486-linux/egcs-2.91.60/specs
   and remove ONLY -warn-common from the *.lib section
   On SuSE 6.1 and SuSE 6.2, edit the file
   /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
   and remove ONLY -warn-common from the *.lib section

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: 8.0
Date: 15-Oct-02

Q. I'm having problems using the IMSL functions. The linker reports
unresolved references for any function I try to use.
A. You must include the IMSL and BLAS libraries:
      libimsl.a and libimslblas.a
      as an argument to the linker like this:
      f77 t.f -f -N15 -limsl -limslblas
      f90 a.f -limsl -limslblas -YEXT_NAMES=LCS -YEXT_SFX=_

      It is necessary to add the options -f(fold to lower case)
      and the -N15(appends a trailing underscore) for F77 and
      the corresponding F90 options, -YEXT_NAMES=LCS -YEXT_SFX=_
      because the IMSL and BLAS libraries were compiled with these options.

      The complete documentation which includes
      Fortran source code examples is included in
      /opt/absoft/doc
      F9040.pdf
      MATH.pdf
      SFUN.pdf
      STATVol1.pdf
      STATVol2.pdf
            

index

Platform: Intel/Linux

Problem Details:

OS Version: Linux
Product Version: Any
Date: 11-Apr-03
Q. I receive the error message "execv of /usr/bin/as failed"
   when building my programs.
A. "execv of /usr/bin/as failed" indicates that you do not have the system
assembler installed. "as" is part of the package known as "binutils".If you have your
Linux Distribution cd (and it is an RPM based distro), locate the package:
binutils<version number>.rpm
   When you find the RPM on your cd, you can install it by typing:
   rpm -i <filename>.rpm
   You may also look on the internet for an RPM or other package for your Linux distribution.
   binutils source:
   http://www.gnu.org/directory/binutils.html
         

index

Platform: ALL
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-March-04
Q. Is it possible to assign a variable the value INF or NAN? 

     Is there a built in function to test if a variable is a NAN or INF?

A.  Please see this file for routines to test real and double values against NaN and INF.  
     Make sure to see the comments in naninfchk.f and compile for your system (Big Endian or Little Endian)
     or your results will be incorrect.

     A test program has also been provided.

index