DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.19k stars 265 forks source link

SLIP_LU libamd.so.2 No such file or directory #109

Closed HamGhibli closed 3 years ago

HamGhibli commented 3 years ago

Dear Professor

Describe the bug I am trying to use the SLIP_backlash in MATLAB. Although compiling itnto a mexFunction succeeds, the installation fails and it shows: ------------------>>>>><<<<<------------------

SLIP_install Compiling the SLIP LU mexFunction for use in SLIP_backslash: Building with 'gcc'. MEX completed successfully. Testing SLIP_backslash: . (please wait) .Invalid MEX-file '/home/[HIDDEN PERSONAL PATH]/SuiteSparse/SLIP_LU/MATLAB/SLIP_mex_soln.mexa64': libamd.so.2: cannot open shared object file: No such file or directory

Error in SLIP_backslash (line 116) x = SLIP_mex_soln (A, b, option) ;

Error in SLIP_test (line 26) x = SLIP_backslash(A,b);

Error in SLIP_install (line 66) SLIP_test ; ------------------>>>>><<<<<------------------

To Reproduce

2 - To use SLIP_LU, I went to the user-guide, I downloaded and installed the GNU GMP and GNU MPFR libraries following the instructions in from https://gmplib.org/ and http://www.mpfr.org/gmp 3 - went back to SuiteSparse main folder and typed 'make' to compile AMD, COLAMD (which are already compiled) and SLIP LU. for the latter I get the following in the terminal:

------------------>>>>><<<<<------------------ SLIP LU Factor & Solve time: 0.062284

example.c: all tests passed

./example2

SLIP LU Factor & Solve time: 0.011872

example2.c: all tests passed

./SLIPLU

Number of L+U nonzeros: 10421 Symbolic analysis time: 0.000575 SLIP LU Factorization time: 0.019391 FB Substitution time: 0.000760

SLIPLU.c: all tests passed

make[1]: Leaving directory '/home/[HIDDEN PERSONAL PATH]/SuiteSparse/SLIP_LU/Demo' ------------------>>>>><<<<<------------------ 4- On Matlab, in folder /SLIP_LU/MATLAB I run. SLIP_install script, which lead to the error described above. it seems the issues comes from libamd.so.2 which cannot be detected although it is present in the folder 'SuiteSparse/lib'.... 5- I tried 'make library' in the main folder to recompile the library files but it still did not work.

Expected behavior Pass the MATLAB test file.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Thanks in advance !

Best,

DrTimothyAldenDavis commented 3 years ago

Try adding the /home/whomever/SuiteSparse/lib directory to your LD_LIBRARY_PATH. See your login settings, likely in ~/.bash* somewhere, and add the directory to the end of the LD_LIBRARY_PATH.

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/me/SuiteSparse/lib export LD_LIBRARY_PATH

then exit the shell, open a new shell, and start matlab again.

On Fri, Oct 29, 2021 at 7:43 AM HamGhibli @.***> wrote:

Assigned #109 https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/109 to @DrTimothyAldenDavis https://github.com/DrTimothyAldenDavis.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/109#event-5540370907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYIIOPNZLF26GAIQC6E4UTUJKQJLANCNFSM5G7H4VSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

HamGhibli commented 3 years ago

Dear Professor, After adding LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/me/SuiteSparse/lib export LD_LIBRARY_PATH in the ~/.profile, the SLIP_LU function seems to be working on Matlab.Thanks again :)