-
The Origin and IBM p690 compilers are very
different. Where the Origin uses flags for
different parallel programming (MPI, openMP etc.), the p690 uses
different compiler names. For example to compile
an MPI program:
-
Origin % f77 mpi.f
-lmpi
IBM p690 % mpxlf mpi.f
A full list of compiler names and uses can be found at :
p690 Compilers
-
To compile an openMP program you need to use the the complier
with the _r suffix and include the flag -qsmp=omp:
Origin % f77 -mp
openmp.f
p690 % xlf_r -qsmp=omp openmp.f
-
By default the IBM compilers do not associate the .f90 suffix
with FORTRAN.
Cu12:~/consult/codes/single106% xlf90 hello.f90
xlf90: 1501-218 file hello.f90 contains an incorrect file
suffix
ld: 0711-715 ERROR: File hello.f90 cannot be processed.
The file must be an object file, an import file, or an
archive.
You can get around this problem by using the -qsuffix=f=f90
compiler flag:
Cu12:~/consult/codes/single110%xlf90 -qsuffix=f=f90
hello.f90
** hello === End of Compilation 1 ===
1501-510 Compilation successful for file hello.f90.
Alternatively you can rename .f90 files to .f files:
Cu12:~/consult/codes/single107% cp hello.f90
hello_f90.f Cu12:~/consult/codes/single108% xlf90
hello_f90.f
** hello === End of Compilation 1 ===
1501-510 Compilation successful for file hello_f90.f.
-
On the Origin2000, -r8 uses REAL(KIND=8) and COMPLEX(KIND=8)
for real and complex variables, respectively.
On the IBM p690, there is no equivalent compiler option that does exactly the same
thing. -qrealsize=8 sets the size of the default REAL, DOUBLE PRECISION,
COMPLEX and DOUBLE COMPLEX values to 8 bytes. -qautodbl=dbl4 promotes
floating-point objects that are single precision to 8 bytes.
(Note: variables explicitly declared as REAL*4 are also promoted.)
-
The following Fortran compiler option may be useful:
-qinitauto : initializes all variables to zero at compile time
-
This link contains a useful discussion on porting programs to XL FORTRAN
Porting FORTRAN programs
-
Page 19 of this AIX C document contains a useful discussion on porting programs from GNU C/C++
Porting GNU c/C++ programs
-
The default on the IBM p690 is 32-bit (default on Origin is
64-bit)
To use 64-bit on IBM, compile with -q64 -qwarn64
( more infomation)
-
When using 32-bit mode the default data segment size (static,
common, allocatable variables) is 256 MBytes
Use this option to raise to 2 GB: -bmaxdata:0x80000000
-
Optimization options (-O, -O3, -O4, etc.) are different on the
p690. See the compiler man page(s) for details.
Description of Optimization levels for FORTRAN
-
On the Origin these are SCSL. On the p690 they are ESSL and
PESSL.
Both SCSL and ESSL provide BLAS, LAPACK and FFT routines. In
addition, PESSL also proides PBLAS, ScaLAPACK and BLACS.
ESSL (Engineering and Scientific Subroutine Library)
PESSL (Parallel ESSL)
-
The Origin uses fastm for simple math functions. The p690 uses
MASS.
MASS (Math Acceleration Subsystem)
-
Automatic parallelization on the Origin uses the -ipo compiler
flag.
On the p690 use -qsmp instead.
-
Routines such as dtime, etime, and flush, need to have a
trailing underscore (_).
-
There is a utility to check your makefiles named check_irix_makefiles. It will check for makefiles starting from the current directory, and show the FILENAME:LINE_NUMBER:TEXT for each Irix-specific option and display suggested AIX XL compiler options to use when porting.
Cu12:~/bin125% check_irix_makefiles
./makefile:4: LIBS = -lmpi
* discard -lmpi , use: "mpxlf_r, mpcc_r, ..."
./makefile:5: CC = cc -64 -mp -O3
* replace -64 with -q64 -qwarn64
./makefile:5: CC = cc -64 -mp -O3
* replace -mp with -qsmp=omp
./makefile:6: CLINKER = cc -64
* replace -64 with -q64 -qwarn64
./makefile:8: CPPFLAGS = -DnoCHECK
* [fortran only: replace -D with -WF,-D]
* .f90 suffix found on fortran files, use: -qsuffix=f=f90
Cu12:~/bin126%
-
XL FORTRAN does not interpret an end-of-file as an error. Therefore constructs
such as:
ERR=stmt_label
will be ignored on reaaching the end of a file read as it does not consider that an
error has occurred. Instead you can use the specific end of file specifier:
END=stmt_label