Commit 8d6a0cde authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

print thread::hardware_concurrency().

parent 11c1787c
......@@ -39,6 +39,8 @@
#endif
#include <unistd.h> /* sysconf, gethostname */
#include <thread>
#if defined(SX)
#define RLIM_T long long
#else
......@@ -1172,12 +1174,12 @@ int parse_options_long(int argc, char *argv[])
//cdo_usage();
//fprintf(stderr, "Illegal option!\n");
return -1;
break;
// break;
case ':':
//cdo_usage();
//fprintf(stderr, "Option requires an argument!\n");
return -1;
break;
// break;
case 0:
if ( lnetcdf_hdr_pad )
{
......@@ -1500,6 +1502,11 @@ int main(int argc, char *argv[])
if ( Debug ) print_pthread_info();
if ( Debug )
{
fprintf(stderr, "C++ max thread = %u\n", std::thread::hardware_concurrency());
}
#if defined(_OPENMP)
if ( numThreads <= 0 ) numThreads = 1;
omp_set_num_threads(numThreads);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment