jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.02k stars 292 forks source link

OpenMP in xeus-cling #431

Open kirillsor11 opened 2 years ago

kirillsor11 commented 2 years ago

I have OpenMP connected, but when I try to parallelize the loop using #pragma omp parallel throws this error:

IncrementalExecutor::executeFunction: symbol '__kmpc_for_static_init_4' unresolved while linking [cling interface function]! IncrementalExecutor::executeFunction: symbol '__kmpc_for_static_fini' unresolved while linking [cling interface function]! IncrementalExecutor::executeFunction: symbol '__kmpc_fork_call' unresolved while linking [cling interface function]! Interpreter Error:

kirillsor11 commented 2 years ago

libraries:

#include <omp.h>
#pragma cling load("libgomp")

For example omp_get_max_threads() works fine