Closed Emblanc closed 6 years ago
I try to reproduce the bug on in the test file developed on branch used for PR #34. For me runing the test_zero_light() test complete without error (all 50 plants have light). @Emblanc : could you run that test on your machine ?
I ran the tests of PR #34 and it failed :
FAIL: test.test_light_interception.test_zero_light Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/home/emmanuelle/WALTer_Dvpt/test/test_light_interception.py", line 17, in test_zero_light assert all(PAR > 0) AssertionError:
ok ! Can you remind me the way you install lpy and caribu ?
For lpy, I simply installed Openalea. I might not have the right version of CARIBU. I think I'd better re-install it to be sure. Could you remind me how I should install the right version please ?
I would do something like that on Linux:
conda create -n walter -c openalea openlea.lpy 'boost =1.66.0' openalea.plantgl alinea.caribu alinea.astk
I create a walter env. in conda. I force the boost version due to a bug on Linux. If you depends on other packages (numpy, scipy, pandas) you may leter install them
To activate your env: source activate walter
To install other packages: conda install numpy scipy pandas
I will also test walter on my computer
Thank you for your help. I created a new env. as you advised and I ran the test again in this new env. but it is still failing.
Hi ! The (good ?) news is that I can reproduce the bug (test fails) on my second machine (win64 with agreenium conda install). I will continue investigating ....
Okay ! The bug came from...the correction of the lpy cut bug in newest version of lpy. I switch the flag to lpy_cut_bug=false and it fix the caribu bug. I've commited the switch in the branch #34 @Emblanc : can you test again ?
Sure. I will launch the tests. Stay tuned...
Unfortunately the test is still failing on my computer (as well as the test_cut_module now, but that was to be expected)
Fresh new installation works. Did you try to remove all environment depending on LPy, clean the cache and re-install ? i.e.
conda env remove -n walter
conda clean --all -y
conda create -n walter boost=1.66 openlea.lpy alinea.caribu openalea.mtg scipy pandas nose -c openalea
I did as you advised and the test is no longer failing !
There is something that I do not understand though : I tried to run a simulation (the same as the test simulation) and when I look at the PAR_per_axes.csv output file, 2 out of 4 plants receive 0 light. I might be doing something wrong. I ran my simulation in the walter environment and my WALTer repository was on the PR34 branch.
very good news for the test (the merge is close) !
Can you describe a bit more how you launch the last test :within a python session with commands similar to the test (if yes, you can probably write /sketch a new failing test, to be investigated/debugged) , or do you do something else ?
Yes, very good news for the test indeed !
To run my last simulation, I just opened a terminal on my computer and then :
source activate walter
walter -p my_project
walter -i sim_scheme_test.csv
Too bad: I run these commands on my two windows machine and cannot reproduce your results (all plants receive light in the PAR_per_axes.csv). May be walter command is pointing to a wrong script ? You may try to re-run at walter root dir:
source activate walter
python setup.py install --prefix=$CONDA_PREFIX
I tried but there is an error with
python setup.py install --prefix=$CONDA_PREFIX
running install Checking .pth file support in /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ /usr/bin/python -E -c pass TEST FAILED: /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ and your PYTHONPATH environment variable currently contains: '' Here are some of your options for correcting the problem: You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) *You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
Are you in your conda environment (activate walter)?
Le 27/03/2018 à 09:56, Emmanuelle Blanc a écrit :
I tried but there is an error with |python setup.py install --prefix=$CONDA_PREFIX|
running install Checking .pth file support in /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ /usr/bin/python -E -c pass TEST FAILED: /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /home/emmanuelle/miniconda2/envs/walter/lib/python2.7/site-packages/ and your PYTHONPATH environment variable currently contains: '' Here are some of your options for correcting the problem: *You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files *You can add the installation directory to the PYTHONPATH environment variable. (It must then also be on PYTHONPATH whenever you run Python and want to use the package(s) you are installing.) *You can set up the installation directory to support ".pth" files by using one of the approaches described here: https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea-incubator/WALTer/issues/30#issuecomment-376431667, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeSjeZh3iPqmI0G3NMPSVCAPdalXw9ks5tifCpgaJpZM4RZqws.
Yes, I am in my conda environment walter
What is the python which is used?
Get me the result of:
which python
Le 27/03/2018 à 10:32, Emmanuelle Blanc a écrit :
Yes, I am in my conda environment walter
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea-incubator/WALTer/issues/30#issuecomment-376441514, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeSv92NGTTNjhhU06C_QabSFvrl0Izks5tifkUgaJpZM4RZqws.
The result of which python is :
/home/emmanuelle/miniconda2/envs/walter/bin/python
Strange.
Send me the result of the command
conda info --all
active environment : walter
active env location : /home/emmanuelle/miniconda2/envs/walter
shell level : 1
user config file : /home/emmanuelle/.condarc
populated config files : conda version : 4.4.10 conda-build version : not installed python version : 2.7.14.final.0 base environment : /home/emmanuelle/miniconda2 (writable) channel URLs : https://repo.continuum.io/pkgs/main/linux-64 https://repo.continuum.io/pkgs/main/noarch https://repo.continuum.io/pkgs/free/linux-64 https://repo.continuum.io/pkgs/free/noarch https://repo.continuum.io/pkgs/r/linux-64 https://repo.continuum.io/pkgs/r/noarch https://repo.continuum.io/pkgs/pro/linux-64 https://repo.continuum.io/pkgs/pro/noarch package cache : /home/emmanuelle/miniconda2/pkgs /home/emmanuelle/.conda/pkgs envs directories : /home/emmanuelle/miniconda2/envs /home/emmanuelle/.conda/envs platform : linux-64 user-agent : conda/4.4.10 requests/2.18.4 CPython/2.7.14 Linux/4.4.0-116-generic ubuntu/14.04 glibc/2.19 UID:GID : 1001:1001 netrc file : None offline mode : False
# base /home/emmanuelle/miniconda2 walter * /home/emmanuelle/miniconda2/envs/walter
sys.version: 2.7.14 |Anaconda, Inc.| (default, Dec 7... sys.prefix: /home/emmanuelle/miniconda2 sys.executable: /home/emmanuelle/miniconda2/bin/python conda location: /home/emmanuelle/miniconda2/lib/python2.7/site-packages/conda conda-build: None conda-env: /home/emmanuelle/miniconda2/bin/conda-env user site dirs:
CIO_TEST:
WARNING: could not import _license.show_info
You have to unset your LD_LIBRARY_PATH
export LD_LIBRARY_PATH=
Can you try just: python setup.py install
I ran both lines. python setup.py install
seemed to work
Should I try to run python setup.py install --prefix=$CONDA_PREFIX
again ?
No. If it succeed, you do not need to rerun the command.
Le 27/03/2018 à 11:27, Emmanuelle Blanc a écrit :
Should I try to run |python setup.py install --prefix=$CONDA_PREFIX| again ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea-incubator/WALTer/issues/30#issuecomment-376458123, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeStQFoqQl-Fc5h5h7m0h2v3wq137vks5tigYbgaJpZM4RZqws.
I can no longer create a project to run my simulation :
walter -p my_project
returns the error
Traceback (most recent call last): File "/usr/local/bin/walter", line 9, in
load_entry_point('walter==2.0.1', 'console_scripts', 'walter')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load entry = import(self.module_name, globals(),globals(), ['name']) File "/usr/local/lib/python2.7/dist-packages/walter-2.0.1-py2.7.egg/walter/project.py", line 15, in from openalea.lpy import Lsystem File "/usr/lib/python2.7/dist-packages/openalea/lpy/init.py", line 2, in from __lpy_kernel__ import * ImportError: liblpy.so: cannot open shared object file: No such file or directory
I can create a project if I run my command in a new terminal (still in the walter environment). But the results of my simulations are still wrong (plants with 0 light)
In your new ternimal, can you run
export LD_LIBRARY_PATH=
I ran export LD_LIBRARY_PATH=
in my new terminal and then tried to create a project. It returned the same error message as in the first terminal
[......] ImportError: liblpy.so: cannot open shared object file: No such file or directory
This is strange. It seems that you use a library that is in your system (not in conda). Do you have the lib in
ls $CONDA_PREFIX/lib/liblpy.so
When I run ls $CONDA_PREFIX/lib/liblpy.so
, the result is
/home/emmanuelle/miniconda2/envs/walter/lib/liblpy.so
and can you run smth like
ldd /home/emmanuelle/miniconda2/envs/walter/lib/liblpy.so
Le 27/03/2018 à 11:50, Emmanuelle Blanc a écrit :
When I run |ls $CONDA_PREFIX/lib/liblpy.so|, the result is
/home/emmanuelle/miniconda2/envs/walter/lib/liblpy.so
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openalea-incubator/WALTer/issues/30#issuecomment-376464947, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEeStanQfrwjfnzSY-By2C3IyD0UoXNks5tigtwgaJpZM4RZqws.
ldd /home/emmanuelle/miniconda2/envs/walter/lib/liblpy.so
linux-vdso.so.1 => (0x00007ffc43fce000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0df9e00000) libpython2.7.so.1.0 => /home/emmanuelle/miniconda2/envs/walter/lib/./libpython2.7.so.1.0 (0x00007f0df9a23000) libboost_python.so.1.66.0 => /home/emmanuelle/miniconda2/envs/walter/lib/./libboost_python.so.1.66.0 (0x00007f0df97e0000) libQtCore.so.4 => /home/emmanuelle/miniconda2/envs/walter/lib/./libQtCore.so.4 (0x00007f0df92d1000) libpgltool.so => /home/emmanuelle/miniconda2/envs/walter/lib/./libpgltool.so (0x00007f0df90c2000) libpglmath.so => /home/emmanuelle/miniconda2/envs/walter/lib/./libpglmath.so (0x00007f0df8ea4000) libpglsg.so => /home/emmanuelle/miniconda2/envs/walter/lib/./libpglsg.so (0x00007f0df8aed000) libpglalgo.so => /home/emmanuelle/miniconda2/envs/walter/lib/./libpglalgo.so (0x00007f0df825b000) libpglgui.so => /home/emmanuelle/miniconda2/envs/walter/lib/./libpglgui.so (0x00007f0df7e40000) libstdc++.so.6 => /home/emmanuelle/miniconda2/envs/walter/lib/./libstdc++.so.6 (0x00007f0df7b06000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0df7800000) libgcc_s.so.1 => /home/emmanuelle/miniconda2/envs/walter/lib/./libgcc_s.so.1 (0x00007f0df75ee000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0df7225000) /lib64/ld-linux-x86-64.so.2 (0x00007f0dfa368000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0df7021000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f0df6e1e000) libz.so.1 => /home/emmanuelle/miniconda2/envs/walter/lib/././libz.so.1 (0x00007f0df6c07000) libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f0df6a05000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f0df66fd000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0df64f5000) libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f0df6287000) libqhull.so.7 => /home/emmanuelle/miniconda2/envs/walter/lib/././libqhull.so.7 (0x00007f0df6017000) libboost_thread.so.1.66.0 => /home/emmanuelle/miniconda2/envs/walter/lib/././libboost_thread.so.1.66.0 (0x00007f0df5df5000) libann.so => /home/emmanuelle/miniconda2/envs/walter/lib/././libann.so (0x00007f0df5be2000) libgmp.so.10 => /home/emmanuelle/miniconda2/envs/walter/lib/././libgmp.so.10 (0x00007f0df594e000) libCGAL.so.13 => /home/emmanuelle/miniconda2/envs/walter/lib/././libCGAL.so.13 (0x00007f0df5727000) libmpfr.so.4 => /home/emmanuelle/miniconda2/envs/walter/lib/././libmpfr.so.4 (0x00007f0df54c3000) libQtOpenGL.so.4 => /home/emmanuelle/miniconda2/envs/walter/lib/././libQtOpenGL.so.4 (0x00007f0df51b8000) libQtGui.so.4 => /home/emmanuelle/miniconda2/envs/walter/lib/././libQtGui.so.4 (0x00007f0df445e000) libQtNetwork.so.4 => /home/emmanuelle/miniconda2/envs/walter/lib/././libQtNetwork.so.4 (0x00007f0df40f9000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f0df3ebb000) libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f0df3c53000) libboost_system.so.1.66.0 => /home/emmanuelle/miniconda2/envs/walter/lib/./././libboost_system.so.1.66.0 (0x00007f0df3a4e000) libfreetype.so.6 => /home/emmanuelle/miniconda2/envs/walter/lib/./././libfreetype.so.6 (0x00007f0df37b4000) libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f0df35aa000) libfontconfig.so.1 => /home/emmanuelle/miniconda2/envs/walter/lib/./././libfontconfig.so.1 (0x00007f0df3367000) libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f0df3155000) libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f0df2e20000) libpng16.so.16 => /home/emmanuelle/miniconda2/envs/walter/lib/./././libpng16.so.16 (0x00007f0df2be9000) libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f0df2998000) libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f0df2790000) libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f0df2574000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f0df234a000) libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f0df2147000) libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f0df1f44000) libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f0df1d3e000) libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f0df1b3c000) libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f0df190e000) libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f0df170b000) libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f0df1505000) libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f0df1303000) libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f0df10ec000) libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f0df0ee7000) libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f0df0cc8000) libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f0df0ac2000) libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f0df08b4000) libxml2.so.2 => /home/emmanuelle/miniconda2/envs/walter/lib/././././libxml2.so.2 (0x00007f0df0559000) libiconv.so.2 => /home/emmanuelle/miniconda2/envs/walter/lib/././././libiconv.so.2 (0x00007f0df026a000) libffi.so.6 => /home/emmanuelle/miniconda2/envs/walter/lib/./././libffi.so.6 (0x00007f0df0061000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f0defe5c000) libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f0defc58000) libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f0defa52000)
Nice. if you run lpy, what happens?
lpy opened normally
With
export LD_LIBRARY_PATH=
?
Yes, lpy opens normally right after I run export LD_LIBRARY_PATH=
Do not use sudo python setup.py in conda...
I noticed that some plants in my simulations never intercept light : in the PAR_per_axes.csv output file, their value for Sum_PAR is always 0.
For example, when I run sim_scheme_test.txt, (which is the simulation we use for tests but with 50 plants instead of 4), plants 11 to 50 never intercept any light ! (see PAR_per_axes.txt)
I think this might be related to Pull request #10 , when we removed mapping_table @christian34, @chrlecarpentier. Before #10 , PAR intercepted by each organ was extracted using mapping_table :
Now we no longer use mapping_table. Instead, ids are extracted from res_sky dictionary :
It is my understanding that res_sky['Ei'] has 1 key for each organ in the simulation. However, there are more objects in lstring because there are one object for each organ + other objects ("[" and "]" for example). I checked, and it seems that lstring always has between 6 times and 12 times more ids than res_sky['Ei']. This is why I think res_sky["Ei"][id] does not refer to the same organ as lstring[id]. As I see it, when all ids in res_sky['Ei'].keys() have been used, there are still organs in lstring that have not been considered.