Pro Fortran 8.0/F77 SDK 5.6 for Macintosh Technical FAQs
Last Updated: 10-Sept-03

Attention OS X 10.2 Users                                                     23-Aug-02
What is Apple's vecLib?                                                       23-Aug-02
Is there a F90 compiler option for big or little endian?                      04-Jul-02
IMSL documentation                                                            04-Jul-02
Supporting -r8 flag in Fortran77                                              04-Jul-02
F90 cannot find functions in modules                                          04-Jul-02
Using the ABSOFT_RT_FLAGS environment variable                                23-Apr-03
Fortran string lengths                                                        04-Jul-02
adjustable array is not a dummy argument                                      04-Jul-02
The /var/tmp directory has the wrong default permissions                      04-Jul-02
I receive the error message "segmentation fault" or "return code (11)"        04-Jul-02
I receive the error message "relocation overflow for relocation entry"        04-Jul-02
Library out of date error(can't load from it)                                 11-Oct-02
Linker errors with Absoft supplied libraries                                  04-Jul-02
Fixup of 32904 too large for field width of 16 bits                           04-Jul-02
Using More Than 2GB of addressable memory                                     04-Jul-02
PLplot runtime error: PLplot cannot open font files                           02-May-03
Reading of data files fails: "Attempt to read past end of file"               31-Mar-03
How to I turn on traping of floating point exceptions?                        11-Apr-03
"execv of /usr/bin/as failed"                                                 11-Apr-03

Platform: Mac OS X

Problem Details:
OS Version: Mac OS X
Product Version: Any
Date: 04-Jul-02

Q. When using Absoft Pro Fortran I receive the message:
   Can't open file: /var/tmp/tmp.000000_*.int
   or Can't open the message file.
   Reason: Permission denied.

A. Change the permissions on the /var/tmp directory
   from the terminal like this:
   chmod a+rw /var/tmp

   You need root permission to use chmod in the /var/tmp
   directory.

index

Platform: Mac OS X

Problem Details:
OS Version: Any
Product Version: Any
Date: 04-Jul-02

Q. When I do a standard compile, the program compiles fine,
but when I execute it, I get a "segmentation fault" or "return code (11)".


A. You may be running into a stack overflow. Mac OS X has a
default stack size of 512k and our compilers default to putting
all variables that are not in common or saved on the stack. Try
compiling with the -s (static storage) option or running your program in a Terminal
window after issuing the following command:

limit stacksize unlimited

To permanently increase the stack add limit stacksize unlimited
to your .tcshrc file.

index

Platform: MAC OS X

Problem Details:

OS Version: Any
Product Version: Any
Date: 04-Jul-02

Q. I receive an error message like this:
   /usr/bin/ld: /usr/lib/crt1.o relocation overflow for relocation entry 24
   in section (__TEXT,__text) (displacement too large)
   /usr/bin/ld: /usr/lib/crt1.o relocation overflow for relocation entry 29
   in section (__TEXT,__text) (displacement too large) 

A. If you are using the IDE to compile then select Link Large
   Data Stubs in the Target tab of the Options window.
   If you are compiling from the command line add
   the files carbon_stub.o and objcint_stub.o to the
   command line like this:
   f77 test.f /applications/absoft/lib/carbon_stub.o /applications/absoft/lib/objcinit_stub.o

index

Platform: Mac OS X

Problem Details:

OS Version: Any
Product Version: Any
Date: 11-Oct-02

Q. I am receiving these error messages:
/usr/bin/ld: table of contents for archive:
/Applications/Absoft/lib/libmrwe.a is out of date; rerun ranlib(1)
(can't load from it)
/usr/bin/ld: table of contents for archive:
/Applications/Absoft/lib/libfio_carbon.a is out of date; rerun
ranlib(1)
(can't load from it)
/usr/bin/ld: table of contents for archive:
/Applications/Absoft/lib/libf77math.a is out of date; rerun ranlib(1)
(can't load from it)
/usr/bin/ld: table of contents for archive:
/Applications/Absoft/lib/libf90math.a is out of date; rerun ranlib(1)
(can't load from it)
A. Run /Applications/Absoft/lib/run_ranlib.sh
by opening the Mac OS X terminal application
that is in the /Applications/Utilities folder.
After double clicking on the Terminal icon enter:
cd /Applications/Absoft/lib ./run_ranlib.sh
     If you get messages about permission denied 
     then enter:
     sudo ./run_ranlib.sh
     and enter your user log-in password.

index

Platform: Mac OS X

  Problem Details:

  OS Version: any
  Product Version: All
  Date: 04-Jul-02

Q. I am trying to link to one of the Absoft supplied libraries:
     IMSL
     LAPACK
     UNIX/VMS compatibility
     AltiVec
     BLAS

     However, I receive an undefined reference for any routine
     that I try to use.  For example:
     [localhost:~] absoft% cat imsl.f
       !C Declare variables
        INTEGER NDEG
        PARAMETER (NDEG=3)
        REAL COEFF(NDEG+1)
        COMPLEX ZERO(NDEG)
        EXTERNAL WRCRN, ZPORC
        ! Set values of COEFF
        !COEFF = (-2.0 4.0 -3.0 1.0)
        DATA COEFF/-2.0, 4.0, -3.0, 1.0/
        CALL ZPORC (NDEG, COEFF, ZERO)
        CALL WRCRN ('The zeros found are', 1, NDEG, ZERO, 1, 0)
        END
     [localhost:~] absoft% f77 imsl.f
     FORTRAN 77 Compiler 7.0, Copyright (c) 1987-2001, Absoft Corp.
     /usr/bin/ld: Undefined symbols:
     _WRCRN
     _ZPORC

  A. All of the Absoft supplied library symbols are lower case with a
     trailing underscore.

     If you change ZPORC and WRCRN to zporc_ and wrcrn_ then imsl.f
     will compile and link with out error.

     If you are using .f files with Absoft Tools then go to
     Configure, Set Project Options…, Plug-ins and select
     the desired library.  If you are using .f90 of .f95 files
     then after selecting the desired plug-in go to the F95
     tab and select Compatibility from the drop down list.
     Then add an underscore in the External Symbol Suffix
     text box.  Then select Format and in External Names
     select Lower Case.

     If you are using the command line here is how you link
     to the IMSL libraries:


  [localhost:~] absoft% f77 imsl.f -limsl -limslblas -N15 -f
  FORTRAN 77 Compiler 7.0, Copyright (c) 1987-2001, Absoft Corp.
  [localhost:~] absoft% f90 imsl.f -limsl -limslblas -YEXT_SFX=_ -YEXT_NAMES=LCS

  The IMSL routines are documented on the CDROM in the
  IMSL Documentation folder

  Unix/VMS libraries:

  The Unix/VMS libraries contain three entry points for
  each routine. 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_

  [localhost:~] absoft% cat test.f
        character*40 argument
            n = IARGC()
              do i=1,n
                call GETARG(i,argument)
                print *,trim(argument)
             end do
           end

  [localhost:~] absoft% f77 test.f -lU77
  FORTRAN 77 Compiler 7.0, Copyright (c) 1987-2001, Absoft Corp.
  [localhost:~] absoft% a.out I am on the command line!
   I
   am
   on
   the
   command
   line!

  The Unix/VMS routines are documented in
   /Applications/absoft/doc/SupportLibrary.pdf

  LAPACK:
  To use the LAPACK libraries you must also link in the BLAS libraries
  from the command line like this:
  [localhost:~] absoft% f90 -YEXT_NAMES=LCS -YEXT_SFX=_ t.f -llapack -lblas
  [localhost:~] absoft% f77 -f -N15 t.f -llapack -lblas
  FORTRAN 77 Compiler 7.0b, Copyright (c) 1987-2002, Absoft Corp.
  From Absoft Tools go to Configure, Plug-ins and put a check in LAPACK
  Library and BLAS Library, Standered.
  You can recompile any of the Absoft supplied
  libraries with any case folding/underscore combination
  that suits your programs linking requirements.
  We supply the complete source codes and makefiles
  for all of the Absoft supplied libraries except for
  the IMSL libraries which is proprietary code.
  All of the Absoft supplied libraries are maintained in:
  /Applications/Absoft/lib

  You can find out what the entry points for any library
  are by typing nm and the name of the library from the
  command line.
index

Platform: Mac OS X            
Problem Details:
           OS Version: Mac OS X
           Product Version: all
           Date: 04-Jul-02
Q. I receive the error message:
           "Fixup of 32904 too large for field width of 16 bits"
A. From the Command line add the –N11 option. In Absoft Tools,
   Options, Target put a check in Use 32- bit Branches. This is happening
   because in certain types of unusually large program units, the 16-bit
   addressing ability of the PowerPC can be exceeded.
index

Platform: All

Problem Details:
OS Version: Any
Product Version: 7.0 or Later
Date: 04-Jul-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
   In addition to those limits, f90 has a limit of a maximum of 512MB
   for any single array or common block. This limit is scheduled to be
   removed from f90 in the next release after version 7.5.
   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: Mac OS X            
Problem Details:
           OS Version: Mac OS X
           Product Version: all
           Date: 04-Jul-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: Mac OS X            
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-Jul-02
Q. Does FORTRAN 77 support the -r8 flag?
A. Use the -N113 compiler option which promotes all real
and complex data types with out explicit length declarations
to double percision and double complex .
   The -N2 option forces all intrinsic functions to be performed
   in DOUBLE PRECISION.
index

Platform: Mac OS X            
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-Jul-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: 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.
          -nounit9
             Causes UNIT 9 not 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: Mac OS X            
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-Jul-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: [golden:~] absoft% cat t.f subroutine Fcode(string, i, d)
   character*(*) string
   integer i
   value i
   double precision d
   print *, string, i, d, len(string)
   end
[golden:~] absoft% 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;
   }
[golden:~] absoft% f77 t.f c.c
   FORTRAN 77 Compiler 7.0b, Copyright (c) 1987-2002, Absoft Corp.
[golden:~] absoft% a.out
   hello, world 1 2.00000000000000 12
[golden:~] absoft%
For more information on mixed Fortran and C programming
See chapter 6 in the Pro Fortran for Mac OS X user guide on
Interfacing with other languages.
index

Platform: Mac OS X            
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-Jul-02
Q. I get the error message:
"adjustable array is not a dummy argument"
A. The most common cause of this is:
   subroutine some_name(a,b,n)
   real A(N), B(N)
   The Absoft FORTRAN 77 compiler is case sensitive by default.
   The easiest way to solve this type of problem is use a
   case folding option: -f or -N109.
index

Platform: Mac OS X            
Problem Details:
           OS Version: all
           Product Version: all
           Date: 04-Jul-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:
   macosx80faq.html#anchor0058 
index

 

Platform: Mac OS X

Problem Details:
OS Version: Mac OS X 10.2
Product Version: 7.0
Date: 23-Aug-02

Q. I just upgraded to OS X 10.2  (or purchased a new computer which runs OS X 10.2.)
      My compiler no longer works and I get an obscure error.
A. Apple upgraded a version of the Apple Developer Tools. This causes an error for Pro Fortran
versions 7.0 and 8.0. We suggest that you follow the instructions (README file) in the following directories
concerning the fix.
      Pro Fortran v7.0 and v8.0 users:
         Go to http://www.absoft.com/download/osxdownloads.html
         Please read the instructions.
        

index

Platform: Mac OS X            
Problem Details:
           OS Version: 10.2 or later
           Product Version: 7.0 and later
           Date: 18-Sept-02
Q. What is Apple's vecLib and how do I link to it using Absoft Pro Fortran?
A. Apple's vecLib is a library of routines coded to take advantage
of PowerPC architecture known as Velocity Engine or AltiVec.
Of particular interest to Fortran programmers is the fact that the
vecLib shipping with OS X 10.2 includes a complete BLAS
implementation (although only the single and complex routines
take advantage of Altivec.) Further information about vecLib
can be found at Apple's web site.
   Linking vecLib with Absoft Pro Fortran is a simple procedure. You
   need to compile your source code with the appropriate name
   decoration options (external routine names folded to lower-case
   with a trailing underscore appended) and then include vecLib when
   building your application. The following two command lines illustrate
   this procedure for FORTRAN 77 and Fortran 90 for a simple, one file
   application.
   f77 -f -N15 file.f -X -framework -X vecLib
   f90 -YEXT_NAMES=LCS -YEXT_SFX=_ file.f90 -X -framework -X vecLib
             
index

Platform: Mac OS X            
Problem Details:
           OS Version: OSX
           Product Version: 7.0 and later
           Date: 31-Mar-03
Q. Whenever I do file I/O with my program, I see this error:
? FORTRAN Runtime Error:
? Attempt to read past end of file
? READ(UNIT=26,...
A. The problem is that your files are in Mac format.  In OS 9 
lines are terminated with a carriage return, in UNIX like
systems lines are terminated with a line feed. OSX is a UNIX
like operating system, and so your input file must be in UNIX format.
      The simplest way to convert these files is to do an ASCII FTP 
      transfer of them between the two computers.
      You can use the command line utility provided,
       /Applications/Absoft/bin/unixformat, to ensure that your files are in the
       correct format. This will also leave a copy of your original file in the
       directory with a .mac file extension added.
       Important Note: If you run the command as "unixformat *" the utility will
       rename of all the directories in the current directory with a .mac
       extension and create a big mess. Use the unixformat command with with
       some kind of specifier so that it is only run on the desired files, such
       as "unixformat *.dat".
       Also, you can control the file format in the Absoft Editor by going to the
       "Format" menu and choosing "Show Info". Select the desired style from the
       "Line Style" drop down box and save. The current format is displayed in
       the lower right corner of the editor window.
               
index

Platform: Mac OS X            
Problem Details:
           OS Version: OSX
           Product Version: 8.0
           Date: 31-Mar-03
Q. My PLplot application compiles and links fine, but at execution I see:
*** PLPLOT ERROR ***
Unable to open font file Program aborted or once I enter the output device number the program exits.
A. The "font files" in question are the six files ending with either ".fnt"
or ".map" in the folder: "/Applications/Absoft/EXAMPLES/PLPlot/examples"
      If the files are not in the same directory as the executable, the
      environment variable "PLPLOT_LIB" is used at runtime to search for these
      files. If you set it to a directory containing these files then any 
      applications you run from that terminal session will find them.                
      Type:

      "set PLPLOT_LIB = /Applications/Absoft/examples/PLPLOT/examples"
      
      Then launch your program from the terminal in any directory and it will run.
      In order to enable PLplot applications to run properly when they are double
      clicked from the Finder, you must link in this object file. This sets the 
      necessary environment variable automatically at runtime. To use it, simply 
      add the file PLplot_fonts.o to your Absoft Tools project and do a rebuild all,
or include it on the compiler invocation line if you are compiling from the terminal.
      Note, for these solutions to work, the font files must exist in the directory
     
     "/Applications/Absoft/examples/PLPLOT/examples"                
     
     on the system you are running the application on. 
                
index

Platform: Mac OS X            
Problem Details:
           OS Version: OSX
           Product Version: 8.0
           Date: 11-Apr-03
Q. How to I turn on traping of floating point exceptions?
A. In order to detect FPU exceptions, you need to enable the
undocumented option "-trap=<EXCEPTION TYPE>". This option is not documented
because FPU exception handling was not added to OS X until 10.2, after the
release of Pro Fortran 8.0.
      If you have your own signal handler installed, this should work. If you do
      not have your own signal handler, enable the option -et (to enable
      exception traceback) as well. To enable -et from Absoft Tools, check the
      box labeled "Runtime Stack Trace" in the Target Type section of the Options window.
      To use the -et option, you will need to have the latest service pack installed from:
      http://absoft.com/downloads.html
     Documentation of the above option:
      FPU Exception Handling:
      When a floating-point exception is produced, the default action of an application is to
       supply an IEEE P754 defined value and continue. For undefined or illegal operations
       (such as divide by zero or square root of a negative number) this value will usually be
       either Infinity (INF) or Not A Number (NaN) depending on the floating-point operation.
       Checking any of the exception boxes will cause the program to stop and produce a core
       dump, rather than continue, if the exception is encountered. If the program is being
       debugged, it will stop in the debugger at the statement line that caused the exception.
       The syntax for using this option on the command line is:
        
        -trap=exception[,exception,...]
        Where exception is one or more of:
               INVALID
               DIVBYZERO
               OVERFLOW
               UNDERFLOW
               INEXACT
             
index

Platform: Mac OS X            
Problem Details:
           OS Version: OSX
           Product Version: 8.0
           Date: 11-Apr-03
Q. I receive the error message "execv of /usr/bin/as failed" 
   when building my programs.
A. Visit:
http://absoft.com/downloads.html and download either
"SystemToolsForOSX10.1.sit.hqx" or "SystemToolsForOSX10.2.sit.hqx"
depending on your version of OS X. Once installed, this package will
provide the proper system assembler (/usr/bin/as) for your machine.

Also, be sure to download and install the latest service pack

index