# Julia on remote RedHat cluster

**URL:** <https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345>\
**Category:** New to Julia\
**Created:** [March 22, 2020, 2:00pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345 "2020-03-22T14:00:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LysandrosAn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lysandrosan/32/12528_2.png) [@LysandrosAn](https://discourse.julialang.org/u/LysandrosAn)\
**Post date:** [March 22, 2020, 2:00pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/1 "2020-03-22T14:00:44Z")

</div>

Dear all,

in order to conduct numerical calculations I have been granted access to a remote high-performance cluster running on Redhat linux. So far, I can run a batch script that calls a simple julia file with:

_println(ENV[“PATH”]);_  
_println(Base.load\_path());_

which returns:

/apps/compilers/julia/1.3.1/tools:/apps/compilers/julia/1.3.1/bin:/apps/compilers/java/9.0/jdk-9.0.4/bin:/apps/compilers/gnu/4.9.2/bin:/apps/compilers/intel/18.0.4/vtune\_amplifier/bin64:/apps/compilers/intel/18.0.4/debugger\_2018/gdb/intel64\_mic/bin:/apps/compilers/intel/18.0.4/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/usr/lpp/mmfs/bin:/users/pa19/lanast/bin:/users/pa19/lanast/bin

[“/users/pa19/lanast/.julia/environments/v1.3/Project.toml”, “/users/apps/compilers/julia/1.3.1/share/julia/stdlib/v1.3”]

The admins advised that certain variables must be set, in order to be able to fetch and run all the Julia packages:  
_#!/bin/bash_  
_JULIAROOT=$HOME/julia_  
_export PATH=$JULIAROOT/bin:$JULIAROOT/tools;_  
_export LD\_LIBRARY\_PATH=$JULIAROOT/lib:$JULIAROOT/lib64;_  
_export INCLUDE=$JULIAROOT/include;_

Now, do I have to type in these commands in the terminal? Or do I have to place them in side an _.sh_ or an _.jl_ file? And do I need to include the “export” command?

Thank you, all the best  
Lysandros

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 22, 2020, 2:38pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/2 "2020-03-22T14:38:39Z")

</div>

> [@LysandrosAn](#):
>
> Now, do I have to type in these commands in the terminal? Or do I have to place them in side an _.sh_ or an _.jl_

Customizations and how jobs can be run should be documented for your cluster, it is not something that is specific to Julia.

Perhaps talk to the sysadmins, or a user who is experienced using this cluster and has a setup to share.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [March 22, 2020, 4:36pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/3 "2020-03-22T16:36:20Z")

</div>

I agree with @Tamas_Papp talk to your friendly sysadmins. Promis to bring them cookies or beer when the current fuss is over.

Many HPC clusters use the ‘modules’ environment to set these variables.  
type ‘module avail’ to see if there is a Julia module. Also ask the sysadmins about modules.

I would put those environment variables at the start of your job script if there is no module available.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [March 22, 2020, 4:38pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/4 "2020-03-22T16:38:45Z")

</div>

Something else to ask your cluster admins.  
Which filesystem should you use for storing data and programs.  
Normally the /home directory is on a smaller, low performance filesystem.  
There probably will be a large capacity high performance filesystem.

---

<div class="post-metadata">

**Author:** ![LysandrosAn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lysandrosan/32/12528_2.png) [@LysandrosAn](https://discourse.julialang.org/u/LysandrosAn)\
**Post date:** [April 2, 2020, 5:01pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/5 "2020-04-02T17:01:15Z")

</div>

Thank you @Tamas_Papp and @johnh for the advice.

Strangely enough, the second element in the bracket of the vector which the command _println(Base.load\_path());_ returns, is a folder on the server which contains all the familiar packages like “LinearAlgebra” and “Statistics”. But the packages still do no not load when I try simple commands.

Could someone guide me to documentation for the difference between Load, Load\_path, Juliaroot and LD\_library\_path.  
This would be helpful.

Best wishes

P.S. julia/1.3.1 is included in the list of _module avail_

---

<div class="post-metadata">

**Author:** ![LysandrosAn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lysandrosan/32/12528_2.png) [@LysandrosAn](https://discourse.julialang.org/u/LysandrosAn)\
**Post date:** [April 3, 2020, 6:27pm UTC](https://discourse.julialang.org/t/julia-on-remote-redhat-cluster/36345/6 "2020-04-03T18:27:33Z")

</div>

After doing some some research, it seems, that one has to append to the Load Path environmental variable, the directory where all the packages are installed in the **user** directory of the cluster, which is good.  
Now I only have to do the same with the Project.toml file…Is there a way to tell Julia to use a different one, than the one listed in _Base.load\_path()_ ?
