mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add read out of OpenMP number of threads
Read out of number of threads for OpenMP. Expected to be equal set environment variable OMP_NUM_THREADS
This commit is contained in:
parent
b9589b3719
commit
9b119e6c04
@ -37,6 +37,7 @@
|
||||
#include <grpcpp/grpcpp.h>
|
||||
|
||||
#include <QTcpServer>
|
||||
#include <omp.h>
|
||||
|
||||
using grpc::CompletionQueue;
|
||||
using grpc::Server;
|
||||
@ -141,6 +142,13 @@ void RiaGrpcServerImpl::initialize()
|
||||
|
||||
ServerBuilder builder;
|
||||
|
||||
int numOmpThreads = 0;
|
||||
#pragma omp parallel
|
||||
{
|
||||
numOmpThreads = omp_get_num_threads();
|
||||
}
|
||||
RiaLogging::info( QString( "OpenMP Num Threads: %1" ).arg( numOmpThreads ) );
|
||||
|
||||
// When setting port number to 0, grpc will find and use a valid port number
|
||||
// The port number is assigned to the m_portNumber variable after calling builder.BuildAndStart()
|
||||
QString requestedServerAddress = QString( "localhost:%1" ).arg( m_portNumber );
|
||||
|
Loading…
Reference in New Issue
Block a user