Header files


sonu84
02-22-2009, 01:29 PM
Hi
This is a simple code I wrote. I wanted to check if the header file, REAL.H is read or not.
------------------- VORT_2D.F--------------------
program vort
#undef BL_LANG_CC
#ifndef BL_LANG_FORT
#define BL_LANG_FORT
#endif
#include "REAL.H"
implicit none
real v_ycen, v_xcen
real v_strength, v_width, v_cl_x
real xlo, xhi, ylo, yhi, delta1, delta2
v_strength = 25.
v_width = .001
v_cl_x = 0.0
v_xcen = 0.001
v_ycen = 0.007
write (*,*) v_strength
end program vort
---------------------------------------------------------
----------------REAL.H---------------------------
#ifndef BL_REAL_H
#define BL_REAL_H
/*
* $Id: REAL.H,v 1.14 2007/03/29 19:40:57 lijewski Exp $
*/
#ifdef BL_USE_FLOAT
# undef BL_USE_DOUBLE
# undef BL_USE_FLOAT
/*@ManDoc:
The macro BL\_USE\_FLOAT indicates that C++ floating-point
calculations should
use "float" variables and Fortran floating-point calculations should
use
"real*4" variables. One of BL\_USE\_FLOAT or BL\_USE\_DOUBLE must
always be
defined when compiling and using BoxLib.
*/
# define BL_USE_FLOAT 1
#else
# undef BL_USE_FLOAT
# undef BL_USE_DOUBLE
/*@ManDoc:
The macro BL\_USE\_DOUBLE indicates that C++ floating-point
calculations
should use "double" variables and Fortran floating-point
calculations
should use "real*8" variables. One of BL\_USE\_FLOAT or BL\_USE
\_DOUBLE must
always be defined when compiling and using BoxLib.
*/
# define BL_USE_DOUBLE 1
#endif
#if !defined(BL_LANG_FORT)
/*@ManDoc:
Real is a typedef specifying the precision of the floating-point
calculations in C++ code. It will be either `float' or `double'
depending upon which of the macros BL\_USE\_FLOAT or
BL\_USE\_DOUBLE, respectively, is defined during compilations. For
portability, you should write floating-point code in terms of this
typedef, instead of using `float' or `double' directly.
Note that exactly one of these macros must be defined
when compiling any module that uses floating-point.
*/
#ifdef BL_USE_FLOAT
typedef float Real;
#else
typedef double Real;
#endif
#else
/*@ManDoc:
The REAL\_T macro specifies the precision of the floating-point
calculations in Fortran code. It will be either `real*4' or
`real*8' depending upon which of the symbols BL\_USE\_FLOAT or
BL\_USE\_DOUBLE, respectively, is defined during compilations. For
portability, you should write floating-point code in terms of this
macro, instead of using `real*4' or `real*8' directly.
Note that exactly one of these macros must be defined
when compiling any module that uses floating-point.
*/
#ifdef BL_USE_FLOAT
#ifdef BL_USE_FORT_STAR_PRECISION
# define REAL_T real*4
#else
# define REAL_T REAL
#endif
#if __STDC__==1
# define BL_REAL(a) a##E0
# define BL_REAL_E(a,b) a##E##b
#else
# define BL_REAL(a) a/**/E0
# define BL_REAL_E(a,b) a/**/E/**/b
#endif
#else
#ifdef BL_USE_FORT_STAR_PRECISION
# define REAL_T real*8
#else
# define REAL_T DOUBLE PRECISION
#endif
#if __STDC__==1
# define BL_REAL(a) a##D0
# define BL_REAL_E(a,b) a##D##b
#else
# define BL_REAL(a) a/**/D0
# define BL_REAL_E(a,b) a/**/D/**/b
#endif
#endif
#endif /* !BL_LANG_FORT */
#endif /*BL_REAL_H*/
------------------------------------------------------
I submit the code as .... pgf90 -fastsse -o exec VORT_2D.F
and the errors I get is ...

PGF90-W-0025-Illegal character (#) - ignored (VORT_2D.F: 3)
PGF90-S-0034-Syntax error at or near end of line (VORT_2D.F: 3)
PGF90-W-0025-Illegal character (#) - ignored (VORT_2D.F: 4)
PGF90-S-0034-Syntax error at or near identifier ndefbl_lang_fort
(VORT_2D.F: 4)
PGF90-S-0034-Syntax error at or near integer constant 3567 (VORT_2D.F:
5)
PGF90-S-0034-Syntax error at or near integer constant 14 (VORT_2D.F:
6)
PGF90-W-0025-Illegal character (#) - ignored (VORT_2D.F: 8)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
1)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
2)
PGF90-S-0018-Illegal label field (./REAL.H: 4)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
5)
PGF90-S-0018-Illegal label field (./REAL.H: 6)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
8)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
9)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
10)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
11)
PGF90-S-0018-Illegal label field (./REAL.H: 12)
PGF90-W-0025-Illegal character (\) - ignored (./REAL.H: 12)
PGF90-S-0034-Syntax error at or near identifier _use (./REAL.H: 12)
PGF90-S-0018-Illegal label field (./REAL.H: 13)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
14)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
15)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
17)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
18)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
19)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
20)
PGF90-S-0021-Label field of continuation line is not blank (./REAL.H:
21)
PGF90-S-0034-Syntax error at or near <quoted string> (./REAL.H: 13)
PGF90-S-0018-Illegal label field (./REAL.H: 22)
PGF90-F-0008-Error limit exceeded (./REAL.H: 22)
-------------------------------------------------------------------
Please let me know, is there some fix for it.