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

undefined reference error

ulasim77
Beginner
718 Views
Hello
I am trying to install the MEGAN model (a model to estimate natural emissions) to a cluster system with intel compilers 9.1.052, ioapi 3.0 and netcdf 3.6.2. I have been using these libraries successfully with other model i am running such as wrf and cmaq (cmaq uses both netcdf and ioapi) but with megan model, i keep getting the error messages attached
can you help me to fix this please?
Thanks
Ulas
0 Kudos
4 Replies
ulasim77
Beginner
718 Views
Hello
i was able to fix the undefined reference errors by adding -openmp -lpthread flags. however i still have problems with the fortcom errors:
any ideas?
thanks
fortcom: Error: ckgdioapi2d.f, line 103: An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute. [VGLVS1]
ALLOCATE ( VGLVS1 ( NLAYS1 + 1 ), STAT = STATUS )
--------------------^
fortcom: Error: ckgdioapi2d.f, line 131: An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute. [VGLVS2]
ALLOCATE ( VGLVS2 ( NLAYS2 + 1 ), STAT = STATUS )
--------------------^
fortcom: Error: ckgdioapi2d.f, line 54: If a deferred-shape array is intended, then the ALLOCATABLE or POINTER attribute is missing; if an assumed-shape array is intended, the array must be a dummy argument. [VGLVS1]
REAL :: VGLVS1( : ) ! vertical coordinate values
-----------------^
fortcom: Error: ckgdioapi2d.f, line 73: If a deferred-shape array is intended, then the ALLOCATABLE or POINTER attribute is missing; if an assumed-shape array is intended, the array must be a dummy argument. [VGLVS2]
REAL :: VGLVS2( : ) ! vertical coordinate values
-----------------^
compilation aborted for ckgdioapi2d.f (code 1)
make: *** [ckgdioapi2d.o] Error 1
fortcom: Error: ckgdioapi2d.f, line 103: An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute. [VGLVS1] ALLOCATE ( VGLVS1 ( NLAYS1 + 1 ), STAT = STATUS )--------------------^fortcom: Error: ckgdioapi2d.f, line 131: An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute. [VGLVS2] ALLOCATE ( VGLVS2 ( NLAYS2 + 1 ), STAT = STATUS )--------------------^fortcom: Error: ckgdioapi2d.f, line 54: If a deferred-shape array is intended, then the ALLOCATABLE or POINTER attribute is missing; if an assumed-shape array is intended, the array must be a dummy argument. [VGLVS1] REAL :: VGLVS1( : ) ! vertical coordinate values-----------------^fortcom: Error: ckgdioapi2d.f, line 73: If a deferred-shape array is intended, then the ALLOCATABLE or POINTER attribute is missing; if an assumed-shape array is intended, the array must be a dummy argument. [VGLVS2] REAL :: VGLVS2( : ) ! vertical coordinate values-----------------^compilation aborted for ckgdioapi2d.f (code 1)make: *** [ckgdioapi2d.o] Error 1
0 Kudos
Stephen_D_Intel
Employee
718 Views
Hi Ulas,

How are declaring VGLVS1 and VGLVS2?

Regards,
Steve Daily
Intel Developer Support

0 Kudos
Stephen_D_Intel
Employee
718 Views
Hi Ulas,

A colleague was kind enough to point out that the declaration is listed in the error
messages. Here is his suggestion on how to correct the problem:

Hes got the declarations shown. What hes missing is the allocatable declaration:

REAL, ALLOCATABLE :: VGLVS1(:)

Regards,
Steve D.
Intel Developer Support

0 Kudos
Steven_L_Intel1
Employee
718 Views
... unless VGLVS1 is supposed to be a dummy argument. If it's a local variable, then adding ALLOCATABLE would be reasonable.
0 Kudos
Reply