EX01 and Topological Error

453 views
Skip to first unread message

Carlo Nervi

unread,
Nov 10, 2020, 8:06:48 AM11/10/20
to USPEX
Dear USPEX community,
I'm very glad to see that USPEX has been updated to 10.4 which finally includes python3, which is very good because the end of life of python2.7.
I did, on my personal copy, the port of USPEX 10.3 to be used with python3.
It is not clear to me whether passing from python2.7 to python3 (in my case 3.7, but also 3.8 and 3.9 are available in my Linux Gentoo) is smooth or not.

I'm doing the test on EX01 and the error reported below appears to be related to the use  of numpy, particularly the module numpy.random. In particular I have no idea of compatibilty between the numpy 1.16 .6 (the last version compatible with python2.7) and numpy 1.19.1 (used with python3.7). Does the random module changed?
Similarly ase changed from 3.17.0 to 3.20.1

Anyway,  EX01 generates all 20 structures, but appear the error below:
Error using python_uspex (line 91)
System error: Traceback (most recent call last):
  File "/opt/USPEX104/application/archive/src/FunctionFolder/random_topology.py", line 3, in <module>
    from randomTopology import generate_structure
  File "randomTopology.py", line 4, in init randomTopology
  File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 151, in <module>
    from . import random
  File "/usr/lib/python3.7/site-packages/numpy/random/__init__.py", line 179, in <module>
    from . import _pickle
  File "/usr/lib/python3.7/site-packages/numpy/random/_pickle.py", line 1, in <module>
    from .mtrand import RandomState
  File "mtrand.pyx", line 1, in init numpy.random.mtrand
  File "bit_generator.pyx", line 1, in init numpy.random.bit_generator
TypeError: Shared Cython type generator has the wrong size, try recompiling

Command executed: python3 -W ignore /opt/USPEX104/application/archive/src/FunctionFolder/random_topology.py 0 118.8 NONE 1 8

Error in random_topology (line 10)


Error in Random_Init_300 (line 52)


Error in initialize_POP_STRUC_300 (line 36)


Error in Initialize (line 46)


Error in Start (line 46)


Error in USPEX (line 39)

MATLAB:python:ExecutionError


I would appreciate any hints.
Carlo


 

reni....@gmx.de

unread,
Nov 11, 2020, 3:11:50 PM11/11/20
to USPEX
I've got the same problem, when trying to calculate EX01. I tried to execute random_topology.py directly and got the error:
/opt/software/easybuild/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module 'randomTopology' does not match runtime version 3.7
I don't know if that helps but i would like to know the solution to this problem as well.
Best Regards,
Reni


Carlo Nervi

unread,
Nov 11, 2020, 6:50:00 PM11/11/20
to USPEX
Ok. I did some tests today, using docker. In this way I create e new clean environment.
I created two images with Docker, using debian as starting distribution.
The two version differs only for python3.6 or python 3.7
Than I run example02, EX02
python3.7 stops after 22 structures genetared (in log):
Error using python_uspex (line 91)
System error: Traceback (most recent call last):
  File "/archive/home/cnervi/bin/USPEX104/application/archive/src/FunctionFolder/random_topology.py", line 3, in <module>
    from randomTopology import generate_structure
  File "randomTopology.py", line 4, in init randomTopology
  File "/usr/local/lib/python3.7/dist-packages/numpy/__init__.py", line 151, in <module>
    from . import random
  File "/usr/local/lib/python3.7/dist-packages/numpy/random/__init__.py", line 179, in <module>
    from . import _pickle
  File "/usr/local/lib/python3.7/dist-packages/numpy/random/_pickle.py", line 1, in <module>
    from .mtrand import RandomState
  File "mtrand.pyx", line 1, in init numpy.random.mtrand
  File "bit_generator.pyx", line 1, in init numpy.random.bit_generator
TypeError: Shared Cython type generator has the wrong size, try recompiling

Command executed: python3 -W ignore /archive/home/cnervi/bin/USPEX104/application/archive/src/FunctionFolder/random_topology.py 0 217.56 NONE 3 4   8  16

Error in random_topology (line 10)


Error in Random_Init_300 (line 52)


Error in initialize_POP_STRUC_300 (line 36)


Error in Initialize (line 46)


Error in Start (line 46)


Error in USPEX (line 39)

MATLAB:python:ExecutionError



python3.6 after generating 22 structures does not stop, but generates several errors:
...
Structure 18 built with space group 100 (P4bm)
Structure 19 built with space group 200 (Pm-3)
Structure 20 built with space group 160 (R3m)
Structure 21 built with space group 8 (Am)
Structure 22 built with space group 84 (P4_2/m)
Opps: Size of coordinates <> sum(numIons)!
Coordinates:
0.000 0.000 0.000
composition:
4   8  16
Opps: Size of coordinates <> sum(numIons)!
Coordinates:
0.000 0.000 0.000
composition:
4   8  16



Therefore now I'm pretty sure there an incompatibility between USPEX 10.4 e a particular version of python3, probably connected with to the compilation of randomTopology.so

I guess there is the urgency to solve this problem. At the moment I can work only excluding the Topology part setting fracTopRand to 0.0.
Carlo

Aaron Bain

unread,
Nov 15, 2020, 3:03:39 AM11/15/20
to USPEX
I had the same problems with python 3.6-7. It seems to work with python 3.5. I set up an anaconda env using python 3.5 and the random topology generator worked fine.

Adam Carlsson

unread,
Nov 19, 2020, 10:34:53 AM11/19/20
to USPEX
I have the same error for USPEX 10.4. 
Before I start mixing around with different python versions and solutions, I was wondering if anyone has been updated on this situation? 

Adam Carlsson

unread,
Nov 26, 2020, 4:27:05 PM11/26/20
to USPEX
I belive one solution to this may be to set the fracTopRand to zero in the variational operators. 
0 : fracTopRand

As it is 0.2 in defult USPEX 10.4. 
Please try this. 
Reply all
Reply to author
Forward
0 new messages