[Wrf-users] [Solved] Re: [WRF 3.5.1, smpar, Intel] undefined reference to `__kmpc_global_thread_num' building "external/io_int"

Бакиров, Медер bakirov at almetico.com
Wed Mar 12 04:00:04 MDT 2014


Thank you very much, Dmitry!

The problem was with an '-openmp' flag was not including in compiler
opts. I adjusted the 'external/io_int/makefile' to include this flag:

--------------------------
@@ -12,6 +12,8 @@ WRF_MOD = ../../frame/pack_utils.o \
 CPP1    = $(CPP) $(TRADFLAG)
 M4      = m4 -Uinclude -Uindex -Ulen

+OMP    = -openmp -fpp -auto
+
 .SUFFIXES: .F90 .F .f .f90 .c .h .o .code

 all : $(LIB) diffwrf test_io_idx
@@ -71,7 +73,7 @@ diffwrf.f: diffwrf.F90 io_int.o

 diffwrf: diffwrf.f $(WRF_MOD) $(ESMF_MOD_DEPENDENCE) $(LIB)
        if [ -f ../../frame/pack_utils.o -a -f ../../frame/clog.o ] ; then \
-         $(FC) $(FCFLAGS) $(LDFLAGS) -I../ioapi_share -o diffwrf $@.f \
+         $(FC) $(FCFLAGS) $(OMP) $(LDFLAGS) -I../ioapi_share -o diffwrf $@.f \
                $(WRF_MOD) $(ESMF_IO_LIB_EXT) $(LIB) ; \
        fi
--------------------------

and the problem has gone.

With the best regards,
Meder Bakirov

On Thu, Mar 6, 2014 at 9:22 PM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote:
>> Libraries, containing these symbols are in my LD_LIBRARY_PATH.
>
> This is not enough. In Linux every library you depend on must be
> linked explicitly.
>
> - D.
>
> 2014-03-06 12:23 GMT+01:00 Бакиров, Медер <bakirov at almetico.com>:
>> On Thu, Mar 6, 2014 at 12:21 AM, Dmitry N. Mikushin <maemarcus at gmail.com> wrote:
>>> You can "nm | grep" Intel's libraries
>>> for this symbol and link the right library
>>
>> Libraries, containing these symbols are in my LD_LIBRARY_PATH.
>>
>> Here's the interesting:
>> - I got these errors only on first 'compile' run
>> - On second 'compile' run, "external/io_int/" seems to compile
>> successfully: I have a 'diffwrf' binary.
>>
>> Does it mean, that 'external/io_int/' depends on some other component,
>> which should be build before?
>>
>> Thanks!
>>
>> With the best regards,
>> Meder Bakirov


More information about the Wrf-users mailing list