Newer numpy (f2py?) produces strange errors
Expected behavior
kmos models should be able to run after being compiled with any of the three backends. In addition running kmos bench should return output similar to
Using the [lat_int] backend.
1000000 steps took 1.23 seconds
Or 8.12e+05 steps/s
Actual behavior
When using numpy 1.13.3, models compile with no apparent errors, however when trying to run a model compiled with otf I get a Segmentation Fault. In addition, when running kmos bench on a model compiled with lat_int, the output looks like
Using the [???] backend.
1000000 steps took 1.24 seconds
Or 8.08e+05 steps/s
Notice the question marks instead of the backend name. This does not happen with the local_smart backend.
Steps to reproduce the issue
- Update numpy to ver 1.13.3
- Pick your favorite otf-enabled model, recompile it with
kmos export -b otf - Run
kmos benchon the model folder
2a. Pick your favorite "default backend" kmos model, compile it with kmos export -b lat_int
3b. Run kmos bench on the model folder
System information
kmos version: 0.3.21 Linux Debian Jessie
Downgrading to numpy 1.8.2 solves the issue. Before I investigate this, it would be nice is somebody could try to reproduce this issue, to make sure is not something wrong with my installation.
I was able to reproduce this issue. However both run and bench produce a SegFault for me.
I used numpy 1.11.0 which works fine and numpy 1.13.3 which does not.
Hi Michael,
Thanks a lot for reproducing this. Yes, the SegFault seems to occur as soon as you try to import kmos.run. I will try to take a look into this next week.
Hi Juan,
SegFault happends when gfortran-7 is used, and it disappears after I update alternatives to gfortran-6.
My OS is the latest Ubuntu 17.10. After hundreds of tries, I found that sudo apt install python-ase works for me while pip install ... makes tons of trouble.
The details are displayed as follows.
mc@mc-server:~/AlOnSi/AlOnSi_otf$ ase info
platform Linux-4.13.0-16-generic-x86_64-with-Ubuntu-17.10-artful
python-3.6.3 /usr/bin/python3
ase-3.14.1 /usr/lib/python3/dist-packages/ase/
numpy-1.12.1 /usr/lib/python3/dist-packages/numpy/
scipy-0.18.1 /usr/lib/python3/dist-packages/scipy/
mc@mc-server:~/AlOnSi/AlOnSi_otf$ kmos --version
0.3.21
mc@mc-server:~/AlOnSi/AlOnSi_otf$ gfortran --version
GNU Fortran (Ubuntu 6.4.0-8ubuntu1) 6.4.0 20171010
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.