DNN multi-target regression

Dear rooters,

I have a quick question about DNN implementation. Previously, I was using it for multi-target regression with root v6.07 and it worked just fine. Recently I updated to 6.08 (6.07 became unavailable on cern computers) and it seems it doesnt support the multi-target regression anymore. When i try to run the 6.08 regression tutorial with 2 targets it returns “Error in TRint::HandleTermInput(): std::out_of_range caught: vector::_M_range_check” when it’s just about to start training. Is there any way to complete the training with DNN or is there any chance it will be fixed in the nearest future?

Cheers,
Maks

Update: I’ve just run multiclass tutorial ( https://root.cern.ch/doc/v608/TMVAMulticlass_8C.html ) for root version 6.08 and the same error pops up although DNN is supposed to work. Can anybody check if it doesn’t work for them as well?

Cheers,
Maks

What version of the DNN are you using (Standard, CPU or GPU)? There is a problem in the standard implementation and multi-target classification/regression. If you are not already, could you try with either the CPU implementation?

In file copy TMVAMulticlass.C somewhere so you can change it and edit nnOptions on line 143; Change Architecture=STANDARD to CPU.

Hello,
Thanks for the answer.
I am using standard implementation - I wanted to try CPU or GPU before but there is another error popping up: “Multi-core CPU backend not enabled. Please make sure you have a BLAS implementation and it was successfully detected by CMake as well that the imt CMake flag is set”. I am using root built in version (6.08/06)for lxplus7, so if you know how to make it work for that setup I could try and change it.

Cheers,
Maks

Hi,

You are correct, it seems the root installation of lxplus7 is not built with support for the BLAS library (thus it is not possible to run the DNN with architecture=CPU).

What you could do is build your own version of ROOT using these instructions: https://root.cern.ch/building-root

Make sure that the blas library is installed and use cmake ./path/to/root -Dimt=true to use implicit multithreading which in turn enables DNN-CPU. (The libraries should be installed on lxplus7 so perhaps it is possible to build it there.)

1 Like

There are two installations of ROOT for lxplus7:

  • A standalone version in /cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.08.06/x86_64-centos7-gcc48-opt that uses the native compiler and does not assume much on system packages. This is perhaps the reason it does not use BLAS.
  • A version as part of the LCG software stack. This is setup like this:
    source /cvmfs/sft.cern.ch/lcg/views/LCG_88/x86_64-centos7-gcc62-opt/setup.sh
    The stack contains BLAS but unfortunately the ROOT build was not configured to use it. I’ll fix this issue for future builds.
    Bottomline: non of the two builds are correct and will be fixed.
1 Like

Hi, I am also having similar problem when trying test dnn in root6.10 on CentOS. It looks like the standard option is now gone with dnn_cpu and dnn_gpu left. I already have blas installed but cmake cannot seem to find. I try to find blas manually, but only doc of it.

We are about to release a LCG stack including ROOT 6.10 in the next few days. Meanwhile you can give a try to the ‘nightlies’ like this on a centos7 system:

source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc62-opt/setup.sh
root.exe -q $ROOTSYS/tutorials/tmva/TMVAMulticlass.C

Hi, i am having the same error as BLAS library is not available. Unfortunately, i couldn’t find a flag in the documentation of the root installation. I guess if it is available in the standard directory such as /usr/lib64 cmake picks it up. I don’t have root access to the OS, so how could i give the direction where to look for BLAS library so that cmake will detect it.

To find BLAS we use the CMake standard module FindBLAS.cmake. If BLAS is installed in your system it should find it. See for example what are the values of the variables BLAS_XXXX in the CMake cache. You can use ccmake . command, and type t to see all the advanced variables.

Woaww i didn’t know anything about ccmake . now i can see all the advanced variables. Ok i can see all the BLAS related variables as well. I have installed OpenBlas library and therei see a flag named BLAS_openblas_LIBRARY, let me see what i can do with that. Thank you for reply.

Sorry to return to this issue, but was the issue with he LCG ROOT releases not being built against BLAS ever resolved ? I ask as I am using ROOT 6.12 from the LCG 92 release

which root
/cvmfs/sft.cern.ch/lcg/releases/LCG_92/ROOT/6.12.04/x86_64-slc6-gcc7-opt/bin/root

and I am also getting the same error message as started this thread

: Multi-core CPU backend not enabled. Please make sure you have a BLAS implementation and it was successfully detected by CMake as well that the imt CMake flag is set.

Chris

Actually I also met this issue:

: Multi-core CPU backend not enabled. Please make sure you have a BLAS implementation and it was successfully detected by CMake as well that the imt CMake flag is set.

Anyone know where to find the guidance on how to install the BLAS and CMake to be compatible with the DNN in TMVA?

Many thanks!
Hai

Hi,

For a BLAS installation, you should be able to find an appropriate version in your linux distribution, or through e.g. homebrew or, fink, etc on mac. As long as BLAS is properly installed it should be picked up by the cmake configuration.

For ROOT imt is by default on since a few releases, so this should not be a problem.

Cheers,
Kim

Dear Kim,

Thanks for the help! I will try to install them correctly.

Best,
Hai