|
75 | 75 | "id": "c3c5ac6f-9434-4de3-9779-8620c72d1a10", |
76 | 76 | "metadata": {}, |
77 | 77 | "source": [ |
78 | | - "## Executing script in terminal on JupyterHub\n", |
| 78 | + "## Executing script in terminal on JupyterHub @ NERSC\n", |
79 | 79 | "\n", |
80 | 80 | "Now, we need to open a new terminal (click blue \"+\" in top left corner of JupyterHub and then \"Terminal\") which should look something like this\n", |
81 | 81 | "\n", |
82 | 82 | "```\n", |
83 | | - "(PtyPy) benedikt@nid001848:/global/u2/b/benedikt> \n", |
| 83 | + "benedikt@login01:/global/u2/b/benedikt/tutorials/notebooks/experimental_xray_data> \n", |
84 | 84 | "```\n", |
85 | 85 | "\n", |
86 | | - "with the (PtyPy) environment already loaded. We can then navigate to the folder for this example \n", |
| 86 | + "We then need to load the PtyPy conda environment\n", |
| 87 | + "\n", |
| 88 | + "```\n", |
| 89 | + "module load python\n", |
| 90 | + "conda activate /global/common/software/trn005/ptypy_env\n", |
| 91 | + "```\n", |
| 92 | + "\n", |
| 93 | + "which should make your terminal look like this\n", |
| 94 | + "\n", |
| 95 | + "```\n", |
| 96 | + "(ptypy_env) benedikt@login01:/global/u2/b/benedikt/tutorials/notebooks/experimental_xray_data> \n", |
| 97 | + "```\n", |
| 98 | + "\n", |
| 99 | + "with the (PtyPy) environment loaded. If not already in the correct folder, we can navigate to the folder for this example \n", |
87 | 100 | "\n", |
88 | 101 | "```bash\n", |
89 | 102 | "cd $HOME/tutorials/notebooks/experimental_xray_data\n", |
|
92 | 105 | "and execute a multi-GPU reconstruction via ```srun``` using all 4 GPUs that is available on a Perlmutter node. \n", |
93 | 106 | "\n", |
94 | 107 | "```bash\n", |
95 | | - "srun -n 4 -c 2 --gpus-per-task=1 --gpu-bin=None python ptypy_run_dls_i08_nanogold.py\n", |
| 108 | + "srun -n 4 -c 2 --gpus-per-task=1 --gpu-bind=None python ptypy_run_dls_i08_nanogold.py\n", |
96 | 109 | "```" |
97 | 110 | ] |
98 | 111 | }, |
|
102 | 115 | "metadata": {}, |
103 | 116 | "source": [ |
104 | 117 | "<div class=\"alert alert-warning\" markdown=\"1\">\n", |
105 | | - " <strong>Challenge</strong><br>Run the I08 nanogold example in a terminal using 4 GPUs and compare the speed against the previous example from the Jupyter notebook which was using just a single GPU.\n", |
| 118 | + " <strong>Challenge</strong><br>Run the I08 nanogold example in a terminal using 1,2,3 and 4 GPUs and compare the speed. You can add <code>p.io.benchmark=\"all\"</code> to get performance benchmark numbers written by PtyPy into a file called \"benchmark.json\"\n", |
106 | 119 | "</div>" |
107 | 120 | ] |
108 | 121 | }, |
|
120 | 133 | "metadata": {}, |
121 | 134 | "source": [ |
122 | 135 | "# commands to copy into terminal\n", |
| 136 | + "module load python\n", |
| 137 | + "conda activate /global/common/software/trn005/ptypy_env\n", |
123 | 138 | "cd $HOME/tutorials/notebooks/experimental_xray_data\n", |
124 | | - "srun -n 4 -c 2 --gpus-per-task=1 --gpu-bin=None python ptypy_run_dls_i08_nanogold.py" |
| 139 | + "srun -n 4 -c 2 --gpus-per-task=1 --gpu-bind=None python ptypy_run_dls_i08_nanogold.py" |
125 | 140 | ] |
126 | 141 | }, |
127 | 142 | { |
|
176 | 191 | "name": "python", |
177 | 192 | "nbconvert_exporter": "python", |
178 | 193 | "pygments_lexer": "ipython3", |
179 | | - "version": "3.9.7" |
| 194 | + "version": "3.11.7" |
180 | 195 | } |
181 | 196 | }, |
182 | 197 | "nbformat": 4, |
|
0 commit comments