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

#define usage

greenberg
Beginner
515 Views
I have the following code in an include block:
#if defined (VECSIZE)
#define tnvec VECSIZE
#else
#define tnvec 64
#endif

integer nvec
parameter (nvec=tnvec)

I get erro 6404: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.

tnvec should be a compile-time constant since VECSIZE is defined. Can anyone tell me how to fix this? I want VECSIZE to depend on the machine as defined by the user at compile time.

Thanks!
0 Kudos
1 Reply
Steven_L_Intel1
Employee
515 Views
Did you name the source file .F or .F90 (with a capital F) or add -fpp to the compile line? If not, the # lines will be ignored.
0 Kudos
Reply