I have installed CFX 11 SP1 on my Windows PC. I have the Intel Fortran compiler 10.0.027 installed.

I have used the header files cfd_constants.h and stacK_point.h in my User Fortran file spring_input.f, giving:

=========================
SUBROUTINE SPRING (
& NLOC, NRET, NARG, RET, ARGS, CRESLT, CZ,DZ,IZ,LZ,RZ )
CC
CC
#include "cfd_constants.h"
#include "stacK_point.h"

CC --------------------
CC Input
CC --------------------
CC
CC NLOC - size of current locale
CC NRET - number of components in result
CC NARG - number of arguments in call
CC ARGS() - (NLOC,NARG) argument values

...
...
==========================

However when I try to compiler the User Fortran file using

cfx5mkext spring_user.f

I get the following:

=======================
C:Program FilesIntelCompilerFortran10.0.027Ia32Binifort -iface:cvf -MD -object:winntspring_input.o -c spring_input.f
Intel (R) Visual Fortran Compiler for applications running on IA-32, Version 10.0
Build 20070809 Package ID: W_FC_C_10.0.027
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.

fortcom: Warning: Bad # preprocessor line
spring_input.f(7): warning: Bad # preprocessor line
#include "cfd_constants.h"
-^
spring_input.f(8): Warning: Bad # preprocessor line
#include "stacK_point.h"
-^
spring_input.f(90) : Error: syntax error, found END-OF-STATEMENT when expecting one of: => = . < : %
___stack_point___ pVAR
------------------------------^
spring_input.f(90) : Error: The statement is positioned incorrectly and/or has syntax errors
___stack_point___ pVAR
------------------------------^
Compilation aborted for spring_input.f (code 1)
An error has occurred in cfx5mkext:

C:program filesintelcompilerfortran10.0.027ia32Binifort exited with return code 1
============================================

I was wondering if you could suggest anything?


When you are using header files you need to specify the name of the Fortran file witha .F extension not a .f extension (ie use capital F rather than small f). The .F extension tells the compiler that the Fortran file has some included files in it; the .f extension denotes straightforward Fortran.

So use

cfx5mkext spring_input.F

rather than

cfx5mkext spring_input.f





Show Form
No comments yet. Be the first to add a comment!