last day (15 days later) » 

7:08 PM
0
Q: Can't declare lapacke.h after installing openBLAS

Jack2007I am a beginner to the openBLAS and LAPACK. The platform I used is Mac OS 10.8.5, Xcode 5.1.1. after I cd to the folder stored openBLAS, I did as the following steps: make; sudo make PREFIX=/usr/local/ install; all all these done, I want to declare lapacke.h in my code, but a error message: f...

 
Did you try to add the path to lapacke.h to the include search path of your compile command ? Something like gcc main.c -o main -I /somewhere_lapacke.h/ -llapack -lblas
 
Thanks, Francis. I think it will works if adding a path to the code. But I do not know which location of the lapacke.h file. How can i get that path?
 
You may look in .../xianyi-OpenBLAS-aceee4e/lapack-netlib/lapacke/include or in /usr/local/include. If you get an error about the library, you might need to add the path to the library : -L /usr/local/lib/somewhere_liblapack.a
 
Thanks again, Francis. I checked the /xianyi-OpenBLAS-aceee4e/lapack-netlib/lapacke/include and I find the lapacke.h file but not in the usr/local/include folder, so how could install the package in usr/local/include folder? i.e., I would like to just write #include <lapacke.h> in the head file.
 
The command make install calls Makefile.install with something like @echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR) in the install target. As you installed using make install, did it print something like ` Copying LAPACKE header files to /usr/local/include` ? Other option : what does it print if you try echo $NO_LAPACKE ?
 
7:08 PM
OK, I will try to install whole the things again. By the way, which step should I input the command 'echo $NO_LAPACKE' .
 
Just type it before make or make install
 
Yes, Francis, I check the package of OpenBLAS and see the @echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR), so if I want to copy the LAPACKE header files to usr/local/include, what I need to do. Thanks again.
 
It should have been done by make install. If it's not the case, you may try to copy it by yourself : sudo cp *.h /usr/local/include ...But doing it with make install would be much more reliable
You could also try to copy lapacke.h and other .h files to your source folder...It should remove the not found error
 
I can try it now and response to you. thanks really, as I have spent more than one day on it.
 
7:50 PM
hey again, Francis. I first inputted the code echo $NO_LAPACKE before installation, nothing happened. Then I inputted make and finally it completed but I did not see something like copying LAPACKE header files to....., and finally it warns ld: warning: could not create compact unwind for _dlatm6_: stack subq instruction is too different from dwarf stack size.
 
The copying LAPACKE header file to should appear as you type sudo make PREFIX=/usr/local/ install
 
and I typed `sudo make PREFIX=/usr/local install`, it has three message, `make[1]: [install] Error 64 (ignored)
Copying the static library to /usr/local/lib
Copying the shared library to /usr/local/lib`
so the problem may be make[1]: [install] Error 64 (ignored) .
 
The fact that nothing was printed as you typed echo $NO_LAPACKE is a good thing.
It seems that there was a problem during the first make. You may type make clean before restarting make
 
do you think the problem it's here: `Copying LAPACKE header files to /usr/local/lib
install: illegal option -- D`
I just reinstall the system and make it again.
 
It should copy the header file to /usr/local/include...
 
7:58 PM
do you think it is a problem with the gcc complier?
 
No : gcc is fine... It seems that lapacke is installed with cmake. Did you installed cmake ? What happen if you type cmake --version ?
 
I tried, but also a problem, i can should you. just moment. :-)
by the way, if I want to copy by myself, then in which folder should I type the command sudo cp *.h /usr/local/include?
 
In the folder where you found lapacke.h
 
It says: Error in configuration process, projects files may be invalid.
I tried with the steps as following: 1, unzip the lapack package, 2, open CMAKE, 3.Browsw source and select the unzipped lapack folder, 4, Browse Build, I create a new folder,5.press configure.
 
8:16 PM
Could you just type make clean, make and sudo make PREFIX=/usr/local install in the folder /xianyi-OpenBLAS-aceee4e and copy-paste the result to your question ?
To install cmake, if you wish to do so, you may use the package manager synaptic
 
9:00 PM
Does it install normally if you don't use the prefix option ? sudo make install
 
9:27 PM
I have followed the same process and it worked fine : make then make PREFIX=/home/bla/soft install
Cmake was already intalled on my pc
 

last day (15 days later) »