Running fastjet with ROOT 6.11

Hello,

I’m trying to run the file example short-example.cc from the
site http://fastjet.fr/quickstart.html
using the root, but something is going wrong!

What I did:

root [0] gSystem->Load("/home/andre/fastjet-install/lib/libfastjet.so")
root [1] .L /home/andre/Dropbox/Doutorado/ROOT/short-example.cc++
Info in <TUnixSystem::ACLiC>: creating shared library /home/andre/Dropbox/Doutorado/ROOT/short-example_cc.so
root [2] main()
/opt/root6/bin/root.exe: symbol lookup error: /home/andre/Dropbox/Doutorado/ROOT/short-example_cc.so: undefined symbol: _ZN7fastjet13JetDefinitionC1ENS_12JetAlgorithmEdNS_8StrategyENS_19RecombinationSchemeEi

Someone can help me?

Thanks!

1 Like

There is a missing symbol, probably due to a missing library that you still need to load. The symbol is

$ c++filt _ZN7fastjet13JetDefinitionC1ENS_12JetAlgorithmEdNS_8StrategyENS_19RecombinationSchemeEi
fastjet::JetDefinition::JetDefinition(fastjet::JetAlgorithm, double, fastjet::Strategy, fastjet::RecombinationScheme, int)

Please check which library contains it. FastJet also has libfastjetplugins.so and libfastjettools.so, so the symbol above is likely in one of them.

which fastjet version were you using?

I just did:

root [0] gSystem->AddIncludePath("-I/home/binet/tmp/fastjet/install/include");
root [1] gSystem->Load("/home/binet/tmp/fastjet/install/lib/libfastjet.so")
(int) 0
root [2] .L main.cc++
Info in <TUnixSystem::ACLiC>: creating shared library /home/binet/tmp/fastjet/ttt/./main_cc.so
In file included from /home/binet/tmp/fastjet/ttt/./main.cc:1:0,
                 from /home/binet/tmp/fastjet/ttt/main_cc_ACLiC_dict.cxx:40:
/home/binet/tmp/fastjet/ttt/./fastjet/ClusterSequence.hh:371:44: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
   inline void plugin_associate_extras(std::auto_ptr<Extras> extras_in){
                                            ^~~~~~~~
In file included from /usr/include/c++/7.2.0/memory:80:0,
                 from /home/binet/tmp/fastjet/ttt/./fastjet/ClusterSequence.hh:38,
                 from /home/binet/tmp/fastjet/ttt/./main.cc:1,
                 from /home/binet/tmp/fastjet/ttt/main_cc_ACLiC_dict.cxx:40:
/usr/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
root [3] main()
#--------------------------------------------------------------------------
#                         FastJet release 3.2.1
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#	                                                                      
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the terms of the GNU GPLv2.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code,
# CGAL and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------
--- strategy= NlnN
Clustering with Longitudinally invariant anti-kt algorithm with R = 0.7 and E scheme recombination
        pt y phi
jet 0: 103 0 0
    constituent 0's pt: 99.0001
    constituent 1's pt: 4.00125
jet 1: 99 0 3.14159
    constituent 0's pt: 99
(int) 0

having said that, it’s true that there is no such symbol in libfastjet.so:

$> nm libfastjet.so.0.0.0 | grep _ZN7fastjet13JetDefinitionC1ENS_12JetAlgorithmEdNS_8StrategyENS_19RecombinationSchemeEi

$> c++filt _ZN7fastjet13JetDefinitionC1ENS_12JetAlgorithmEdNS_8StrategyENS_19RecombinationSchemeEi
fastjet::JetDefinition::JetDefinition(fastjet::JetAlgorithm, double, fastjet::Strategy, fastjet::RecombinationScheme, int)

and looking at the source, one can see:

  /// constructor to fully specify a jet-definition (together with
  /// information about how algorithically to run it).
  ///
  /// the ordering of arguments here is old and deprecated (except
  /// as the common constructor for internal use)
  FASTJET_DEPRECATED_MSG("This argument ordering is deprecated. Use JetDefinition(alg, R, strategy, scheme[, n_parameters]) instead")
  JetDefinition(JetAlgorithm jet_algorithm_in, 
                double R_in, 
                Strategy strategy_in,
                RecombinationScheme recomb_scheme_in = E_scheme,
                int nparameters_in = 1){
    (*this) = JetDefinition(jet_algorithm_in,R_in,recomb_scheme_in,strategy_in,nparameters_in);
  }

this symbol can be found in the 3.1.3 version of libfastjet.so

Hi,

thanks for the reply,

in the folder fastjet-install/lib:

libfastjet.a          libfastjetplugins.so.0      libfastjettools.a         libsiscone.a         libsiscone_spherical.a
libfastjet.la         libfastjetplugins.so.0.0.0  libfastjettools.la        libsiscone.la        libsiscone_spherical.la
libfastjetplugins.a   libfastjet.so
libfastjettools.so
libsiscone.so        libsiscone_spherical.so
libfastjetplugins.la  libfastjet.so.0             libfastjettools.so.0      libsiscone.so.0      libsiscone_spherical.so.0
libfastjetplugins.so libfastjet.so.0.0.0  libfastjettools.so.0.0.0  libsiscone.so.0.0.0  libsiscone_spherical.so.0.0.0

I have the file that you ask.

Thanks you guys!

Now I can run this example fastjet with the root 6.11

What I did:

Fastjet 3.1.3

wget http://fastjet.fr/repo/fastjet-3.1.3.tar.gz
tar zxvf fastjet-3.1.3.tar.gz
cd fastjet-3.1.3/
mkdir fastjet-install
./configure --prefix=/home/andre/fastjet-3.1.3/fastjet-install --enable-allplugins
sudo make && sudo make install

root

root [0] gSystem->AddIncludePath("-I/home/andre/fastjet-3.1.3/fastjet-install/include");
root [1] gSystem->Load("/home/andre/fastjet-3.1.3/fastjet-install/lib/libfastjet.so");
root [2] .L short-example.cc++
Info in <ACLiC>: script has already been loaded in interpreted mode
Info in <ACLiC>: unloading /home/andre/Dropbox/Doutorado/ROOT/./short-example.cc and compiling it
Info in <TUnixSystem::ACLiC>: creating shared library /home/andre/Dropbox/Doutorado/ROOT/./short-example_cc.so
In file included from /home/andre/Dropbox/Doutorado/ROOT/./short-example.cc:1:0,
                from /home/andre/Dropbox/Doutorado/ROOT/short_example_cc_ACLiC_dict.cxx:40:
/home/andre/fastjet-3.1.3/fastjet-install/include/fastjet/ClusterSequence.hh:364:44: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  inline void plugin_associate_extras(std::auto_ptr<Extras> extras_in) {
                                           ^
In file included from /usr/include/c++/5/bits/locale_conv.h:41:0,
                from /usr/include/c++/5/locale:43,
                from /usr/include/c++/5/iomanip:43,
                from /opt/root6/include/RWrap_libcpp_string_view.h:44,
                from /opt/root6/include/RStringView.h:26,
                from /opt/root6/include/TString.h:28,
                from /opt/root6/include/TNamed.h:26,
                from /opt/root6/include/TDictionary.h:44,
                from /opt/root6/include/TClass.h:24,
                from /home/andre/Dropbox/Doutorado/ROOT/short_example_cc_ACLiC_dict.cxx:13:
/usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here
  template<typename> class auto_ptr;
                           ^
root [3] main()
#--------------------------------------------------------------------------
#                         FastJet release 3.1.3
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#	                                                                      
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the terms of the GNU GPLv2.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code
# and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------
Clustering with Longitudinally invariant anti-kt algorithm with R = 0.7 and E scheme recombination
       pt y phi
jet 0: 103 0 0
   constituent 0's pt: 99.0001
   constituent 1's pt: 4.00125
jet 1: 99 0 3.14159
   constituent 0's pt: 99
(int) 0

Cheers,

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.