Updated cudaForStorm/CMakeLists.txt to make use of the new GIT based version schema.
Added version functions to the Cuda Plugin.
Edited storm.cpp to show version infos for the CUDA Plugin.
Fixed a critical error in basicValueIteration.cu which causes random SEGFAULTs... :P
Streamlined the TopologicalValueIterationNondeterministicLinearEquationSolver.cpp. The SCC group optimizer now returns flat_sets instead of a vector as the sets are ordered, which is required for the Solver to work.
This is now a stable version of StoRM containing a fully wor
Former-commit-id: 47d5c2825c
LOG4CPLUS_INFO(logger,"We will allocate "<<(sizeof(uint_fast64_t)*sccSubmatrix.rowIndications.size()+sizeof(uint_fast64_t)*sccSubmatrix.columnsAndValues.size()*2+sizeof(double)*sccSubX.size()+sizeof(double)*sccSubX.size()+sizeof(double)*sccSubB.size()+sizeof(double)*sccSubB.size()+sizeof(uint_fast64_t)*sccSubNondeterministicChoiceIndices.size())<<" Bytes.");
LOG4CPLUS_INFO(logger,"We will allocate "<<(sizeof(uint_fast64_t)*sccSubmatrix.rowIndications.size()+sizeof(uint_fast64_t)*sccSubmatrix.columnsAndValues.size()*2+sizeof(double)*sccSubX.size()+sizeof(double)*sccSubX.size()+sizeof(double)*sccSubB.size()+sizeof(double)*sccSubB.size()+sizeof(uint_fast64_t)*sccSubNondeterministicChoiceIndices.size())<<" Bytes.");
LOG4CPLUS_INFO(logger,"The CUDA Runtime Version is "<<getRuntimeCudaVersion());
LOG4CPLUS_INFO(logger,"The CUDA Runtime Version is "<<getRuntimeCudaVersion());
LOG4CPLUS_INFO(logger,"Executed "<<localIterations<<" of max. "<<maximalNumberOfIterations<<" Iterations.");
uint_fast64_tdiffCount=0;
for(size_ti=0;i<currentX->size();++i){
if(currentX->at(i)!=copyX.at(i)){
LOG4CPLUS_WARN(logger,"CUDA solution differs on index "<<i<<" diff. "<<std::abs(currentX->at(i)-copyX.at(i))<<", CPU: "<<currentX->at(i)<<", CUDA: "<<copyX.at(i));
std::cout<<"CUDA solution differs on index "<<i<<" diff. "<<std::abs(currentX->at(i)-copyX.at(i))<<", CPU: "<<currentX->at(i)<<", CUDA: "<<copyX.at(i)<<std::endl;
++diffCount;
}
}
std::cout<<"CUDA solution differed in "<<diffCount<<" of "<<currentX->size()<<" values."<<std::endl;
#else
LOG4CPLUS_ERROR(logger,"The useGpu Flag of a SCC was set, but this version of StoRM does not support CUDA acceleration. Internal Error!");
throwstorm::exceptions::InvalidStateException()<<"The useGpu Flag of a SCC was set, but this version of StoRM does not support CUDA acceleration. Internal Error!";
#endif
#endif
}else{
}else{
localIterations=0;
localIterations=0;
@ -256,14 +199,6 @@ namespace storm {
currentMaxLocalIterations=localIterations;
currentMaxLocalIterations=localIterations;
}
}
}
}
//if (!xMemoryProvided) {
// delete newX;
//}
// if (!multiplyResultMemoryProvided) {
// delete multiplyResult;
// }
// Check if the solver converged and issue a warning otherwise.
// Check if the solver converged and issue a warning otherwise.
std::cout<<"Compiled with Runtime Support for the StoRM CUDA Plugin."<<std::endl;
std::cout<<"Detected the StoRM CUDA Plugin in Version "<<getStormCudaPluginVersionMajor()<<"."<<getStormCudaPluginVersionMinor()<<"."<<getStormCudaPluginVersionPatch();
std::cout<<" build from revision "<<getStormCudaPluginVersionHash();
if(getStormCudaPluginVersionIsDirty()){
std::cout<<" (DIRTY)";
}
std::cout<<"."<<std::endl;
#endif
#ifdef STORM_HAVE_INTELTBB
#ifdef STORM_HAVE_INTELTBB
std::cout<<"Linked with Intel Threading Building Blocks v"<<TBB_VERSION_MAJOR<<"."<<TBB_VERSION_MINOR<<" (Interface version "<<TBB_INTERFACE_VERSION<<")."<<std::endl;
std::cout<<"Linked with Intel Threading Building Blocks v"<<TBB_VERSION_MAJOR<<"."<<TBB_VERSION_MINOR<<" (Interface version "<<TBB_INTERFACE_VERSION<<")."<<std::endl;