libAtoms / QUIP

libAtoms/QUIP molecular dynamics framework: https://libatoms.github.io
349 stars 122 forks source link

Error in fedora installation: foxlibs Error 1 #273

Open vishankkumar opened 3 years ago

vishankkumar commented 3 years ago

Hi,

I was trying to compile quippy (without GAP) basic installation that worked a few weeks ago but now it is failing with the fox/error. I am using x86_64_gfortran architecture on fedora system with GCC version of GNU Fortran (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9). I have also attached the src/fox/config.log file to easily point out the error.

Thanks for your help in advance. config.log

gabor1 commented 3 years ago

when you say "failing with the fox/error" what sort of error is that? can you past the complete output of the make?

did you git clone QUIP with --recursive option ? that brings the correct version of FoX.

-- Gábor

Gábor Csányi Professor of Molecular Modelling Engineering Laboratory, University of Cambridge Pembroke College Cambridge

Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/

On 25 Jan 2021, at 15:34, Vishank Kumar notifications@github.com wrote:

Hi,

I was trying to compile quippy (without GAP) basic installation that worked a few weeks ago but now it is failing with the fox/error. I am using x86_64_gfortran architecture on fedora system with GCC version of GNU Fortran (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9). I have also attached the src/fox/config.log file to easily point out the error.

Thanks for your help in advance. config.log

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

vishankkumar commented 3 years ago

Yes, I did cloned with --recursive option. The exact error I am getting while make is: checking for EOR character used by gfortran... configure: error: Could not execute compiled program make[1]: *** [Makefile.QUIP:29: foxlibs] Error 1 make[1]: Leaving directory '/home/vishank-hp/github/QUIP/src/fox' make: *** [Makefile:140: src/fox/objs.linux_x86_64_gfortran/lib/libFoX_common.a] Error 2

vishankkumar commented 3 years ago

I did git submodule foreach --recursive git submodule update --init again and did make deepclean followed by make on a single processor and it worked. While it was throwing errors with make -j4.

However, now, after make install, make quippy and make install-quippy, which compiled properly but while doing import quippy, it gives the following import error: ImportError: /home/vishank-hp/miniconda3/envs/quip/lib/python3.7/site-packages/quippy-https_github.com_libAtoms_QUIP.git_d467b6c92_dirty-py3.7-linux-x86_64.egg/_quippy.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _gfortran_os_error_at.

Any idea if I am missing something, just to tell you I am using python 3.7.8

gabor1 commented 3 years ago

does quip (without the python) work correctly?

-- Gábor

Gábor Csányi Professor of Molecular Modelling Engineering Laboratory, University of Cambridge Pembroke College Cambridge

Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/

On 27 Jan 2021, at 12:02, Vishank Kumar notifications@github.com wrote:

I did git submodule foreach --recursive git submodule update --init again and did make deepclean followed by make on a single processor and it worked. While it was throwing errors with make -j4.

However, now, after make install, make quippy and make install-quippy, which compiled properly but while doing import quippy, it gives the following import error: ImportError: /home/vishank-hp/miniconda3/envs/quip/lib/python3.7/site-packages/quippy-https_github.com_libAtoms_QUIP.git_d467b6c92_dirty-py3.7-linux-x86_64.egg/_quippy.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _gfortran_os_error_at.

Any idea if I am missing something, just to tell you I am using python 3.7.8

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

vishankkumar commented 3 years ago

@gabor1 , it is running fine but some syntax error, might be some change in the code. I tried this: quip atoms_filename=test.xyz init_args=’IP LJ’ param_filename=~/github/QUIP/share/Parameters/ip.parms.LJ.xml E Output: libAtoms::Hello World: 27/01/2021 14:31:28 libAtoms::Hello World: git version https://github.com/libAtoms/QUIP.git,d467b6c-dirty libAtoms::Hello World: QUIP_ARCH linux_x86_64_gfortran libAtoms::Hello World: compiled on Jan 27 2021 at 11:37:52 libAtoms::Hello World: Random Seed = 52288258 libAtoms::Hello World: global verbosity = 0 Calls to system_timer will do nothing by default param_read_line: unknown key LJ Usage: quip [atoms_filename=file(stdin)] [param_filename=file(quip_params.xml)] [E|energy] [F|forces] [V|virial] ... There are lots of other options, typequip --help' for a full list. SYSTEM ABORT:`

It cannot find LJ keyword for Lennard-Jones though I double checked the parameter.

Moreover, just a note, I guess in the current version at_file has been replaced with atoms_filename, but is not updated in the documentation. Thanks for your help in advance

vishankkumar commented 3 years ago

By mistake I added wrong commas in init_args=’IP LJ’ instead of init_args='IP LJ' and now it works fine. So quip is working without python.

gabor1 commented 3 years ago

ok. can you verify that the c compiler you choose in the QUIP/quippy make process is the same as the one cpython expects?

-- Gábor

Gábor Csányi Professor of Molecular Modelling Engineering Laboratory, University of Cambridge Pembroke College Cambridge

Pembroke College supports CARA. A Lifeline to Academics at Risk. http://www.cara.ngo/

On 27 Jan 2021, at 14:37, Vishank Kumar notifications@github.com wrote:

By mistake I added wrong commas in init_args=’IP LJ’ instead of init_args='IP LJ' and now it works fine. So quip is working without python.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

vishankkumar commented 3 years ago

Are you referring to this mismatch, my gcc --version gives: gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) but python is compiled with: Python 3.9.1 | packaged by conda-forge | (default, Jan 26 2021, 01:34:10) [GCC 9.3.0] on linux

I have now updated my python and again make everything and now quippy import is showing a different error: import quippy ImportError: dynamic module does not define module export function (PyInit__quippy)

jameskermode commented 3 years ago

Can you try with Python 3.7 or 3.8 if possible? 3.9 is quite new and breaks compatibility in some cases.

vishankkumar commented 3 years ago

I tried with Python 3.6.12, and on import quippy returns the previous error:

ImportError:..../quippy-https_github.com_libAtoms_QUIP.git_d467b6c92_dirty-py3.6-linux-x86_64.egg/_quippy.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _gfortran_os_error_at

and with python 3.7.9 as well, the same error of gfortran_os_erro_at

jameskermode commented 3 years ago

That looks like a missing -lgfortran on the link line for _quippy.so. You can add this by setting a QUIPPY_LIBS Makefile variable in your Makefile.inc

vishankkumar commented 3 years ago

@jameskermode Thanks for your suggestion, I tried that as well and now apparently I am getting a new error. Another thing I did was to clean up previous quippy installation, I removed all the files and made a clean installation with python 3.7. and now after import quippy I am getting this error:

ImportError: dynamic module does not define module export function (PyInit__quippy)

jameskermode commented 3 years ago

This looks to me like a mixture of Python 2 and 3 versions. Double check what is being used to compile quippy (PYTHON Makefile option) and what you are using to load the module.

vishankkumar commented 3 years ago

@jameskermode I double checked, I am only using python 3, python 3.7.9, was used for compiling quippy and I am using the same for importing quippy.