Closed robertf closed 5 months ago
Thanks a lot for the report! I do not think you are doing anything wrong - molsim should install as you did it.
1) The first warning is completely valid, but for some reason I do not get this with my version of gcc (12.2.0) - I will fix this! Can I ask you what version of mingw you use? The second warning is more tricky; with Octave 8.4 the type is long int (as the code uses) not const long long as your report shows. This might be an Octave issue.
2) Despite the warnings I think the build should be made. After installation does the command pkg list show molsim? Does the file 'molsim.mex' exists on you computer?
I will soon make a bug-fix release (v.1.0.1) based on your report.
Jesper
PS C:\Program Files\GNU Octave\Octave-9.0.1\mingw64\bin> ./gcc -v
Using built-in specs.
COLLECT_GCC=C:\Program Files\GNU Octave\Octave-9.0.1\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/Program\ Files/GNU\ Octave/Octave-9.0.1/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /buildbot/octave-mxe-default-w64/build/tmp-native-gcc/gcc-13.2.0/configure --target=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu --prefix=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32 --enable-languages=c,c++,fortran --disable-libsanitizer --enable-version-specific-runtime-libs --disable-nls --without-x --disable-win32-registry --with-native-system-header-dir=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32/include --enable-threads=posix --disable-multilib --enable-64bit --disable-libgomp --with-cloog=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32 --with-gmp=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32 --with-isl=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32 --with-mpc=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32 --with-mpfr=/buildbot/octave-mxe-default-w64/build/usr/x86_64-w64-mingw32
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)
molsim is not listed in mingw64/lib/octave/packages/
, where I see other packages that have .mex files.
This is different but the same: I've now installed molsim 1.0.0 in Octave 6.2.0 running under Debian Linux 11 within VirtualBox under Windows 11. The pkg install
command completed without any warnings or error messages, but when I give the command molsim('hello')
I again get the message
error: 'molsim' undefined near line 1, column 1
I do see the file ~/octave/molsim-1.0.0/molsim.mex
.
If you go to that directory and launch Octave from here can you shake hands?
From terminal cd ~/octave/molsim-1.0.0 octave molsim('hello')
If this works you can add the directory to your search path using
addpath('~/octave/molsim-1.0.0/')
This does not explain/fix why the standard installation did not succeed. Of that I am still not sure.
For my Linux-in-VirtualBox Octave, your suggestion works perfectly :-)
For my Windows Octave, I finally found molsim.mex
and I can do
cd C:\Users\Robert\AppData\Roaming\octave\api-v58\packages\molsim-1.0.0\
& 'C:\Program Files\GNU Octave\Octave-9.0.1\mingw64\bin\octave.bat'
molsim('hello')
and it works :-) (I don't know if octave.bat is actually the file that I should run.)
In addition to using addpath, do I also use savepath so I don't have to repeat the addpath every time?
I tend to add paths in my octave startup file. Under linux this is is just the file ~/.octaverc . Not sure about Windows, but I think the same file should be on your (Windows) machine somewhere.
I will install Octave on a Windows machine, get the installation procedure right on this OS, update the documentation, and make a bug-fix release. Thank you once again for reporting this.
I think that the PATH is stored in the Windows registry?
Hi robertf,
A final comment: I can make every thing work if I load molsim explicit with the package manager
pkg load molsim
I will close the issue unless you have objections.
Doing 'pkg load molsim' also made it work for me. Thank you.
I couldn't figure out what the current version number was, for the install command, so I just used 1.0.0 again. Is that correct? Where should I look for the version number?
The newest version is 1.0.1 - mainly based on your comment :) The release has not yet been announced on Octave's Github page, but this will soon happen.
Out of curiosity, can I ask what systems you simulate with molsim?
Thank you.
My modelling is mainly with the finite-element method (ear mechanics and acoustics) but when teaching I like to introduce students to other modelling approaches, including molecular dynamics. I haven't yet found an excuse to use it for real.
Thanks. It's really good to know that you use it for teaching - very interesting. It is worth to consider some tools for nice visualization...
I gave the command
pkg install "https://github.com/jesperschmidthansen/molsim/archive/refs/tags/v1.0.0.tar.gz"
in Octave 9.0.1. There were some warnings and possibly an error:When I do molsim('hello') I get this error message:
error: 'molsim' undefined near line 1, column 1
So I guess that last bit wasn't just a warning? Any idea what I might be doing wrong? Thanks.