Skip to content

Commit 1ab0d91

Browse files
committed
parallel tools venn diagram
1 parent 05e5148 commit 1ab0d91

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

workshop_notebooks/.ipynb_checkpoints/Part2_Numba-checkpoint.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"import numpy as np\n",
3030
"import time\n",
3131
"\n",
32-
"x = np.arange(100000000).reshape(10000, 10000)\n",
32+
"x = np.arange(1000000).reshape(1000, 1000)\n",
3333
"\n",
3434
"@jit(nopython=True) # Set \"nopython\" mode for best performance\n",
3535
"def go_fast(a): # Function is compiled to machine code when called the first time\n",
@@ -87,14 +87,14 @@
8787
},
8888
{
8989
"cell_type": "code",
90-
"execution_count": 3,
90+
"execution_count": 1,
9191
"metadata": {},
9292
"outputs": [],
9393
"source": [
9494
"import numpy as np\n",
9595
"import time\n",
9696
"\n",
97-
"x = np.arange(100000000).reshape(10000, 10000)\n",
97+
"x = np.arange(1000000).reshape(1000, 1000)\n",
9898
"\n",
9999
"def go_slow(a): # Function is run as standard Python/Numpy code\n",
100100
" trace = 0\n",

workshop_notebooks/Conclusions.ipynb

+27-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,32 @@
4242
"\n",
4343
"Tricky to set up.(even if mpi4py can be imported - requires compiler that provide mpirun\n",
4444
"\n",
45-
"###"
45+
"## RSE Workshop notes\n",
46+
"\n",
47+
"Joblib - https://pypi.org/project/joblib/\n",
48+
"\n",
49+
"FENICS - https://fenicsproject.org/\n",
50+
"\n",
51+
"Dask - http://dask.pydata.org/en/latest/\n",
52+
"\n",
53+
"### Exisiting parallel C/Fortran code?\n",
54+
"\n",
55+
"Cython lets you interface with existing C-code (which could contain OpenMP/MPI etc)\n",
56+
"(No need to re-write it in 'Cython')\n",
57+
"\n",
58+
"Also ctypes, CFFI etc.\n",
59+
"\n",
60+
"F2PY - similar as above but for Fortran code (Python bindings/interface for Fortran code)\n",
61+
"\n",
62+
"http://www.f2py.com/\n",
63+
"\n",
64+
"Other Fortran bindings:\n",
65+
"\n",
66+
"F2X - https://github.com/DLR-SC/F2x\n",
67+
"\n",
68+
"F90WRAP - https://github.com/jameskermode/f90wrap\n",
69+
"\n",
70+
"Pyccel - https://github.com/pyccel/pyccel\n"
4671
]
4772
},
4873
{
@@ -69,7 +94,7 @@
6994
"name": "python",
7095
"nbconvert_exporter": "python",
7196
"pygments_lexer": "ipython3",
72-
"version": "3.6.5"
97+
"version": "3.6.6"
7398
}
7499
},
75100
"nbformat": 4,

workshop_notebooks/Part2_Numba.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"import numpy as np\n",
3030
"import time\n",
3131
"\n",
32-
"x = np.arange(100000000).reshape(10000, 10000)\n",
32+
"x = np.arange(1000000).reshape(1000, 1000)\n",
3333
"\n",
3434
"@jit(nopython=True) # Set \"nopython\" mode for best performance\n",
3535
"def go_fast(a): # Function is compiled to machine code when called the first time\n",
@@ -87,14 +87,14 @@
8787
},
8888
{
8989
"cell_type": "code",
90-
"execution_count": 3,
90+
"execution_count": 1,
9191
"metadata": {},
9292
"outputs": [],
9393
"source": [
9494
"import numpy as np\n",
9595
"import time\n",
9696
"\n",
97-
"x = np.arange(100000000).reshape(10000, 10000)\n",
97+
"x = np.arange(1000000).reshape(1000, 1000)\n",
9898
"\n",
9999
"def go_slow(a): # Function is run as standard Python/Numpy code\n",
100100
" trace = 0\n",

workshop_notebooks/Part3_CythonOpenMP.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
" double a = 0.0, b = 1.0, tmp;\n",
5757
" for (i=0; i<n; ++i)\n",
5858
" {\n",
59-
" tmp a;\n",
59+
" tmp = a;\n",
6060
" a = a + b;\n",
6161
" b = tmp;\n",
6262
" }\n",

workshop_notebooks/venn_diag.jpg

188 KB
Loading

0 commit comments

Comments
 (0)