{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Start each lab by giving an overview of what to expect to learn. Avoid using `/edit/` in your notebook as it will change to a fixed path on remote machine. \n",
    "\n",
    "**EXAMPLE**\n",
    "\n",
    "Let's execute the cell below to display information about the GPUs running on the server by running the pgaccelinfo command, which ships with the PGI compiler that we will be using. To do this, execute the cell block below by giving it focus (clicking on it with your mouse), and hitting Ctrl-Enter, or pressing the play button in the toolbar above. If all goes well, you should see some output returned below the grey cell."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pgaccelinfo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Heading1\n",
    "\n",
    "### Heading3\n",
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis sodales neque, ac tincidunt justo. Cras facilisis eget magna non mollis. Donec rutrum vulputate dolor non efficitur. Maecenas porttitor imperdiet accumsan. Etiam ac massa metus. Cras malesuada felis tellus, at pretium velit ullamcorper et. Sed feugiat egestas mi ut vehicula. Nam vel interdum felis. Nam ullamcorper velit ut blandit facilisis. Integer cursus erat ut felis viverra maximus. Phasellus leo lectus, dapibus ut faucibus non, dignissim porttitor neque. Fusce sit amet maximus justo. Vivamus nec tempus nisi. Donec interdum eros et augue mollis, vitae semper arcu semper.\n",
    "\n",
    "- **Lorem** ipsum dolor sit amet\n",
    "- **Lorem** ipsum dolor sit amet\n",
    "- **Lorem** ipsum dolor sit amet\n",
    "\n",
    "<img src=\"images/Nsight Diagram.png\" width=\"80%\" height=\"80%\">\n",
    "*EXAMPLE image: ipsum dolor sit amet*\n",
    "\n",
    "#### Heading4\n",
    "Proin aliquet, odio placerat euismod accumsan, risus est ultrices nisi, quis porttitor libero sapien ac nunc. Donec fringilla eros at dui sagittis, in tempus magna tincidunt. Praesent sem lacus, dapibus id leo ut, laoreet tempus nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut vehicula est non metus aliquam, faucibus blandit risus tempus. Aenean ultrices turpis nec pretium finibus. Duis ac nisl dui. Nulla bibendum tincidunt ante, ornare convallis sem maximus sit amet. Vivamus vitae velit sed felis feugiat gravida. Suspendisse sagittis non elit consequat auctor. Nunc vulputate posuere neque, vel vulputate diam viverra id. Maecenas faucibus mi arcu, non interdum sem condimentum nec. Curabitur dictum lacus vel felis commodo, et semper urna congue. Donec at ex eros. Nam euismod posuere aliquam. Quisque et faucibus elit.\n",
    "\n",
    "\n",
    "**EXAMPLE CODE**\n",
    "\n",
    "```cpp\n",
    "    nvtxRangePushA(\"init\");\n",
    "    initialize(A, Anew, m, n);\n",
    "    nvtxRangePop();\n",
    "\n",
    "    printf(\"Jacobi relaxation Calculation: %d x %d mesh\\n\", n, m);\n",
    "\n",
    "    double st = omp_get_wtime();\n",
    "    int iter = 0;\n",
    "\n",
    "    nvtxRangePushA(\"while\");\n",
    "    while ( error > tol && iter < iter_max )\n",
    "    {\n",
    "        nvtxRangePushA(\"calc\");\n",
    "        error = calcNext(A, Anew, m, n);\n",
    "        nvtxRangePop();\n",
    "\n",
    "        nvtxRangePushA(\"swap\");\n",
    "        swap(A, Anew, m, n);\n",
    "        nvtxRangePop();\n",
    "\n",
    "        if(iter % 100 == 0) printf(\"%5d, %0.6f\\n\", iter, error);\n",
    "\n",
    "        iter++;\n",
    "    }\n",
    "    nvtxRangePop();\n",
    "```\n",
    "\n",
    "**EXAMPLE LINK**\n",
    "\n",
    "Detailed NVTX documentation can be found under the __[CUDA Profiler user guide](https://docs.nvidia.com/cuda/profiler-users-guide/index.html#nvtx)__."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "-----\n",
    "\n",
    "# <div style=\"text-align: center ;border:3px; border-style:solid; border-color:#FF0000  ; padding: 1em\">[NEXT](appName_c_lab1.ipynb)</div>\n",
    "\n",
    "-----"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Links and Resources\n",
    "\n",
    "Include all the necessary links and resources here including links to download a tool, links for further reading, any slack channel or mailing list you would like them to join.\n",
    "\n",
    "**EXAMPLE**\n",
    "\n",
    "Don't forget to check out additional [OpenACC Resources](https://www.openacc.org/resources) and join our [OpenACC Slack Channel](https://www.openacc.org/community#slack) to share your experience and get more help from the community.\n",
    "\n",
    "--- \n",
    "\n",
    "## Licensing \n",
    "\n",
    "This material is released by NVIDIA Corporation under the Creative Commons Attribution 4.0 International (CC BY 4.0). "
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
