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

Fortran variable in OpenMP clause: This name does not have a type, and must have an explicit type

psing51
New Contributor I
959 Views

Hi,
While trying to compile a code with intel compilers,  i get following issue on stdout - 


sed -e "s/^\!.*'.*//" -e "s/^ *\!.*'.*//" module_ADVECTION.F > module_ADVECTION.G
/lib/cpp -P -nostdinc -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/inc -DEM_CORE=0 -DNMM_CORE=1 -DNMM_MAX_DIM=2600 -DDA_CORE=0 -DWRFPLUS=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_FUNC -DWRF_USE_CLM -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT  -DDM_PARALLEL -DNETCDF -DPNETCDF -DGRIB2 -DMOVE_NESTS -DUSE_ALLOCATABLES -Dwrfmodel -DGRIB1 -DINTIO -DKEEP_INT_AROUND -DLIMIT_ARGS -DBUILD_RRTMG_FAST=1 -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=1 -DPNETCDF_QUILT=1 -DHWRF=1 -I. -traditional-cpp -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT  -D_OPENMP module_ADVECTION.G  > module_ADVECTION.bb
/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/tools/standard.exe module_ADVECTION.bb | /lib/cpp -P -nostdinc -traditional-cpp -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT > module_ADVECTION.f90
rm -f module_ADVECTION.G module_ADVECTION.bb
time mpiifort -o module_ADVECTION.o -c -O3 -ip -fp-model precise -w -ftz -align all -fno-alias -FR -convert big_endian -fp-model fast=2 -no-heap-arrays -no-prec-div -no-prec-sqrt -fno-common -march=core-avx2  -qopenmp -fpp -auto -I../dyn_em -I../dyn_nmm  -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/external/esmf_time_f90  -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/main -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/external/io_netcdf -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/external/io_int -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/frame -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/share -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/phys -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/wrftladj -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/chem -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/src/HWRF_v4.0a_tut_codes/hwrfrun/sorc/WRF/inc -I/home/user1/HWRF_AMD_icc2019u5/v4.0A/DEPS/v1/include  -real-size `expr 8 \* 4` -i4  module_ADVECTION.f90
module_ADVECTION.f90(1064): error #6404: This name does not have a type, and must have an explicit type.   [BOT]
!$omp& private(afr,afrp,bot,d2pqe,d2pqq,d2pqw,del,dep,detap,dpdn,dpup   &
------------------------^
module_ADVECTION.f90(1064): error #7656: Subobjects are not allowed in this OpenMP* clause; a named variable must be specified.   [BOT]
!$omp& private(afr,afrp,bot,d2pqe,d2pqq,d2pqw,del,dep,detap,dpdn,dpup   &
------------------------^
module_ADVECTION.f90(1064): error #6404: This name does not have a type, and must have an explicit type.   [DPDN]
!$omp& private(afr,afrp,bot,d2pqe,d2pqq,d2pqw,del,dep,detap,dpdn,dpup   &
------------------------------------------------------------^
module_ADVECTION.f90(1064): error #7656: Subobjects are not allowed in this OpenMP* clause; a named variable must be specified.   [DPDN]
!$omp& private(afr,afrp,bot,d2pqe,d2pqq,d2pqw,del,dep,detap,dpdn,dpup   &
------------------------------------------------------------^
module_ADVECTION.f90(1064): error #6404: This name does not have a type, and must have an explicit type.   [DPUP]
!$omp& private(afr,afrp,bot,d2pqe,d2pqq,d2pqw,del,dep,detap,dpdn,dpup   &
-----------------------------------------------------------------^
module_ADVECTION.f90(1064): error #7656: Subobjects are not allowed in this OpenMP* clause; a named variable must be specified.   [DPUP]

 
This code allows both OpenMP + MPI  and Pure MPI modes. This seems to be a known issue with compilation  - https://forum.wrfforum.com/viewtopic.php?f=5&t=2979

Afaik, the variable should be case insensitive so BOT (declared as bool type in code) and bot variable should be same.
I am not sure if i need to use any additional compilation flags to compile this code. I am attaching the .F and .f90 files herewith .



0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
940 Views

The error occurs in SUBROUTINE VAD2 where BOT (aka bot, BoT, Bot, bOt, bot, B O T, ...) is not defined.

BOT is defined in SUBROUTINE HAD2 as a local variable

BOT is also defined in SUBROUTINE HAD2_SCAL as a local variable.

Jim Dempsey

 

 

0 Kudos
psing51
New Contributor I
914 Views

Thanks,
i'll try defining this variable in VAD2  subroutine.

0 Kudos
Reply