[ilamb-users] ilamb v2

Nathan Collier nathaniel.collier at gmail.com
Thu Jan 5 14:48:05 EST 2017


Xitian,

Thanks for writing. This is a pretty strange error but I can venture a
guess. Do you notice that the errors come from matplotlib/backends?

The "backend" for matplotlib refers to the code that matplotlib actually
uses to draw plots. By default, matplotlib uses a backend which requires an
X connection (in this case, it is using the Qt library). So I am guessing
that you are on edison and did not connect with the -X option. So if that
is the case, you have two options:

1) connect to edison with a -X option
2) set matplotlib to use a different backend. You can do this by setting an
environment variable,

export MPLBACKEND=Agg

"Agg" is a backend that will not give you windows if you are plotting
interactively, but does draw the saved figures without the need for an X
connection.

Let me know if this doesn't solve the issue.

Nate





On Thu, Jan 5, 2017 at 2:15 PM Xitian Cai <xtcai at lbl.gov> wrote:

Hi Nate,

When I run your demo, I receive the following message.

xtcai at edison03:/global/u2/x/xtcai/models/ilamb/ilamb-src/demo> python
driver.py --config sample.cfg --model_root $ILAMB_ROOT/MODELS/ --regions
global

Traceback (most recent call last):
  File "driver.py", line 1, in <module>
    from ILAMB.ModelResult import ModelResult
  File
"/global/homes/x/xtcai/.local/lib/python2.7/site-packages/ILAMB/__init__.py",
line 24, in <module>
    pkg = __import__(key, globals(), locals(), [froms[key]])
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py",
line 31, in <module>
    from mpl_toolkits.axes_grid1 import make_axes_locatable
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/__init__.py",
line 9, in <module>
    from .axes_grid import Grid, ImageGrid, AxesGrid
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/axes_grid.py",
line 8, in <module>
    import matplotlib.pyplot as plt
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/pyplot.py",
line 109, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show =
pylab_setup()
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
line 17, in <module>
    from .backend_qt5agg import NavigationToolbar2QTAgg
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py",
line 18, in <module>
    from .backend_qt5 import QtCore
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py",
line 31, in <module>
    from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName,
__version__
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py",
line 91, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: /usr/lib64/libxcb-xlib.so.0: undefined symbol: _xcb_unlock_io

Can you advice how to fix this?

Thanks,

Xitian

On Wed, Jan 4, 2017 at 1:29 PM, Xitian Cai <xtcai at lbl.gov> wrote:

Hi Nate,

I fixed the error by installing and linking to the Udunits-2 library. Now I
can get the Ilamb version number. Thank you all the same.

Xitian

On Wed, Jan 4, 2017 at 12:00 PM, Xitian Cai <xtcai at lbl.gov> wrote:

Hi Nate,

I use miniconda on Edison. After installing Ilamb, I got the following
message when I use python -c "import ILAMB; print ILAMB.__version__" to
check the installation:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/global/homes/x/xtcai/.local/lib/python2.7/site-packages/ILAMB/__init__.py",
line 26, in <module>
    pkg = __import__(key)
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/cfunits/__init__.py",
line 52, in <module>
    from .units import Units
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/site-packages/cfunits/units.py",
line 42, in <module>
    _udunits = ctypes.CDLL('libudunits2.so.0')
  File
"/global/homes/x/xtcai/programs/miniconda2/lib/python2.7/ctypes/__init__.py",
line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libudunits2.so.0: cannot open shared object file: No such file or
directory

It seems the error is associated with cfunits. Do you know how to fix this?

Thanks,

Xitian

On Tue, Jan 3, 2017 at 4:33 PM, Xitian Cai <xtcai at lbl.gov> wrote:

Hi Nate,

Thanks a lot. This is very helpful. I will let you know when I have
questions.

Best,

Xitian

On Tue, Jan 3, 2017 at 4:03 PM, Nathan Collier <nathaniel.collier at gmail.com>
wrote:

Bill/Xitian,

Great news, the code is being hosted here:

https://bitbucket.org/ncollier/ilamb

All the relevant links are available on that page, but specifically the
installation tutorial may be found here:

http://climate.ornl.gov/~ncf/ILAMB/docs/tutorial.html

Let me know if you run into any problems. I will be traveling tomorrow but
back at work on Thursday.

Nate



On Tue, Jan 3, 2017 at 5:35 PM William Riley <wjriley at lbl.gov> wrote:

Hi Nate,
Xitian, who is a new postdoc here, is interested in using the ilambv2
package with the new model. Can you point him to where the current code and
documentation is? I recall Qing was having some trouble with the setup
here, but I haven't touched base with him yet this year.

Thanks.

Bill.

Earth Sciences Division
Berkeley National Laboratory
Bldg 84, Room 332
1 Cyclotron Rd
Berkeley, CA 94720
(510) 486-5036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.ilamb.org/pipermail/ilamb-users/attachments/20170105/b2ce9826/attachment.html>


More information about the ilamb-users mailing list