diff --git a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc index c66ea3dfd1..da10fa0791 100644 --- a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc +++ b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.cc @@ -229,6 +229,28 @@ bool * isGoodHel) // output: isGoodHel[ncomb] - device array //-------------------------------------------------------------------------- + // Retrieve the compiler that was used to build this module + const std::string CPPProcess::getCompiler() + { + std::stringstream out; +#ifdef __CUDACC__ +#if defined __CUDACC_VER_MAJOR__ && defined __CUDACC_VER_MINOR__ && defined __CUDACC_VER_BUILD__ + out << "nvcc " << __CUDACC_VER_MAJOR__ << "." << __CUDACC_VER_MINOR__ << "." << __CUDACC_VER_BUILD__; +#else + out << "nvcc UNKNOWN"; +#endif +#else +#if defined __GNUC__ && defined __GNUC_MINOR__ && defined __GNUC_PATCHLEVEL__ + out << "gcc (GCC) " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__; +#else + out << "gcc UNKNOWKN"; +#endif +#endif + return out.str(); + } + + //-------------------------------------------------------------------------- + #ifdef __CUDACC__ void sigmaKin_setGoodHel(const bool * isGoodHel) // input: isGoodHel[ncomb] - host array { diff --git a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h index 5776cfb7f5..7734ca9a0c 100644 --- a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h +++ b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/CPPProcess.h @@ -87,6 +87,9 @@ class CPPProcess static const int nexternal = mgOnGpu::npar; // static const int nprocesses = 1; + // Retrieve the compiler that was used to build this module + static const std::string getCompiler(); + private: int m_numiterations; // gpu variables diff --git a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/check.cc b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/check.cc index ce735e143b..137ada289f 100644 --- a/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/check.cc +++ b/epoch2/cuda/ee_mumu/SubProcesses/P1_Sigma_sm_epem_mupmum/check.cc @@ -645,7 +645,7 @@ int main(int argc, char **argv) #endif << "OMP threads / `nproc --all` = " << omp_get_max_threads() << " / " << nprocall // includes a newline #endif - //<< "MatrixElements compiler = " << process.getCompiler() << std::endl + << "MatrixElements compiler = " << process.getCompiler() << std::endl << "-----------------------------------------------------------------------" << std::endl << "NumberOfEntries = " << niter << std::endl << std::scientific // fixed format: affects all floats (default precision: 6)