HPUX to IBM RS6000 Compiling *.F Files 
Author Message
 HPUX to IBM RS6000 Compiling *.F Files

 I am trying to port to an IBM RS6000 a fortran program that works
 on an HPUX. Some of the HP files end in .F, and the HP f77 processes
 these files by the C preprocessor, because they contain C macros.
 In the IBM AIX Fortran (xlf), there doesn't seem to be an identical
 processing option, or is there? How can I compile these files by xlf?
--
___________________________________________________________________________________

University of {*filter*}ia Department of Mechanical, Aerospace, and Nuclear Engineering  
___________________________________________________________________________________



Mon, 30 Nov 1998 03:00:00 GMT  
 HPUX to IBM RS6000 Compiling *.F Files

|>  I am trying to port to an IBM RS6000 a Fortran program that works
|>  on an HPUX. Some of the HP files end in .F, and the HP f77 processes
|>  these files by the C preprocessor, because they contain C macros.
|>  In the IBM AIX Fortran (xlf), there doesn't seem to be an identical
|>  processing option, or is there? How can I compile these files by xlf?

     XL Fortran has supported invoking cpp for .F files since Version 3.2.
If you're using an earlier version of xlf, you can simulate things by invoking
cpp directly.  For a file x.F enter:

          /lib/cpp -P -C x.F Fx.f
          xlf Fx.f

Hope this helps,

Henry
-------------------------------------------------------------------------------
Henry Zongaro      XL Fortran Compiler Development
IBM SWS Toronto Lab   Tie Line 778-6044  Phone (416) 448-6044



Tue, 01 Dec 1998 03:00:00 GMT  
 HPUX to IBM RS6000 Compiling *.F Files


Quote:
(Count Dracula) writes:
>  I am trying to port to an IBM RS6000 a Fortran program that works
>  on an HPUX. Some of the HP files end in .F, and the HP f77 processes
>  these files by the C preprocessor, because they contain C macros.
>  In the IBM AIX Fortran (xlf), there doesn't seem to be an identical
>  processing option, or is there? How can I compile these files by xlf?
> --

It should be the same.
Here is the head of "man xlf"
  AIX XL Fortran Compiler

  Usage:
     xlf  [ option | file ] ...
     f77  [ option | file ] ...
     xlf90  [ option | file ] ...

  Description:
     The xlf command compiles XL Fortran source files.  It also processes
     assembler source files and object files. Unless the -c option is
     specified, xlf calls the linkage editor to produce a single object
     file. Input files can be any of the following:
       1. file name with .f suffix: Fortran source file
       2. file name with .o suffix: object file for ld command
       3. file name with .s suffix: assembler source file.
       4. file name with .F suffix: Fortran source file with cpp preprocessor di
rectives
Jacek.



Tue, 01 Dec 1998 03:00:00 GMT  
 HPUX to IBM RS6000 Compiling *.F Files



Quote:

>(Count Dracula) writes:
>>  I am trying to port to an IBM RS6000 a Fortran program that works
>>  on an HPUX. Some of the HP files end in .F, and the HP f77 processes
>>  these files by the C preprocessor, because they contain C macros.
>>  In the IBM AIX Fortran (xlf), there doesn't seem to be an identical
>>  processing option, or is there? How can I compile these files by xlf?
>It should be the same.

With a sufficiently recent version of xlf, that is.
If your makefile must work with older releases of the compiler, try
something like the following:

.F.o:
        $(CPP) -P $(CPPFLAGS) $< > tmp/$*.f && \
        $(FC) $(FLAGS) -c tmp/$*.f

--
Note to junk mailers: e-mail to this address will not be read
(but its origin will be logged for possible blacklisting).



Tue, 01 Dec 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. compiling winterp on a ibm rs6000 aix v 3

2. Porting a Fortran program from HPUX to RS6000

3. Editor for APL2/6000 on an IBM RS6000/900

4. Eiffel on IBM RS6000

5. REXX for the IBM RS6000

6. Modula-2 compiler for IBM RS6000

7. Gnat for IBM RS6000 ???

8. Cobol Set for AIX on IBM RS6000

9. ADA X-BINDINGS FOR IBM RS6000 ADA COMPILER

10. LONG_INTEGER On IBM RS6000

11. Speed between HP and IBM RS6000 on real*16 Fortran

12. spill in xlf output on AIX rs6000 ibm

 

 
Powered by phpBB® Forum Software