gcsosso / SOAP_GAS

A genetic algorithm to optimise the SOAP descriptor
2 stars 4 forks source link

segmentation fault when running "python genAlg.py input" #3

Open JoeyTYW opened 1 year ago

JoeyTYW commented 1 year ago

Hi all

I am just trying out the code using the input.py, database and xyz in the "EXAMPLES" directory. When running it I get these printed out: _[{'lower': 2, 'upper': 6, 'centres': '{8, 7, 6, 1, 16, 17, 9}', 'neighbours': '{8, 7, 6, 1, 16, 17, 9}', 'mu': 0, 'mu_hat': 0, 'nu': 2, 'nu_hat': 0, 'average': True, 'mutationChance': 0.15, 'min_cutoff': 5, 'max_cutoff': 10, 'min_sigma': 0.1, 'max_sigma': 0.5}] Getting SOAPS for ['soap average cutoff=8 l_max=4 n_max=3 atom_sigma=0.34 n_Z=7 Z={8, 7, 6, 1, 16, 17, 9} n_species=7 species_Z={8, 7, 6, 1, 16, 17, 9} mu=0 mu_hat=0 nu=2 nuhat=0'] zsh: segmentation fault python genAlg.py input

And in the output_input.txt file i get the outputs: _Starting genetic algorithm with the following parameters: Population size: 12 Sample size of best individuals: 6 Sample size of lucky individuals: 2 Number of children: 3 The descriptor parameters being used are: [{'lower': 2, 'upper': 6, 'centres': '{8, 7, 6, 1, 16, 17, 9}', 'neighbours': '{8, 7, 6, 1, 16, 17, 9}', 'mu': 0, 'mu_hat': 0, 'nu': 2, 'nu_hat': 0, 'average': True, 'mutationChance': 0.15, 'min_cutoff': 5, 'max_cutoff': 10, 'min_sigma': 0.1, 'maxsigma': 0.5}] Generating random values for initial population

I am wondering if anyone has an idea for why i get zsh: segmentation fault python genAlg.py input. Below are my packages and versions relevant to running SOAP_GAS:

Name Version Build Channel ase 3.22.1 pypi_0 pypi quippy 0.3.3 pypi_0 pypi quippy-ase 0.9.12 pypi_0 pypi scikit-learn 1.2.1 pypi_0 pypi scipy 1.10.1 pypi_0 pypi

Any help would be appreciated, thanks!

gcsosso commented 1 year ago

Hi @JoeyTYW ,

thanks for getting in touch - and apologies for being slow!

There is an issue related to the compression within the current version of quippy. We are in contact with the quippy developers, bear with us please. In the meantime, we have pushed a few changes that should allow for a workaround, but the syntax will change, hence - again - please bear with us as we update the docs.

JoeyTYW commented 1 year ago

Hi @gcsosso

Thanks for getting back to me! Is there a rough timeline for when i can expect the updated code to be available Thanks

gcsosso commented 1 year ago

Hi @JoeyTYW ,

thank you for your patience. We have identified the issue, which indeed appears to be with quippy. The developers of the latter are looking into it - I would estimate one or two weeks before everything is sorted. Thank you for raising this issue, as you can see it's part of a larger issue with quippy itself, so definitely worth sorting out!

gcsosso commented 1 year ago

Hi @JoeyTYW ,

it looks like the issue with the pip-installed version of quippy runs a bit deeper than we anticipated. As a temporary workaround, could you please compile quippy from source instead? A typical set of instructions to do so on, e.g., a Linux workstation would look like:

$ git clone --recursive https://github.com/libAtoms/QUIP.git
$ cd QUIP/src
$ rm -rf GAP
$ git clone --recursive https://github.com/JPDarby/GAP.git
$ export QUIP_ARCH=linux_x86_64_gfortran # on a typical Linux workstation
$ cd ..
$ make config

Do _not_ accept the default linking options for BLAS and LaPACK. Instead specify:

-lopenblas

Accept the default options for every option offered interactively _except GAP support_: specify yes (y) in that case.

$ make
$ make quippy
$ QUIPPY_INSTALL_OPTS=--user make install-quippy

At that point, you should be able to run the GA code with no issues. Note that we have updated the documentation to reflect the new syntax re: the usage of compression options. I hope this helps - let me know how you get along with the code!