Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use matlab demo #46

Open
flying-gwx opened this issue Mar 7, 2022 · 5 comments
Open

Cannot use matlab demo #46

flying-gwx opened this issue Mar 7, 2022 · 5 comments

Comments

@flying-gwx
Copy link

No description provided.

@flying-gwx
Copy link
Author

Hello, I want to try the curvelet demo in matlab. I have installed matlab s2let package (with so3, ssht and fftw given in makefile and matlab R2017b installed). I do have make matlab successed(while matlab R2021b can not success).

gcc -Wall -g -fPIC -fopenmp -DS2LET_VERSION="2.2.4" -DS2LET_BUILD="git rev-parse HEAD" -I/home/weason/.conan/data/fftw/3.3.9///package/ed5fdd5398345049c567da0bb158e2b41e34bccf/include -I/home/weason//.conan/data/ssht/1.3.7///package/e472b5ac5942a316a5d6886379a089b9b4a28c04/include -I/home/weason//.conan/data/astro-informatics-so3/1.3.4///package/0846fa3e74d99ba447e75cff12b007dde52b4e73/include -I./include -c ./src/main/matlab/s2let_bandlimit_mex.c -o src/main/matlab/s2let_bandlimit_mex.o -I/home/weason/matlab/extern/include
/home/weason/matlab/bin/mex src/main/matlab/s2let_bandlimit_mex.o -output src/main/matlab/s2let_bandlimit_mex.mexa64 -L./lib -ls2let -lc -L/home/weason//.conan/data/astro-informatics-so3/1.3.4///package/0846fa3e74d99ba447e75cff12b007dde52b4e73/lib -lso3 -L/home/weason//.conan/data/ssht/1.3.7///package/e472b5ac5942a316a5d6886379a089b9b4a28c04/lib -lssht -L/home/weason/.conan/data/fftw/3.3.9///package/ed5fdd5398345049c567da0bb158e2b41e34bccf/lib -lfftw3 -lm -cxx -L/home/weason/matlab/extern/lib
Building with 'g++'.
Warning: You are using gcc version '7.5.0'. The version of gcc is not supported. The version currently supported with MEX is '4.9.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
MEX completed successfully.
rm src/main/matlab/s2let_bandlimit_mex.o

However, when I try the matlab demo in './src/main/matlab', i found the error:

s2let_demo1
Undefined function or variable 'ssht_inverse'.
Error in s2let_demo1 (line 12)
f = ssht_inverse(flm, L, 'Reality', true);

I checked the './src/main/matlab', there is no function as ssht_inverse, Is there anything i missed? How can I use the curvelet demo correctly?

@jasonmcewen
Copy link
Contributor

s2let requires ssht to compute spherical harmonic transforms. So you would also need the matlab interface to ssht installed and in your path. That would then provide the ssht_inverse routine.

@jasonmcewen
Copy link
Contributor

I've closed this issue for now but please just reopen if you have further questions.

@flying-gwx
Copy link
Author

I compile the matlab interface to ssht and so3 and the demo of s2let just works fine. Thank you!

Besides, In my case(gcc7.5 ubuntu18.04) I found that:

  1. makefile line 125 in so3 can cause build error:
    $(SO3OBJ)/%.o: %.c $(SO3HEADERS)
    I have to delete $(SO3HEADERS).
  2. the INCDIR of so3 is not correct:
    SO3INC = $(SO3DIR)/include/c
    It should be SO3INC = $(SO3DIR)/include/so3

Similar change should be done on the makefile of ssht.

@jasonmcewen
Copy link
Contributor

Glad you got it working @flying-gwx and thanks for the comments about the makefiles.

@mdavezac Did the location or naming of the SO3 header path change (see comments above)? Perhaps we need to update the makefiles accordingly (even tho this in not the main build approach any longer, it seems they are still useful for matlab installs)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants