astro-informatics / s2let

Fast wavelet transforms on the sphere.
http://astro-informatics.github.io/s2let
GNU General Public License v3.0
11 stars 2 forks source link

Cannot use matlab demo #46

Open flying-gwx opened 2 years ago

flying-gwx commented 2 years ago

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\" -DS2LETBUILD=\"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_bandlimitmex.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 commented 2 years ago

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 commented 2 years ago

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

flying-gwx commented 2 years ago

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 commented 2 years ago

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)?