Registered Member
|
Hello,
Can anyone share how to install or implement SuperLU and Umfpack packages on OSx (Xcode) to allow Eigen3 to perform sparse direct solver? Also since accelerate framework come with OSx has cblas, how can I let SuperLU/Umfpack know this? I tried to install SuperLU following "README" for Mac provided in SuperLU folder. Not succeeded. The example is for linux but make.inc for mac looks different and I am not advanced enough to mess with this file. Big thks, |
Registered Member
|
All,
I finally dig this through. It might not be the smartest way but at least it finally allow me to backend SuperLU to beloved Eigen3.1.0a1. I am a true amateur in programming world but since there is no reply so I guess not many expert here use Xcode. Then hope you do not mind me sharing my method here so if in the future another newbie happen to stuck on the same problem like I did, they will not have to spend 1-2 weeks like me to succeed it. Note: • I use double quote “ “ in this note to emphasize name, folder name and file name. If any direction requires to input my written text into command window, DO NOT include “ “. Just copy only text inside double quote. • My user name is “TOY”. When referring to your folder on your mac using my path written in this note, change “TOY” to your username. • All the work in this note assuming every folders (SuperLU source and static library product) are save on Desktop (path is “/Users/TOY/Desktop” …… again change “TOY” to your user name. Link Eigen Module with Xcode Project 1. Simply uncompress Eigen zip file in any place you want. In my case I assume it is kept on my desktop (path is “/Users/TOY/Desktop/Eigen3.1.0Alpha”). 2. You do not have to do anything else wit Eigen file. We just have to link Xcode to the folder we keep Eigen. 3. Right clicking on your project and choose “Get Info”. 4. Go to tab “Build”, select “All Configuration” to set this for both build and debug modes and scroll down to “Header Search Paths” under “Search Paths” category. 5. Click to add path to Eigen header files which is “/Users/TOY/Desktop/Eigen3.1.0Alpha”. Compile SuperLU_4.3 into Static Library (libsuperlu_4.3.a) 1. Download SuperLU_4.3 from http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ 2. Uncompress downloaded file on desktop (Now SuperLU4.3 address is “/Users/TOY/desktop/superlu_4.3”. 3. Open file “make.mac-x” in “SuperLU_4.3/MAKE-INC” folder using “TextEdit” or “Console” 4. Edit “make.mac-x” as shown below: • Goto line “SuperLUroot = $(HOME)/Codes/SuperLU_4.3” • Change it to “SuperLUroot = /Users/TOY/desktop/superlu_4.3” 5. Save the “make.mac-x” and change its name to “make.inc” 6. Copy “make.inc” inside “SuperLU_4.3/MAKE_INC” folder and replace the old one exists in “SuperLU_4.3” folder. 7. Goto “Terminal” program under “/Application/Utilities” 8. Direct “Terminal” to “SuperLU_4.3” folder by typing “cd Desktop/Super_LU_4.3” 9. Build Blas Library by typing “make blaslib” and hit enter. Then you should have “libblas.a” inside “/SuperLU_4.3/lib”. 10. Now we are ready to build SuperLU by typing “make superlulib” and hit enter. Then now you should have another file inside “/SuperLU_4.3/lib” named “libsuperlu_4.3.a” Link SuperLU_4.3 Static Library annd Required SuperLU Headers to Your Xcode Project 1. Right click on your project and choose “Add >> Existing Files” option. 2. Browse to folder where you keep “libsuperlu_4.3.a”. Then select to add it to your project. 3. Now tell Xcode to know where SuperLU header files are by right clicking on your project and choose “Get Info”. 4. Go to tab “Build”, select “All Configuration” to set this for both build and debug modes and scroll down to “Header Search Paths” under “Search Paths” category. 5. Click to add path to SuperLU header files which is “/Users/TOY/Desktop/SuperLU_4.3/SRC”. 6. Now you can use Xcode with Eigen backend by SuperLU by adding #include <Eigen/SuperLUSupport> in your xcode file. |
Registered Member
|
I forgot to mention that we also need to add Acceleration Framework to the project to get SuperLU running. (right click at the reject and choose to Add Framework. |
Registered Member
|
Thank you very much for posting this after having found the solution to your problem without any help!
I had to make some modifications though in order to make it working. Based on your comments, I had to modify the make.inc file as follows: SuperLUroot = $(HOME)/Downloads/SuperLU_4.3 // I downloaded the SuperLU_4.3 directory in my folder Downloads SUPERLULIB = /usr/local/lib/libsuperlu_4.3.a // This is where I want libsuperlu_4.3.a BLASLIB = /usr/local/lib/libblas.a // This is where I already had my libblas.a file. To know where you have it, type "locate libblas.a" TMGLIB = libtmglib.a // leave like this LIBS = $(SUPERLULIB) $(BLASLIB) // leave like this That way, it worked perfectly for me. Greetz |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]