Configuring Julia for SSRDE
SSRDE does have Julia that is available to use. The Julia executable is located at /sscf/ssrde-storage/apps/julia-1.0.1/bin/julia, and calling that path will open the Julia REPL (interactive session):
Calling that path on a Julia script will run that script; in this example the script is named "test.jl" and is located in my home directory:
It can get tedious to type out the entirety of that path every time you want to run a Julia script -- even with tab-completion -- so aliasing may be useful during the setup process (although the full path is needed when submitting jobs, more on this later). An alias associates a user-defined command with another command that the server knows, usually as a shortcut.
In this case, if we run the command alias julia='/sscf/ssrde-storage/apps/julia-1.0.1/bin/julia', then we can now use the julia command instead of having to call the entire path:
The alias relation will only last until your session ends by default. To make the alias persistent you can run the following command from your home directory: echo "alias julia='/sscf/ssrde-storage/apps/julia-1.0.1/bin/julia'" > .bash_aliases. This writes the alias command we ran above to a file called .bash_aliases which keeps track of your aliases between sessions. Be advised that if you make a spelling error you may have to modify this file to fix your commands. If you need assistance with this you can contact SSCF at firstname.lastname@example.org
If you need additional Julia libraries, you can acquire these through the REPL. If you hit the ] key from the REPL it will take you into a Pkg session. Pkg is Julia's package manager, and a resource that will let you install 3rd-party libraries:
In most cases, installing packages is as simple as calling add <package name> from the Pkg session. In some cases you may need to build a package or add it from GitHub, the official Pkg has more documentation for those cases.
Julia installs packages to your home directory by default, so you do not need sudo to install them:
Please note that for technical reasons, when you've finished writing your code and run your script as a job, aliases won't be recognized on the compute nodes. You'll need to call the full Julia path in your submission script:
SSCF representatives are not programmers and will not be able to provide substantial help with your code itself, but we can assist with the transfer and organization of files, navigating the server, and using the job submission program Slurm.
If you need additional help setting up your environment, please don't hesitate to contact SSCF at email@example.com (or reach out to your department SSCF representative, ex. firstname.lastname@example.org) and we'll be happy to assist!