Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29231 Discussions

Help with cDEC$ directive on IA64/Linux F9x

mkatlihan
Beginner
674 Views
Folks,
I am trying to use cDEC$ in a conditional directive on Linux/IA64 to declare two integers E and D.
cDEC$ IF DEFINED (LINUX)
INTEGER*8 E, D
cDEC$ ELSE
INTEGER*4 E, D
cDEC$ ENDIF
however, the compiler (efc 7.1)totally ignores my -DLINUX definition and gives the following error.
% efc -w -c-o DATA.o DATA.for -DLINUX
module DATA
INTEGER*4 E, D
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
^
Error 115 at (675:../for/DATA.for) : A component with this name already exists
Not sure what I am missing. The directive works correctly on Windows.
Thanks
MKA
0 Kudos
3 Replies
Steven_L_Intel1
Employee
674 Views
If I recall, with Intel Fortran 7.1, you have to have the source run through the preprocessor to support the conditional compilation directives. Either rename the source to have a .fpp file type or add the -fpp switch.
0 Kudos
mkatlihan
Beginner
674 Views

Thanks,

-fpp=1 is the default according to user manual, so I did not try that until your message. Apperantly,manuals (even at 7 th release) couldhave such simple mistakes.Setting -fpp=1 explicitly solved the issue.

Best

0 Kudos
Steven_L_Intel1
Employee
674 Views
I understand the confusion. The manual is trying to say that IF fpp is used, the default level is fpp=1. But fpp is not invoked by default for .for or .f90 file types.
0 Kudos
Reply