File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ macro(xeus_cpp_create_target target_name linkage output_name)
314
314
set (XEUS_CPP_XEUS_TARGET xeus-static )
315
315
endif ()
316
316
317
- target_link_libraries (${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse xtl OpenMP::OpenMP_CXX )
317
+ target_link_libraries (${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse xtl )
318
318
319
319
if (WIN32 OR CYGWIN )
320
320
#
Original file line number Diff line number Diff line change @@ -135,15 +135,22 @@ class XCppTests(jupyter_kernel_test.KernelTests):
135
135
#include <omp.h>
136
136
#include <iostream>
137
137
#include <clang/Interpreter/CppInterOp.h>
138
- Cpp::LoadLibrary("libomp");
138
+ bool library_loaded=Cpp::LoadLibrary("/home/runner/micromamba/envs/xeus-cpp/libomp.so");
139
+ if(library_loaded) {
139
140
int max_threads = omp_get_max_threads();
140
141
omp_set_thread_num(max_threads);
141
142
#pragma omp parallel
142
143
{
143
144
if(omp_get_thread_num()==2) {
144
145
std::cerr<<omp_get_thread_num()<<std::endl;
145
146
}
146
- }"""
147
+ }
148
+ }
149
+ else
150
+ {
151
+ std::cerr<<"OpenMP library not loaded"<<std::endl;
152
+ }
153
+ """
147
154
def test_xcpp_omp (self ):
148
155
self .flush_channels ()
149
156
reply , output_msgs = self .execute_helper (code = self .code_omp ,timeout = 1 )
You can’t perform that action at this time.
0 commit comments