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

Help on how to use included examples on Mac

CO_Traut
Beginner
903 Views
Hi,

I installed ifort compiler for Mac OS* X which comes with mkl lib. Then I want to test the compiler and mkl lib with an example in the folder/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf. However, error information shows up as what follows. Could you let me know what's wrong with me?

make lib32
make wrap_lib _IA=32
cd "../.."/interfaces/fftw2xf && make lib32 PRECISION=MKL_DOUBLE compiler=intel INSTALL_DIR=/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32
make clean libfftw2xf_intel.a _IA=32
rm -rf /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
rm -f /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/libfftw2xf_intel.a
mkdir -p /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
mkdir: /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib: Permission denied
make[3]: *** [libfftw2xf_intel.a] Error 1
make[2]: *** [lib32] Error 2
make[1]: *** [wrap_lib] Error 2
make: *** [lib32] Error 2

0 Kudos
6 Replies
Yuan_C_Intel
Employee
903 Views
Quoting - CO_Traut
rm -rf /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
rm -f /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/libfftw2xf_intel.a
mkdir -p /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
mkdir: /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib: Permission denied
Hi,

The error shows that you don't have permission to mkdirunder folder"/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib". So have a check on youraccountaccess permissions for the installation folder and reset the permission if needed.
0 Kudos
CO_Traut
Beginner
903 Views
Hi,

The error shows that you don't have permission to mkdirunder folder"/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib". So have a check on youraccountaccess permissions for the installation folder and reset the permission if needed.

Thanks much. I changed the permission to the entire folder of /mkl and reran the code. Now I get error msg like this. Seems like 'icc' is required, but I am using ifort instead of icc... I am confused.


c-71-56-196-131:fftw2xf liangzhezhang$ make lib32
make wrap_lib _IA=32
cd "../.."/interfaces/fftw2xf && make lib32 PRECISION=MKL_DOUBLE compiler=intel INSTALL_DIR=/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32
make clean libfftw2xf_intel.a _IA=32
rm -rf /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
rm -f /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/libfftw2xf_intel.a
mkdir -p /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
make -f makefile objects
icc -c -DMKL_DOUBLE -I../../include -I../../include/fftw wrappers/fftw_f77.c -o /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj/fftw_f77.o
make[4]: icc: Command not found
make[4]: *** [/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj/fftw_f77.o] Error 127
make[3]: *** [libfftw2xf_intel.a] Error 2
make[2]: *** [lib32] Error 2
make[1]: *** [wrap_lib] Error 2
make: *** [lib32] Error 2

0 Kudos
eliosh
Beginner
903 Views
Quoting - CO_Traut

Thanks much. I changed the permission to the entire folder of /mkl and reran the code. Now I get error msg like this. Seems like 'icc' is required, but I am using ifort instead of icc... I am confused.


c-71-56-196-131:fftw2xf liangzhezhang$ make lib32
make wrap_lib _IA=32
cd "../.."/interfaces/fftw2xf && make lib32 PRECISION=MKL_DOUBLE compiler=intel INSTALL_DIR=/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32
make clean libfftw2xf_intel.a _IA=32
rm -rf /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
rm -f /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/libfftw2xf_intel.a
mkdir -p /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj
make -f makefile objects
icc -c -DMKL_DOUBLE -I../../include -I../../include/fftw wrappers/fftw_f77.c -o /opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj/fftw_f77.o
make[4]: icc: Command not found
make[4]: *** [/opt/intel/Compiler/11.1/058/Frameworks/mkl/examples/fftw2xf/lib/32/obj/fftw_f77.o] Error 127
make[3]: *** [libfftw2xf_intel.a] Error 2
make[2]: *** [lib32] Error 2
make[1]: *** [wrap_lib] Error 2
make: *** [lib32] Error 2

From what I see, You try to build wrappers that provide FFTW interface to Intel's own FFT routines. The wrappers are written in C not in Fortran. I do not know much about Mac version, but PC version of MKL, if I remember correctly, comes with precompiled interfaces that you can uses from Fortran programs. Check the manual.

0 Kudos
CO_Traut
Beginner
903 Views
Quoting - eliosh
From what I see, You try to build wrappers that provide FFTW interface to Intel's own FFT routines. The wrappers are written in C not in Fortran. I do not know much about Mac version, but PC version of MKL, if I remember correctly, comes with precompiled interfaces that you can uses from Fortran programs. Check the manual.

Thanks for your help.

I read through the manual... but I am so confused. The manual command is not consistent with the examples that come with the compiler package.


0 Kudos
Steven_L_Intel1
Employee
903 Views
I'm going to move this discussion to the MKL forum.
0 Kudos
Ying_H_Intel
Moderator
903 Views


Hello CO_Traut,

Yes, as eliosh mentioned, the FFT warpper iswritten by C, so it requiresa C compiler on your machine. the command > make lib32 will invoke Intel C compiler to build the warpper library.But you haven't Intel C Compiler, so build failed.

Attached is one I build. Please copy it into your MKL library library for example,

/opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/32

Then you can use it in the future.

For build the example code under example/fftw2xf,

You may try the command.

for example build real 1d FFT.

>ifort -w -vec-report0 -DMKL_DOUBLE -I"/opt/intel/Compiler/11.1/058/Frameworks/mkl"/include -I"/opt/intel/Compiler/11.1/058/Frameworks/mkl"/include/fftw source/real_1d_double_ex2.f source/mkl_fftw_examples_support.f -L/opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/32 -lfftw2xf_intel "/opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/32"/libmkl_intel.a "/opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/32"/libmkl_intel_thread.a "/opt/intel/Compiler/11.1/058/Frameworks/mkl/lib/32"/libmkl_core.a -L"/opt/intel/Compiler/11.1/058/lib" -liomp5 -lpthread -lm -o _results/intel_parallel_32_lib_double/real_1d_double_ex2.out

and run the executable file,

> _results/intel_parallel_32_lib_double/real_1d_double_ex2.out

Hope it helps
Regards,
Ying

0 Kudos
Reply