From c2544b534bb66efb76227ed1015ae4e45c67a2a6 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 24 Sep 2023 10:19:07 +0000 Subject: [PATCH] Add the execution results from the omp example --- notebooks/omp/hello_world.ipynb | 37 ++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/notebooks/omp/hello_world.ipynb b/notebooks/omp/hello_world.ipynb index f90f20dd..d0764753 100644 --- a/notebooks/omp/hello_world.ipynb +++ b/notebooks/omp/hello_world.ipynb @@ -2,19 +2,19 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "73cbab37-71dd-477d-981b-f2ec28c01bd6", "metadata": {}, "outputs": [], "source": [ "#include \n", "#include \n", - "#include " + "#include " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "ef1cd58a-672c-4a6f-843a-6c88fc4911f3", "metadata": {}, "outputs": [], @@ -25,7 +25,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "c2b754ad-9553-4a42-b990-f990a9a269ed", "metadata": {}, "outputs": [], @@ -48,10 +48,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "a37a13d4-fc82-496e-8f42-9e718a8c2aa0", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "max threads: 8\n", + "Hello World from thread = 2 with 8 threads\n", + "Hello World from thread = 0 with 8 threads\n", + "Hello World from thread = 1 with 8 threads\n", + "Hello World from thread = 7 with 8 threads\n", + "Hello World from thread = 4 with 8 threads\n", + "Hello World from thread = 5 with 8 threads\n", + "Hello World from thread = 3 with 8 threads\n", + "Hello World from thread = 6 with 8 threads\n", + "all done, with hopefully 8 threads\n" + ] + } + ], "source": [ "main();" ] @@ -67,16 +84,16 @@ ], "metadata": { "kernelspec": { - "display_name": "C++14", - "language": "C++14", - "name": "xcpp14" + "display_name": "C++17 (+OpenMP)", + "language": "C++17", + "name": "omp-xcpp17" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".cpp", "mimetype": "text/x-c++src", "name": "c++", - "version": "14" + "version": "17" } }, "nbformat": 4,