On Fri, 15 May 2015 00:38:25 -0400 (EDT)
Stuart Barkley <[email protected]> wrote:

> Reviving a 2 month old thread.  Now working with easybuild 2.1.0...
> 
> On Thu, 19 Mar 2015 at 22:57 -0000, Stuart Barkley wrote:
> 
> > > > Is there a good way to see a dependency tree with easybuild (I'm
> > > > now running 2.0.0)?  I'm trying to reconcile different
> > > > dependency requirements for my large build and am finding it
> > > > difficult to determine what packages are requiring other
> > > > packages.
> > >
> > > Have you considered trying eb --dep-graph?
> > >
> > > That can be used to generate a .dot file describing the dependency
> > > graph (eb will tell you what's missing).
> > >
> > > With the right optional Python packages installed, you can also
> > > make it dump a rendered image (.png, .pdf).
> > >
> > > For example:
> > >
> > >     eb --dep-graph=goolf.dot goolf-1.4.10.eb -r
> >
> > I missed seeing this and I don't have the necessary dependencies
> > installed.
> >
> > This would tend to imply that there is some dependency resolution
> > which could be useful.  Is is possible to get the basic relationship
> > data without out sending things all the way through graphviz?
> >
> > The graphviz dependencies are not installed in my easybuild version
> > of python which might be useful.  I'll follow up on this in the
> > future.
> 
> I wanted to revisit my dependency tree and spent some time today
> trying to get --dep-graph to work for me without much luck.
> 
>     % eb --configfiles app-c6-alpha.cfg --dep-graph=alpha.dot --robot
> -- easyconfigs/FDASCL_*.eb == temporary log file in case of
> crash /tmp/eb-DCn36b/easybuild-77mVPt.log == resolving
> dependencies ... ERROR: An optional Python packages required to
> generate dependency graphs is missing: Failed to import pygraph-core:
> try easy_install python-graph-core Failed to import pygraph-dot: try
> easy_install python-graph-dot Failed to import graphviz: try yum
> install graphviz-python,or apt-get install python-pygraphviz,or brew
> install graphviz --with-bindings, global name 'digraph' is not
> defined %
> 
> I can do 'yum install graphviz-python' on a test system and get that
> module without problem (since it is directly in CentOS 6).  That gets
> rid of one message.  (There is a Graphviz-2.38.0-intel-2014b.eb module
> which I may try to modify for -goolf at a later time.)
> 
> However, I don't have easy_install available so thought I would just
> add python-graph-core and python-graph-dot to my python installation
> as built with easybuild.  I can build either of them into Python, but
> not both of them at the same time.
> 
> I've added the following to my Python-2.7.3-goolf-1.4.10.eb file:
> 
>     # Added to support easybuild --dep-graph option
>     # http://pydot.googlecode.com/files/pydot-1.0.28.tar.gz
>     ('pydot', '1.0.28', {
>         'source_urls': ['http://pydot.googlecode.com/files/'],
>     }),
> 
>     -- and --
> 
>     #
> https://pypi.python.org/packages/source/p/python-graph-core/python-graph-core-1.8.2.tar.gz
> # md5=16f177496beb6e6bc507b12b8346ff96 ('pygraph', '1.8.2', {
>         'source_tmpl': 'python-graph-core-%(version)s.tar.gz',
>         'source_urls':
> ['https://pypi.python.org/packages/source/p/python-graph-core/'], }),
> 
>     -- or --
> 
>     #
> https://pypi.python.org/packages/source/p/python-graph-dot/python-graph-dot-1.8.2.tar.gz
> # md5=0ecd251a9fd210a9135e1d1957689709 ('pygraph', '1.8.2', {
>         'source_tmpl': 'python-graph-dot-%(version)s.tar.gz',
>         'source_urls':
> ['https://pypi.python.org/packages/source/p/python-graph-dot/'], }),
> 
> This will get rid of one of the remaining messages but I have not been
> able to figure out how to add both modules at the same time.  These
> appear to be two source files that are part of the same python module.
> 
> There may be something simple that will let this work.  Also, I did
> this while using "--try-toolchain-version=1.7.20", just in case that
> makes a difference.  (goolf-1.7.20 seems to working okay for me, but
> that is other work for a different email thread.)
> 
> > I'll leave the rant about useless modules being necessary just to
> > write a simple text mode .dot file aside for now (mostly).
> 
> So far I have not been able to get the  =alpha.dot option to
> work so don't know what that output is actually like, but it should be
> pretty simple and about what I would like to see for a basic report.
> 
> Both pygraph and pydot look pretty dead (and floundering further with
> the lingering demise of google code).  I suspect this use case for
> them is very minor and simple write statements could really handle the
> easybuild needs (eliminating at least three external dependencies).
> 
> I suggest that easybuild/framework/easyconfig/tools.py could use some
> work to remove these dependencies and either use graphviz-python
> (gv) or just directly use the graphviz binary.
> 
> At the same time, a simple text mode dependency table could be output
> which would be more useful than a .jpeg or .png anyway.  Something
> suitable for input to tsort(1) would be useful as would a slightly
> more verbose form.

+1 for this.

I also had a lot of troubles with --dep-graph dependencies. In fact I
gave up and generated the tree I wanted (it was just a toolchain one) in
a test VM. But I see myself using this quite often if available in my
main production system.

Inigo

> 
> Stuart

Reply via email to