# Cling can't load generated dictionaries on a different machine

**URL:** <https://root-forum.cern.ch/t/cling-cant-load-generated-dictionaries-on-a-different-machine/56603>\
**Category:** Cling\
**Created:** [October 4, 2023, 3:19pm UTC](https://root-forum.cern.ch/t/cling-cant-load-generated-dictionaries-on-a-different-machine/56603 "2023-10-04T15:19:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weishi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/ce73a5/32.png) [@weishi](https://root-forum.cern.ch/u/weishi)\
**Post date:** [October 4, 2023, 3:19pm UTC](https://root-forum.cern.ch/t/cling-cant-load-generated-dictionaries-on-a-different-machine/56603/1 "2023-10-04T15:19:41Z")

</div>

Dear experts,

I stored some nested vectors in ROOT Ttree which required to generate dictionaries:

> <https://github.com/weishi10141993/dunetpc/blob/feature/v07_09_00/dune/CAFMaker/CAFMaker_module.cc#L625-L627>

This worked fine on a local SL7 machine. However once I send the compiled program to the grid, it complains cannot load the generated dictionaries,

```auto
cling::DynamicLibraryManager::loadLibrary(): /dune/app/users/weishi/dunetpclegacy/srcs/dunetpc/dune/CAFMaker/AutoDict_vector_vector_vector_double ______ cxx.so: cannot open shared object file: No such file or directory
cling::DynamicLibraryManager::loadLibrary(): /dune/app/users/weishi/dunetpclegacy/srcs/dunetpc/dune/CAFMaker/AutoDict_vector_vector_vector_double ______ cxx.so: cannot open shared object file: No such file or directory
Error in <TTree::Branch>: The class requested (vector<vector<vector<vector<vector<unsigned long> > > > >) for the branch "FD_evt_hadron_throw_result_NDLAr" is an instance of an stl collection and does not have a compiled CollectionProxy. Please generate the dictionary for this collection (vector<vector<vector<vector<vector<unsigned long> > > > >) to avoid to write corrupted data.

```

where the directory `/dune/app/users/weishi/` is from my local machine, apprarently it can not find this from the grid worker node. Ideally, this directory should be replaced by `/srv` on the grid.

I’ve tried adding the dictionaries path on the grid (i.e. `${PWD}`) to `LD_LIBRARY_PATH`:

```auto
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD}

```

But it’s still giving me the same errors above.

How should I resolve this?

Thanks,  
Wei

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [October 4, 2023, 7:02pm UTC](https://root-forum.cern.ch/t/cling-cant-load-generated-dictionaries-on-a-different-machine/56603/2 "2023-10-04T19:02:06Z")

</div>

Dear Wei,

Thanks for posting.  
I do not understand why you see the path of your home directory being propagated to the grid nodes: do you have a suggestion? I don’t see how ROOT could do that, unless instructed explicitly to do so.

For grid/batch use cases, what I would perhaps suggest to follow the standard approach, i.e. to generate dictionaries once before the mass production happen, for example using rootcling or genreflex (see [this page](https://root.cern/manual/io_custom_classes/)), and to compile them as a library or together with the rest of the code.

Please do not hesitate to ask follow up questions if something is not clear.

Cheers,  
D

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [October 18, 2023, 7:02pm UTC](https://root-forum.cern.ch/t/cling-cant-load-generated-dictionaries-on-a-different-machine/56603/3 "2023-10-18T19:02:35Z")

</div>

Closed on October 18, 2023, 7:02pm UTC

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