I use modules to switch between julia binaries and a self-compiled MKL version.
Example lua file:
help([==[
Description
===========
Provides access to Julia 0.6.4 binaries
]==])
whatis([==[Description: Provides access to Julia 0.6.4 binaries]==])
unload("julia-mkl")
load("Intel/2018.2.199-GCC-5.5.0", "ParaStationMPI/5.2.1-1", "HDF5/1.10.1")
setenv("SSL_CERT_FILE", "/etc/pki/tls/cert.pem")
setenv("EDITOR", "vim")
setenv("JULIA_PKGDIR", "/gpfs/homea/hku27/hku273/.julia")
prepend_path("LD_LIBRARY_PATH", "/gpfs/homea/hku27/hku273/software/julia/0.6.4/usr/lib")
prepend_path("CPATH", "/gpfs/homea/hku27/hku273/software/julia/0.6.4/usr/include")
prepend_path("PATH", "/gpfs/homea/hku27/hku273/software/julia/0.6.4/bin")
After adding the folder with those files to my $MODULEPATH
I can just do module load julia/0.6.4
or module load julia-mkl/0.6.4
.