- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to link Intel Math Kernel Library (MKL) with C/C++ through Eclipse IDE. Actually i followed the steps provided by Intel website but still the problem. I am trying to compile one example of those coming with the MKL package. The console shows me this "error in BOLD" ;
Info: Internal Builder is used for build
gcc "-IC:\\Program Files (x86)\\IntelSWTools\\
gcc "-LC:\\Program Files (x86)\\IntelSWTools\\
complex2.o: In function `main':
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
C:\Users\aaelmeli\workspace\
collect2.exe: error: ld returned 1 exit status
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To use the FFTW interface, you need to compile and link with the FFTW wrapper, which is provided as source code, as described at https://software.intel.com/en-us/mkl-developer-reference-c-appendix-d-fftw-interface-to-intel-math-kernel-library .
Your linking line shows indiscriminate use of all the MKL libraries. For instance, the *95 libraries have no relevance to using MKL from C code. The *ilp64* and *lp64 libraries are incompatible and you should use only the appropriate ones for your code. See https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sorry mecej4, How can I compile and link with FFTW wrappers. As I see, there are many files.c which are not containing the Main function.
Also, how can I identify which library I should use.
I am sorry for that but really I am confused. I am using Eclipse IDE CDT for C/C++ with GCC compiler.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MKL packages contain the makefiles which may help you to build standalone libraries of FFTW[3/2] [C/F] wrappers to MKL. see MKLROOT/interfaces folders.
Regards to your original questions -- the set of libs you used for linking contains everything but this is not what mkl linker adviser recommends to do. Please check with MKL LA or see MKL User's Guide the examples how build/link your application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying now with VS 2017, the OS is windows 10. I am trying to build the lib for fftw2x but i could not.
i opened the command window , i changed the direcctory to the wrapper directory where makefile exists. then : nmake libintel64 compiler=msvc install_dir=desktop.
but it gives me that error
"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are not the system administrator or have administrator privileges on your computer, you will have to copy the FFTW source package (including makefiles, etc.) to a working directory on a device/directory on your machine to which you have full access and build the library there. After building the library, if you want it added to the MKL directory tree, you may need to ask your system administrator to do so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mecej4 is right, please copy the whole fftw2c folder to one writable folder, then the nmake will work. the processing is like
2. Open MSVS 2017 command line windows from start-up -> All programs -> Visual Stuido 2017-> Visual Studio tools-> developer command prompt for VS 2017 : cd the folder
4. nmake libintel64 compiler=msvs (not msvc) install_dir=desktop
Hope it helps
Ying
Here is the command output in my MSVS prompt windows
** Visual Studio 2017 Developer Command Prompt v15.0.26228.10
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
iles (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interface
s\fftw2xc
kl\interfaces\fftw2xc>nmake libintel64 compiler=msvc install_dir=desktop
Copyright (C) Microsoft Corporation. All rights reserved.
Copyright (C) Microsoft Corporation. All rights reserved.
The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
kl\interfaces\fftw2xc>cd ..
kl\interfaces>cd C:\Users\yhu5\Desktop\mkl example\fftw2xc\fftw2xc
install_dir=desktop
Copyright (C) Microsoft Corporation. All rights reserved.
Copyright (C) Microsoft Corporation. All rights reserved.
nmake fftw.obj fftw_check_memory_leaks.obj fftw_create_plan.obj fftw_
create_plan_specific.obj fftw_destroy_plan.obj fftw_die.obj fftw_export_wisdo
m.obj fftw_export_wisdom_to_file.obj fftw_export_wisdom_to_string.obj fftw_fo
rget_wisdom.obj fftw_fprint_plan.obj fftw_free.obj fftw_import_wisdom.obj ff
tw_import_wisdom_from_file.obj fftw_import_wisdom_from_string.obj fftw_malloc.
obj fftw_one.obj fftw_print_max_memory_usage.obj fftw_print_plan.obj fftw_si
zeof_fftw_real.obj fftw_threads.obj fftw_threads_init.obj fftw_threads_one.ob
j fftw2d_create_plan.obj fftw2d_create_plan_specific.obj fftw3d_create_plan.o
bj fftw3d_create_plan_specific.obj fftwnd.obj fftwnd_create_plan.obj fftwnd_
create_plan_specific.obj fftwnd_destroy_plan.obj fftwnd_fprint_plan.obj fftwn
d_one.obj fftwnd_print_plan.obj fftwnd_threads.obj fftwnd_threads_one.obj rf
ftw.obj rfftw_create_plan.obj rfftw_create_plan_specific.obj rfftw_destroy_pl
an.obj rfftw_executor_simple.obj rfftw_fprint_plan.obj rfftw_one.obj rfftw_p
rint_plan.obj rfftw_threads.obj rfftw_threads_one.obj rfftw2d_create_plan.obj
rfftw2d_create_plan_specific.obj rfftw3d_create_plan.obj rfftw3d_create_plan
_specific.obj rfftwnd_complex_to_real.obj rfftwnd_create_plan.obj rfftwnd_cre
ate_plan_specific.obj rfftwnd_destroy_plan.obj rfftwnd_fprint_plan.obj rfftwn
d_one_complex_to_real.obj rfftwnd_one_real_to_complex.obj rfftwnd_print_plan.o
bj rfftwnd_real_to_complex.obj rfftwnd_threads_complex_to_real.obj rfftwnd_th
reads_one_complex_to_real.obj rfftwnd_threads_one_real_to_complex.obj rfftwnd_
threads_real_to_complex.obj library compiler=msvc PRECISION=MKL_DOUBLE
Copyright (C) Microsoft Corporation. All rights reserved.
icl /c /MT /DMKL_DOUBLE /Fo"desktop\obj_double_msvc"\ wrappers\fftw.c
'icl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'icl' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
install_dir=desktop
Copyright (C) Microsoft Corporation. All rights reserved.
Copyright (C) Microsoft Corporation. All rights reserved.
nmake fftw.obj fftw_check_memory_leaks.obj fftw_create_plan.obj fftw_
create_plan_specific.obj fftw_destroy_plan.obj fftw_die.obj fftw_export_wisdo
m.obj fftw_export_wisdom_to_file.obj fftw_export_wisdom_to_string.obj fftw_fo
rget_wisdom.obj fftw_fprint_plan.obj fftw_free.obj fftw_import_wisdom.obj ff
tw_import_wisdom_from_file.obj fftw_import_wisdom_from_string.obj fftw_malloc.
obj fftw_one.obj fftw_print_max_memory_usage.obj fftw_print_plan.obj fftw_si
zeof_fftw_real.obj fftw_threads.obj fftw_threads_init.obj fftw_threads_one.ob
j fftw2d_create_plan.obj fftw2d_create_plan_specific.obj fftw3d_create_plan.o
bj fftw3d_create_plan_specific.obj fftwnd.obj fftwnd_create_plan.obj fftwnd_
create_plan_specific.obj fftwnd_destroy_plan.obj fftwnd_fprint_plan.obj fftwn
d_one.obj fftwnd_print_plan.obj fftwnd_threads.obj fftwnd_threads_one.obj rf
ftw.obj rfftw_create_plan.obj rfftw_create_plan_specific.obj rfftw_destroy_pl
an.obj rfftw_executor_simple.obj rfftw_fprint_plan.obj rfftw_one.obj rfftw_p
rint_plan.obj rfftw_threads.obj rfftw_threads_one.obj rfftw2d_create_plan.obj
rfftw2d_create_plan_specific.obj rfftw3d_create_plan.obj rfftw3d_create_plan
_specific.obj rfftwnd_complex_to_real.obj rfftwnd_create_plan.obj rfftwnd_cre
ate_plan_specific.obj rfftwnd_destroy_plan.obj rfftwnd_fprint_plan.obj rfftwn
d_one_complex_to_real.obj rfftwnd_one_real_to_complex.obj rfftwnd_print_plan.o
bj rfftwnd_real_to_complex.obj rfftwnd_threads_complex_to_real.obj rfftwnd_th
reads_one_complex_to_real.obj rfftwnd_threads_one_real_to_complex.obj rfftwnd_
threads_real_to_complex.obj library compiler=msvs PRECISION=MKL_DOUBLE
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /MT /DMKL_DOUBLE /Fo"desktop\obj_double_msvs"\ wrappers\fftw.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
c:\users\yhu5\desktop\mkl example\fftw2xc\fftw2xc\wrappers\fftw2_mkl.h(34): fata
l error C1083: Cannot open include file: 'mkl_dfti.h': No such file or directory
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\cl.EXE"' : return code '
0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
lSWTools\compilers_and_libraries_2018.1.156\windows\mkl\interfaces\fftw2xc
kl\interfaces\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop
Copyright (C) Microsoft Corporation. All rights reserved.
Copyright (C) Microsoft Corporation. All rights reserved.
The directory or file cannot be created.
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017
\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX86\x86\nmake.EXE"' : return cod
e '0x2'
Stop.
kl\interfaces\fftw2xc>"C:\Program Files (x86)\IntelSWTools\compilers_and_librari
es_2018.1.156\windows\mkl\bin\mklvars.bat" intel64
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It generated folder named obj_double_msvs but this folder is empty.
this is my command displays:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I managed to generate this library "fftw2xc_double_msvs.lib" for example fftw2xc. However, while linking process, it gives me error.
I am using VS 2017 C/C++. I included the name of this file in Additional Dependencies in the Linker menu. Also, i provided the path of this file.
The displayed message as shown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Sorry for the long message , which may cause you miss the key step:
1. copy fftw2c to your desktop , which support can be wrote. In command line, you may first run
2. Open MSVS 2017 command line windows from start-up -> All programs -> Visual Stuido 2017-> Visual Studio tools-> developer command prompt for VS 2017 : cd the folder
3. in command line wondows, run the command to set MKL environment :
4. "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\bin\mklvars.bat" intel64
5. nmake libintel64 compiler=msvs (not msvc) install_dir=desktop
so under command line, please first run
>C:\Users\aaelmeli\Desktop\fftw2xc> "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018.1.156\windows\mkl\bin\mklvars.bat" intel64
Then
>C:\Users\aaelmeli\Desktop\fftw2xc>nmake libintel64 compiler=msvs install_dir=desktop.
In MSVS environment, you may need add mkl library (mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib) in your Additional Dependencies in the Linker menu. as the discussion in Merry Christmas E1 -- Help me find dgesv
Best Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page