[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] Error in python code checks
From: |
Henri Menke |
Subject: |
Re: [ESPResSo-users] Error in python code checks |
Date: |
Thu, 29 Mar 2018 12:57:42 +1300 |
On Wed, 2018-03-28 at 20:55 +0200, Michael Klatt wrote:
> Dear all,
>
> I am new user of ESPResSo. Unfortunately, I can only run the TCL
> scripts, but pypresso causes errors that I cannot resolve on my own.
>
> Is there a TCL counterpart of the python minimize_energy functionality?
> If not may I ask for your help to resolve my problems with pypresso?
> Thank you very much!
>
> In the following, I summarize the error reports (full error reports are
> included in the postscript).
>
> I am using Xubuntu 16.04. Neither the latest release (3.3.1) of ESPResSo
> nor cloning the python branch on GitHub worked. Resolving the problems
> for any of the two would suffice.
I just compiled ESPResSo on a naked Ubuntu 16.04 to see if I can reproduce your
issue, but I couldn't. Here are my steps:
apt-get update
apt-get install build-essential cmake git openmpi-bin libfftw3-dev libboost-dev
libboost-serialization-dev libboost-mpi-dev libboost-filesystem-dev
libboost-test-dev cython python python-numpy python-h5py python-enum
libhdf5-openmpi-dev libhdf5-openmpi-10 libhdf5-10
git clone https://github.com/espressomd/espresso.git
cd espresso/
mkdir build
cd build/
cmake ..
make -j 16
Then I can run ./pypresso
>>> import espressomd
>>> print(espressomd.features())
['BOND_ANGLE', 'BUCKINGHAM', 'COLLISION_DETECTION', 'CONSTRAINTS',
'ELECTROSTATICS', 'EXCLUSIONS', 'EXTERNAL_FORCES', 'FFTW', 'GAUSSIAN',
'GHOSTS_HAVE_BONDS', 'H5MD', 'HERTZIAN', 'LANGEVIN_PER_PARTICLE', 'LATTICE',
'LB', 'LB_BOUNDARIES', 'LENNARD_JONES', 'LENNARD_JONES_GENERIC', 'LJCOS',
'LJCOS2', 'MASS', 'MORSE', 'NPT', 'P3M', 'PARTIAL_PERIODIC', 'SOFT_SPHERE',
'TABULATED']
> -------------------------------------------------------------------------
>
> (1) When I compiled the latest release (3.3.1), "import espressomd"
> causes no problems, but "print(espressomd.features())" throws an error:
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'features'
>
> -------------------------------------------------------------------------
>
> (2) Last week, I have cloned the python branch of ESPResSo and followed
> the instructions for installation from the ESPResSo documentation.
>
> "make install" was completed without errors.
> However, "make check" reported a problem:
> undefined reference to `boost::mpi::communicator::operator int() const'
>
> When I import espressomd in "pypresso", the following error is reported:
> libcluster_analysis.so.4: undefined symbol:
> _ZNK5boost3mpi12communicatorcviEv
>
> -------------------------------------------------------------------------
>
> Thank you very much once more for your help!
>
> Best regards,
>
> Michael
>
> -------------------------------------------------------------------------
>
> P.S. Error when invoking code checks:
>
> $ make check
> [ 2%] Built target myconfig
> [ 2%] Built target check_myconfig
> [ 2%] Built target EspressoConfig
> [ 2%] Built target link_cell_test
> [ 2%] Built target Cache_test
> [ 2%] Built target None_test
> [ 2%] Linking CXX executable all_compare_test
> CMakeFiles/all_compare_test.dir/all_compare_test.cpp.o: In function
> `bool Utils::Mpi::all_compare<int>(boost::mpi::communicator const&, int
> const&)':
> all_compare_test.cpp:(.text._ZN5Utils3Mpi11all_compareIiEEbRKN5boost3mpi12comm
> unicatorERKT_[_ZN5Utils3Mpi11all_compareIiEEbRKN5boost3mpi12communicatorERKT_]
> +0x3e):
> undefined reference to `boost::mpi::communicator::operator int() const'
> all_compare_test.cpp:(.text._ZN5Utils3Mpi11all_compareIiEEbRKN5boost3mpi12comm
> unicatorERKT_[_ZN5Utils3Mpi11all_compareIiEEbRKN5boost3mpi12communicatorERKT_]
> +0xa2):
> undefined reference to `boost::mpi::communicator::operator int() const'
> collect2: error: ld returned 1 exit status
> src/core/unit_tests/CMakeFiles/all_compare_test.dir/build.make:121:
> recipe for target 'src/core/unit_tests/all_compare_test' failed
> make[3]: *** [src/core/unit_tests/all_compare_test] Error 1
> CMakeFiles/Makefile2:1510: recipe for target
> 'src/core/unit_tests/CMakeFiles/all_compare_test.dir/all' failed
> make[2]: *** [src/core/unit_tests/CMakeFiles/all_compare_test.dir/all]
> Error 2
> CMakeFiles/Makefile2:107: recipe for target 'CMakeFiles/check.dir/rule'
> failed
> make[1]: *** [CMakeFiles/check.dir/rule] Error 2
> Makefile:186: recipe for target 'check' failed
> make: *** [check] Error 2
>
> -------------------------------------------------------------------------
>
> P.P.S. Error when importing espressomd in "pypresso":
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.7/site-packages/espressomd/__init__.py",
> line 23, in <module>
> import espressomd._init
> ImportError: /home/mklatt/[...path to
> espresso...]/espresso/build/src/core/cluster_analysis/libcluster_analysis.so.4
> :
> undefined symbol: _ZNK5boost3mpi12communicatorcviEv
>
>