porting arapck code to octave

David Bateman dbateman at dbateman.org
Fri Dec 19 17:27:26 CST 2008


I've been looking at porting the eigs function to octave and basically 
have it finished.. However I have a bizarre issue in that

eigs (diag(1:100),4,'LM')

doesn't work due to an internal error in an ARPACK function.. I'd 
remember something like this and that I'd patch arpack to avoid it on my 
machine in the past. However, I thought I'd investigate the issue 
further and modified an ARPACK example function "dssimp" to treat the 
exact same case as above and no bug manifested..

I then tried reimplementing dssimp  as an oct-file, trying to keep it 
close to the same functionality as the fortran code (ie arrays 
initialized to zero, etc), and the result was I saw the same bug in the 
DSAUPD function as previously. I've been staring at this code for hours 
and don't see what the issue is. I attach my modified dssimp.f and the 
code that duplicates it in octave with "dssimp(diag(1:100))"... Anyone 
want to confirm that

gfortran -o dssimp dssimp.f -larpack -lblas -llapack
./dssimp

works and gives the 4 largest eigenvalues [100, 99, 98, 97] as expected. 
whereas

mkoctfile dssimp.cc -larpack
octave --eval "dssimp(diag(1:100))"

doesn't... Anyone want to look at the code and see if they can see an 
issue that I missed?

Regards
David




-- 
David Bateman                                dbateman at dbateman.org
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dssimp.cc
Type: text/x-c++src
Size: 4857 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081220/648a8fac/attachment-0001.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dssimp.f
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081220/648a8fac/attachment-0001.ksh 


More information about the Octave-maintainers mailing list