From 39857cfac2182ed58cacf29ee3ff3ce3ed23e38d Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 5 Jun 2024 06:20:04 -0400 Subject: [PATCH 01/13] Removed the description and edited the examples section --- Languages/Julia/README.md | 52 ++++----------------------------------- 1 file changed, 5 insertions(+), 47 deletions(-) diff --git a/Languages/Julia/README.md b/Languages/Julia/README.md index de07ca23..024e3531 100755 --- a/Languages/Julia/README.md +++ b/Languages/Julia/README.md @@ -2,44 +2,13 @@ ![Julia Logo](Images/julia-logo.png) -[Julia](https://en.wikipedia.org/wiki/Julia_(programming_language)) is a high-level, high-performance dynamic programming language for technical computing. It has syntax that is familiar to users of many other technical computing environments. Designed at MIT to tackle large-scale partial-differential equation simulation and distributed linear algebra, Julia features a robust ecosystem of tools for -[optimization,](https://www.juliaopt.org/) -[statistics,](https://juliastats.github.io/) -[parallel programming,](https://julia.mit.edu/#parallel) and -[data visualization.](https://juliaplots.github.io/) -Julia is actively developed by teams -[at MIT](https://julia.mit.edu/) and -[in industry,](https://juliacomputing.com/) along with -[hundreds of domain-expert scientists and programmers from around the world](https://github.com/JuliaLang/julia/graphs/contributors). +### Purpose - -![Gadfly Demo](Images/gadfly-demo.png) - -### Installation -Julia most easily [installed](https://docs.julialang.org/en/v1/manual/getting-started/) by downloading the precompiled [binaries](https://github.com/fasrc/User_Codes/blob/master/Documents/Software/Binaries.md) from: [https://julialang.org/downloads/](https://julialang.org/downloads/) We recommend the Generic Linux on x86 64 bit glibc version. This avoids any need to build any dependencies. We recommend downloading it to your holylabs directory for use. - -Once you have downloaded Julia you can add Julia to your path by setting the following in your ~/.bashrc - -```bash -export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Lab/software/julia-1.9.3/bin -``` - -Subbing in whereever you extracted Julia to. Once that is set the next time you login Julia will be in your path and ready to use. - -#### Example Installation - -This is an example for Julia 1.9.3. Check [Julia downloads](https://julialang.org/downloads/) for other versions. +Examples of installing and using Julia on the Harvard University FAS cluster. ```bash -# use lab storage -[jharvard@holy7c12104 ~]$ cd /n/holylabs/LABS/jharvard_lab/Users/jharvard/software/ - -# download julia and extract -[jharvard@holy7c12104 software]$ wget https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.3-linux-x86_64.tar.gz -[jharvard@holy7c12104 software]$ tar xvfz julia-1.9.3-linux-x86_64.tar.gz - -# add julia to path -[jharvard@holy7c12104 julia-1.9.3]$ export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Users/jharvard/software/julia-1.9.3/bin +# on $HOME +[jharvard@holy7c12104 ~]$ curl -fsSL https://install.julialang.org | sh [jharvard@holy7c12104 julia-1.9.3]$ julia _ @@ -54,17 +23,6 @@ This is an example for Julia 1.9.3. Check [Julia downloads](https://julialang.or julia> ``` -To get started with Julia on the FAS cluster you can try the below examples: - * [Example 1](Example1): Monte-Carlo calculation of PI * [Example 2](Example2): Ordinary Differential Equations (ODEs) - -You can also use Julia in [Jupyter notebooks in our VDI interactive environment](Notebook.md). - -#### References: - -* [The Julia Programming Language](https://julialang.org/) -* [Julia Computing](https://juliacomputing.com/) -* [Julia Documentation](https://docs.julialang.org/en/v1/) - - +* [Example 3](Notebook.md): Julia in Jupyter notebook on OOD From 6bcc58283c0470b0d77d3a79718cbff79941d213 Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 5 Jun 2024 06:23:15 -0400 Subject: [PATCH 02/13] Added 2 section headings --- Languages/Julia/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Languages/Julia/README.md b/Languages/Julia/README.md index 024e3531..993fd604 100755 --- a/Languages/Julia/README.md +++ b/Languages/Julia/README.md @@ -2,10 +2,12 @@ ![Julia Logo](Images/julia-logo.png) -### Purpose +### Purpose: Examples of installing and using Julia on the Harvard University FAS cluster. +### Installation: + ```bash # on $HOME [jharvard@holy7c12104 ~]$ curl -fsSL https://install.julialang.org | sh @@ -23,6 +25,8 @@ Examples of installing and using Julia on the Harvard University FAS cluster. julia> ``` +### Examples: + * [Example 1](Example1): Monte-Carlo calculation of PI * [Example 2](Example2): Ordinary Differential Equations (ODEs) * [Example 3](Notebook.md): Julia in Jupyter notebook on OOD From 6209575b39ebe3bcd1a320f1b69b5493720a1c3d Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Mon, 29 Jul 2024 14:32:15 -0400 Subject: [PATCH 03/13] Removed the srun command and the export statement from the sbatch file. Removed the program output file --- Languages/Julia/Example1/pi_monte_carlo.out | 6 ------ Languages/Julia/Example1/run.sbatch | 6 ++---- 2 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 Languages/Julia/Example1/pi_monte_carlo.out diff --git a/Languages/Julia/Example1/pi_monte_carlo.out b/Languages/Julia/Example1/pi_monte_carlo.out deleted file mode 100644 index 00e37ff0..00000000 --- a/Languages/Julia/Example1/pi_monte_carlo.out +++ /dev/null @@ -1,6 +0,0 @@ -N = 1000: PI = 3.188 -N = 10000: PI = 3.1476 -N = 100000: PI = 3.142 -N = 1000000: PI = 3.140612 -N = 10000000: PI = 3.140406 -N = 100000000: PI = 3.14155792 diff --git a/Languages/Julia/Example1/run.sbatch b/Languages/Julia/Example1/run.sbatch index 9cf5d852..4d2c3b22 100644 --- a/Languages/Julia/Example1/run.sbatch +++ b/Languages/Julia/Example1/run.sbatch @@ -8,7 +8,5 @@ #SBATCH -t 0-00:30 #SBATCH --mem=2G -# Set up Julia and run the program -export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Users/jharvard/software/julia-1.9.3/bin -srun -n 1 -c 1 julia pi_monte_carlo.jl - +# Run the program using Julia +julia pi_monte_carlo.jl From bedf73f7f1bceff2e31756e56b4e1400645acf0c Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Mon, 29 Jul 2024 14:34:10 -0400 Subject: [PATCH 04/13] Updated the corresponding README --- Languages/Julia/Example1/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Languages/Julia/Example1/README.md b/Languages/Julia/Example1/README.md index bcd78cb2..a8684321 100755 --- a/Languages/Julia/Example1/README.md +++ b/Languages/Julia/Example1/README.md @@ -51,13 +51,10 @@ end #SBATCH -t 0-00:30 #SBATCH --mem=2G -# Set up Julia and run the program -export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Users/jharvard/software/julia-1.9.3/bin -srun -n 1 -c 1 julia pi_monte_carlo.jl +# Run the program using Julia +julia pi_monte_carlo.jl ``` -**NOTE:** Please remember to point the `PATH` environmental variable to the actual location of your Julia installation. - ### Example Usage: ```bash From 403d8c290b81a976c4490691a77a297c1ad43b86 Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Fri, 20 Sep 2024 07:02:14 -0400 Subject: [PATCH 05/13] Matched it with what was on README, that is, for i in 3: 8 n = 10^i --- Languages/Julia/Example1/pi_monte_carlo.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Languages/Julia/Example1/pi_monte_carlo.jl b/Languages/Julia/Example1/pi_monte_carlo.jl index 869692c7..26855a9f 100644 --- a/Languages/Julia/Example1/pi_monte_carlo.jl +++ b/Languages/Julia/Example1/pi_monte_carlo.jl @@ -18,7 +18,8 @@ function montepi(n::Int) end # Main program -for n in 10 .^(3: 8) +for i in 3: 8 + n = 10^i p = montepi(n) println("N = $n: PI = $p") end From 0905fdd7d1cac0c51e02a2670f9482d40adf3535 Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Fri, 20 Sep 2024 07:04:55 -0400 Subject: [PATCH 06/13] Removed the results.dat file --- Languages/Julia/Example2/results.dat | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 Languages/Julia/Example2/results.dat diff --git a/Languages/Julia/Example2/results.dat b/Languages/Julia/Example2/results.dat deleted file mode 100644 index e45d7040..00000000 --- a/Languages/Julia/Example2/results.dat +++ /dev/null @@ -1,28 +0,0 @@ - Time Numeric Exact - ------------------------------ - 0.0000 1.000000 1.000000 - 0.2000 0.837462 0.837462 - 0.4000 0.740639 0.740640 - 0.6000 0.697624 0.697623 - 0.8000 0.698660 0.698658 - 1.0000 0.735763 0.735759 - 1.2000 0.802393 0.802388 - 1.4000 0.893198 0.893194 - 1.6000 1.003802 1.003793 - 1.8000 1.130613 1.130598 - 2.0000 1.270681 1.270671 - 2.2000 1.421625 1.421606 - 2.4000 1.581455 1.581436 - 2.6000 1.748569 1.748547 - 2.8000 1.921645 1.921620 - 3.0000 2.099603 2.099574 - 3.2000 2.281551 2.281524 - 3.4000 2.466785 2.466747 - 3.6000 2.654677 2.654647 - 3.8000 2.844781 2.844742 - 4.0000 3.036672 3.036631 - 4.2000 3.230027 3.229991 - 4.4000 3.424601 3.424555 - 4.6000 3.620150 3.620104 - 4.8000 3.816498 3.816459 - 5.0000 4.013510 4.013476 From 09b5e6ae35f73f655f5dc0e13483a049fc23bd8c Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:00:11 -0400 Subject: [PATCH 07/13] Deleted extra spaces --- Languages/Julia/Example1/README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Languages/Julia/Example1/README.md b/Languages/Julia/Example1/README.md index a8684321..eda653aa 100755 --- a/Languages/Julia/Example1/README.md +++ b/Languages/Julia/Example1/README.md @@ -1,15 +1,13 @@ ### Purpose: - -This example illustrates the use of Julia on the Harvard University FAS cluster. Specifically, it evaluates PI via a Monte-Carlo method. +This example illustrates the use of Julia on the Harvard University +FAS cluster. Specifically, it evaluates PI via a Monte-Carlo method. ### Contents: - * pi\_monte\_carlo.jl: Julia source code * run.sbatch: Batch-job submission script ### Julia code: - ```julia #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Program: pi_monte_carlo.jl @@ -39,7 +37,6 @@ end ``` ### Example Batch-Job Submission Script: - ```bash #!/bin/bash #SBATCH -J pi_monte_carlo @@ -56,13 +53,11 @@ julia pi_monte_carlo.jl ``` ### Example Usage: - ```bash sbatch run.sbatch ``` ### Example Output: - ```bash $ cat pi_monte_carlo.out N = 1000: PI = 3.228 From 8a8230692bd3f1d39c112c9ae47f77a1bdaa5b42 Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:06:06 -0400 Subject: [PATCH 08/13] Edited ode_test.jl to have @pyinclude, PyCall, & pyimport --- Languages/Julia/Example2/{ode_test.jl => ode_test_python.jl} | 5 +++++ 1 file changed, 5 insertions(+) rename Languages/Julia/Example2/{ode_test.jl => ode_test_python.jl} (89%) diff --git a/Languages/Julia/Example2/ode_test.jl b/Languages/Julia/Example2/ode_test_python.jl similarity index 89% rename from Languages/Julia/Example2/ode_test.jl rename to Languages/Julia/Example2/ode_test_python.jl index 3d634f0e..30149663 100644 --- a/Languages/Julia/Example2/ode_test.jl +++ b/Languages/Julia/Example2/ode_test_python.jl @@ -6,6 +6,7 @@ using SimpleDiffEq using Printf using Plots using Plots.PlotMeasures +using PyCall # --- Define the problem --- f(u, p, t) = t - u @@ -37,3 +38,7 @@ for i = 1: size(sol.t)[1] end close(fo) +pyimport("numpy") + +# --- Run the Python script to plot the result --- +@pyinclude("figure.py") \ No newline at end of file From bf8dc7fe3aaea5eda92c3f5706890d7631372f8f Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:06:42 -0400 Subject: [PATCH 09/13] Renamed to ode_test.jl --- .../Julia/Example2/{ode_test_python.jl => ode_test.jl} | 0 Languages/Julia/Example2/run.sbatch | 6 ++---- 2 files changed, 2 insertions(+), 4 deletions(-) rename Languages/Julia/Example2/{ode_test_python.jl => ode_test.jl} (100%) diff --git a/Languages/Julia/Example2/ode_test_python.jl b/Languages/Julia/Example2/ode_test.jl similarity index 100% rename from Languages/Julia/Example2/ode_test_python.jl rename to Languages/Julia/Example2/ode_test.jl diff --git a/Languages/Julia/Example2/run.sbatch b/Languages/Julia/Example2/run.sbatch index 2b0023bd..6d3db82b 100755 --- a/Languages/Julia/Example2/run.sbatch +++ b/Languages/Julia/Example2/run.sbatch @@ -8,7 +8,5 @@ #SBATCH -t 0-00:30 #SBATCH --mem=4G -# Set up Julia and run the program -#export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Users/jharvard/software/julia-1.9.3/bin -export PATH=$PATH:/n/home06/pkrastev/holyscratch01/Work/Julia/julia-1.9.3/bin -srun -n 1 -c 1 julia ode_test.jl +# Run the program using Julia +julia ode_test.jl From 06dd1ba7b612e208b41d85efd3df585c408ad59e Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:08:06 -0400 Subject: [PATCH 10/13] Removed plt.style.use('seaborn-white') --- Languages/Julia/Example2/figure.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Languages/Julia/Example2/figure.py b/Languages/Julia/Example2/figure.py index c6d783ab..dd5181e7 100644 --- a/Languages/Julia/Example2/figure.py +++ b/Languages/Julia/Example2/figure.py @@ -5,7 +5,6 @@ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt -plt.style.use('seaborn-white') from matplotlib.ticker import MultipleLocator, FormatStrFormatter def rc_params(): From fc7042e3949446dbc5e15d6ebe04827b1682773f Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:25:16 -0400 Subject: [PATCH 11/13] Updated it with latest changes in run.sbatch, ode_test.jl, and figure.py --- Languages/Julia/Example2/README.md | 35 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/Languages/Julia/Example2/README.md b/Languages/Julia/Example2/README.md index 0d3ecc2f..8e77eaf3 100755 --- a/Languages/Julia/Example2/README.md +++ b/Languages/Julia/Example2/README.md @@ -1,18 +1,18 @@ ### Purpose: - -This example illustrates solving differential equations numerically in Julia. Specifically, it solves an ODE after an example taken from [this](https://sam-dolan.sites.sheffield.ac.uk/mas212-course/sample-notebooks/ode_example) Python notebook, using [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) +This example illustrates solving differential equations numerically in +Julia. Specifically, it solves an ODE after an example taken from +[this](https://sam-dolan.sites.sheffield.ac.uk/mas212-course/sample-notebooks/ode_example) +Python notebook, using +[DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) ### Contents: - * ode\_test.jl: Julia source code +* figure.py: Python script for generating the figure * run.sbatch: Batch-job submission script -* results.dat: Numeric results * figure.png: Figure of ODE's solution -* figure.py: Python script for generating the figure ### Julia code: - ```julia #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Program: ode_test.jl @@ -22,6 +22,7 @@ using SimpleDiffEq using Printf using Plots using Plots.PlotMeasures +using PyCall # --- Define the problem --- f(u, p, t) = t - u @@ -52,15 +53,25 @@ for i = 1: size(sol.t)[1] @printf(fo, "%8.4f %10.6f %10.6f\n", x, y, y_exact) end close(fo) + +pyimport("numpy") + +# --- Run the Python script to plot the result --- +@pyinclude("figure.py") ``` -> **Note:** You may need to install the `DifferentialEquations`, `SimpleDiffEq` and `Plots` packages. Use the following command inside the Julia REPL: +> **Note:** You may need to install the `DifferentialEquations`, + `SimpleDiffEq`, `Plots`, and `PyCall` packages. Use the following + command inside Julia's full-featured interactive command-line REPL + (read-eval-print loop): ```julia julia> using Pkg julia> Pkg.add("DifferentialEquations") julia> Pkg.add("SimpleDiffEq") julia> Pkg.add("Plots") +julia> ENV["PYTHON"]="" +julia> Pkg.build("PyCall") ``` ### Example Batch-Job Submission Script: @@ -76,20 +87,16 @@ julia> Pkg.add("Plots") #SBATCH -t 0-00:30 #SBATCH --mem=4G -# Set up Julia and run the program -export PATH=$PATH:/n/holylabs/LABS/jharvard_lab/Users/jharvard/software/julia-1.9.3/bin -srun -n 1 -c 1 julia ode_test.jl +# Run the program using Julia +julia ode_test.jl ``` -**NOTE:** Please remember to point the `PATH` environmental variable to the actual location of your Julia installation. ### Example Usage: - ```bash sbatch run.sbatch ``` ### Example Output: - ```bash $ cat results.dat Time Numeric Exact @@ -123,7 +130,6 @@ $ cat results.dat ``` ### Figure of Solution: - solution ### Python script for generating the figure: @@ -136,7 +142,6 @@ import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt -plt.style.use('seaborn-white') from matplotlib.ticker import MultipleLocator, FormatStrFormatter def rc_params(): From ec0789b2621d178dde75ee57e9ec7cff3885669a Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 07:30:04 -0400 Subject: [PATCH 12/13] Reordered bits in README --- Languages/Julia/Example2/README.md | 72 +++++++++++++++--------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Languages/Julia/Example2/README.md b/Languages/Julia/Example2/README.md index 8e77eaf3..20be8fcb 100755 --- a/Languages/Julia/Example2/README.md +++ b/Languages/Julia/Example2/README.md @@ -96,42 +96,6 @@ julia ode_test.jl sbatch run.sbatch ``` -### Example Output: -```bash -$ cat results.dat - Time Numeric Exact - ------------------------------ - 0.0000 1.000000 1.000000 - 0.2000 0.837462 0.837462 - 0.4000 0.740639 0.740640 - 0.6000 0.697624 0.697623 - 0.8000 0.698660 0.698658 - 1.0000 0.735763 0.735759 - 1.2000 0.802393 0.802388 - 1.4000 0.893198 0.893194 - 1.6000 1.003802 1.003793 - 1.8000 1.130613 1.130598 - 2.0000 1.270681 1.270671 - 2.2000 1.421625 1.421606 - 2.4000 1.581455 1.581436 - 2.6000 1.748569 1.748547 - 2.8000 1.921645 1.921620 - 3.0000 2.099603 2.099574 - 3.2000 2.281551 2.281524 - 3.4000 2.466785 2.466747 - 3.6000 2.654677 2.654647 - 3.8000 2.844781 2.844742 - 4.0000 3.036672 3.036631 - 4.2000 3.230027 3.229991 - 4.4000 3.424601 3.424555 - 4.6000 3.620150 3.620104 - 4.8000 3.816498 3.816459 - 5.0000 4.013510 4.013476 -``` - -### Figure of Solution: -solution - ### Python script for generating the figure: ```python @@ -200,6 +164,42 @@ plt.legend(fontsize=15, loc="upper left", shadow=True, fancybox=True) plt.savefig(fig_path, format='png', dpi=100, bbox_inches='tight') ``` +### Example Output: +```bash +$ cat results.dat + Time Numeric Exact + ------------------------------ + 0.0000 1.000000 1.000000 + 0.2000 0.837462 0.837462 + 0.4000 0.740639 0.740640 + 0.6000 0.697624 0.697623 + 0.8000 0.698660 0.698658 + 1.0000 0.735763 0.735759 + 1.2000 0.802393 0.802388 + 1.4000 0.893198 0.893194 + 1.6000 1.003802 1.003793 + 1.8000 1.130613 1.130598 + 2.0000 1.270681 1.270671 + 2.2000 1.421625 1.421606 + 2.4000 1.581455 1.581436 + 2.6000 1.748569 1.748547 + 2.8000 1.921645 1.921620 + 3.0000 2.099603 2.099574 + 3.2000 2.281551 2.281524 + 3.4000 2.466785 2.466747 + 3.6000 2.654677 2.654647 + 3.8000 2.844781 2.844742 + 4.0000 3.036672 3.036631 + 4.2000 3.230027 3.229991 + 4.4000 3.424601 3.424555 + 4.6000 3.620150 3.620104 + 4.8000 3.816498 3.816459 + 5.0000 4.013510 4.013476 +``` + +### Figure of Solution: +solution + ### References: * [Official **DifferentialEquations.jl** Documentation](https://docs.sciml.ai/DiffEqDocs/stable/) \ No newline at end of file From 336a38bf207a12f710e4aaa902864f99c648493d Mon Sep 17 00:00:00 2001 From: Manasvita Joshi Date: Wed, 25 Sep 2024 10:19:27 -0400 Subject: [PATCH 13/13] Added bits to install matplotlib and PyCall considerations --- Languages/Julia/Example2/README.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Languages/Julia/Example2/README.md b/Languages/Julia/Example2/README.md index 20be8fcb..0d0d3f37 100755 --- a/Languages/Julia/Example2/README.md +++ b/Languages/Julia/Example2/README.md @@ -61,19 +61,33 @@ pyimport("numpy") ``` > **Note:** You may need to install the `DifferentialEquations`, - `SimpleDiffEq`, `Plots`, and `PyCall` packages. Use the following - command inside Julia's full-featured interactive command-line REPL - (read-eval-print loop): + `SimpleDiffEq`, `Plots`, `PyCall`, `Conda`, and `matplotlib` + packages. Use the following command inside Julia's full-featured + interactive command-line REPL (read-eval-print loop) to adding these packages. ```julia julia> using Pkg julia> Pkg.add("DifferentialEquations") julia> Pkg.add("SimpleDiffEq") julia> Pkg.add("Plots") +julia> Pkg.add("Conda") julia> ENV["PYTHON"]="" julia> Pkg.build("PyCall") +julia> using Conda +julia> Conda.add("matplotlib") ``` +> **Note:** The `PYTHON` environmental variable above has been set to + `blank` prior to building the `PyCall` package. This is to + override the default behavior of `PyCall`, which is to use the + system's default Python environment in Linux, and instead install + Julia's "private" version of Python. You can find more details on + how to install `PyCall` at a desired location and call Python + functions from a Julia program on + [Github](https://github.com/JuliaPy/PyCall.jl) and + [Stackoverflow]( + https://stackoverflow.com/questions/66648841/how-to-call-a-python-function-from-a-julia-program) + ### Example Batch-Job Submission Script: ```bash @@ -202,4 +216,6 @@ $ cat results.dat ### References: -* [Official **DifferentialEquations.jl** Documentation](https://docs.sciml.ai/DiffEqDocs/stable/) \ No newline at end of file +* [Official **DifferentialEquations.jl** Documentation](https://docs.sciml.ai/DiffEqDocs/stable/) +* [PyCall](https://github.com/JuliaPy/PyCall.jl) +* [Pycall to call Python code](https://stackoverflow.com/questions/66648841/how-to-call-a-python-function-from-a-julia-program) \ No newline at end of file