diff --git a/dev/getting_started_with_julia/index.html b/dev/getting_started_with_julia/index.html index f010817..d1fb3ca 100644 --- a/dev/getting_started_with_julia/index.html +++ b/dev/getting_started_with_julia/index.html @@ -14,4 +14,4 @@ julia> DataFrame(a=[1,2],b=[3,4])

You should get an error or a BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"

Copy the contents of previous code block into a file called Project.toml and place it in an empty folder named newproject. It is important that the file is named Project.toml. You can create a new folder from the REPL with

julia> mkdir("newproject")

To install all the packages registered in this file you need to activate the folder containing your Project.toml file

(@v1.8) pkg> activate newproject

and then instantiating it

(newproject) pkg> instantiate

The instantiate command will download and install all listed packages and their dependencies in just one click.

Getting help in package mode

You can get help about a particular package operator by writing help in front of it

(@v1.8) pkg> help activate

You can get an overview of all package commands by typing help alone

(@v1.8) pkg> help

Package operations in Julia code

In some situations it is required to use package commands in Julia code, e.g., to automatize installation and deployment of Julia applications. This can be done using the Pkg package. For instance

julia> using Pkg
-julia> Pkg.status()

is equivalent to calling status in package mode.

(@v1.8) pkg> status

Conclusion

We have learned the basics of how to work with Julia. If you want to further dig into the topics we have covered here, you can take a look at the following links:

+julia> Pkg.status()

is equivalent to calling status in package mode.

(@v1.8) pkg> status

Conclusion

We have learned the basics of how to work with Julia. If you want to further dig into the topics we have covered here, you can take a look at the following links:

diff --git a/dev/index.html b/dev/index.html index ddcba8d..88d7aa4 100644 --- a/dev/index.html +++ b/dev/index.html @@ -2,4 +2,4 @@ Home · XM_40017

Programming Large-Scale Parallel Systems (XM_40017)

Welcome to the interactive lecture notes of the Programming Large-Scale Parallel Systems course at VU Amsterdam!

What

This page contains part of the course material of the Programming Large-Scale Parallel Systems course at VU Amsterdam. We provide several lecture notes in jupyter notebook format, which will help you to learn how to design, analyze, and program parallel algorithms on multi-node computing systems. Further information about the course is found in the study guide (click here) and our Canvas page (for registered students).

Note

This page contains only a part of the course material. The rest is available on Canvas. In particular, the lecture notes in this public webpage do not fully cover all topics in the final exam.

How to use this page

You have two main ways of running the notebooks:

  • Download the notebooks and run them locally on your computer (recommended)
  • Run the notebooks on the cloud via mybinder.org (high startup time).

You also have the static version of the notebooks displayed in this webpage for quick reference. At each notebook page you will find a green box with links to download the notebook or to open in on mybinder.

How to run the notebooks locally

To run a notebook locally follow these steps:

  • Install Julia (if not done already). More information in Getting started.
  • Download the notebook.
  • Launch Julia. More information in Getting started.
  • Execute these commands in the Julia command line:
julia> using Pkg
 julia> Pkg.add("IJulia")
 julia> using IJulia
-julia> notebook()
  • These commands will open a jupyter in your web browser. Navigate in jupyter to the notebook file you have downloaded and open it.

Authors

This material is created by Francesc Verdugo with the help of Gelieza Kötterheinrich. Part of the notebooks are based on the course slides by Henri Bal.

License

All material on this page that is original to this course may be used under a CC BY 4.0 license.

Acknowledgment

This page was created with the support of the Faculty of Science of Vrije Universiteit Amsterdam in the framework of the project "Interactive lecture notes and exercises for the Programming Large-Scale Parallel Systems course" funded by the "Innovation budget BETA 2023 Studievoorschotmiddelen (SVM) towards Activated Blended Learning".

+julia> notebook()

Authors

This material is created by Francesc Verdugo with the help of Gelieza Kötterheinrich. Part of the notebooks are based on the course slides by Henri Bal.

License

All material on this page that is original to this course may be used under a CC BY 4.0 license.

Acknowledgment

This page was created with the support of the Faculty of Science of Vrije Universiteit Amsterdam in the framework of the project "Interactive lecture notes and exercises for the Programming Large-Scale Parallel Systems course" funded by the "Innovation budget BETA 2023 Studievoorschotmiddelen (SVM) towards Activated Blended Learning".

diff --git a/dev/notebook-html/tsp.html b/dev/notebook-html/tsp.html index 4e5aeb7..a9a71ae 100644 --- a/dev/notebook-html/tsp.html +++ b/dev/notebook-html/tsp.html @@ -7620,12 +7620,12 @@ a.anchor-link { -
+
diff --git a/dev/notebooks/jacobi_method/index.html b/dev/notebooks/jacobi_method/index.html index 873821a..659378a 100644 --- a/dev/notebooks/jacobi_method/index.html +++ b/dev/notebooks/jacobi_method/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); -
+ diff --git a/dev/notebooks/julia_async/index.html b/dev/notebooks/julia_async/index.html index a18076d..7a78f03 100644 --- a/dev/notebooks/julia_async/index.html +++ b/dev/notebooks/julia_async/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/julia_basics/index.html b/dev/notebooks/julia_basics/index.html index d7aac4a..95e0800 100644 --- a/dev/notebooks/julia_basics/index.html +++ b/dev/notebooks/julia_basics/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/julia_distributed/index.html b/dev/notebooks/julia_distributed/index.html index 56e16b0..3fbccd1 100644 --- a/dev/notebooks/julia_distributed/index.html +++ b/dev/notebooks/julia_distributed/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/julia_intro/index.html b/dev/notebooks/julia_intro/index.html index 20ae146..558a3d6 100644 --- a/dev/notebooks/julia_intro/index.html +++ b/dev/notebooks/julia_intro/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/julia_jacobi/index.html b/dev/notebooks/julia_jacobi/index.html index 8e01539..749f7a6 100644 --- a/dev/notebooks/julia_jacobi/index.html +++ b/dev/notebooks/julia_jacobi/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/julia_tutorial/index.html b/dev/notebooks/julia_tutorial/index.html index 5d06464..5e6d966 100644 --- a/dev/notebooks/julia_tutorial/index.html +++ b/dev/notebooks/julia_tutorial/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/matrix_matrix/index.html b/dev/notebooks/matrix_matrix/index.html index 72722d4..c00bdad 100644 --- a/dev/notebooks/matrix_matrix/index.html +++ b/dev/notebooks/matrix_matrix/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/mpi_tutorial/index.html b/dev/notebooks/mpi_tutorial/index.html index 16af658..1aaa683 100644 --- a/dev/notebooks/mpi_tutorial/index.html +++ b/dev/notebooks/mpi_tutorial/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/notebook-hello/index.html b/dev/notebooks/notebook-hello/index.html index 8d2988a..e4067f9 100644 --- a/dev/notebooks/notebook-hello/index.html +++ b/dev/notebooks/notebook-hello/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/solutions/index.html b/dev/notebooks/solutions/index.html index 00498f8..c017f54 100644 --- a/dev/notebooks/solutions/index.html +++ b/dev/notebooks/solutions/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/notebooks/tsp.ipynb b/dev/notebooks/tsp.ipynb index f8017c4..0c7898e 100644 --- a/dev/notebooks/tsp.ipynb +++ b/dev/notebooks/tsp.ipynb @@ -157,10 +157,21 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "03f0dd8e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(path = [1, 4, 5, 2, 3, 6], distance = 222)" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "@everywhere function tsp_dist_impl(connections,hops,path,current_distance,min_distance,max_hops,jobs_chnl,ftr_result)\n", " num_cities = length(connections)\n", @@ -188,7 +199,7 @@ " end\n", " end \n", " else\n", - " if jobs_channel !== nothing\n", + " if jobs_chnl !== nothing\n", " put!(jobs_chnl,(;hops,path,current_distance))\n", " end\n", " end\n", @@ -208,7 +219,7 @@ " task = @async begin\n", " tsp_dist_impl(connections,hops,path,current_distance,min_distance,max_hops,jobs_chnl,nothing)\n", " for w in workers()\n", - " put!(job_chnl,nothing)\n", + " put!(jobs_chnl,nothing)\n", " end\n", " end\n", " @sync for w in workers()\n", @@ -220,14 +231,15 @@ " if job == nothing\n", " break\n", " end\n", - " hobs = job.hobs\n", + " hops = job.hops\n", " path = job.path\n", " current_distance = job.current_distance\n", - " tsp_dist_impl(connections,hops,path,current_distance,min_distance,max_hops,jobs_chnl,ftr_result)\n", + " tsp_dist_impl(connections,hops,path,current_distance,min_distance,max_hops,jobs_channel,ftr_result)\n", " end\n", " end\n", " end \n", - " (;path=path,distance=min_distance)\n", + " result = fetch(ftr_result)\n", + " (;path = result.path, distance = result.min_distance_ref[])\n", "end\n", "city = 1\n", "tsp_dist(connections,city)" @@ -244,7 +256,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.9.0", + "display_name": "Julia 1.9.1", "language": "julia", "name": "julia-1.9" }, @@ -252,7 +264,7 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.9.0" + "version": "1.9.1" } }, "nbformat": 4, diff --git a/dev/notebooks/tsp/index.html b/dev/notebooks/tsp/index.html index beb7114..bd8ffd2 100644 --- a/dev/notebooks/tsp/index.html +++ b/dev/notebooks/tsp/index.html @@ -18,4 +18,4 @@ var myIframe = document.getElementById("notebook"); iFrameResize({log:true}, myIframe); }); - + diff --git a/dev/search/index.html b/dev/search/index.html index 28d7121..6d8d521 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · XM_40017

Loading search...

    +Search · XM_40017

    Loading search...