Menu

First successful Octave run

I thought I would announce that I just managed to hack the code together to run the first simple Wavepacket demo with Octave. It is a hack (for those interested: the branch "octavetest" contains the changes I had to do), but somewhat better than I would have imagined.

Now what are the main changes to get Wavepacket to run under Octave?

  1. Octave seems to have a parsing problem with namespaces. In particular, if you have a function log() and a namespace "log" (directory "+log"), one of these shadows the other. That is, you either get an error when calling the function log() because Octave thinks you talk about the namespace or the other way round, calling "log.somefunction" fails because Octave tries to call the log() function. That needs some further investigation about possible solutions. I only hacked my way around this issue with renamings.
  2. Potentials derive from matlab.mixin.Copyable to allow simple copying. This class does not exist under Octave, so we either need to implement it ourselves, which should be doable for the limited Wavepacket use-case without nasty edge cases, or find some other solution for copying potentials.
  3. Somewhat unsurprisingly, Octave has no license for the module "matlab". So getting the user name from that license information is bound to fail. Fortunately, there is an "octave" module that can be used instead.

And that is it. Granted, the first issue is tough, and I have already seen that plotting and some advanced functions will require further tweaks. But altogether, this attempt was surprisingly smooth once I understood again how Octave and the current code works (quite some differences from the version 4 that I got used to).

Posted by Ulf Lorenz 2020-09-17

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.