espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] 回复: 回复: 回复: 回复: Problem with installation of espre


From: Shawn
Subject: Re: [ESPResSo-users] 回复: 回复: 回复: 回复: Problem with installation of espresso-4.1.0
Date: Fri, 4 Oct 2019 12:40:16 -0500

Hi JN, 
I can install espresso-4.1.0 successfully by following your suggestions. Thanks very much. I really appreciate your patience.
Have a good weekend.

Best,
Shawn


Jean-Noël Grad <address@hidden> 于2019年10月4日周五 上午11:37写道:
Hi Shawn,

If you do "echo $PYTHONPATH" and get something like
"/home/zhsh/.local/lib/python3.6/site-packages:" (note the trailing
colon symbol), it means your PYTHONPATH points to both
"/home/zhsh/.local/lib/python3.6/site-packages" and "" (an empty string,
which is interpreted as the current directory where python is launched).
If this is the case, simply modify your .bashrc file as explained in
https://github.com/espressomd/espresso/issues/3149#issuecomment-529974793
to fix the PYTHONPATH variable and the Py_Initialize error should disappear.

Best,
JN

On 10/4/19 6:27 PM, Shawn wrote:
> Hi JN,
>
> I just tried to use another version of gcc (6.3.1), the result seemed
> better. But I got an error similar to I posted in July:
>
> [ 58%] Generating code_info.pyx
>
> Fatal Python error: Py_Initialize: can't initialize sys standard streams
>
> Traceback (most recent call last):
>
>    File
> "/home/zhsh/sourcecode/espresso410/espresso/src/python/espressomd/io/__init__.py",
> line 17, in <module>
>
>    File
> "/home/zhsh/sourcecode/espresso410/espresso/src/python/espressomd/io/writer/__init__.py",
> line 17, in <module>
>
> ValueError: attempted relative import beyond top-level package
>
> /bin/sh: line 1: 72159 Aborted                 (core dumped)
> /home/zhsh/soft/python3/bin/python3 gen_code_info.py
> /home/zhsh/sourcecode/espresso410/espresso/src/config/features.def
> /home/zhsh/sourcecode/espresso410/espresso/build/src/python/espressomd/code_info.pyx
>
> make[2]: *** [src/python/espressomd/code_info.pyx] Error 134
>
> make[1]: ***
> [src/python/espressomd/CMakeFiles/espressomd_code_info.dir/all] Error 2
>
> make: *** [all] Error 2
>
> and the patch file you uploaded before doesn’t work now. Could you help
> me to fix this problem?
>
> Thank you very much.
>
> Best,
>
> Shawn
>
> *发件人: *Jean-Noël Grad <mailto:address@hidden>
> *发送时间: *2019年10月4日5:52
> *收件人: *address@hidden <mailto:address@hidden>
> *主题: *Re: [ESPResSo-users] 回复: 回复: 回复: Problem with installation
> of espresso-4.1.0
>
> Hi,
>
> I'm using cmake 3.10.2 on Ubuntu 18.04 and cmake 3.14.6 on CentOS 7 with
>
> devtoolset 6.
>
> Your FFTW3 error is reproducible on CentOS 7 by doing this: "cmake ..;
>
> mv /usr/include/fftw3.h /usr/include/fftw3.h.bak; make -j12". Not sure
>
> why in your environment cmake detects fftw3.h but not your compiler.
>
> Maybe try this: locate the path to the FFTW3 header file with command
>
> 'find /usr/include -name "fftw3.h"', you should get something like
>
> /usr/include/fftw3.h, then only provide the directory name as an include
>
> path for your compiler with 'cmake .. -DCMAKE_CXX_FLAGS="-isystem
>
> /usr/include/"'. It works on my CentOS 7 when I have FFTW3 installed in
>
> another place than the standard /usr/include/fftw3.h (CMake will
>
> complain it can't find FFTW3, but the compiler directly gets the path so
>
> compilation works).
>
> Best,
>
> JN
>
> On 10/4/19 12:18 AM, Shawn wrote:
>
>> Hi JN,
>
>>
>
>> After I updated gcc, the Cmake returned a “0” code with the command line
>
>> “echo $?” and I didn’t use your patch when I tried to install
>
>> espresso-4.1.0. As you mentioned, it might be my espresso directory was
>
>> not clean. So I deleted the whole directory, unpacked the package and
>
>> rebuilt it again. But error was still there, fftw3.h isn't found.
>
>>
>
>> Anyway, thanks very much JN, and I really appreciate your help. Could
>
>> you tell me which version of cmake you use?
>
>>
>
>> Best,
>
>>
>
>> Shawn
>
>>
>
>> *发件人: *Jean-Noël Grad <mailto:address@hidden>
>
>> *发送时间: *2019年10月3日16:25
>
>> *收件人: *address@hidden <mailto:address@hidden>
>
>> *主题: *Re: [ESPResSo-users] 回复: 回复: Problem with installation of
>
>> espresso-4.1.0
>
>>
>
>> Hi Shawn,
>
>>
>
>> You won't be able to compile espresso if CMake returns a non-zero error
>
>>
>
>> code. You can show the error code with the command line "echo $?", once
>
>>
>
>> the "cmake .." command has completed ($? is a variable that stores the
>
>>
>
>> error code of the previous command). I do not understand how you were
>
>>
>
>> able to run the compiler when CMake failed: when I reproduce your CMake
>
>>
>
>> error message by renaming the src/python/espressomd/io directory to
>
>>
>
>> src/python/espressomd/io_, the command "make -j12" fails because the
>
>>
>
>> Makefile runs CMake first, sees the error code is 1, and stops.
>
>>
>
>> If you renamed the io directory using my patch from July, please know it
>
>>
>
>> isn't necessary anymore. We found out the source of the issue with
>
>>
>
>> Python standard streams is caused by a malformed export command in the
>
>>
>
>> "${HOME}/.bashrc" file. You can find the explanation and a clean
>
>>
>
>> solution here:
>
>>
>
>> https://github.com/espressomd/espresso/issues/3149#issuecomment-529974793
>
>>
>
>> I'm not sure why fftw3.h isn't found by the compiler given CMake found
>
>>
>
>> it. It could be that you ran "cmake .." in a build directory that still
>
>>
>
>> contained files from a previous build. I has never been an issue for us,
>
>>
>
>> but apparently your CMake program doesn't seem to correctly overwrite
>
>>
>
>> old files. It could be a good idea to always clean your build directory
>
>>
>
>> before attempting a new build. You probably also should replace the
>
>>
>
>> content of /home/zhsh/sourcecode/espresso410/espresso by a fresh copy of
>
>>
>
>> the espresso source code, because src/python/espressomd/io is now either
>
>>
>
>> renamed or missing.
>
>>
>
>> Best,
>
>>
>
>> JN
>
>>
>
>> On 10/3/19 10:15 PM, Shawn wrote:
>
>>
>
>>> Hi JN,
>
>>
>
>>> Thanks for your help. I've updated my gcc to version 7.3.1 and I can
>
>>
>
>>> pass the configuring process. But I got a new error below:
>
>>
>
>>>
>
>>
>
>>> [ 50%] Building CXX object
>
>>
>
>>> src/core/cluster_analysis/CMakeFiles/cluster_analysis.dir/ClusterStructure.cpp.o
>
>>
>
>>> In file included from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/electrostatics_magnetostatics/p3m.hpp:58:0,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/electrostatics_magnetostatics/coulomb_inline.hpp:32,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/bonded_interactions/bonded_coulomb_sr.hpp:36,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/energy_inline.hpp:61,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/pair_criteria/pair_criteria.hpp:22,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/cluster_analysis/ClusterStructure.hpp:23,
>
>>
>
>>>                   from
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/cluster_analysis/ClusterStructure.cpp:19:
>
>>
>
>>> /home/zhsh/sourcecode/espresso410/espresso/src/core/electrostatics_magnetostatics/fft.hpp:51:10:
>
>>
>
>>> fatal error: fftw3.h: No such file or directory
>
>>
>
>>>   #include <fftw3.h>
>
>>
>
>>>            ^~~~~~~~~
>
>>
>
>>> compilation terminated.
>
>>
>
>>> make[2]: ***
>
>>
>
>>> [src/core/cluster_analysis/CMakeFiles/cluster_analysis.dir/ClusterStructure.cpp.o]
>
>>
>
>>> Error 1
>
>>
>
>>> make[1]: ***
>
>>
>
>>> [src/core/cluster_analysis/CMakeFiles/cluster_analysis.dir/all] Error 2
>
>>
>
>>> make: *** [all] Error 2
>
>>
>
>>>
>
>>
>
>>> It seems that there's something wrong with my fftw library. But I can
>
>>
>
>>> install espresso-4.0.2 with fftw successfully. Do you have any
>
>>
>
>>> suggestions for solving this problem?
>
>>
>
>>> Attached please find the output of cmake.
>
>>
>
>>>
>
>>
>
>>> Best,
>
>>
>
>>> Shawn
>
>>
>
>>>
>
>>
>
>>> Jean-Noël Grad <address@hidden
>
>>
>
>>> <mailto:address@hidden>> 于2019年10月3日周四 下午12:06写道:
>
>>
>
>>>
>
>>
>
>>>     Hi Shawn,
>
>>
>
>>>
>
>>
>
>>>     I just tried compiling espresso 4.1 on CentOS 7 with CMake 3.14.6
>
>>
>
>>>     with a
>
>>
>
>>>     C++ standard not recognized by my gcc v6.3.1 and CMake did throw a long
>
>>
>
>>>     list of errors messages: "Target ... requires the language dialect
>
>>
>
>>>     CXX..
>
>>
>
>>>     but CMake does not know the compile flags to use to enable it". The
>
>>
>
>>>     return code is 1. I can't figure out why your version of CMake doesn't
>
>>
>
>>>     show that error nor display the compiler name and version.
>
>>
>
>>>
>
>>
>
>>>     In any case, you'll need to install a newer version of gcc, version
>
>>
>
>>>     4.9.0 or later, to compile espresso 4.1.
>
>>
>
>>>
>
>>
>
>>>     Best,
>
>>
>
>>>     JN
>
>>
>
>>>
>
>>
>
>>>     On 10/3/19 6:18 PM, Shawn wrote:
>
>>
>
>>>      > Hi JN,
>
>>
>
>>>      >
>
>>
>
>>>      > My gcc version is 4.8.5, and my cmake version is 3.14.5. So I should
>
>>
>
>>>      > update my gcc to newer version?
>
>>
>
>>>      >
>
>>
>
>>>      > Regards,
>
>>
>
>>>      >
>
>>
>
>>>      > Shawn
>
>>
>
>>>      >
>
>>
>
>>>      > *发件人: *Jean-Noël Grad <mailto:address@hidden
>
>>
>
>>>     <mailto:address@hidden>>
>
>>
>
>>>      > *发送时间: *2019年10月3日11:11
>
>>
>
>>>      > *收件人: *address@hidden
>
>>
>
>>>     <mailto:address@hidden>
>
>>
>
>>>     <mailto:address@hidden
>
>>
>
>>>     <mailto:address@hidden>>
>
>>
>
>>>      > *主题: *Re: [ESPResSo-users] 回复: Problem with installation of
>
>>
>
>>>      > espresso-4.1.0
>
>>
>
>>>      >
>
>>
>
>>>      > Hi Shawn,
>
>>
>
>>>      >
>
>>
>
>>>      > It looks like your compiler doesn't know the C++14 standard. For
>
>>
>
>>>     example:
>
>>
>
>>>      >
>
>>
>
>>>      >  > /home/zhsh/sourcecode/espresso/src/utils/include/utils/Vector.hpp:
>
>>
>
>>>      >
>
>>
>
>>>      >  >   error: parameter declared ‘auto’
>
>>
>
>>>      >
>
>>
>
>>>      >  >                   [](auto ai, auto bi) { return ai * bi; });
>
>>
>
>>>      >
>
>>
>
>>>      >  >                           ^
>
>>
>
>>>      >
>
>>
>
>>>      >  >   error: parameter declared ‘auto’
>
>>
>
>>>      >
>
>>
>
>>>      >  >                   [](auto ai, auto bi) { return ai * bi; });
>
>>
>
>>>      >
>
>>
>
>>>      >  >                                    ^
>
>>
>
>>>      >
>
>>
>
>>>      >  >   error: ‘ai’ was not declared in this scope
>
>>
>
>>>      >
>
>>
>
>>>      >  >                   [](auto ai, auto bi) { return ai * bi; });
>
>>
>
>>>      >
>
>>
>
>>>      >  >                                                 ^
>
>>
>
>>>      >
>
>>
>
>>>      >  >   error: ‘bi’ was not declared in this scope
>
>>
>
>>>      >
>
>>
>
>>>      >  >                   [](auto ai, auto bi) { return ai * bi; });
>
>>
>
>>>      >
>
>>
>
>>>      >  >                                                      ^
>
>>
>
>>>      >
>
>>
>
>>>      > can be reproduced with gcc v4.8.5. Many of the other error
>
>>
>
>>>     messages can
>
>>
>
>>>      >
>
>>
>
>>>      > be reproduced by more recent gcc versions with the C++11 flag. The
>
>>
>
>>>      >
>
>>
>
>>>      > minimal gcc version needed for espresso 4.1 is v4.9.0. Our build
>
>>
>
>>>     system
>
>>
>
>>>      >
>
>>
>
>>>      > does not check for compiler version numbers, instead it checks the
>
>>
>
>>>      >
>
>>
>
>>>      > compiler is C++14-capable. I'm not sure why CMake did not fail. Also,
>
>>
>
>>>      >
>
>>
>
>>>      > the CMake output should have shown a line with the compiler
>
>>
>
>>>     version, or
>
>>
>
>>>      >
>
>>
>
>>>      > the string "The CXX compiler identification is unknown".
>
>>
>
>>>      >
>
>>
>
>>>      > Could you please share with us your CMake version and gcc
>
>>
>
>>>     version? The
>
>>
>
>>>      >
>
>>
>
>>>      > command lines are "gcc --version" and "cmake --version". If this
>
>>
>
>>>     is an
>
>>
>
>>>      >
>
>>
>
>>>      > issue in CMake, we will have to add a few lines in our build system.
>
>>
>
>>>      >
>
>>
>
>>>      > Best,
>
>>
>
>>>      >
>
>>
>
>>>      > JN
>
>>
>
>>>      >
>
>>
>
>>>      > On 10/3/19 5:22 PM, Shawn wrote:
>
>>
>
>>>      >
>
>>
>
>>>      >> Hi JN,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> As you mentioned in your reply, I deleted the old folder of 4.0.2,
>
>>
>
>>>      >
>
>>
>
>>>      >> unpacked the files of  4.1.0 and tried to reinstall the newest
>
>>
>
>>>     package,
>
>>
>
>>>      >
>
>>
>
>>>      >> but the errors still existed during the compilation. Attached
>
>>
>
>>>     please
>
>>
>
>>>      >
>
>>
>
>>>      >> find the output.
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Mainly two problems:
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> 1 fatal: Not a git repository (or any of the parent
>
>>
>
>>>     directories): .git
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> 2 At global scope:
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> cc1plus: warning: unrecognized command line option
>
>>
>
>>>      >
>
>>
>
>>>      >> "-Wno-cast-function-type" [enabled by default]
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> make[2]: *** [src/core/CMakeFiles/EspressoCore.dir/cells.cpp.o]
>
>>
>
>>>     Error 1
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> make[1]: *** [src/core/CMakeFiles/EspressoCore.dir/all] Error 2
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> make: *** [all] Error 2
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Could you help me to figure out what’s the reason why I failed ?
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Thank  you very much.
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Best,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Shawn
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> *发件人: *Jean-Noël Grad <mailto:address@hidden
>
>>
>
>>>     <mailto:address@hidden>>
>
>>
>
>>>      >
>
>>
>
>>>      >> *发送时间: *2019年10月2日17:19
>
>>
>
>>>      >
>
>>
>
>>>      >> *收件人: *address@hidden
>
>>
>
>>>     <mailto:address@hidden>
>
>>
>
>>>     <mailto:address@hidden
>
>>
>
>>>     <mailto:address@hidden>>
>
>>
>
>>>      >
>
>>
>
>>>      >> *主题: *Re: [ESPResSo-users] Problem with installation of
>
>>
>
>>>     espresso-4.1.0
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Hi Shawn,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> The g++ error message is hard to interpret. The include paths
>
>>
>
>>>     are wrong,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> there is an extra folder
>
>>
>
>>>     /home/zhsh/sourcecode/espresso/src/core/utils
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> that shouldn't exist, and the compiler options do not match what
>
>>
>
>>>     we have
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> in 4.1.0. Could it be that you accidentally unpacked the files
>
>>
>
>>>     of the
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> 4.1.0 release into the same folder where you unpacked the files
>
>>
>
>>>     of the
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> 4.0.2 release back in July?
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> Best,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> JN
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >> On 10/2/19 8:47 PM, Shawn wrote:
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> Hello guys,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> As the newest version of espresso released, I am trying to
>
>>
>
>>>     install it on
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> my computer. But I got an fatal error when I tried to compile the
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> package. And I also failed after I ran the "make" command.
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> Attached please find the detailed output of the compilation. I
>
>>
>
>>>     have used
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> the same script to install espresso-4.0.2 successfully, but
>
>>
>
>>>     I've no idea
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> where these errors come from when I try to install
>
>>
>
>>>     espresso-4.1.0. Can
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> someone help me out? Thank you.
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>>
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> Best,
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>> Shawn
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>      >>>
>
>>
>
>>>      >
>
>>
>
>>>      >>
>
>>
>
>>>      >
>
>>
>
>>>
>
>>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]