No auto fall-back to CPU if GPU tracker was requested
authortbreitne <timo.gunther.breitner@cern.ch>
Tue, 24 Feb 2015 09:32:09 +0000 (10:32 +0100)
committertbreitne <timo.gunther.breitner@cern.ch>
Tue, 24 Feb 2015 09:33:21 +0000 (10:33 +0100)
HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx
HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerFramework.cxx

index 023da81..d06ef05 100644 (file)
@@ -438,6 +438,10 @@ int AliHLTTPCCATrackerComponent::DoInit( int argc, const char** argv )
     fSliceCount = fgkNSlices;
     //Create tracker instance and set parameters
     fTracker = new AliHLTTPCCATrackerFramework(fAllowGPU, fGPULibrary, fGPUDeviceNum);
+    if ( fAllowGPU && fTracker->GetGPUStatus() < 2 ) {
+      HLTError("GPU Tracker requested but unavailable, aborting.");
+      return -ENODEV;
+    }
     fClusterData = new AliHLTTPCCAClusterData[fgkNSlices];
     if (fGPUHelperThreads != -1)
     {
index 51b819c..088441a 100644 (file)
@@ -269,7 +269,10 @@ AliHLTTPCCATrackerFramework::AliHLTTPCCATrackerFramework(int allowGPU, const cha
        if (allowGPU && fGPULibAvailable)
        {
                fUseGPUTracker = (fGPUTrackerAvailable = (fGPUTracker->InitGPU(-1, GPUDeviceNum) == 0));
-               HLTInfo("GPU Tracker Initialized and available in framework");
+               if(fUseGPUTracker)
+                 HLTInfo("GPU Tracker Initialized and available in framework");
+               else
+                 HLTError("GPU Tracker NOT Initialized and NOT available in framework");
        }
 }