Pro Fortran 8.0 for Windows Technical FAQs
Updated: 15-May-2003

Visual C++ debugging                                                        01-Sep-02
Errors using Microsoft C header files                                       01-Sep-02
How to pass VB arrays to a DLL                                              01-Sep-02
IMSL documentation                                                          01-Sep-02
Specifying STDCALL functions with Fortran 77                                01-Sep-02
Supporting -r8 flag in Fortran 77                                           01-Sep-02
F90 cannot find functions in modules                                        01-Sep-02
STRUCTURE definitions for Win32 API functions                               01-Sep-02
How to pass VB strings to a DLL                                             01-Sep-02
Data type specification errors                                              01-Sep-02
C Library                                                                   01-Sep-02
MRWE source and example                                                     01-Sep-02
How to execute DOS commands                                                 01-Sep-02
Controlling the FPU in Windows                                              01-Sep-02
OpenGL                                                                      01-Sep-02
Using the ABSOFT_RT_FLAGS environment variable                              23-Apr-03
Fx debugger unable to load program for debugging                            01-Sep-02
Fortran string lengths                                                      01-Sep-02
Reading TAB characters                                                      01-Sep-02
Microsoft ODBC                                                              01-Sep-02
MRWE charcter/line limitations                                              01-Sep-02
How do I use the Microsoft Win32 API?                                       01-Sep-02
Buffer allocation failure                                                   01-Sep-02
Adjustable array is not a dummy argument                                    01-Sep-02
VMS and Unix libraries on Windows                                           15-Oct-02
Viewing arrays using the Visual C++ debugger                                01-Sep-02
Is there an F90 compiler option for big or little endian?                   01-Sep-02
IMSL linking problem                                                        15-Oct-02
Stack faults and increasing the stack size                                  01-Sep-02
Is it possible to use Absoft Pro Fortran with Matlab V6.1                   01-Sep-02
Is it possible to use Absoft Pro Fortran with Matlab V6.5                   15-May-03
I receive the message: Out of environment space                             01-Sep-02
Linking NETCDF libraries compiled with Digital Fortran (DVF)                01-Sep-02
Using more than 2GB of addressable memory                                   01-Sep-02
PLplot runtime error: PLplot cannot open font files                         02-May-03

Platform: Windows

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

Q. When I try to link Visual C++ 4.2 object files which contain
   debugging information using the Absoft Linker, I get the following
   error:

        "symbol records not in natural alignment"

   What should I do to correct this?

A. When linking object files created by Visual C++ 4.2, you need to
   specify the /CVPACK switch to the Absoft linker.

index

Platform: Windows

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

Q. I get errors when using the Windows header files with your C compiler.

A. Use the -windefs compiler option.

index

Platform: Windows

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

Q. How do I pass an array from VB to a DLL?

A. Refer to your Microsoft VisualBasic Programmer's Guide page 652. VB
   passes entire arrays using OLE Automation argument protocols. Absoft
   F77/F90/C/C++ expect CDECL arguments. The VB manual section explains how to pass the
   address of the first argument of the array. Basically:

   Declare ... lParam as Any

   Dim array(100)

   Call DLL(array(0))

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: Windows

Problem Details:

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

Q. I have been trying to compile a Windows program using Absoft Fortran 77.
   I forced a map to be generated and it became clear that the subroutines
   and functions are being renamed-"ABOUTPROC" becomes "_ABOUTPROC@16" for
   example. And the module that calls the routine is not using the modified
   name. What is the correct way to compile and link such programs?

A. This is STDCALL mangling. The leading underscore is normal for Windows
   API compliant procedures. The trailing @nn is the size of the stack that
   needs to be popped by the callee (4 times the argument list count).  STDCALL
   uses a callee stack pop protocol and the name mangling helps the linker pick
   the proper procedure.

   When the ABOUTPROC function is included in the main source file, the
   compiler can match the argument lists.  When it's separate, the compiler does not
   know how many arguments the ABOUTPROC function will take.  It mangles the
   name as:

                              _ABOUTPROC

   You need to create an alias file to map the name:

        _ABOUTPROC_ABOUTPROC@16

index

Platform: Windows

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.

   The -N2 option forces all intrinsic functions to be performed
   in DOUBLE PRECISION.

index

Platform: Windows

Problem Details:

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

Q. I have a file which "uses" a precompiled by 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: Windows

Problem Details:

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

Q. What is "point" in MoveToEx?  I found the RECORD statement, but
   no corresponding STRUCTURE statement in main.f

A. It looks like this:

       STRUCTURE /POINT/
           INTEGER*4       x
           INTEGER*4       y
       END STRUCTURE

   The source is: ...\Absoft\FInclude\Windef.inc

   The include files for FORTRAN 77 and the module files for Fortran 90
   are translations of the Microsoft C header files (also included with
   Pro Fortran). The easiest way to look these up is to select "Find"
   from the "Start" menu and then choose the "Find Files or Folders..."
   command:

   1. Under the "Name and Location" tab, leave "Named" blank, but set
      "Look in:" to "...\Absoft\FInclude".

   2. Under the "Advanced" tab, fill in what you're looking for in the
      "Containing Text" edit box. For example: "STRUCTURE /POINT/"

index

Platform: Windows

Problem Details:

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

Q. How do I pass a Visual Basic string to a DLL?

A. Visual Basic strings are maintained in a data structured
   referred to as a BSTR which is not compatible with other
   languages in a DLL. However, you can pass a null terminated,
   C programming language string in Visual Basic. The
   declaration and usage would take the following form:

Private Declare Sub getString Lib "Test" Alias "_getString@4" _
       (ByVal text As String)

Private Sub Command1_Click()
Dim text As String
text = "hello, world"
Call getString(text)
End Sub

The key is to pass the string by value (ByVal).

At the FORTRAN end:

        stdcall subroutine getString(p_theString)

        implicit none

! FORTRAN expects the string lengths to be passed
! after the formal argument list as values. Since
! Visual Basic does not do this and because this is
! a STDCALL procedure, we need to accept the argument
! as a general pointer to a string passed by value.

        integer p_theString; value p_theString

! local variables

        character*1024 string           ! longer than expected
        pointer (p_string, string)

        character*1024 temp, title
        integer length, p_temp, p_title, i

! definitions for using the Win32 API MessageBox function

        include "windef.inc"
        include "winuser.inc"

! the Visual Basic string is passed as a null terminated
! C string. The first thing we have to do is find the
! null to determine the length of the string.

        p_string = p_theString

        length = index(string, char(0))
        if ((length .lt. 2) .or. (length .gt. 1024)) return

! copy the string to a local (and safe) variable.
! initialize the message box title string

        temp  = string(1:length-1)
        title = "FORTRAN DLL"

! null terminate the strings for the call to "Message Box"

        temp  = trim(temp)//char(0)
        title = trim(title)//char(0)

! create pointers to the strings so they can be
! passed by value to the Win32 API function "MessageBox"

        p_temp  = loc(temp)
        p_title = loc(title)

        i = MessageBox(val(0),val(p_temp),val(p_title),val(MB_OK))

        end

Use the following commands to build the DLL (assuming the
FORTRAN source file is "test.f"):

f77 -c test.f
lnk -lib test.obj -exports:test.xps
lnk -dll test.obj -exports:test.xps absRT0.lib kernel32.lib user32.lib \
         fiodll.lib fmathdll.lib -aliases:unicode.als

index

Platform: Windows

Problem Details:

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

Q. Apparently the compiler considers the variable NORMX as integer even
   though I explicitly typed it as:

   real normx

   Please fix the compilers and send me the patch.

A. There is no need to provide a patch for the compiler.

   The FORTRAN 77 compiler is case sensitive. You can use either
   of the two following options to disable case sensitivity:

   -f      fold to lower case
   -N109   fold to upper case

   Caution: The use of either option will make it impossible
            to communicate directly with the Windows API.

index

Platform: Windows

Problem Details:

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

Q. I receive linker errors when compiling C programs which reference
   certain POSIX functions such as open(), close(), read(), write(), etc.
   Am I missing a library?

A. Unlike most other operating systems, a POSIX library is not supplied
   with Windows. Is is only included with the Microsoft C/C++ compilers.

   Absoft supplies an ANSI C library, but POSIX functions are not defined
   as part of that library. We recommend for portability reasons that you
   use the ANSI C streams functions such as fopen(), fclose(), fread(),
   fwrite(), etc.

index

Platform: Windows

Problem Details:

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

Q. Could I put in a plea for an MRWE sample program (or is there one
   already - I couldn't find it)?

A. In the "ABSOFT\EXAMPLES\MRWE" folder, you'll find two
   makefiles:

   1. makefile. This one constructs the mrwe.lib library. Simply
      enter "amake" from the MS-DOS Prompt command line in this
      directory to (re)build the library. Don't forget to copy
      the output to "ABSOFT\LIB"

   2. makefile.dev. This one constructs the debugging version of
      mrwe and includes a demo of some of mrwe's features in its
      main program: "main.f". Enter "amake -f makefile.dev" to
      build this version. This version is an application: main.exe
      and can be executed out of this directory. This is to simplify
      the development process. After changes are made, the
      release version should then be built as outlined in 1., above.

index

Platform: Windows

Problem Details:

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

Q. Is it possible to execute DOS commands like DIR or CLS
   with the Unix library SYSTEM function?

A. You need to use "command.com" to execute the MS-DOS Prompt
   built-in commands. For example:

         call SYSTEM("command.com /c dir")

   For Windows NT,2000 and XP use:

         call SYSTEM("cmd/c dir")

index

Platform: Windows

Problem Details:

OS Version: any
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: Windows

Problem Details:

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

Q. I am very much interested in using OpenGL for applications. Do
   you have any simple examples of using them ProFortran?

A. OpenGL was produced by Silicon Graphics. The libraries are included
   by Microsoft on Windows NT systems. We supply them on the CDROM so
   that Windows 95 users will have them available. You can get more
   information from:

   http://www.sgi.com/software/opengl/faq.html

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: Windows

Problem Details:

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

Q. Whenever I try to debug my program, Fx displays a dialog box
   that reads "Unable to load object file" followed by the name
   of my program. How do I get Fx to debug my program?

A. This error is most likely displayed because the program you are
   trying to debug does not contain any symbolic debugging information.
   Make sure that you are compiling your source code with the -g option
   and linking it with the -debug:full and -debugtype:both options. If
   you are using one of the compiler drivers (f77.exe/f90.exe/ACC.exe) to
	do both compilation and linking, you only need to specify the -g option, as in:

        f77 -g program.f

   But if you are using a separate link step, you will need to supply the
   additional options to the linker, as in:

        lnk -o program.exe -debug:full -debugtype:both program.obj

index

Platform: All

Problem Details:
OS Version: any
Product Version: any
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:

   C:\Absoft70>type main.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;
   }

   C:\Absoft70>acc -c -A main.c
   Absoft C/C++ Compiler 1.3, Copyright (c) 1994-1997, Absoft Corp.

   C:\Absoft70>type fcode.f
   subroutine Fcode(string, i, d)

   character*(*) string
   integer i
   value i
   double precision d

   print *, string, i, d, len(string)

   end

   C:\Absoft70>f77 -o main.exe main.obj fcode.f
   FORTRAN 77 Compiler 5.0, Copyright (c) 1987 - 1998, Absoft Corp.

   C:\Absoft70>main
   hello, world 1 2.00000000000000 12

   C:\Absoft70>

index

Platform: Windows

Problem Details:

OS Version: any
Product Version: Pro Fortran 6.0 and later
Date: 01-Sep-02

Q. Is there a way to read an ASCII tab character, CHAR(9),
   from a file?

A. Tabs read from formatted files are expanded modulo TABSIZE
   where TABSIZE is an environment variable. If TABSIZE is not
   set, tabs are expanded modulo 8. If TABSIZE is set to 0, the
   tab is passed unmolested to the application.

index

Platform: Windows

Problem Details:

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

Q: Is there an interface between Absoft Fortran and Microsoft's ODBC?

A: Canaima Software, a third party, provides f90SQL, which offers
   a convenient and familiar way to directly read and write data
   from Fortran programs to many applications formats. Product
   details and a light version compatible with Absoft Pro Fortran
   v7.0 for Windows is available for free download from
   Canaima at:

   http://www.canaimasoft.com

index

Platform: Windows

Problem Details:

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

Q: When I print a large(>33000)lines of data to
standard output using MRWE it crashes.

A: The maximum number of lines and characters is
defined in "c:\absoft\examples\mrwe\mrwe.inc".

integer MAX_LINES; parameter (MAX_LINES = 32768)

integer MAX_CHARS; parameter (MAX_CHARS = 262144)
   To increase these maximums, follow this procedure:
               
   1.Edit the file "c:\absoft\examples\mrwe\mrwe.inc"
   MAX_LINES and MAX_CHARS are defined on lines 84-85.
   Increase them as required. In version 7.0 or later change
   the parameter b_index in line 32 in child.inc to increase the maxume
   number of lines. Child.inc is in the \examples\mrwe directory.
   Save your changes.
               
   2.From the "Absoft Pro Fortran" menu, open the
   "Development Command Shell". Change your directory
   to the MRWE source directory:
               
   cd c:\absoft\examples\mrwe
               
   3.Delete all of the object files in this directory:
               
   del*.obj
               
   4.Enter the command to rebuild the library:
               
   amake
               
   5.Move the newly built library "mrwe.lib" to:
               
   c:\absoft\lib 

index

Platform: Windows

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

Q. How do I use the Microsoft Win32 API?

A. Using the Microsoft Win32 API is beyond the scope
   of Absoft technical support.

   For more information on win32 API see
   the Win32 SDK help in the Absoft menu on
   Absoft Pro Fortran 7.0.

index

Platform: Windows

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

Q. I am trying to write a large array as one record and when using
   the -N3 compiler option I get this run time error:

      ? FORTRAN Runtime Error:
      ? Buffer allocation failed
      ? WRITE(UNIT=3,...


A. The -N3 option instructs the compiler to read/write unformatted
   sequential access files with record length information embedded
   in the record. This places a 32-bit integer at the beginning and
   the end of each record which allows the runtime library to skip and
   backspace these records. Without the length information that would
   be impossible.

   However, your write statements try to write this entire array as one
   record.  With the -N3 option we have to allocate enough memory in one
   contiguous chunk to create this record so that the length information
   can be inserted at the beginning and the end.  The allocation of this
   buffer is what failed.

   When the -N3 option is not specified, I/O transfers are performed using
   much smaller (4096 byte) buffers since the data is pure binary with no
   record length information.

   If you receive this error on the Macintosh, then increase the memory
   application size.

index

Platform: All

Problem Details:
OS Version: Any
Product Version: Any
Date: 01-Sep-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 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: Windows

Problem Details:

OS Version: any
Product Version: Pro Fortran v8.0
Date: 01-Sep-02

Q. I am trying to use the Microsoft Visual Studio and the
   Microsoft debugger does not recognize arrays and certain
   other variables.  I compiled all of my Fortran source files
   with the -g compiler option to include symbolic debugging information?

A.Use the -N102 compiler option which causes the compilers to generate
  debug information that can be interpreted by Visual C++ 5.0/6.0.

  How do I use this new option?

  When compiling your Fortran 77 and Fortran 90 source code, simply add
  the -N102 option along with the -g option. For example:

	f77 -c -g -N102 myfile.f
	f90 -c -g -N102 myfile.f90

  Why is this option necessary?

  The Microsoft Visual tool kits have no knowledge of Fortran. This means
  that they cannot interpret the debug information that Absoft compilers
  generate for certain Fortran language constructs, such as arrays. Note
  that there is nothing incorrect about the debug information the Absoft
  compilers are generating for these constructs. It is fully conformant
  with the Microsoft Codeview debugging format.

  What changes when the -N102 option is used?

  When the compilers see the -N102 option, they generate debug information
  that attempts to describe Fortran language constructs as if they were
  C language constructs. For example, arrays are represented as having a
  constant lower bound of 0.

  What still doesn't work with the -N102 option?

  Any Fortran construct that cannot be mapped to C. For example, adjustable
  size arrays, character*(*) strings, and Fortran 90 host associated
  local variables.
  

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:

   win70tfaq.html#anchor0058

index

Platform: All

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

Q. My application compiles and runs fine with small arrays, but
   when I increase the array sizes, I get an application error
   when I run it. Is there a limit on program or array size?

A. Local variables are allocated on the stack. The default stack
   allocation in 1 MB. When the total stack requirements exceed
   that, a memory fault will occur. It is not easy to predict
   a program's stack requirements, since it depends on the
   execution path at any point in time. There are several
   solutions:

   1. You can increase the stack size with the -stack option
      described on page 81 of the Absoft Pro Fortran for Windows
      User Guide. This option is entered in the Developer Tools
      Interface by clicking on the "Lnk Options..." button.

   2. If it is a Fortran program, you can use the "-s" compiler
      option (static storage) to move the data from the stack
      to the heap.

   3. If it is a Fortran program, you can place the arrays in
      a COMMON block which allocates them in the heap.

index

Platform: All

Problem Details:
OS Version: Windows
Product Version: Pro Fortran 8.0
Date: 01-Sep-02

Q. Is it possible to use Absoft Pro Fortran with Matlab V6.1?

A. It is possible to use Absoft Pro Fortran with Matlab V6.1 by
   using a batch file that configures the Matlab environment
   and creates a DLL that links in the Absoft compilers.
   Everything that you need is here:

   ftp://ftp.absoft.com/pub/windows/profortran7.5/MatlabV6.1R12.1.zip

index

 

Platform: All

Problem Details:
OS Version: Windows
Product Version: Pro Fortran 8.0
Date: 15-May-03

Q. Is it possible to use Absoft Pro Fortran with Matlab V6.5?

A. It is possible to use Absoft Pro Fortran with Matlab V6.5 by
   using a batch file that configures the Matlab environment
   and creates a DLL that links in the Absoft compilers.
   Everything that you need is here:

   http://www.absoft.com/download/pub/windows/profortran8.0/MatlabV6.5_PF8.0.zip

   All the instructions are located in the Readme file.

index

Platform: All

Problem Details:
OS Version: Windows
Product Version: Pro Fortran 8.0
Date: 01-Sep-02

Q. When I execute a Console application from the Atools
interface I receive this message:
Out of environment space
Out of environment space A. You are receiving the Out of environment space message
because by default the MS-DOS Console window's Initial
Environment is set to Auto. To increase the initial environment
click on the MSDS icon in the upper left corner of the
console window. Select Properties, Memory set the initial
environment to 4096 and click OK.

index

Platform: All

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

Q. I am having problems linking the NETCDF libraries.

A. All of the DVF compiled routines will have upper case names.
For Absoft f77, you will need to use the -N109 (Fold to Upper Case) option.
   You will need to declare all of the NEDCDF routines with the
   STDCALL declaration. When using Absoft f90, use
   STDCALL NCAPT
   When using Absoft f77, use
   STDCALL EXTERNAL NCAPT
   NOTE: To allow calls to the Windows API, the STDCALL declaration is case
         sensitive in Absoft f90. When declaring NETCDF routines, you must use
         upper case.
   DVF handles CHARACTER arguments in a unique way. The lengths of
   CHARACTER arguments must be passed to the called subroutine or
   function so that CHARACTER*(*) declarations (assumed length) work.
   Absoft follows the UNIX convention of passing CHARACTER lengths
   after the end of the formal argument list. DVF passes the length
   immediately following the argument. In order to link Absoft compiled
   code with NETCDF libraries compiled with DVF, you must both
   defeat the Absoft convention as well as simulate the DVF convention.
   Consider this subroutine call:
     call test(a, "hello", i, n)
   To call a DVF compiled version of 'test', you would modify the
   call as follows:
     call test(a, VAL(LOC("hello")), VAL(5), i, n)
   VAL(LOC(...)) takes the address of the argument and passes it
   by value. In FORTRAN, this simply passes the argument by address,
   the default. But, for CHARACTER arguments, it defeats the Absoft
   convention of appending the length of the CHARACTER argument to
   argument list.
   The VAL(5) argument is the length of the preceeding CHARACTER
   argument passed in the location where DVF expects to find it.
               

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
   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: Windows

Problem Details:
OS Version: Any
Product Version: Pro Fortran 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 IMSLBLAS libraries:
   Imsl.lib and imslblas.lib
   as an argument to the linker like this from the command line:
   f77 imsl.f imsl.lib imslblas.lib -f -N15
   f90 imsl.f imsl.lib imslblas.lib -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 IMSLBLAS libraries were compiled with these options.


   From the compiler interface under options, Plug-ins, put a check
   in the IMSL Library box.


   The complete IMSL documentation including Fortran examples is available 
   by going to Start, Programs, IMSL Documentation.

index

Platform: Windows

Problem Details:
OS Version:Windows
Product Version: Pro Fortran 8.0
Date: 15-Oct-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 C;\Absoft\lib:

   vms.lib     VMS compatibility library
   unix.lib    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

   Also, some of the functions use system API calls.
   For these you must also include the alias file
   "Unicode.als". This can be done by typing

   f77 test.f -aliases:unicode.als unix.lib

   at the command prompt or if you choose to use the
   compiler interface, go into "Set Options". Once the
   dialog box comes up, click on the "Link" tab and type
   "Unicode.als" where it says "Aliases File:" and click OK.


    The VMS and Unix library routines are documented in the
Support Library guide which is available on the Absoft Pro
Fortran, Documentation menu. The complete source code
for the Unix compatibility routines is in:
\Absoft\EXAMPLES\F77\UNIX
and the VMS routines are in:
\Absoft\EXAMPLES\F77\VMS

index

Platform: Windows

Problem Details:
OS Version: Windows
Product Version: Pro Fortran 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 directory "C:\Absoft80\EXAMPLES\PLPlot\examples".
     If the files are not in the same directory as the executable, these
     environment variable "PLPLOT_LIB" is used at runtime to search for the
     files. If you set it to a directory containing these files then any 
     applications you run from that command shell session will find them.
     Type:
                 
     "set PLPLOT_LIB=C:\Absoft80\examples\PLPLOT\examples"
     
     Then launch your program from the command shell in any directory and it will run.
     If you wish to set this variable system wide (so you can double click on
     applications using PLPlot), right click on "My Computer" and select
     properties. Locate the "Environment Variables" section of the
     properties window (on the "Advanced" tab on Windows 2000) and add a new
     variable for either your user name or system wide. The variable name
     must be "PLPLOT_LIB" and the value must be a directory containing the font files. 
     Windows 98 users add the environment variable to the c:\autoexec.bat file by adding:
     set PLPLOT_LIB=C:\Absoft80\examples\PLPLOT\examples
     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_font_init.obj to your Compiler Interface project and do a rebuild 
     all, or include it on the compiler invocation line if you are compiling from the Command Shell.
     Note, for these solutions to work, the font files must exist in the directory 
                 
     "C:\Absoft80\examples\PLPLOT\examples" 
    
     on the system you are running the application on.

index