Trouble with Proof on Macbook

I would like to run and test code locally on my Macbook before sending jobs off to the batch farm. It seems however that Proof does not behave on the Mac as it should.
I have successfully used proof on my Macbook several years ago, but it no longer seems to work in ROOT6

The most basic example session on a Mac:

improv:~> root
   ----------------------------------------------------------------
  | Welcome to ROOT 6.06/02                    http://root.cern.ch |
  |                                   (c) 1995-2014, The ROOT Team |
  | Built for macosx64                                             |
  | From heads/master@v6-07-02-437-gb06340c, Mar 02 2016, 19:01:57 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'     |
   ----------------------------------------------------------------

root [0] TProof *pl = TProof::Open("lite://");
 +++ Starting PROOF-Lite with 8 workers +++
Opening connections to workers: OK (8 workers)                 
Setting up worker servers: OK (8 workers)                 
PROOF set to parallel mode (8 workers)
root [1] pl
(TProof *) nullptr
root [2] 

Note that ROOT version 6.06.05 (compiled from git) does not do any better.
This is not the only issue I run into, but the easiest to reproduce.

I can still use version 5.34.36 and this works OK, however now I can no longer use all the nice ROOT6 and C++11 features.

Have people used Proof successfully on ROOT6?
Thanks!

Dear Maurik,

Yes, people are using PROOF with ROOT 6.
I managed to reproduce the problem on my Mac. Very weird, it must be something in the variable assignment on Mac. The variable ‘gProof’ is defined correctly.
I’ll try to understand why the return from TProof::Open is not kept (it works fine on Linux, just checked).
In the meantime I suggest to use ‘gProof’ or define ‘TProof *pl = gProof’ after the call to TProof::Open.

I have opened a ticket: sft.its.cern.ch/jira/browse/ROOT-8185 .

G Ganis

Thank you G Ganis, and thank you for opening the ticket.

The hint to use gProof instead of pl was very useful.

I still find a strange issue with the compile step: ch->Process(“Test.C++”), that seems unrelated and has something to do with the clang compiler not linking agains one of the system libraries:

root [3] ch->SetProof(gProof)
root [4] ch->Process("Test.C++")
 
Info in <TProofLite::SetQueryRunning>: starting query: 1
Info in <TProofQueryResult::SetRunning>: nwrks: 8
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/Documents/Analysis/HPS/PiZero/./Test_C.so
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/System/Library/Extensions/GeForceMTLDriver.bundle/Contents/MacOS/GeForceMTLDriver' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
Error in <TSelector::GetSelector>: The file Test.C++ does not define a class named Test.
Error in <TProofLite::CopyMacroToCache>: could not create a selector from Test.C++
Info in <TProofQueryResult::RecordEnd>: output list cloned successfully!
Lite-0: all output objects have been merged                                                         
(Long64_t) -1
root [5] 

This happens only if Proof is used, not if I just run the code on a TChain.

The workaround seems to be to compile with gProof->Load(“Test.C++”) and then use the class as ch->Process(“Test”), which works fine.

root [3] gProof->Load("Test.C++")
Info in <ACLiC>: unmodified script has already been compiled and loaded
Info in <ACLiC>: it will be regenerated and reloaded!
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/Documents/Analysis/HPS/PiZero/./Test_C.so
15:18:44  2890 Wrk-0.0 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:44  2890 Wrk-0.0 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:18:47  2902 Wrk-0.6 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:47  2902 Wrk-0.6 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:18:50  2894 Wrk-0.2 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:50  2894 Wrk-0.2 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:18:52  2898 Wrk-0.4 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:52  2898 Wrk-0.4 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:18:55  2896 Wrk-0.3 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:55  2896 Wrk-0.3 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:18:58  2905 Wrk-0.7 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:18:58  2905 Wrk-0.7 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:19:00  2892 Wrk-0.1 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:19:00  2892 Wrk-0.1 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
15:19:03  2900 Wrk-0.5 | Info in <TProofServLite::HandleCache>: loading macro Test.C++ ...
15:19:03  2900 Wrk-0.5 | Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/maurik/.proof/cache/./Test_C.so
(Int_t) 0
root [4]  TChain *ch=new TChain("HPS_Event");    ch->Add("/data/HPS/engrun2015/pass4/dst/hps_005772.10_dst_20151218.205540-15.root");   
root [5] ch->SetProof(gProof)
root [6] ch->Process("Test")
 
Info in <TProofLite::SetQueryRunning>: starting query: 1
Info in <TProofQueryResult::SetRunning>: nwrks: 8
Looking up for exact location of files: OK (1 files)                 
Looking up for exact location of files: OK (1 files)                 
Info in <TPacketizer::TPacketizer>: Initial number of workers: 8
Validating files: OK (1 files)                 
Lite-0: all output objects have been merged                                                         
(Long64_t) 0
root [7]