Python Interface Question

249 views
Skip to first unread message

brian.w....@gmail.com

unread,
Aug 14, 2018, 3:28:26 PM8/14/18
to aenet
Hi all,
I'm trying to get an MD simulation working with ANN potentials I've trained and I'm running into problems with the python interface. First my environment is:

ubuntu 16.04
python 3.5.5
numpy 1.14.0
ase 3.10.0
cython 0.28.4
gfortran 5.4.0
aenet2.0.3

I seem to have a problem importing the aenet.ase_calculator when I run the aenet-md.py script. The error I get is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/orlando/anaconda3/lib/python3.5/site-packages/aenet-0.1.0a1-py3.5-linux-x86_64.egg/aenet/ase_calculator.py", line 24, in <module>
    from aenet.core import ANNPotentials
ImportError: /home/orlando/anaconda3/lib/python3.5/site-packages/aenet-0.1.0a1-py3.5-linux-x86_64.egg/aenet/core.cpython-35m-x86_64-linux-gnu.so: undefined symbol: mpi_allreduce_

When I compiled aenet2.0.3 I used the Makefile.gfortran_mpi file and I made a library using the make lib -f ./makefiles/Makefile.gfortran_mpi. Not too sure what the problem is so any suggestions would be greatly appreciated!

Best,
Brian Doherty

Nongnuch Artrith

unread,
Aug 14, 2018, 5:24:22 PM8/14/18
to brian.w....@gmail.com, aenet
Hi all,

Sorry, our interface implementation is only working in serial --- not with mpi.  That is probably the reason.  I have not tested the interface with anaconda Python either.

Best,
Nong

Daniel Massote

unread,
Apr 14, 2021, 9:49:21 AM4/14/21
to aenet
Dear all,

I am facing the same issue, though I am using serial version. I am using anaconda. Does anyone made it work that way?

Best,
Prof. Daniel Massote
UFJF - Brazil

Daniel Massote

unread,
Apr 14, 2021, 1:16:45 PM4/14/21
to aenet
Actually I was able to compile it again, without mpi error. I compiled everything with gfortran serial. When trying to run aenet-md.py, I got the error: "double free or corruption (out)".

I am not sure if I am missing anything, but the README files do not state the clearly the correct order of compilation. In python3 folder, we should run "python setup.py build_ext --inplace", but in the main README it only says that "python setup install --user". In the end, I run both commands in the order I mention them.

Best,
Daniel

Nongnuch Artrith

unread,
Apr 14, 2021, 1:25:37 PM4/14/21
to Daniel Massote, aenet, Nongnuch Artrith
Dear Daniel,

Thanks for your interest in using aenet.

Please see a working example (all command lines) in the following Google Colab notebook [1]: https://github.com/atomisticnet/MLP-beginners-guide

To run the example, you first need to create your own copy of the notebook by choosing “File→Save Copy in Drive”.

Best,
Nong

[1] A.M. Miksch, T. Morawietz, J. Kästner, A. Urban, N. Artrith
“Strategies for the Construction of Machine-Learning Potentials for Accurate and Efficient Atomic-Scale Simulations”, submitted (2021). https://arxiv.org/abs/2101.10468

===============================
Nongnuch Artrith, PhD
Research Scientist (PI) 
Department of Chemical Engineering and 
Columbia University 500 W. 120th St., 1006 Mudd
New York, NY 10027
Tel: 212-854-0105 or 857-523-8452
E-mail: nart...@atomistic.net and na2...@columbia.edu
Web: http://nartrith.atomistic.net and http://ann.atomistic.net

Also funded by:
Center for Functional Nanomaterials (CFN)
Brookhaven National Laboratory
===============================

Daniel Massote

unread,
Apr 14, 2021, 1:59:34 PM4/14/21
to aenet
Thanks Nong,

I missed this text. I followed everything. One thing that I noticed was the "pip install". I run exactly and still got the error. I tried to find exactly where it was crashing, and run these commands in ipython:

In [1]: import aenet

In [2]: from aenet.ase_calculator import ANNCalculator

In [3]: import ase

In [4]: import ase.spacegroup

In [5]: import ase.visualize

In [6]: atoms = ase.io.read("structure4536.xsf")

In [7]: ase.io.write('tio2.traj', atoms)

In [8]: ase.io.write('tio2.png', atoms)

In [9]: pot = {"Ti": "Ti.15t-15t.nn-04885", "O": "O.15t-15t.nn-04885"}

In [10]: calc = ANNCalculator(pot)

double free or corruption (out)

Looks like the calculator is not able to load the potentials. I tested with my own generated potential and also the one provided in the TiO2 example. Both crashed at the same point.

I think it may be some software version. All my system is updated. Is there any limit to python or ase?

Sorry about this.

Best,
Daniel

Nongnuch Artrith

unread,
Apr 14, 2021, 2:04:28 PM4/14/21
to Daniel Massote, aenet
Hi Daniel,

The commands from the Google Colab notebook are not meant to be run in your own IPython terminal, since they download and compile aenet and the Python interface. I would recommend first running the notebook from within Google Colab.

The example uses Python 3 and the most recent version of ASE.

Best,
Nong


--
You received this message because you are subscribed to the Google Groups "aenet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aenet+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aenet/e02c0193-15b5-42ea-9bab-6b391e856b67n%40googlegroups.com.

Daniel Massote

unread,
Apr 14, 2021, 2:52:26 PM4/14/21
to aenet
Thanks for helping out.

Best,
Daniel
Reply all
Reply to author
Forward
0 new messages