Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Compiling CDFTF example

svyatoslav_korneev
초급자
3,110 조회수
Hellow, Intel experts.

Thank you for the nice MKL library. I have one question.

I try to compile CDFTF example on ia32 PC, everything work fine. Then I compile this example on 64 cluster, work OK too. But when I remove
"SUBROUTINE Dfti_Example_Status_Print" from example files, I have such errors on 64 cluster:

/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_blacs_intelmpi_ilp64.a(blacs_extended.o): In function `MKL_Waitall':
_blacs_extended.c:(.text+0x1da): undefined reference to `mkl_serv_mkl_print'
/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_blacs_intelmpi_ilp64.a(blacs_extended.o): In function `MKL_Waitany':
_blacs_extended.c:(.text+0x2a9): undefined reference to `mkl_serv_mkl_print'

When I compile example without "SUBROUTINE Dfti_Example_Status_Print" on my ia32 PC, everything is OK.

What is the problem. Why I can't compile example without this subroutine on 64 cluster?

Thank you,
Svyatoslav
0 포인트
1 솔루션
Vladimir_Petrov__Int
새로운 기여자 III
3,110 조회수

Hello Svyatoslav,

In order to make your modified example work please try placing the core library after the BLACS library on the link line (near the end of the makefile) like this:

... $(MKL_LIBS) $(MKL_PATH)/libmkl_blacs$(Bs)$(BLACS_PART).$(EXT) $(CORE_LIB) -lpthread ...

Best regards,
Vladimir

원본 게시물의 솔루션 보기

0 포인트
9 응답
Shane_S_Intel
직원
3,110 조회수
Problem compiling under ia64

Can you elaborate more on theproblems you're having? -Shane
0 포인트
svyatoslav_korneev
초급자
3,111 조회수

Can you elaborate more on theproblems you're having? -Shane


I try to compile CDFTF example under 64 cluster. (/opt/intel/Compiler/11.0/083/mkl/examples/cdftf)

When I remove "SUBROUTINE Dfti_Example_Status_Print" from examples files, I have such errors:

/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_blacs_intelmpi_ilp64.a(blacs_extended.o): In function `MKL_Waitall':
_blacs_extended.c:(.text+0x1da): undefined reference to `mkl_serv_mkl_print'
/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_blacs_intelmpi_ilp64.a(blacs_extended.o): In function `MKL_Waitany':
_blacs_extended.c:(.text+0x2a9): undefined reference to `mkl_serv_mkl_print'

This errors occur under 64 system, but not under 32.

Can you explain me, this errors and why this subroutine play such role in compiling under 64

P.S.

I suppose that this subroutine contains USE MKL_DFTI

Svyatoslav
0 포인트
Vladimir_Petrov__Int
새로운 기여자 III
3,111 조회수

Hello Svyatoslav,

In order to make your modified example work please try placing the core library after the BLACS library on the link line (near the end of the makefile) like this:

... $(MKL_LIBS) $(MKL_PATH)/libmkl_blacs$(Bs)$(BLACS_PART).$(EXT) $(CORE_LIB) -lpthread ...

Best regards,
Vladimir
0 포인트
svyatoslav_korneev
초급자
3,110 조회수

Hello Svyatoslav,

In order to make your modified example work please try placing the core library after the BLACS library on the link line (near the end of the makefile) like this:

... $(MKL_LIBS) $(MKL_PATH)/libmkl_blacs$(Bs)$(BLACS_PART).$(EXT) $(CORE_LIB) -lpthread ...

Best regards,
Vladimir

Thank you for the answer.

But core library is included in:

MKL_LIBS= -Wl,--start-group $(MKL_PATH)/libmkl_cdft_core.a $(IFACE_LIB) $(THREADING_LIB) $(CORE_LIB) -Wl,--end-group $(OMP_LIB)

So I try to place MKL_LIBS after BLACS like this:

$(_CS) $(SPEC_OPT) $(RES_DIR)/$*.o $(RES_DIR)/cdft_example_support.o $(RES_DIR)/mkl_cdft.o -L $(MKL_PATH) $(MKL_PATH)/libmkl_blacs$(Bs)$(BLACS_PART).$(EXT) $(MKL_LIBS) -lpthread -lm -o $(RES_DIR)/$*.exe

And after start make file:

make libem64t interface=ilp64 mpi=mpich

I have a lot of errors:

/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_cdft_core.a(CreateDesc.o): In function `DftiCreateDescriptorDM':
head_CreateDesc.c:(.text+0xdb): undefined reference to `MKL_Comm_size'
head_CreateDesc.c:(.text+0xed): undefined reference to `MKL_SUCCESS'
head_CreateDesc.c:(.text+0x15e): undefined reference to `MKL_Comm_rank'
head_CreateDesc.c:(.text+0x170): undefined reference to `MKL_SUCCESS'
/opt/intel/mkl/10.1.0.015/lib/em64t/libmkl_cdft_core.a(computend.o): In function `mkl_cdft_CDFT_Compute_nd':
head_computend.c:(.text+0x248): undefined reference to `MKL_DOUBLE'
head_computend.c:(.text+0x26a): undefined reference to `MKL_Alltoallv'
head_computend.c:(.text+0x274): undefined reference to `MKL_SUCCESS'
head_computend.c:(.text+0x346): undefined reference to `MKL_DOUBLE'
head_computend.c:(.text+0x368): undefined reference to `MKL_Alltoallv'
head_computend.c:(.text+0x372): undefined reference to `MKL_SUCCESS'

........................................................................

Regards,
Svyatoslav


0 포인트
Vladimir_Petrov__Int
새로운 기여자 III
3,110 조회수

Svyatoslav,

There are circular references between the libraries. To resolve all of them successfully the libraries have to be either repeated or placed inside the --start-group ... --end-group.

Have you tried my previous suggestion?

Best regards,
Vladimir
0 포인트
svyatoslav_korneev
초급자
3,110 조회수

Svyatoslav,

There are circular references between the libraries. To resolve all of them successfully the libraries have to be either repeated or placed inside the --start-group ... --end-group.

Have you tried my previous suggestion?

Best regards,
Vladimir

Thanks, It work.
Can you explain me plz, what was the reason of the error.

Why in the initial make file core library was'n inside --start-group ... --end-group

What about $(MKL_PATH)/libmkl_cdft_core.a $(IFACE_LIB) $(THREADING_LIB), shoud I place it inside group block?

Regards,
Svyatoslav
0 포인트
Vladimir_Petrov__Int
새로운 기여자 III
3,110 조회수

Thanks, It work.
Can you explain me plz, what was the reason of the error.

Why in the initial make file core library was'n inside --start-group ... --end-group

What about $(MKL_PATH)/libmkl_cdft_core.a $(IFACE_LIB) $(THREADING_LIB), shoud I place it inside group block?

Regards,
Svyatoslav

Svyatoslav,

The core library (libmkl_core.a) is inside the group block. It's probably a good idea to place the BLACS and cdft_core libraries inside the group block as well.

In general you can easily find answers to questions on how to link with MKL with the help of our Link Line Advisor:
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

Best regards,
Vladimir
0 포인트
svyatoslav_korneev
초급자
3,110 조회수

Svyatoslav,

The core library (libmkl_core.a) is inside the group block. It's probably a good idea to place the BLACS and cdft_core libraries inside the group block as well.

In general you can easily find answers to questions on how to link with MKL with the help of our Link Line Advisor:
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/

Best regards,
Vladimir

Thank you for the all answers. Can you plz refer me to article, where I can read about difference between group block lib and outgroup.
0 포인트
svyatoslav_korneev
초급자
3,110 조회수

Thanks, It work.
Can you explain me plz, what was the reason of the error.

Why in the initial make file core library was'n inside --start-group ... --end-group

What about $(MKL_PATH)/libmkl_cdft_core.a $(IFACE_LIB) $(THREADING_LIB), shoud I place it inside group block?

Regards,
Svyatoslav

In this post I was wrong. I mixed up inside with outside :)

Right questions:

Why in the initial make file core library was'n OUTside --start-group ... --end-group

What about $(MKL_PATH)/libmkl_cdft_core.a $(IFACE_LIB) $(THREADING_LIB), shoud I place it OUTside group block?

Thank you

Regards,
Svyatoslav
0 포인트
응답