#ifndef

I have some programs (MM5 Preprocessors) that contain #ifndef statements.

PGI Workstation 6.0 compiles them just fine under Linux (FC4), but will not accept them using Workstation for Windows. Is there a compiler option, etc. that I can change to correct this?

Is actually #ifdef as in:

#ifdef XCRAY
REAL, PARAMETER :: SMALLRES = 1.0E-9
#else
REAL, PARAMETER :: SMALLRES = 1.0E-6
#endif

The error is of the form:

PGF90-S-0021-Label field of continuation line is not blank

Again, PGI handles these fine under linux, but not under Windows.

Thanks

Hi Cody,

Something else is going on since “#ifdef” does work. Which MM5 Preprocessor are you using?

  • Mat
PGI$ cat test.c
#ifdef XCRAY
REAL, PARAMETER :: SMALLRES = 1.0E-9
#else
REAL, PARAMETER :: SMALLRES = 1.0E-6
#endif
PGI$ pgcc -V -P test.c

pgcc 6.0-8 32-bit target on x86 Windows
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc.  All Rights Reserved.
PGC/x86 nt86 6.0-8
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc.  All Rights Reserved.
PGI$ cat test.i
REAL , PARAMETER : : SMALLRES = 1.0E-6
PGI$ pgcc -V -P test.c -DXCRAY

pgcc 6.0-8 32-bit target on x86 Windows
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc.  All Rights Reserved.
PGC/x86 nt86 6.0-8
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc.  All Rights Reserved.
PGI$ cat test.i
REAL , PARAMETER : : SMALLRES = 1.0E-9
PGI$

It was the same for INTERPF REGRID (regridder) and LITTLE_R these are the ones I’ve tried. They worked fine in FC4 under VMWare using the linux version of PGI Workstation, and then trying a compile in windows using PGIWorkstation for windows I had problems till I deleted the #ifdef lines.