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

Problem building mkl-fftw wrapper library

rob_n_
初学者
5,490 次查看

Hello,

I am attempting to build the mkl-fftw wrappers, as I am compiling a program that uses FFTW3 and claims to benefit from the mkl-wrapper.  When I execute the following:

cd /opt/intel/mkl/interfaces/fftw3xf
sudo make libintel64

I get command not found:

primary@localhost: fftw3xf$sudo make libintel64
make -f  makefile lib _IA=intel64
make[1]: Entering directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
rm -rf ./obj_intel
mkdir -p ./obj_intel
icc -vec-report0   -I../../include -I../../include/fftw     -c ../../interfaces/fftw3xf/wrappers/fftw_cleanup.c -o obj_intel/fftw_cleanup.o
make[1]: icc: Command not found
make[1]: *** [obj_intel/fftw_cleanup.o] Error 127
make[1]: Leaving directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
make: *** [libintel64] Error 2

It would seem to my untrained eye that one of the icc flags is innapproprate.

If I run the same command with the gnu compiler, all works well. (make libintel64 compiler=gnu)

I am running Fedora20 with the latest Intel Parallel Studio XE package (ifort/icc 14.0.1) and gcc 4.8.2

I'm sure this has been addressed before; however, I searched the forum and did not find an answer to my dilema. 

 

Appreciatively,

Robert

0 项奖励
7 回复数
Gennady_F_Intel
主持人
5,490 次查看

look at the line of the message:   make[1]: icc: Command not found

you need to launch something like that first of all : 

source //opt/intel/composer_xe_2013_sp1.1.106/bin/compilervars.sh intel64 

to setup the compiler's environment...

0 项奖励
rob_n_
初学者
5,490 次查看

I don't think that is the problem.  I have set up the compiler environment. 

I don't believe it is saying the command "icc" is not found, I believe the compiler is saying it did not find the command/flag.  I could be wrong, as I'm not at all in my comfort zone here, but if I type icc, I do not get "command not found."

 


 

0 项奖励
Gennady_F_Intel
主持人
5,490 次查看

I checked how it will work on my side - I don't see problem. 

this is the log of thic  build: as you can see at the very bottom -- ar: creating libfftw3xf_intel.a

......]# source /opt/intel/composer_xe_2013_sp1.1.106/bin/compilervars.sh intel64
......]# ifort --version
ifort (IFORT) 14.0.1 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.
 
......]]# ls
fftw3xf.lst  makefile  wrappers
......]]# make libintel64                                                                                                                                               
make -f  makefile lib _IA=intel64

make[1]: Entering directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
rm -rf ./obj_intel
mkdir -p ./obj_intel
icc -vec-report0   -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw     -c /opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf/wrappers/fftw_cleanup.c -o obj_intel/fftw_cleanup.o
icc -vec-report0   -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw     -c /opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf/wrappers/fftw_cleanup_threads.c -o obj_intel/fftw_cleanup_threads.o
..................
..................
icc -vec-report0   -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw     -c /opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf/wrappers/sfftw_plan_with_nthreads.c -o obj_intel/sfftw_plan_with_nthreads.o
icc -vec-report0   -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include -I/opt/intel/composer_xe_2013_sp1.1.106/mkl/include/fftw     -c /opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf/wrappers/sfftw_print_plan.c -o obj_intel/sfftw_print_plan.o
ar rs libfftw3xf_intel.a obj_intel/fftw_cleanup.o obj_intel/fftw_cleanup_threads.o obj_intel/fftw_destroy_plan.o obj_intel/fftw_estimate_cost.o obj_intel/fftw_execute.o  ......*.o
ar: creating libfftw3xf_intel.a
rm -rf ./obj_intel
make[1]: Leaving directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
.........]# 


0 项奖励
rob_n_
初学者
5,490 次查看

I don't know why mine does not work.   I can say I am not an isolated case. I actually have a colleague that has recently set up Ubuntu on his computer to run the same program I wish to run.  In the manual it recommends building and using these wrappers so he of course attempted this as well.  He informed me that he also had errors trying to compile the mkl-fftw3 wrappers with the intel compiler.

 

primary@localhost: fftw3xf$ifort -v
ifort version 14.0.1


primary@localhost: fftw3xf$icc -v
icc version 14.0.1 (gcc version 4.8.0 compatibility)

 

primary@localhost: fftw3xf$ls
obj_ifort/  obj_intel/  wrappers/  fftw3xf.lst  libfftw3xf_gnu.a  makefile

 

primary@localhost: fftw3xf$sudo make libintel64
make -f  makefile lib _IA=intel64
make[1]: Entering directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
rm -rf ./obj_intel
mkdir -p ./obj_intel
icc -vec-report0   -I../../include -I../../include/fftw     -c ../../interfaces/fftw3xf/wrappers/fftw_cleanup.c -o obj_intel/fftw_cleanup.o
make[1]: icc: Command not found
make[1]: *** [obj_intel/fftw_cleanup.o] Error 127
make[1]: Leaving directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3xf'
make: *** [libintel64] Error 2
primary@localhost: fftw3xf$

You can see the gnu compiled library is present, as it compiles when I specify the gnu compiler.

 

Also, when I attempt to make the wrapper in dir fftw3x_cdft, neither compiler works

 

primary@localhost: fftw3x_cdft$sudo make libintel64 compiler=gnu
make clean mkobjdir wraplib ILP_EXT=_lp64 _IA=intel64
make[1]: Entering directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3x_cdft'
rm -rf ./obj_intel64_lp64
rm -f ../../lib/intel64/libfftw3x_cdft_lp64.a
mkdir -p ./obj_intel64_lp64
mkdir -p ../../lib/intel64
mpicc -c -Wall     \
    -DMKL_DOUBLE -I../../include -I../../include/fftw wrappers/init_clean.c -o obj_intel64_lp64/init_clean.o
make[1]: mpicc: Command not found
make[1]: *** [obj_intel64_lp64/init_clean.o] Error 127
make[1]: Leaving directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3x_cdft'
make: *** [libintel64] Error 2

 

primary@localhost: fftw3x_cdft$sudo make libintel64 compiler=intel
make clean mkobjdir wraplib ILP_EXT=_lp64 _IA=intel64
make[1]: Entering directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3x_cdft'
rm -rf ./obj_intel64_lp64
rm -f ../../lib/intel64/libfftw3x_cdft_lp64.a
mkdir -p ./obj_intel64_lp64
mkdir -p ../../lib/intel64
mpiicc -c -Wall     \
    -DMKL_DOUBLE -I../../include -I../../include/fftw wrappers/init_clean.c -o obj_intel64_lp64/init_clean.o
make[1]: mpiicc: Command not found
make[1]: *** [obj_intel64_lp64/init_clean.o] Error 127
make[1]: Leaving directory `/opt/intel/composer_xe_2013_sp1.1.106/mkl/interfaces/fftw3x_cdft'
make: *** [libintel64] Error 2
primary@localhost: fftw3x_cdft$

I'm honestly not sure what the difference is between fftw3xc, fftw3xf, and fftw3x_cdft are.  I assumed the c and f corresponded to c compiler and fortran compiler, but I don't know why that would be necessary.

0 项奖励
Dmitry_B_Intel
5,490 次查看

That happens because icc and mpiicc are not seen under sudo. You can check this by running 'sudo icc -V'. Please notice that 'sudo gcc' works.

My recommendation is not use sudo. Cd to your working directory. Set MKLROOT=/opt/intel/composer_xe_2013_sp1.1.106/mkl. Run

make -f $MKLROOT/interfaces/fftw3xc MKLROOT=$MKLROOT libintel64

 

fftw3xc provides wrappers for use from C/C++, fftw3xf provides wrappers for use from Fortran.

Thanks
Dima

 

UNMESH_M_
初学者
5,490 次查看

I am having the same issue. The last comment by Dmitry did not help. Please give me some suggestion.

0 项奖励
mwo1
初学者
4,911 次查看

This is a very old thread, but it helped me to figure out the problem, so I hope that this comment can help someone as well.

Dimitry's answer was correct, icc is indeed not found under sudo.

However, his make command did not work for me. What did was to run:

make libintel64 INSTALL_DIR=$HOME

in the

$MKLROOT/interfaces/fftw3xf

directory.

Of course I sourced the intel compiler vars first.

Cheers, Michael

回复