setting NPP, NSUB_X, NSUB_E for OPENMP

Hello,
I am running CROCO with gfortran OPENMP. I am face a problem with setting the tile parameters NSUB_X and NSUB_E. My system has 28 CPUs.

In param.h, I am setting the OPENMP parameters in this way:

#elif defined OPENMP
  parameter (NPP=28)
  parameter (NSUB_X=7)
  parameter (NSUB_E=4)

While compiling, this is the error I get:

cpp -traditional -DLinux -P -I/usr/include -ICROCOFILES/AGRIF_INC par_pisces.F90 > par_pisces_.f90 gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 -mcmodel=medium -fopenmp par_pisces_.f90 -o par_pisces.o cpp -traditional -DLinux -P -I/usr/include -ICROCOFILES/AGRIF_INC param.F | ./mpc > param_.f gfortran -c -O3 -fdefault-real-8 -fdefault-double-8 -mcmodel=medium -fopenmp param_.f -o param.o param_.f:12:25:

parameter (NSUB_X=1, NSUB_E=NPP) 1

Error: PARAMETER attribute of ‘nsub_x’ conflicts with PARAMETER attribute at (1)

Makedefs:13: recipe for target 'param.o' failed
make: *** [param.o] Error 1

I think the code is taking a default value of NSUB_X = 1, and therefore setting NSUB_E as 28. But I am providing 7 and 4, which is conflicting with the default values. I tried turning off the AUTOTILING flag, but its still showing the same error.

Where should I make the appropriate change so that it can set the tiling for OPENMP to 7 and 4?

Thanks.

Hi

What is weird is that the compiler is going through this line

parameter (NSUB_X=1, NSUB_E=NPP)

You can attach your param.h, but for me, for what you want to do it should look like

#ifdef MPI
   integer NP_XI, NP_ETA, NNODES
   parameter (NP_XI=1,  NP_ETA=4,  NNODES=NP_XI*NP_ETA)
   parameter (NPP=1)
   parameter (NSUB_X=1, NSUB_E=1)
#elif defined OPENMP
   parameter (NPP=28)
   # ifdef AUTOTILING
   common/distrib/NSUB_X, NSUB_E
   # else
   parameter (NSUB_X=7, NSUB_E=4)
  # endif
#else
   parameter (NPP=1)
   # ifdef AUTOTILING
   common/distrib/NSUB_X, NSUB_E
   # else
   parameter (NSUB_X=1, NSUB_E=NPP)
 # endif
#endif

Rachid