Skip to content

Commit 2106bc0

Browse files
committed
Update test_xcpp_kernel.py
1 parent d5d5e12 commit 2106bc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_xcpp_kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class XCppTests(jupyter_kernel_test.KernelTests):
131131
'mime': 'image/png'
132132
}
133133
]
134-
code_omp='#include <iostream>\n#include "omp.h"\n#include "clang/Interpreter/CppInterOp.h"\nCpp::LoadLibrary("libomp");omp_set_thread_num(4);#pragma omp parallel\n{\nif(omp_get_thread_num()==2) std::cout<<omp_get_thread_num()<<std::endl;}'
134+
code_omp='#include <iostream>\n#include <omp>\n#include <clang/Interpreter/CppInterOp.h>\nCpp::LoadLibrary("libomp");int max_threads = omp_get_max_threads();omp_set_thread_num(max_threads);#pragma omp parallel \n{\nif(omp_get_thread_num()==2) std::cout<<omp_get_thread_num()<<std::endl;}'
135135
def test_xcpp_omp(self):
136136
self.flush_channels()
137137
reply, output_msgs = self.execute_helper(code=self.code_omp,timeout=100)
@@ -152,4 +152,4 @@ class XCppTests2(jupyter_kernel_test.KernelTests):
152152

153153

154154
if __name__ == '__main__':
155-
unittest.main()
155+
unittest.main()

0 commit comments

Comments
 (0)