Skip to content

Commit 702c57c

Browse files
committed
Debug
1 parent 6960a0c commit 702c57c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
mkdir -p build
9797
cd build
98-
find $CONDA_PREFIX/include/
98+
find $CONDA_PREFIX
9999
cmake .. \
100100
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
101101
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \

test/test_xcpp_kernel.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,20 @@ class XCppTests(jupyter_kernel_test.KernelTests):
135135
#include <omp.h>
136136
#include <iostream>
137137
#include <clang/Interpreter/CppInterOp.h>
138-
std::cerr<<Cpp::LoadLibrary("/home/runner/micromamba/envs/xeus-cpp/libomp.so")<<std::endl;
138+
if(Cpp::LoadLibrary("/home/runner/micromamba/envs/xeus-cpp/libomp.so")) {
139+
int max_threads = omp_get_max_threads();
140+
omp_set_thread_num(max_threads);
141+
#pragma omp parallel
142+
{
143+
if(omp_get_thread_num()==2) {
144+
std::cerr<<omp_get_thread_num()<<std::endl;
145+
}
146+
}
147+
}
148+
else
149+
{
150+
std::cerr<<"OpenMP library not loaded"<<std::endl;
151+
}
139152
"""
140153
def test_xcpp_omp(self):
141154
self.flush_channels()

0 commit comments

Comments
 (0)