|
26 | 26 | "git clone --recurse-submodules https://github.com/idefix-code/idefix.git idefix.src\n", |
27 | 27 | "export IDEFIX_DIR=$PWD/idefix.src\n", |
28 | 28 | "```\n", |
29 | | - "For conveniance, we set the `IDEFIX_DIR` environment variable to the absolute path of the root directory of idefix (as above). \n", |
30 | | - "\n", |
31 | | - "If you intend to use the python script provided in this tutorial, best is to deploy a python environement with everything already set up. \n", |
32 | | - "We therefore create a python environement in the directory `$IDEFIX_DIR/test` with the right modules\n", |
33 | | - "\n", |
34 | | - "```shell\n", |
35 | | - "cd $IDEFIX_DIR/test\n", |
36 | | - "python3 -m venv ./env\n", |
37 | | - "source env/bin/activate\n", |
38 | | - "pip install -r python_requirements.txt\n", |
39 | | - "```" |
40 | | - ] |
41 | | - }, |
42 | | - { |
43 | | - "cell_type": "markdown", |
44 | | - "id": "6a5f21fb-2d61-4ab6-8539-a666b83ddc05", |
45 | | - "metadata": {}, |
46 | | - "source": [ |
47 | 29 | "For conveniance, we set the `IDEFIX_DIR` environment variable to the absolute path of the root directory of idefix (as above). " |
48 | 30 | ] |
49 | 31 | }, |
|
134 | 116 | "\n", |
135 | 117 | "Running on a GPU usually requires a specific environement for the architecture you target. For Nvidia gpus, you will need CUDA with a compatible host compiler, on AMD GPUs, this is Rocm with its llvm compiler, while for intel you will need the intel oneapi compiler.\n", |
136 | 118 | "\n", |
137 | | - "For this tutorial, we have prepared and tested environement for each machine (dgx, h200 and pocamd). You just need to source the right environement from `idefix-tutorial/environement/xxx.sh` in your terminal window. e.g. on dgx:\n", |
| 119 | + "For this tutorial, we have prepared and tested environement for each machine (dgx, h200 and pocamd). You just need to source the right environement from `idefix-tutorial/environement/xxx.env` in your terminal window. e.g. on dgx:\n", |
138 | 120 | "\n", |
139 | 121 | "```shell\n", |
140 | | - "source <path_to_idefix_tutorial>/environements/dgx.sh\n", |
| 122 | + "source $IDEFIX_TUTORIAL_DIR/environements/dgx.env\n", |
141 | 123 | "```\n", |
142 | 124 | "\n", |
143 | 125 | "Don't forget to source this environement each time you open a new terminal on the target machine.\n", |
|
213 | 195 | "For this first simple setup, we move in the SimpleSetup/problem1 directory of the tutorial. i.e\n", |
214 | 196 | "\n", |
215 | 197 | "```shell\n", |
216 | | - "cd <path_to_idefix_tutorial>/SimpleSetup/problem1/\n", |
| 198 | + "cd $IDEFIX_TUTORIAL_DIR/SimpleSetup/problem1/\n", |
217 | 199 | "```\n", |
218 | 200 | "\n", |
219 | 201 | "## What is an idefix setup?\n", |
|
278 | 260 | "import os\n", |
279 | 261 | "import sys\n", |
280 | 262 | "# Possibly adapt the idefix path depending on where you cloned the sources\n", |
281 | | - "sys.path.append(\"../idefix.src\")\n", |
| 263 | + "sys.path.append(\"idefix.src\")\n", |
282 | 264 | "from pytools.vtk_io import readVTK\n", |
283 | 265 | "import matplotlib.pyplot as plt\n", |
284 | 266 | "import numpy as np" |
|
402 | 384 | "We first move to the problem directory\n", |
403 | 385 | "\n", |
404 | 386 | "```shell\n", |
405 | | - "cd <path_to_idefix_tutorial>/PythonSetup/problem/\n", |
| 387 | + "cd $IDEFIX_TUTORIAL_DIR/PythonSetup/problem/\n", |
406 | 388 | "```\n", |
407 | 389 | "\n", |
408 | 390 | "## Your tasks\n", |
|
465 | 447 | "For now, lets move to the problem directory\n", |
466 | 448 | "\n", |
467 | 449 | "```shell\n", |
468 | | - "cd idefix-tutorial/AdvancedSetup/problem1\n", |
| 450 | + "cd $IDEFIX_TUTORIAL_DIR/AdvancedSetup/problem1\n", |
469 | 451 | "```" |
470 | 452 | ] |
471 | 453 | }, |
|
657 | 639 | "The first problem is a simple 1D shock tube problem. This can be compiled and run on your laptop or on a cluster.\n", |
658 | 640 | "\n", |
659 | 641 | "```shell\n", |
660 | | - "cd idefix-tutorial/Debugging/problem1\n", |
| 642 | + "cd $IDEFIX_TUTORIAL_DIR/Debugging/problem1\n", |
661 | 643 | "```\n", |
662 | 644 | "\n", |
663 | 645 | "We then configure, compile and run the code\n", |
|
740 | 722 | "The second problem is a pure thermal diffusion problem where the gas is kept fixed with 0 velocity. This can be compiled and run *on your laptop*.\n", |
741 | 723 | "\n", |
742 | 724 | "```shell\n", |
743 | | - "cd idefix-tutorial/Debugging/problem2\n", |
| 725 | + "cd $IDEFIX_TUTORIAL_DIR/Debugging/problem2\n", |
744 | 726 | "```\n", |
745 | 727 | "\n", |
746 | 728 | "We then configure, compile and run the code\n", |
|
861 | 843 | "Let's move to problem 4, which is again a planet-disk interraction problem. This can be compiled and run *on your laptop* or on the on a cluster, but let's focus for now on the GPU version on the a cluster (you can try to do the exercise on your laptop). First go to the right directory\n", |
862 | 844 | "\n", |
863 | 845 | "```shell\n", |
864 | | - "cd idefix-tutorial/Debugging/problem4\n", |
| 846 | + "cd $IDEFIX_TUTORIAL_DIR/Debugging/problem4\n", |
865 | 847 | "```\n", |
866 | 848 | "\n", |
867 | 849 | "We then configure\n", |
|
909 | 891 | { |
910 | 892 | "cell_type": "code", |
911 | 893 | "execution_count": null, |
912 | | - "id": "68fea61b-5fa3-4cfe-85a6-c170b43aeaec", |
| 894 | + "id": "0e28f9fb-0dc0-4e35-9eca-8ae4254c4529", |
913 | 895 | "metadata": {}, |
914 | 896 | "outputs": [], |
915 | 897 | "source": [] |
|
0 commit comments