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

newbi: using mkl examples - i.e. #include "mkl_dfti_examples.h"

Erich_Zwyssig
Beginner
496 Views
Hija all

The examples in e.g. /opt/intel/mkl/10.2.2.025/examples/dftc/ use

#include "mkl_dfti_examples.h"

Where do I find the object (or .c) files to link the examples?


Thanks for your help

Erich

0 Kudos
5 Replies
Alexander_K_Intel2
496 Views
Hi Eric,
Try to find it in directory /examples/dftc/source/
With best regards,
Alexander Kalinkin
0 Kudos
Erich_Zwyssig
Beginner
496 Views
Hi Alex

Thanks for your reply. I tried to find mkl_dfti_examples.o or .c, but I see that these routines
are in

- dfti_example_status_print.c
- dfti_example_support.c

Would you be able to tell me what the error below means?

g++ -c -Wall -g -I include -I /usr/include -I /opt/intel/mkl/10.2.2.025/examples/dftc/source -I KLINCLUDE -I PPINCLUDE src/mkl_dfti_example.cpp -o mkl_dfti_example.o
src/mkl_dfti_example.cpp: In function int main(int, char**):
src/mkl_dfti_example.cpp:75: warning: format %d expects type int, but argument 2 has type long int
g++ -c -Wall -g -I include -I /usr/include -I /opt/intel/mkl/10.2.2.025/examples/dftc/source -I KLINCLUDE -I PPINCLUDE -c -o dfti_example_status_print.o /opt/intel/mkl/10.2.2.025/examples/dftc/source/dfti_example_status_print.c
g++ -c -Wall -g -I include -I /usr/include -I /opt/intel/mkl/10.2.2.025/examples/dftc/source -I KLINCLUDE -I PPINCLUDE -c -o dfti_example_support.o /opt/intel/mkl/10.2.2.025/examples/dftc/source/dfti_example_support.c
/opt/intel/mkl/10.2.2.025/examples/dftc/source/dfti_example_support.c: In function int init_forward_tone_and_expected_result_c(void*, void*, long int):
/opt/intel/mkl/10.2.2.025/examples/dftc/source/dfti_example_support.c:279: error: invalid conversion from void* to float*
/opt/intel/mkl/10.2.2.025/examples/dftc/source/dfti_example_support.c:280: error: invalid conversion from void* to float*
.....


bon weekend

Erich
0 Kudos
mecej4
Honored Contributor III
496 Views
Do you ask about the location of the example sources, the MKL header files or the MKL library?

Anyway, all these are located in a fairly logical and simply organized set of directories. For example, the libraries on our system are in /opt/intel/mkl101/lib/em64t. the header files in /opt/intel/mkl101/include/ and the example sources are in /opt/intel/mkl101/examples/ .

Unless you have a nonstandard installation, these paths, modified to suit your version of MKL and machine architecture, should work.
0 Kudos
barragan_villanueva_
Valued Contributor I
496 Views

Erich,

It looks like you use incorrectly g++.
In order to run dftc examples please use make in the directory/opt/intel/mkl/10.2.2.025/examples/dftc/

% make help
Usage: make {libia32|soia32|libintel64|sointel64} [function=name]
[compiler=compiler_name] [interface=interface_name] [threading=threading_name]
[omp=omp_name] [parallel=parallel_name]

name - function name. Please see dftc.lst file

compiler_name - can be gnu, pgi or intel. Default value is intel.
Intel C Compiler as default

omp_name - can be iomp5 if parallel=intel or
can be iomp5 or gomp if parallel=gnu or
can be pgmp if parallel=pgi.
Default value is iomp5.

interface_name - can be lp64 or ilp64 for intel64. Default value is lp64.

parallel_name - can be intel (default value), pgi (only if compiler=pgi) or
gnu (if compiler=gnu).

threading_name - can be parallel or sequential. Default value is parallel.

0 Kudos
Erich_Zwyssig
Beginner
496 Views
Hi Victor

Thank you for your help.

That's compiling now, thanks.


Erich

0 Kudos
Reply