lab-cosmo / sketchmap

Suite of programs to perform non-linear dimensionality reduction -- sketch-map in particular
GNU General Public License v3.0
45 stars 10 forks source link

dimred fails with "on entry to DSYEVX parameter number 6 had an illegal value" #8

Closed mcjankousky closed 1 year ago

mcjankousky commented 1 year ago

Hello!

I am hoping you can help me with an issue when trying to work through the examples in the manual at https://sketchmap.org/index.html?page=manu&psub=dimred using the command line.

I can generate the landmarks from the tutorial dataset using dimlandmark, but when trying to run

dimred -D 24 -d 2 -pi 6.2832 < LANDMARKS > PROJECTION

the output in the terminal is:

Initialization done, running dim. reduction hey conjgrad 1 simulated annealing ops: 2 0.1 100

0 0 0 SIMIL Multiplying to find full metric matrix Finding low-dim points (diagonalization 0x0)

Once this has printed, the PROJECTION file contains only the line ** On entry to DSYEVX parameter number 6 had an illegal value

The same error occurs when dimred -D 24 -d 2 -pi 6.2832 -w -preopt 20 -grid 100,20,200 -gopt 3 < LANDMARKS > PROJECTION

In the DSYEVX subroutine, parameter 6 is the leading dimension of the array A, which is supposed to be an NxN symmetric matrix to be diagonalized.

Do you think the issue is likely to be with my LAPACK installation or the compilation of sketchmap? Any advice regarding this issue would be greatly appreciated!

ceriottm commented 1 year ago

Hi. I suspect it's just that you're not removing or filtering out the comment lines in the LANDMARKS file. The parser is very rudimentary and so if there are comments it just reads garbage (arguably it could at least give an error). If you look carefully, the tutorial (and the sketch-map.sh script) filter out the comments with grep:

grep -v \# highd-landmarks | dimred -D 24 -pi 6.283185 -d 2 -w -center > lowd-mds

Let me know if this fixes it for you.

mcjankousky commented 1 year ago

This has resolved the issue for me, I have a better understanding of how the parser works now. Thanks for your help!