Skip to content

Commit 9563d70

Browse files
committed
distributed fix
1 parent aed4883 commit 9563d70

5 files changed

+166
-100
lines changed

02_constr_fwi_judi.ipynb

+8-3
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@
311311
"ENV[\"OMP_PROC_BIND\"] = \"close\"\n",
312312
"ENV[\"OMP_NUM_THREADS\"] = \"$(div(nthread, nw))\" \n",
313313
"addprocs(nw)\n",
314+
"\n",
315+
"# This is becuase of how the server is setup and isn't needed in practice \n",
316+
"base_startup = LOAD_PATH[end]\n",
317+
"@sync @everywhere workers() push!(LOAD_PATH, $(base_startup))\n",
318+
"\n",
314319
"@show workers()\n",
315320
"for k in 1:nworkers()\n",
316321
" place1 = (k - 1) * div(nthread,nworkers())\n",
@@ -2953,15 +2958,15 @@
29532958
],
29542959
"metadata": {
29552960
"kernelspec": {
2956-
"display_name": "Julia 1.6.3",
2961+
"display_name": "Julia 1.8.0",
29572962
"language": "julia",
2958-
"name": "julia-1.6"
2963+
"name": "julia-1.8"
29592964
},
29602965
"language_info": {
29612966
"file_extension": ".jl",
29622967
"mimetype": "application/julia",
29632968
"name": "julia",
2964-
"version": "1.6.3"
2969+
"version": "1.8.0"
29652970
}
29662971
},
29672972
"nbformat": 4,

04_probing.ipynb

+145-84
Large diffs are not rendered by default.

05_chainrules.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"using Zygote, ChainRulesCore, LinearAlgebra"
20+
"using Flux, ChainRulesCore, LinearAlgebra"
2121
]
2222
},
2323
{
@@ -446,7 +446,7 @@
446446
}
447447
],
448448
"source": [
449-
"summary = optimize(loss, δloss!, randn(N), ConjugateGradient(),\n",
449+
"sol = optimize(loss, δloss!, randn(N), ConjugateGradient(),\n",
450450
" Optim.Options(g_tol = 1e-12, iterations = 200, store_trace = true, show_trace = true, show_every=1))"
451451
]
452452
},
@@ -480,22 +480,22 @@
480480
"source": [
481481
"using PyPlot\n",
482482
"plot(x, label=\"true\")\n",
483-
"plot(summary.minimizer, label=\"Recovered\")\n",
483+
"plot(sol.minimizer, label=\"Recovered\")\n",
484484
"legend()"
485485
]
486486
}
487487
],
488488
"metadata": {
489489
"kernelspec": {
490-
"display_name": "Julia 1.6.3",
490+
"display_name": "Julia 1.8.0",
491491
"language": "julia",
492-
"name": "julia-1.6"
492+
"name": "julia-1.8"
493493
},
494494
"language_info": {
495495
"file_extension": ".jl",
496496
"mimetype": "application/julia",
497497
"name": "julia",
498-
"version": "1.6.3"
498+
"version": "1.8.0"
499499
}
500500
},
501501
"nbformat": 4,

06_seis4ccs.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1038,15 +1038,15 @@
10381038
],
10391039
"metadata": {
10401040
"kernelspec": {
1041-
"display_name": "Julia 1.6.2",
1041+
"display_name": "Julia 1.8.0",
10421042
"language": "julia",
1043-
"name": "julia-1.6"
1043+
"name": "julia-1.8"
10441044
},
10451045
"language_info": {
10461046
"file_extension": ".jl",
10471047
"mimetype": "application/julia",
10481048
"name": "julia",
1049-
"version": "1.6.2"
1049+
"version": "1.8.0"
10501050
}
10511051
},
10521052
"nbformat": 4,

07_normalizing_flow_training.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -679,17 +679,17 @@
679679
}
680680
},
681681
"kernelspec": {
682-
"display_name": "Julia 1.7.2",
682+
"display_name": "Julia 1.8.0",
683683
"language": "julia",
684-
"name": "julia-1.7"
684+
"name": "julia-1.8"
685685
},
686686
"language_info": {
687687
"file_extension": ".jl",
688688
"mimetype": "application/julia",
689689
"name": "julia",
690-
"version": "1.7.2"
690+
"version": "1.8.0"
691691
}
692692
},
693693
"nbformat": 4,
694-
"nbformat_minor": 2
694+
"nbformat_minor": 4
695695
}

0 commit comments

Comments
 (0)