<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://support.beocat.ksu.edu/BeocatDocs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhauser</id>
	<title>Beocat - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://support.beocat.ksu.edu/BeocatDocs/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhauser"/>
	<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/Docs/Special:Contributions/Jhauser"/>
	<updated>2026-05-21T23:15:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=487</id>
		<title>Installed software</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=487"/>
		<updated>2019-05-28T18:42:06Z</updated>

		<summary type="html">&lt;p&gt;Jhauser: Remove redundant section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Module Availability ==&lt;br /&gt;
For a complete list of all installed modules, check [https://modules.beocat.ksu.edu/ our modules website]&lt;br /&gt;
&lt;br /&gt;
We try to keep the same software available across all node classes, but sometimes it is impossible. Please check the modules website if you have any questions about software availability on each node class.&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
A toolchain is a set of compilers, libraries and applications that are needed to build software. Some software functions better when using specific toolchains.&lt;br /&gt;
&lt;br /&gt;
We provide a good number of toolchains and versions of toolchains make sure your applications will compile and/or run correctly.&lt;br /&gt;
&lt;br /&gt;
These toolchains include (you can run 'module keyword toolchain'):&lt;br /&gt;
; foss:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.&lt;br /&gt;
; fosscuda:    GNU Compiler Collection (GCC) based compiler toolchain based on FOSS with CUDA support.&lt;br /&gt;
; gmvapich2:    GNU Compiler Collection (GCC) based compiler toolchain, including MVAPICH2 for MPI support. '''DEPRECATED'''&lt;br /&gt;
; gompi:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support.&lt;br /&gt;
; goolfc:    GCC based compiler toolchain __with CUDA support__, and including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. '''DEPRECATED'''&lt;br /&gt;
; iomkl:    Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL &amp;amp; OpenMPI.&lt;br /&gt;
&lt;br /&gt;
You can run 'module spider $toolchain/' to see the versions we have:&lt;br /&gt;
 $ module spider iomkl/&lt;br /&gt;
* iomkl/2017a&lt;br /&gt;
* iomkl/2017b&lt;br /&gt;
* iomkl/2017beocatb&lt;br /&gt;
&lt;br /&gt;
If you load one of those (module load iomkl/2017b), you can see the other modules and versions of software that it loaded with the 'module list':&lt;br /&gt;
 $ module list&lt;br /&gt;
 Currently Loaded Modules:&lt;br /&gt;
   1) icc/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   2) binutils/2.28-GCCcore-6.4.0&lt;br /&gt;
   3) ifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   4) iccifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   5) GCCcore/6.4.0&lt;br /&gt;
   6) numactl/2.0.11-GCCcore-6.4.0&lt;br /&gt;
   7) hwloc/1.11.7-GCCcore-6.4.0&lt;br /&gt;
   8) OpenMPI/2.1.1-iccifort-2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   9) iompi/2017b&lt;br /&gt;
  10) imkl/2017.3.196-iompi-2017b&lt;br /&gt;
  11) iomkl/2017b&lt;br /&gt;
&lt;br /&gt;
As you can see, toolchains can depend on each other. For instance, the iomkl toolchain, depends on iompi, which depends on iccifort, which depend on icc and ifort, which depend on GCCcore which depend on GCC. Hence it is very important that the correct versions of all related software are loaded.&lt;br /&gt;
&lt;br /&gt;
With software we provide, the toolchain used to compile is always specified in the &amp;quot;version&amp;quot; of the software that you want to load.&lt;br /&gt;
&lt;br /&gt;
If you mix toolchains, inconsistent things may happen.&lt;br /&gt;
== Most Commonly Used Software ==&lt;br /&gt;
Check our [https://modules.beocat.ksu.edu/ modules website] for the most up to date software availability.&lt;br /&gt;
&lt;br /&gt;
The versions mentioned below are representations of what was available at the time of writing, not necessarily what is currently available.&lt;br /&gt;
=== [http://www.open-mpi.org/ OpenMPI] ===&lt;br /&gt;
We provide lots of versions, you are most likely better off directly loading a toolchain or application to make sure you get the right version, but you can see the versions we have with 'module avail OpenMPI/'&lt;br /&gt;
&lt;br /&gt;
The first step to run an MPI application is to load one of the OpenMPI modules.  You normally will just need to load the default version as below.  If your code needs access to nVidia GPUs you'll need the cuda version above.  Otherwise some codes are picky about what versions of the underlying GNU or Intel compilers that are needed.&lt;br /&gt;
&lt;br /&gt;
  module load OpenMPI&lt;br /&gt;
&lt;br /&gt;
If you are working with your own MPI code you will need to start by compiling it.  MPI offers &amp;lt;B&amp;gt;mpicc&amp;lt;/B&amp;gt; for compiling codes written in C, &amp;lt;B&amp;gt;mpic++&amp;lt;/B&amp;gt; for compiling C++ code, and &amp;lt;B&amp;gt;mpifort&amp;lt;/B&amp;gt; for compiling Fortran code.  You can get a complete listing of parameters to use by running them with the &amp;lt;B&amp;gt;--help&amp;lt;/B&amp;gt; parameter.  Below are some examples of compiling with each.&lt;br /&gt;
&lt;br /&gt;
  mpicc --help&lt;br /&gt;
  mpicc -o my_code.x my_code.c&lt;br /&gt;
  mpic++ -o my_code.x my_code.cc&lt;br /&gt;
  mpifort -o my_code.x my_code.f&lt;br /&gt;
&lt;br /&gt;
In each case above, you can name the executable file whatever you want (I chose &amp;lt;T&amp;gt;my_code.x&amp;lt;/I&amp;gt;).  It is common to use different optimization levels, for example, but those may depend on the version of OpenMPI you choose.  Some are based on the Intel compilers so you'd need to use  optimizations for the underlying icc or ifort compilers they call, and some are GNU based so you'd use compiler optimizations for gcc or gfortran.&lt;br /&gt;
&lt;br /&gt;
We have many MPI codes in our modules that you simply need to load before using.  Below is an example of loading and running Gromacs which is an MPI based code to simulate large numbers of atoms classically.&lt;br /&gt;
&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
&lt;br /&gt;
This loads the Gromacs modules and sets all the paths so you can run the scalar version &amp;lt;B&amp;gt;gmx&amp;lt;/B&amp;gt; or the MPI version &amp;lt;B&amp;gt;gmx_mpi&amp;lt;/B&amp;gt;.  Below is a sample job script for running a complete Gromacs simulation.&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --mem=120G&lt;br /&gt;
  #SBATCH --time=24:00:00&lt;br /&gt;
  #SBATCH --job-name=gromacs&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=4&lt;br /&gt;
  &lt;br /&gt;
  module purge&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Running Gromacs on $HOSTNAME&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export OMP_NUM_THREADS=1&lt;br /&gt;
  time mpirun -x OMP_NUM_THREADS=1 gmx_mpi mdrun -nsteps 500000 -ntomp 1 -v -deffnm 1ns -c 1ns.pdb -nice 0&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Finished run on $SLURM_NTASKS $HOSTNAME cores&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;mpirun&amp;lt;/B&amp;gt; will run your job on all cores requested which in this case is 4 cores on a single node.  You will often just need to guess at the memory size for your code, then check on the memory usage with &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt; and adjust the memory in future jobs.&lt;br /&gt;
&lt;br /&gt;
I prefer to put a &amp;lt;B&amp;gt;module purge&amp;lt;/B&amp;gt; in my scripts then manually load the modules needed to insure each run is using the modules it needs.  If you don't do this when you submit a job script it will simply use the modules you currently have loaded which is fine too.&lt;br /&gt;
&lt;br /&gt;
I also like to put a &amp;lt;B&amp;gt;time&amp;lt;/B&amp;gt; command in front of each part of the script that can use significant amounts of time.  This way I can track the amount of time used in each section of the job script.  This can prove very useful if your job script copies large data files around at the start, for example, allowing you to see how much time was used for each stage of the job if it runs longer than expected.&lt;br /&gt;
&lt;br /&gt;
The OMP_NUM_THREADS environment variable is set to 1 and passed to the MPI system to insure that each MPI task only uses 1 thread.  There are some MPI codes that are also multi-threaded, so this insures that this particular code uses the cores allocated to it in the manner we want.&lt;br /&gt;
&lt;br /&gt;
Once you have your job script ready, submit it using the &amp;lt;B&amp;gt;sbatch&amp;lt;/B&amp;gt; command as below where the job script is in the file &amp;lt;I&amp;gt;sb.gromacs&amp;lt;/I&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  sbatch sb.gromacs&lt;br /&gt;
&lt;br /&gt;
You should then monitor your job as it goes through the queue and starts running using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  You code will also generate an output file, usually of the form &amp;lt;I&amp;gt;slurm-#######.out&amp;lt;/I&amp;gt; where the 7 # signs are the 7 digit job ID number.  If you need to cancel your job use &amp;lt;B&amp;gt;scancel&amp;lt;/B&amp;gt; with the 7 digit job ID number.&lt;br /&gt;
&lt;br /&gt;
   scancel #######&lt;br /&gt;
&lt;br /&gt;
=== [http://www.r-project.org/ R] ===&lt;br /&gt;
You can see what versions of R we provide with 'module avail R/'&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
We provide a small number of R modules installed by default, these are generally modules that are needed by more than one person.&lt;br /&gt;
&lt;br /&gt;
==== Installing your own R Packages ====&lt;br /&gt;
To install your own module, login to Beocat and start R interactively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load R&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then install the package using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
install.packages(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Follow the prompts. Note that there is a CRAN mirror at KU - it will be listed as &amp;quot;USA (KS)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After installing you can test before leaving interactive mode by issuing the command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
library(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Running R Jobs ====&lt;br /&gt;
&lt;br /&gt;
You cannot submit an R script directly. '&amp;lt;tt&amp;gt;sbatch myscript.R&amp;lt;/tt&amp;gt;' will result in an error. Instead, you need to make a bash [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|script]] that will call R appropriately. Here is a minimal example. We'll save this as submit-R.sbatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --mem-per-cpu=4G&lt;br /&gt;
# Now we tell Slurm how long we expect our work to take: 15 minutes (D-HH:MM:SS)&lt;br /&gt;
#SBATCH --time=0-00:15:00&lt;br /&gt;
&lt;br /&gt;
# Now lets do some actual work. This starts R and loads the file myscript.R&lt;br /&gt;
module purge&lt;br /&gt;
module load R&lt;br /&gt;
R --no-save -q &amp;lt; myscript.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to submit your R job, you would type&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch submit-R.sbatch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can monitor your jobs using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  The output of your job will be in a slurm-#.out file where '#' is the 7 digit job ID number for your job.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.java.com/ Java] ===&lt;br /&gt;
You can see what versions of Java we support with 'module avail Java/'&lt;br /&gt;
&lt;br /&gt;
=== [http://www.python.org/about/ Python] ===&lt;br /&gt;
You can see what versions of Python we support with 'module avail Python/'. Note: Running this does not load a Python module, it just shows you a list of the ones that are available.&lt;br /&gt;
&lt;br /&gt;
If you need libraries that we do not have installed, you should use [https://virtualenv.pypa.io/en/stable/userguide/ virtualenv] to setup a virtual python environment in your home directory. This will let you install python libraries as you please.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your virtual environment ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Load Python&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command Python is loaded.  After you logoff and then logon again Python will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* Create a location for your virtual environments (optional, but helps keep things organized)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/virtualenvs&lt;br /&gt;
cd ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Create a virtual environment. Here I will create a default virtual environment called 'test'. Note that &amp;lt;code&amp;gt;virtualenv --help&amp;lt;/code&amp;gt; has many more useful options.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
virtualenv test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Lets look at our virtual environments (the virtual environment name should be in the output):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Activate one of these&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command your virtual environment is activated.  After you logoff and then logon again your virtual environment will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* You can now install the python modules you want. This can be done using &amp;lt;tt&amp;gt;pip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pip install numpy biopython&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using your virtual environment within a job ====&lt;br /&gt;
Here is a simple job script using the virtual environment test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
python ~/path/to/your/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using MPI with Python within a job ====&lt;br /&gt;
Here is a simple job script using MPI with Python&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
PYTHON_BINARY=$(which python)&lt;br /&gt;
mpirun ${PYTHON_BINARY} ~/path/to/your/mpi/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://spark.apache.org/ Spark] ===&lt;br /&gt;
&lt;br /&gt;
Spark is a programming language for large scale data processing.&lt;br /&gt;
It can be used in conjunction with Python, R, Scala, Java, and SQL.&lt;br /&gt;
Spark can be run on Beocat interactively or through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
To run interactively, you must first request a node or nodes from the Slurm queue.&lt;br /&gt;
The line below requests 1 node and 1 core for 24 hours and if available will drop&lt;br /&gt;
you into the bash shell on that node.&lt;br /&gt;
&lt;br /&gt;
  srun -J srun -N 1 -n 1 -t 24:00:00 --mem=10G --pty bash&lt;br /&gt;
&lt;br /&gt;
We have some sample python based Spark code you can try out that came from the &lt;br /&gt;
exercises and homework from the PSC Spark workshop.  &lt;br /&gt;
&lt;br /&gt;
  mkdir spark-test&lt;br /&gt;
  cd spark-test&lt;br /&gt;
  cp -rp /homes/daveturner/projects/PSC-BigData-Workshop/Shakespeare/* .&lt;br /&gt;
&lt;br /&gt;
You will need to set up a python virtual environment and load the &amp;lt;B&amp;gt;nltk&amp;lt;/B&amp;gt; package &lt;br /&gt;
before you run the first time.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  mkdir -p ~/virtualenvs&lt;br /&gt;
  cd ~/virtualenvs&lt;br /&gt;
  virtualenv spark-test&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  pip install nltk&lt;br /&gt;
  pip install numpy&lt;br /&gt;
  deactivate&lt;br /&gt;
&lt;br /&gt;
To run the sample code interactively, load the Python and Spark modules,&lt;br /&gt;
source your python virtual environment, change to the sample directory, fire up pyspark, &lt;br /&gt;
then execute the sample code.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  module load Spark&lt;br /&gt;
  cd ~/spark-test&lt;br /&gt;
  pyspark&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; exec(open(&amp;quot;shakespeare.py&amp;quot;).read())&lt;br /&gt;
&lt;br /&gt;
You can work interactively from the pyspark prompt (&amp;gt;&amp;gt;&amp;gt;) in addition to running scripts as above.&lt;br /&gt;
&lt;br /&gt;
The Shakespeare directory also contains a sample sbatch submit script that will run the &lt;br /&gt;
same shakespeare.py code through the Slurm batch queue.  &lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --job-name=shakespeare&lt;br /&gt;
  #SBATCH --mem=10G&lt;br /&gt;
  #SBATCH --time=01:00:00&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=1&lt;br /&gt;
  &lt;br /&gt;
  # Load Spark and Python (version 3 here)&lt;br /&gt;
  module load Spark&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  &lt;br /&gt;
  spark-submit shakespeare.py&lt;br /&gt;
&lt;br /&gt;
When you run interactively, pyspark initializes your spark context &amp;lt;B&amp;gt;sc&amp;lt;/B&amp;gt;.&lt;br /&gt;
You will need to do this manually as in the sample python code when you want&lt;br /&gt;
to submit jobs through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
  # If there is no Spark Context (not running interactive from pyspark), create it&lt;br /&gt;
  try:&lt;br /&gt;
     sc&lt;br /&gt;
  except NameError:&lt;br /&gt;
     from pyspark import SparkConf, SparkContext&lt;br /&gt;
     conf = SparkConf().setMaster(&amp;quot;local&amp;quot;).setAppName(&amp;quot;App&amp;quot;)&lt;br /&gt;
     sc = SparkContext(conf = conf)&lt;br /&gt;
&lt;br /&gt;
=== [http://www.perl.org/ Perl] ===&lt;br /&gt;
The system-wide version of perl is tracking the stable releases of perl. Unfortunately there are some features that we do not include in the system distribution of perl, namely threads.&lt;br /&gt;
&lt;br /&gt;
To use perl with threads, out a newer version, you can load it with the module command. To see what versions of perl we provide, you can use 'module avail Perl/'&lt;br /&gt;
&lt;br /&gt;
==== Submitting a job with Perl ====&lt;br /&gt;
Much like R (above), you cannot simply '&amp;lt;tt&amp;gt;sbatch myProgram.pl&amp;lt;/tt&amp;gt;', but you must create a [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|submit script]] which will call perl. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --mem-per-cpu=1G&lt;br /&gt;
# Now we tell sbatch how long we expect our work to take: 15 minutes (H:MM:SS)&lt;br /&gt;
#SBATCH --time=0-0:15:00&lt;br /&gt;
# Now lets do some actual work. &lt;br /&gt;
module load Perl&lt;br /&gt;
perl /path/to/myProgram.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Octave for MatLab codes ===&lt;br /&gt;
&lt;br /&gt;
'module avail Octave/'&lt;br /&gt;
&lt;br /&gt;
The 64-bit version of Octave can be loaded using the command above.  Octave can then be used&lt;br /&gt;
to work with MatLab codes on the head node and to submit jobs to the compute nodes through the&lt;br /&gt;
sbatch scheduler.  Octave is made to run MatLab code, but it does have limitations and does not support&lt;br /&gt;
everything that MatLab itself does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=octave&lt;br /&gt;
#SBATCH --output=octave.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load Octave/4.2.1-foss-2017beocatb-enable64&lt;br /&gt;
&lt;br /&gt;
octave &amp;lt; matlab_code.m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MatLab compiler ===&lt;br /&gt;
&lt;br /&gt;
Beocat also has a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for the MatLab compiler and the most common toolboxes&lt;br /&gt;
including the Parallel Computing Toolbox, Optimization Toolbox, Statistics and Machine Learning Toolbox,&lt;br /&gt;
Image Processing Toolbox, Curve Fitting Toolbox, Neural Network Toolbox, Sumbolic Math Toolbox, &lt;br /&gt;
Global Optimization Toolbox, and the Bioinformatics Toolbox.&lt;br /&gt;
&lt;br /&gt;
Since we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt;, this means that you will be expected to develop your MatLab code&lt;br /&gt;
with Octave or elsewhere on a laptop or departmental server.  Once you're ready to do large runs, then you&lt;br /&gt;
move your code to Beocat, compile the MatLab code into an executable, and you can submit as many jobs as&lt;br /&gt;
you want to the scheduler.  To use the MatLab compiler, you need to load the MATLAB module to compile code and&lt;br /&gt;
load the mcr module to run the resulting MatLab executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have addpath() commands in your code, you will need to wrap them in an &amp;quot;if ~deployed&amp;quot; block and tell the&lt;br /&gt;
compiler to include that path via the -I flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;MATLAB&amp;quot;&amp;gt;&lt;br /&gt;
% wrap addpath() calls like so:&lt;br /&gt;
if ~deployed&lt;br /&gt;
    addpath('./another/folder/with/code/')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  The license manager checks the mcc compiler out for a minimum of 30 minutes, so if another user compiles a code&lt;br /&gt;
you unfortunately may need to wait for up to 30 minutes to compile your own code.&lt;br /&gt;
&lt;br /&gt;
Compiling with additional paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -I ./another/folder/with/code/ -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any directories added with addpath() will need to be added to the list of compile options as -I arguments.  You&lt;br /&gt;
can have multiple -I arguments in your compile command.&lt;br /&gt;
&lt;br /&gt;
Here is an example job submission script.  Modify time, memory, tasks-per-node, and job name as you see fit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=matlab&lt;br /&gt;
#SBATCH --output=matlab.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load mcr&lt;br /&gt;
&lt;br /&gt;
./matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those who make use of mex files - compiled C and C++ code with matlab bindings - you will need to add these&lt;br /&gt;
files to the compiled archive via the -a flag.  See the behavior of this flag in the [https://www.mathworks.com/help/compiler/mcc.html compiler documentation].  You can either target specific .mex files or entire directories.&lt;br /&gt;
&lt;br /&gt;
Because codes often require adding several directories to the Matlab path as well as mex files from several locations,&lt;br /&gt;
we recommend writing a script to preserve and help document the steps to compile your Matlab code.  Here is an&lt;br /&gt;
abbreviated example from a current user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module load MATLAB&lt;br /&gt;
&lt;br /&gt;
cd matlabPyrTools/MEX/&lt;br /&gt;
&lt;br /&gt;
# compile mex files&lt;br /&gt;
mex upConv.c convolve.c wrap.c edges.c&lt;br /&gt;
mex corrDn.c convolve.c wrap.c edges.c&lt;br /&gt;
mex histo.c&lt;br /&gt;
mex innerProd.c&lt;br /&gt;
&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;br /&gt;
mcc -m mongrel_creation.m \&lt;br /&gt;
  -I ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -I ./matlabPyrTools/ \&lt;br /&gt;
  -I ./FastICA/ \&lt;br /&gt;
  -a ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -a ./texturesynth/ \&lt;br /&gt;
  -o mongrel_creation_binary&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for MatLab so the model is to develop and debug your MatLab code&lt;br /&gt;
elsewhere or using Octave on Beocat, then you can compile the MatLab code into an executable and run it without&lt;br /&gt;
limits on Beocat.  &lt;br /&gt;
&lt;br /&gt;
For more info on the mcc compiler see:  https://www.mathworks.com/help/compiler/mcc.html&lt;br /&gt;
&lt;br /&gt;
=== COMSOL ===&lt;br /&gt;
Beocat has no license for COMSOL. If you want to use it, you must provide your own.&lt;br /&gt;
&lt;br /&gt;
 module spider COMSOL/&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
  COMSOL: COMSOL/5.3&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
    Description:&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling&lt;br /&gt;
      and simulating scientific and engineering problems&lt;br /&gt;
 &lt;br /&gt;
    This module can be loaded directly: module load COMSOL/5.3&lt;br /&gt;
 &lt;br /&gt;
    Help:&lt;br /&gt;
      &lt;br /&gt;
      Description&lt;br /&gt;
      ===========&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling and &lt;br /&gt;
 simulating scientific and engineering problems&lt;br /&gt;
      You must provide your own license.&lt;br /&gt;
      export LM_LICENSE_FILE=/the/path/to/your/license/file&lt;br /&gt;
      *OR*&lt;br /&gt;
      export LM_LICENSE_FILE=$LICENSE_SERVER_PORT@$LICENSE_SERVER_HOSTNAME&lt;br /&gt;
      e.g. export LM_LICENSE_FILE=1719@some.flexlm.server.ksu.edu&lt;br /&gt;
      &lt;br /&gt;
      More information&lt;br /&gt;
      ================&lt;br /&gt;
       - Homepage: https://www.comsol.com/&lt;br /&gt;
==== Graphical COMSOL ====&lt;br /&gt;
Running COMSOL in graphical mode on a cluster is generally a bad idea. If you choose to run it in graphical mode on a compute node, you will need to do something like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to the cluster with X11 forwarding (ssh -Y or mobaxterm)&lt;br /&gt;
# load the comsol module on the headnode&lt;br /&gt;
module load COMSOL&lt;br /&gt;
# export your comsol license as mentioned above, and tell the scheduler to run the software&lt;br /&gt;
srun --nodes=1 --time=1:00:00 --mem=1G --pty --x11 comsol -3drend sw&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .NET Core ===&lt;br /&gt;
==== Load .NET ====&lt;br /&gt;
 mozes@[eunomia] ~ $ module load dotNET-Core-SDK&lt;br /&gt;
==== create an application ====&lt;br /&gt;
Following instructions from [https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-with-xplat-cli here], we'll create a simple 'Hello World' application&lt;br /&gt;
 mozes@[eunomia] ~ $ mkdir Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~ $ cd Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet new console&lt;br /&gt;
 The template &amp;quot;Console Application&amp;quot; was created successfully.&lt;br /&gt;
 &lt;br /&gt;
 Processing post-creation actions...&lt;br /&gt;
 Running 'dotnet restore' on /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Restoring packages for /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.props.&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.targets.&lt;br /&gt;
  Restore completed in 358.43 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
 &lt;br /&gt;
 Restore succeeded.&lt;br /&gt;
&lt;br /&gt;
==== Edit your program ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ vi Program.cs&lt;br /&gt;
==== Run your .NET application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet run&lt;br /&gt;
 Hello World!&lt;br /&gt;
==== Build and run the built application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet build&lt;br /&gt;
 Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core&lt;br /&gt;
 Copyright (C) Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
  Restore completed in 106.12 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
  Hello -&amp;gt; /homes/mozes/Hello/bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 &lt;br /&gt;
 Build succeeded.&lt;br /&gt;
    0 Warning(s)&lt;br /&gt;
    0 Error(s)&lt;br /&gt;
 &lt;br /&gt;
 Time Elapsed 00:00:02.86&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 Hello World!&lt;br /&gt;
&lt;br /&gt;
== Installing my own software ==&lt;br /&gt;
Installing and maintaining software for the many different users of Beocat would be very difficult, if not impossible. For this reason, we don't generally install user-run software on our cluster. Instead, we ask that you install it into your home directories.&lt;br /&gt;
&lt;br /&gt;
In many cases, the software vendor or support site will incorrectly assume that you are installing the software system-wide or that you need 'sudo' access.&lt;br /&gt;
&lt;br /&gt;
As a quick example of installing software in your home directory, we have a sample video on our [[Training Videos]] page. If you're still having problems or questions, please contact support as mentioned on our [[Main Page]].&lt;/div&gt;</summary>
		<author><name>Jhauser</name></author>
	</entry>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=486</id>
		<title>Installed software</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=486"/>
		<updated>2019-05-28T18:39:57Z</updated>

		<summary type="html">&lt;p&gt;Jhauser: Add section to explain how to view the available python versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Module Availability ==&lt;br /&gt;
For a complete list of all installed modules, check [https://modules.beocat.ksu.edu/ our modules website]&lt;br /&gt;
&lt;br /&gt;
We try to keep the same software available across all node classes, but sometimes it is impossible. Please check the modules website if you have any questions about software availability on each node class.&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
A toolchain is a set of compilers, libraries and applications that are needed to build software. Some software functions better when using specific toolchains.&lt;br /&gt;
&lt;br /&gt;
We provide a good number of toolchains and versions of toolchains make sure your applications will compile and/or run correctly.&lt;br /&gt;
&lt;br /&gt;
These toolchains include (you can run 'module keyword toolchain'):&lt;br /&gt;
; foss:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.&lt;br /&gt;
; fosscuda:    GNU Compiler Collection (GCC) based compiler toolchain based on FOSS with CUDA support.&lt;br /&gt;
; gmvapich2:    GNU Compiler Collection (GCC) based compiler toolchain, including MVAPICH2 for MPI support. '''DEPRECATED'''&lt;br /&gt;
; gompi:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support.&lt;br /&gt;
; goolfc:    GCC based compiler toolchain __with CUDA support__, and including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. '''DEPRECATED'''&lt;br /&gt;
; iomkl:    Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL &amp;amp; OpenMPI.&lt;br /&gt;
&lt;br /&gt;
You can run 'module spider $toolchain/' to see the versions we have:&lt;br /&gt;
 $ module spider iomkl/&lt;br /&gt;
* iomkl/2017a&lt;br /&gt;
* iomkl/2017b&lt;br /&gt;
* iomkl/2017beocatb&lt;br /&gt;
&lt;br /&gt;
If you load one of those (module load iomkl/2017b), you can see the other modules and versions of software that it loaded with the 'module list':&lt;br /&gt;
 $ module list&lt;br /&gt;
 Currently Loaded Modules:&lt;br /&gt;
   1) icc/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   2) binutils/2.28-GCCcore-6.4.0&lt;br /&gt;
   3) ifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   4) iccifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   5) GCCcore/6.4.0&lt;br /&gt;
   6) numactl/2.0.11-GCCcore-6.4.0&lt;br /&gt;
   7) hwloc/1.11.7-GCCcore-6.4.0&lt;br /&gt;
   8) OpenMPI/2.1.1-iccifort-2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   9) iompi/2017b&lt;br /&gt;
  10) imkl/2017.3.196-iompi-2017b&lt;br /&gt;
  11) iomkl/2017b&lt;br /&gt;
&lt;br /&gt;
As you can see, toolchains can depend on each other. For instance, the iomkl toolchain, depends on iompi, which depends on iccifort, which depend on icc and ifort, which depend on GCCcore which depend on GCC. Hence it is very important that the correct versions of all related software are loaded.&lt;br /&gt;
&lt;br /&gt;
With software we provide, the toolchain used to compile is always specified in the &amp;quot;version&amp;quot; of the software that you want to load.&lt;br /&gt;
&lt;br /&gt;
If you mix toolchains, inconsistent things may happen.&lt;br /&gt;
== Most Commonly Used Software ==&lt;br /&gt;
Check our [https://modules.beocat.ksu.edu/ modules website] for the most up to date software availability.&lt;br /&gt;
&lt;br /&gt;
The versions mentioned below are representations of what was available at the time of writing, not necessarily what is currently available.&lt;br /&gt;
=== [http://www.open-mpi.org/ OpenMPI] ===&lt;br /&gt;
We provide lots of versions, you are most likely better off directly loading a toolchain or application to make sure you get the right version, but you can see the versions we have with 'module avail OpenMPI/'&lt;br /&gt;
&lt;br /&gt;
The first step to run an MPI application is to load one of the OpenMPI modules.  You normally will just need to load the default version as below.  If your code needs access to nVidia GPUs you'll need the cuda version above.  Otherwise some codes are picky about what versions of the underlying GNU or Intel compilers that are needed.&lt;br /&gt;
&lt;br /&gt;
  module load OpenMPI&lt;br /&gt;
&lt;br /&gt;
If you are working with your own MPI code you will need to start by compiling it.  MPI offers &amp;lt;B&amp;gt;mpicc&amp;lt;/B&amp;gt; for compiling codes written in C, &amp;lt;B&amp;gt;mpic++&amp;lt;/B&amp;gt; for compiling C++ code, and &amp;lt;B&amp;gt;mpifort&amp;lt;/B&amp;gt; for compiling Fortran code.  You can get a complete listing of parameters to use by running them with the &amp;lt;B&amp;gt;--help&amp;lt;/B&amp;gt; parameter.  Below are some examples of compiling with each.&lt;br /&gt;
&lt;br /&gt;
  mpicc --help&lt;br /&gt;
  mpicc -o my_code.x my_code.c&lt;br /&gt;
  mpic++ -o my_code.x my_code.cc&lt;br /&gt;
  mpifort -o my_code.x my_code.f&lt;br /&gt;
&lt;br /&gt;
In each case above, you can name the executable file whatever you want (I chose &amp;lt;T&amp;gt;my_code.x&amp;lt;/I&amp;gt;).  It is common to use different optimization levels, for example, but those may depend on the version of OpenMPI you choose.  Some are based on the Intel compilers so you'd need to use  optimizations for the underlying icc or ifort compilers they call, and some are GNU based so you'd use compiler optimizations for gcc or gfortran.&lt;br /&gt;
&lt;br /&gt;
We have many MPI codes in our modules that you simply need to load before using.  Below is an example of loading and running Gromacs which is an MPI based code to simulate large numbers of atoms classically.&lt;br /&gt;
&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
&lt;br /&gt;
This loads the Gromacs modules and sets all the paths so you can run the scalar version &amp;lt;B&amp;gt;gmx&amp;lt;/B&amp;gt; or the MPI version &amp;lt;B&amp;gt;gmx_mpi&amp;lt;/B&amp;gt;.  Below is a sample job script for running a complete Gromacs simulation.&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --mem=120G&lt;br /&gt;
  #SBATCH --time=24:00:00&lt;br /&gt;
  #SBATCH --job-name=gromacs&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=4&lt;br /&gt;
  &lt;br /&gt;
  module purge&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Running Gromacs on $HOSTNAME&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export OMP_NUM_THREADS=1&lt;br /&gt;
  time mpirun -x OMP_NUM_THREADS=1 gmx_mpi mdrun -nsteps 500000 -ntomp 1 -v -deffnm 1ns -c 1ns.pdb -nice 0&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Finished run on $SLURM_NTASKS $HOSTNAME cores&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;mpirun&amp;lt;/B&amp;gt; will run your job on all cores requested which in this case is 4 cores on a single node.  You will often just need to guess at the memory size for your code, then check on the memory usage with &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt; and adjust the memory in future jobs.&lt;br /&gt;
&lt;br /&gt;
I prefer to put a &amp;lt;B&amp;gt;module purge&amp;lt;/B&amp;gt; in my scripts then manually load the modules needed to insure each run is using the modules it needs.  If you don't do this when you submit a job script it will simply use the modules you currently have loaded which is fine too.&lt;br /&gt;
&lt;br /&gt;
I also like to put a &amp;lt;B&amp;gt;time&amp;lt;/B&amp;gt; command in front of each part of the script that can use significant amounts of time.  This way I can track the amount of time used in each section of the job script.  This can prove very useful if your job script copies large data files around at the start, for example, allowing you to see how much time was used for each stage of the job if it runs longer than expected.&lt;br /&gt;
&lt;br /&gt;
The OMP_NUM_THREADS environment variable is set to 1 and passed to the MPI system to insure that each MPI task only uses 1 thread.  There are some MPI codes that are also multi-threaded, so this insures that this particular code uses the cores allocated to it in the manner we want.&lt;br /&gt;
&lt;br /&gt;
Once you have your job script ready, submit it using the &amp;lt;B&amp;gt;sbatch&amp;lt;/B&amp;gt; command as below where the job script is in the file &amp;lt;I&amp;gt;sb.gromacs&amp;lt;/I&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  sbatch sb.gromacs&lt;br /&gt;
&lt;br /&gt;
You should then monitor your job as it goes through the queue and starts running using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  You code will also generate an output file, usually of the form &amp;lt;I&amp;gt;slurm-#######.out&amp;lt;/I&amp;gt; where the 7 # signs are the 7 digit job ID number.  If you need to cancel your job use &amp;lt;B&amp;gt;scancel&amp;lt;/B&amp;gt; with the 7 digit job ID number.&lt;br /&gt;
&lt;br /&gt;
   scancel #######&lt;br /&gt;
&lt;br /&gt;
=== [http://www.r-project.org/ R] ===&lt;br /&gt;
You can see what versions of R we provide with 'module avail R/'&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
We provide a small number of R modules installed by default, these are generally modules that are needed by more than one person.&lt;br /&gt;
&lt;br /&gt;
==== Installing your own R Packages ====&lt;br /&gt;
To install your own module, login to Beocat and start R interactively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load R&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then install the package using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
install.packages(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Follow the prompts. Note that there is a CRAN mirror at KU - it will be listed as &amp;quot;USA (KS)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After installing you can test before leaving interactive mode by issuing the command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
library(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Running R Jobs ====&lt;br /&gt;
&lt;br /&gt;
You cannot submit an R script directly. '&amp;lt;tt&amp;gt;sbatch myscript.R&amp;lt;/tt&amp;gt;' will result in an error. Instead, you need to make a bash [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|script]] that will call R appropriately. Here is a minimal example. We'll save this as submit-R.sbatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --mem-per-cpu=4G&lt;br /&gt;
# Now we tell Slurm how long we expect our work to take: 15 minutes (D-HH:MM:SS)&lt;br /&gt;
#SBATCH --time=0-00:15:00&lt;br /&gt;
&lt;br /&gt;
# Now lets do some actual work. This starts R and loads the file myscript.R&lt;br /&gt;
module purge&lt;br /&gt;
module load R&lt;br /&gt;
R --no-save -q &amp;lt; myscript.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to submit your R job, you would type&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch submit-R.sbatch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can monitor your jobs using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  The output of your job will be in a slurm-#.out file where '#' is the 7 digit job ID number for your job.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.java.com/ Java] ===&lt;br /&gt;
You can see what versions of Java we support with 'module avail Java/'&lt;br /&gt;
&lt;br /&gt;
=== [http://www.python.org/about/ Python] ===&lt;br /&gt;
You can see what versions of Python we support with 'module avail Python/'&lt;br /&gt;
&lt;br /&gt;
If you need libraries that we do not have installed, you should use [https://virtualenv.pypa.io/en/stable/userguide/ virtualenv] to setup a virtual python environment in your home directory. This will let you install python libraries as you please.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your virtual environment ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Load Python&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command Python is loaded.  After you logoff and then logon again Python will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* Create a location for your virtual environments (optional, but helps keep things organized)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/virtualenvs&lt;br /&gt;
cd ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Create a virtual environment. Here I will create a default virtual environment called 'test'. Note that &amp;lt;code&amp;gt;virtualenv --help&amp;lt;/code&amp;gt; has many more useful options.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
virtualenv test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Lets look at our virtual environments (the virtual environment name should be in the output):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Activate one of these&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command your virtual environment is activated.  After you logoff and then logon again your virtual environment will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* You can now install the python modules you want. This can be done using &amp;lt;tt&amp;gt;pip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pip install numpy biopython&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using your virtual environment within a job ====&lt;br /&gt;
Here is a simple job script using the virtual environment test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
python ~/path/to/your/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using MPI with Python within a job ====&lt;br /&gt;
Here is a simple job script using MPI with Python&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
PYTHON_BINARY=$(which python)&lt;br /&gt;
mpirun ${PYTHON_BINARY} ~/path/to/your/mpi/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== View available Python versions ====&lt;br /&gt;
Type the below command to get a list of the available python versions. The D in parenthesis denotes the one that will be loaded by default. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module avail Python/&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Running this does not load a Python module, it just shows you a list of the ones that are available.&lt;br /&gt;
&lt;br /&gt;
=== [http://spark.apache.org/ Spark] ===&lt;br /&gt;
&lt;br /&gt;
Spark is a programming language for large scale data processing.&lt;br /&gt;
It can be used in conjunction with Python, R, Scala, Java, and SQL.&lt;br /&gt;
Spark can be run on Beocat interactively or through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
To run interactively, you must first request a node or nodes from the Slurm queue.&lt;br /&gt;
The line below requests 1 node and 1 core for 24 hours and if available will drop&lt;br /&gt;
you into the bash shell on that node.&lt;br /&gt;
&lt;br /&gt;
  srun -J srun -N 1 -n 1 -t 24:00:00 --mem=10G --pty bash&lt;br /&gt;
&lt;br /&gt;
We have some sample python based Spark code you can try out that came from the &lt;br /&gt;
exercises and homework from the PSC Spark workshop.  &lt;br /&gt;
&lt;br /&gt;
  mkdir spark-test&lt;br /&gt;
  cd spark-test&lt;br /&gt;
  cp -rp /homes/daveturner/projects/PSC-BigData-Workshop/Shakespeare/* .&lt;br /&gt;
&lt;br /&gt;
You will need to set up a python virtual environment and load the &amp;lt;B&amp;gt;nltk&amp;lt;/B&amp;gt; package &lt;br /&gt;
before you run the first time.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  mkdir -p ~/virtualenvs&lt;br /&gt;
  cd ~/virtualenvs&lt;br /&gt;
  virtualenv spark-test&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  pip install nltk&lt;br /&gt;
  pip install numpy&lt;br /&gt;
  deactivate&lt;br /&gt;
&lt;br /&gt;
To run the sample code interactively, load the Python and Spark modules,&lt;br /&gt;
source your python virtual environment, change to the sample directory, fire up pyspark, &lt;br /&gt;
then execute the sample code.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  module load Spark&lt;br /&gt;
  cd ~/spark-test&lt;br /&gt;
  pyspark&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; exec(open(&amp;quot;shakespeare.py&amp;quot;).read())&lt;br /&gt;
&lt;br /&gt;
You can work interactively from the pyspark prompt (&amp;gt;&amp;gt;&amp;gt;) in addition to running scripts as above.&lt;br /&gt;
&lt;br /&gt;
The Shakespeare directory also contains a sample sbatch submit script that will run the &lt;br /&gt;
same shakespeare.py code through the Slurm batch queue.  &lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --job-name=shakespeare&lt;br /&gt;
  #SBATCH --mem=10G&lt;br /&gt;
  #SBATCH --time=01:00:00&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=1&lt;br /&gt;
  &lt;br /&gt;
  # Load Spark and Python (version 3 here)&lt;br /&gt;
  module load Spark&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  &lt;br /&gt;
  spark-submit shakespeare.py&lt;br /&gt;
&lt;br /&gt;
When you run interactively, pyspark initializes your spark context &amp;lt;B&amp;gt;sc&amp;lt;/B&amp;gt;.&lt;br /&gt;
You will need to do this manually as in the sample python code when you want&lt;br /&gt;
to submit jobs through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
  # If there is no Spark Context (not running interactive from pyspark), create it&lt;br /&gt;
  try:&lt;br /&gt;
     sc&lt;br /&gt;
  except NameError:&lt;br /&gt;
     from pyspark import SparkConf, SparkContext&lt;br /&gt;
     conf = SparkConf().setMaster(&amp;quot;local&amp;quot;).setAppName(&amp;quot;App&amp;quot;)&lt;br /&gt;
     sc = SparkContext(conf = conf)&lt;br /&gt;
&lt;br /&gt;
=== [http://www.perl.org/ Perl] ===&lt;br /&gt;
The system-wide version of perl is tracking the stable releases of perl. Unfortunately there are some features that we do not include in the system distribution of perl, namely threads.&lt;br /&gt;
&lt;br /&gt;
To use perl with threads, out a newer version, you can load it with the module command. To see what versions of perl we provide, you can use 'module avail Perl/'&lt;br /&gt;
&lt;br /&gt;
==== Submitting a job with Perl ====&lt;br /&gt;
Much like R (above), you cannot simply '&amp;lt;tt&amp;gt;sbatch myProgram.pl&amp;lt;/tt&amp;gt;', but you must create a [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|submit script]] which will call perl. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --mem-per-cpu=1G&lt;br /&gt;
# Now we tell sbatch how long we expect our work to take: 15 minutes (H:MM:SS)&lt;br /&gt;
#SBATCH --time=0-0:15:00&lt;br /&gt;
# Now lets do some actual work. &lt;br /&gt;
module load Perl&lt;br /&gt;
perl /path/to/myProgram.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Octave for MatLab codes ===&lt;br /&gt;
&lt;br /&gt;
'module avail Octave/'&lt;br /&gt;
&lt;br /&gt;
The 64-bit version of Octave can be loaded using the command above.  Octave can then be used&lt;br /&gt;
to work with MatLab codes on the head node and to submit jobs to the compute nodes through the&lt;br /&gt;
sbatch scheduler.  Octave is made to run MatLab code, but it does have limitations and does not support&lt;br /&gt;
everything that MatLab itself does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=octave&lt;br /&gt;
#SBATCH --output=octave.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load Octave/4.2.1-foss-2017beocatb-enable64&lt;br /&gt;
&lt;br /&gt;
octave &amp;lt; matlab_code.m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MatLab compiler ===&lt;br /&gt;
&lt;br /&gt;
Beocat also has a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for the MatLab compiler and the most common toolboxes&lt;br /&gt;
including the Parallel Computing Toolbox, Optimization Toolbox, Statistics and Machine Learning Toolbox,&lt;br /&gt;
Image Processing Toolbox, Curve Fitting Toolbox, Neural Network Toolbox, Sumbolic Math Toolbox, &lt;br /&gt;
Global Optimization Toolbox, and the Bioinformatics Toolbox.&lt;br /&gt;
&lt;br /&gt;
Since we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt;, this means that you will be expected to develop your MatLab code&lt;br /&gt;
with Octave or elsewhere on a laptop or departmental server.  Once you're ready to do large runs, then you&lt;br /&gt;
move your code to Beocat, compile the MatLab code into an executable, and you can submit as many jobs as&lt;br /&gt;
you want to the scheduler.  To use the MatLab compiler, you need to load the MATLAB module to compile code and&lt;br /&gt;
load the mcr module to run the resulting MatLab executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have addpath() commands in your code, you will need to wrap them in an &amp;quot;if ~deployed&amp;quot; block and tell the&lt;br /&gt;
compiler to include that path via the -I flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;MATLAB&amp;quot;&amp;gt;&lt;br /&gt;
% wrap addpath() calls like so:&lt;br /&gt;
if ~deployed&lt;br /&gt;
    addpath('./another/folder/with/code/')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  The license manager checks the mcc compiler out for a minimum of 30 minutes, so if another user compiles a code&lt;br /&gt;
you unfortunately may need to wait for up to 30 minutes to compile your own code.&lt;br /&gt;
&lt;br /&gt;
Compiling with additional paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -I ./another/folder/with/code/ -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any directories added with addpath() will need to be added to the list of compile options as -I arguments.  You&lt;br /&gt;
can have multiple -I arguments in your compile command.&lt;br /&gt;
&lt;br /&gt;
Here is an example job submission script.  Modify time, memory, tasks-per-node, and job name as you see fit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=matlab&lt;br /&gt;
#SBATCH --output=matlab.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load mcr&lt;br /&gt;
&lt;br /&gt;
./matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those who make use of mex files - compiled C and C++ code with matlab bindings - you will need to add these&lt;br /&gt;
files to the compiled archive via the -a flag.  See the behavior of this flag in the [https://www.mathworks.com/help/compiler/mcc.html compiler documentation].  You can either target specific .mex files or entire directories.&lt;br /&gt;
&lt;br /&gt;
Because codes often require adding several directories to the Matlab path as well as mex files from several locations,&lt;br /&gt;
we recommend writing a script to preserve and help document the steps to compile your Matlab code.  Here is an&lt;br /&gt;
abbreviated example from a current user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module load MATLAB&lt;br /&gt;
&lt;br /&gt;
cd matlabPyrTools/MEX/&lt;br /&gt;
&lt;br /&gt;
# compile mex files&lt;br /&gt;
mex upConv.c convolve.c wrap.c edges.c&lt;br /&gt;
mex corrDn.c convolve.c wrap.c edges.c&lt;br /&gt;
mex histo.c&lt;br /&gt;
mex innerProd.c&lt;br /&gt;
&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;br /&gt;
mcc -m mongrel_creation.m \&lt;br /&gt;
  -I ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -I ./matlabPyrTools/ \&lt;br /&gt;
  -I ./FastICA/ \&lt;br /&gt;
  -a ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -a ./texturesynth/ \&lt;br /&gt;
  -o mongrel_creation_binary&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for MatLab so the model is to develop and debug your MatLab code&lt;br /&gt;
elsewhere or using Octave on Beocat, then you can compile the MatLab code into an executable and run it without&lt;br /&gt;
limits on Beocat.  &lt;br /&gt;
&lt;br /&gt;
For more info on the mcc compiler see:  https://www.mathworks.com/help/compiler/mcc.html&lt;br /&gt;
&lt;br /&gt;
=== COMSOL ===&lt;br /&gt;
Beocat has no license for COMSOL. If you want to use it, you must provide your own.&lt;br /&gt;
&lt;br /&gt;
 module spider COMSOL/&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
  COMSOL: COMSOL/5.3&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
    Description:&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling&lt;br /&gt;
      and simulating scientific and engineering problems&lt;br /&gt;
 &lt;br /&gt;
    This module can be loaded directly: module load COMSOL/5.3&lt;br /&gt;
 &lt;br /&gt;
    Help:&lt;br /&gt;
      &lt;br /&gt;
      Description&lt;br /&gt;
      ===========&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling and &lt;br /&gt;
 simulating scientific and engineering problems&lt;br /&gt;
      You must provide your own license.&lt;br /&gt;
      export LM_LICENSE_FILE=/the/path/to/your/license/file&lt;br /&gt;
      *OR*&lt;br /&gt;
      export LM_LICENSE_FILE=$LICENSE_SERVER_PORT@$LICENSE_SERVER_HOSTNAME&lt;br /&gt;
      e.g. export LM_LICENSE_FILE=1719@some.flexlm.server.ksu.edu&lt;br /&gt;
      &lt;br /&gt;
      More information&lt;br /&gt;
      ================&lt;br /&gt;
       - Homepage: https://www.comsol.com/&lt;br /&gt;
==== Graphical COMSOL ====&lt;br /&gt;
Running COMSOL in graphical mode on a cluster is generally a bad idea. If you choose to run it in graphical mode on a compute node, you will need to do something like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to the cluster with X11 forwarding (ssh -Y or mobaxterm)&lt;br /&gt;
# load the comsol module on the headnode&lt;br /&gt;
module load COMSOL&lt;br /&gt;
# export your comsol license as mentioned above, and tell the scheduler to run the software&lt;br /&gt;
srun --nodes=1 --time=1:00:00 --mem=1G --pty --x11 comsol -3drend sw&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .NET Core ===&lt;br /&gt;
==== Load .NET ====&lt;br /&gt;
 mozes@[eunomia] ~ $ module load dotNET-Core-SDK&lt;br /&gt;
==== create an application ====&lt;br /&gt;
Following instructions from [https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-with-xplat-cli here], we'll create a simple 'Hello World' application&lt;br /&gt;
 mozes@[eunomia] ~ $ mkdir Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~ $ cd Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet new console&lt;br /&gt;
 The template &amp;quot;Console Application&amp;quot; was created successfully.&lt;br /&gt;
 &lt;br /&gt;
 Processing post-creation actions...&lt;br /&gt;
 Running 'dotnet restore' on /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Restoring packages for /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.props.&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.targets.&lt;br /&gt;
  Restore completed in 358.43 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
 &lt;br /&gt;
 Restore succeeded.&lt;br /&gt;
&lt;br /&gt;
==== Edit your program ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ vi Program.cs&lt;br /&gt;
==== Run your .NET application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet run&lt;br /&gt;
 Hello World!&lt;br /&gt;
==== Build and run the built application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet build&lt;br /&gt;
 Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core&lt;br /&gt;
 Copyright (C) Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
  Restore completed in 106.12 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
  Hello -&amp;gt; /homes/mozes/Hello/bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 &lt;br /&gt;
 Build succeeded.&lt;br /&gt;
    0 Warning(s)&lt;br /&gt;
    0 Error(s)&lt;br /&gt;
 &lt;br /&gt;
 Time Elapsed 00:00:02.86&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 Hello World!&lt;br /&gt;
&lt;br /&gt;
== Installing my own software ==&lt;br /&gt;
Installing and maintaining software for the many different users of Beocat would be very difficult, if not impossible. For this reason, we don't generally install user-run software on our cluster. Instead, we ask that you install it into your home directories.&lt;br /&gt;
&lt;br /&gt;
In many cases, the software vendor or support site will incorrectly assume that you are installing the software system-wide or that you need 'sudo' access.&lt;br /&gt;
&lt;br /&gt;
As a quick example of installing software in your home directory, we have a sample video on our [[Training Videos]] page. If you're still having problems or questions, please contact support as mentioned on our [[Main Page]].&lt;/div&gt;</summary>
		<author><name>Jhauser</name></author>
	</entry>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=485</id>
		<title>Installed software</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=485"/>
		<updated>2019-05-28T18:37:28Z</updated>

		<summary type="html">&lt;p&gt;Jhauser: fix the version of the python package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Module Availability ==&lt;br /&gt;
For a complete list of all installed modules, check [https://modules.beocat.ksu.edu/ our modules website]&lt;br /&gt;
&lt;br /&gt;
We try to keep the same software available across all node classes, but sometimes it is impossible. Please check the modules website if you have any questions about software availability on each node class.&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
A toolchain is a set of compilers, libraries and applications that are needed to build software. Some software functions better when using specific toolchains.&lt;br /&gt;
&lt;br /&gt;
We provide a good number of toolchains and versions of toolchains make sure your applications will compile and/or run correctly.&lt;br /&gt;
&lt;br /&gt;
These toolchains include (you can run 'module keyword toolchain'):&lt;br /&gt;
; foss:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.&lt;br /&gt;
; fosscuda:    GNU Compiler Collection (GCC) based compiler toolchain based on FOSS with CUDA support.&lt;br /&gt;
; gmvapich2:    GNU Compiler Collection (GCC) based compiler toolchain, including MVAPICH2 for MPI support. '''DEPRECATED'''&lt;br /&gt;
; gompi:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support.&lt;br /&gt;
; goolfc:    GCC based compiler toolchain __with CUDA support__, and including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. '''DEPRECATED'''&lt;br /&gt;
; iomkl:    Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL &amp;amp; OpenMPI.&lt;br /&gt;
&lt;br /&gt;
You can run 'module spider $toolchain/' to see the versions we have:&lt;br /&gt;
 $ module spider iomkl/&lt;br /&gt;
* iomkl/2017a&lt;br /&gt;
* iomkl/2017b&lt;br /&gt;
* iomkl/2017beocatb&lt;br /&gt;
&lt;br /&gt;
If you load one of those (module load iomkl/2017b), you can see the other modules and versions of software that it loaded with the 'module list':&lt;br /&gt;
 $ module list&lt;br /&gt;
 Currently Loaded Modules:&lt;br /&gt;
   1) icc/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   2) binutils/2.28-GCCcore-6.4.0&lt;br /&gt;
   3) ifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   4) iccifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   5) GCCcore/6.4.0&lt;br /&gt;
   6) numactl/2.0.11-GCCcore-6.4.0&lt;br /&gt;
   7) hwloc/1.11.7-GCCcore-6.4.0&lt;br /&gt;
   8) OpenMPI/2.1.1-iccifort-2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   9) iompi/2017b&lt;br /&gt;
  10) imkl/2017.3.196-iompi-2017b&lt;br /&gt;
  11) iomkl/2017b&lt;br /&gt;
&lt;br /&gt;
As you can see, toolchains can depend on each other. For instance, the iomkl toolchain, depends on iompi, which depends on iccifort, which depend on icc and ifort, which depend on GCCcore which depend on GCC. Hence it is very important that the correct versions of all related software are loaded.&lt;br /&gt;
&lt;br /&gt;
With software we provide, the toolchain used to compile is always specified in the &amp;quot;version&amp;quot; of the software that you want to load.&lt;br /&gt;
&lt;br /&gt;
If you mix toolchains, inconsistent things may happen.&lt;br /&gt;
== Most Commonly Used Software ==&lt;br /&gt;
Check our [https://modules.beocat.ksu.edu/ modules website] for the most up to date software availability.&lt;br /&gt;
&lt;br /&gt;
The versions mentioned below are representations of what was available at the time of writing, not necessarily what is currently available.&lt;br /&gt;
=== [http://www.open-mpi.org/ OpenMPI] ===&lt;br /&gt;
We provide lots of versions, you are most likely better off directly loading a toolchain or application to make sure you get the right version, but you can see the versions we have with 'module avail OpenMPI/'&lt;br /&gt;
&lt;br /&gt;
The first step to run an MPI application is to load one of the OpenMPI modules.  You normally will just need to load the default version as below.  If your code needs access to nVidia GPUs you'll need the cuda version above.  Otherwise some codes are picky about what versions of the underlying GNU or Intel compilers that are needed.&lt;br /&gt;
&lt;br /&gt;
  module load OpenMPI&lt;br /&gt;
&lt;br /&gt;
If you are working with your own MPI code you will need to start by compiling it.  MPI offers &amp;lt;B&amp;gt;mpicc&amp;lt;/B&amp;gt; for compiling codes written in C, &amp;lt;B&amp;gt;mpic++&amp;lt;/B&amp;gt; for compiling C++ code, and &amp;lt;B&amp;gt;mpifort&amp;lt;/B&amp;gt; for compiling Fortran code.  You can get a complete listing of parameters to use by running them with the &amp;lt;B&amp;gt;--help&amp;lt;/B&amp;gt; parameter.  Below are some examples of compiling with each.&lt;br /&gt;
&lt;br /&gt;
  mpicc --help&lt;br /&gt;
  mpicc -o my_code.x my_code.c&lt;br /&gt;
  mpic++ -o my_code.x my_code.cc&lt;br /&gt;
  mpifort -o my_code.x my_code.f&lt;br /&gt;
&lt;br /&gt;
In each case above, you can name the executable file whatever you want (I chose &amp;lt;T&amp;gt;my_code.x&amp;lt;/I&amp;gt;).  It is common to use different optimization levels, for example, but those may depend on the version of OpenMPI you choose.  Some are based on the Intel compilers so you'd need to use  optimizations for the underlying icc or ifort compilers they call, and some are GNU based so you'd use compiler optimizations for gcc or gfortran.&lt;br /&gt;
&lt;br /&gt;
We have many MPI codes in our modules that you simply need to load before using.  Below is an example of loading and running Gromacs which is an MPI based code to simulate large numbers of atoms classically.&lt;br /&gt;
&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
&lt;br /&gt;
This loads the Gromacs modules and sets all the paths so you can run the scalar version &amp;lt;B&amp;gt;gmx&amp;lt;/B&amp;gt; or the MPI version &amp;lt;B&amp;gt;gmx_mpi&amp;lt;/B&amp;gt;.  Below is a sample job script for running a complete Gromacs simulation.&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --mem=120G&lt;br /&gt;
  #SBATCH --time=24:00:00&lt;br /&gt;
  #SBATCH --job-name=gromacs&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=4&lt;br /&gt;
  &lt;br /&gt;
  module purge&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Running Gromacs on $HOSTNAME&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export OMP_NUM_THREADS=1&lt;br /&gt;
  time mpirun -x OMP_NUM_THREADS=1 gmx_mpi mdrun -nsteps 500000 -ntomp 1 -v -deffnm 1ns -c 1ns.pdb -nice 0&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Finished run on $SLURM_NTASKS $HOSTNAME cores&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;mpirun&amp;lt;/B&amp;gt; will run your job on all cores requested which in this case is 4 cores on a single node.  You will often just need to guess at the memory size for your code, then check on the memory usage with &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt; and adjust the memory in future jobs.&lt;br /&gt;
&lt;br /&gt;
I prefer to put a &amp;lt;B&amp;gt;module purge&amp;lt;/B&amp;gt; in my scripts then manually load the modules needed to insure each run is using the modules it needs.  If you don't do this when you submit a job script it will simply use the modules you currently have loaded which is fine too.&lt;br /&gt;
&lt;br /&gt;
I also like to put a &amp;lt;B&amp;gt;time&amp;lt;/B&amp;gt; command in front of each part of the script that can use significant amounts of time.  This way I can track the amount of time used in each section of the job script.  This can prove very useful if your job script copies large data files around at the start, for example, allowing you to see how much time was used for each stage of the job if it runs longer than expected.&lt;br /&gt;
&lt;br /&gt;
The OMP_NUM_THREADS environment variable is set to 1 and passed to the MPI system to insure that each MPI task only uses 1 thread.  There are some MPI codes that are also multi-threaded, so this insures that this particular code uses the cores allocated to it in the manner we want.&lt;br /&gt;
&lt;br /&gt;
Once you have your job script ready, submit it using the &amp;lt;B&amp;gt;sbatch&amp;lt;/B&amp;gt; command as below where the job script is in the file &amp;lt;I&amp;gt;sb.gromacs&amp;lt;/I&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  sbatch sb.gromacs&lt;br /&gt;
&lt;br /&gt;
You should then monitor your job as it goes through the queue and starts running using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  You code will also generate an output file, usually of the form &amp;lt;I&amp;gt;slurm-#######.out&amp;lt;/I&amp;gt; where the 7 # signs are the 7 digit job ID number.  If you need to cancel your job use &amp;lt;B&amp;gt;scancel&amp;lt;/B&amp;gt; with the 7 digit job ID number.&lt;br /&gt;
&lt;br /&gt;
   scancel #######&lt;br /&gt;
&lt;br /&gt;
=== [http://www.r-project.org/ R] ===&lt;br /&gt;
You can see what versions of R we provide with 'module avail R/'&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
We provide a small number of R modules installed by default, these are generally modules that are needed by more than one person.&lt;br /&gt;
&lt;br /&gt;
==== Installing your own R Packages ====&lt;br /&gt;
To install your own module, login to Beocat and start R interactively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load R&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then install the package using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
install.packages(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Follow the prompts. Note that there is a CRAN mirror at KU - it will be listed as &amp;quot;USA (KS)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After installing you can test before leaving interactive mode by issuing the command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
library(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Running R Jobs ====&lt;br /&gt;
&lt;br /&gt;
You cannot submit an R script directly. '&amp;lt;tt&amp;gt;sbatch myscript.R&amp;lt;/tt&amp;gt;' will result in an error. Instead, you need to make a bash [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|script]] that will call R appropriately. Here is a minimal example. We'll save this as submit-R.sbatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --mem-per-cpu=4G&lt;br /&gt;
# Now we tell Slurm how long we expect our work to take: 15 minutes (D-HH:MM:SS)&lt;br /&gt;
#SBATCH --time=0-00:15:00&lt;br /&gt;
&lt;br /&gt;
# Now lets do some actual work. This starts R and loads the file myscript.R&lt;br /&gt;
module purge&lt;br /&gt;
module load R&lt;br /&gt;
R --no-save -q &amp;lt; myscript.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to submit your R job, you would type&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch submit-R.sbatch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can monitor your jobs using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  The output of your job will be in a slurm-#.out file where '#' is the 7 digit job ID number for your job.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.java.com/ Java] ===&lt;br /&gt;
You can see what versions of Java we support with 'module avail Java/'&lt;br /&gt;
&lt;br /&gt;
=== [http://www.python.org/about/ Python] ===&lt;br /&gt;
You can see what versions of Python we support with 'module avail Python/'&lt;br /&gt;
&lt;br /&gt;
If you need libraries that we do not have installed, you should use [https://virtualenv.pypa.io/en/stable/userguide/ virtualenv] to setup a virtual python environment in your home directory. This will let you install python libraries as you please.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your virtual environment ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Load Python&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command Python is loaded.  After you logoff and then logon again Python will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* Create a location for your virtual environments (optional, but helps keep things organized)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/virtualenvs&lt;br /&gt;
cd ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Create a virtual environment. Here I will create a default virtual environment called 'test'. Note that &amp;lt;code&amp;gt;virtualenv --help&amp;lt;/code&amp;gt; has many more useful options.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
virtualenv test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Lets look at our virtual environments (the virtual environment name should be in the output):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Activate one of these&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command your virtual environment is activated.  After you logoff and then logon again your virtual environment will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* You can now install the python modules you want. This can be done using &amp;lt;tt&amp;gt;pip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pip install numpy biopython&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using your virtual environment within a job ====&lt;br /&gt;
Here is a simple job script using the virtual environment test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
python ~/path/to/your/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using MPI with Python within a job ====&lt;br /&gt;
Here is a simple job script using MPI with Python&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
PYTHON_BINARY=$(which python)&lt;br /&gt;
mpirun ${PYTHON_BINARY} ~/path/to/your/mpi/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://spark.apache.org/ Spark] ===&lt;br /&gt;
&lt;br /&gt;
Spark is a programming language for large scale data processing.&lt;br /&gt;
It can be used in conjunction with Python, R, Scala, Java, and SQL.&lt;br /&gt;
Spark can be run on Beocat interactively or through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
To run interactively, you must first request a node or nodes from the Slurm queue.&lt;br /&gt;
The line below requests 1 node and 1 core for 24 hours and if available will drop&lt;br /&gt;
you into the bash shell on that node.&lt;br /&gt;
&lt;br /&gt;
  srun -J srun -N 1 -n 1 -t 24:00:00 --mem=10G --pty bash&lt;br /&gt;
&lt;br /&gt;
We have some sample python based Spark code you can try out that came from the &lt;br /&gt;
exercises and homework from the PSC Spark workshop.  &lt;br /&gt;
&lt;br /&gt;
  mkdir spark-test&lt;br /&gt;
  cd spark-test&lt;br /&gt;
  cp -rp /homes/daveturner/projects/PSC-BigData-Workshop/Shakespeare/* .&lt;br /&gt;
&lt;br /&gt;
You will need to set up a python virtual environment and load the &amp;lt;B&amp;gt;nltk&amp;lt;/B&amp;gt; package &lt;br /&gt;
before you run the first time.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  mkdir -p ~/virtualenvs&lt;br /&gt;
  cd ~/virtualenvs&lt;br /&gt;
  virtualenv spark-test&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  pip install nltk&lt;br /&gt;
  pip install numpy&lt;br /&gt;
  deactivate&lt;br /&gt;
&lt;br /&gt;
To run the sample code interactively, load the Python and Spark modules,&lt;br /&gt;
source your python virtual environment, change to the sample directory, fire up pyspark, &lt;br /&gt;
then execute the sample code.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  module load Spark&lt;br /&gt;
  cd ~/spark-test&lt;br /&gt;
  pyspark&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; exec(open(&amp;quot;shakespeare.py&amp;quot;).read())&lt;br /&gt;
&lt;br /&gt;
You can work interactively from the pyspark prompt (&amp;gt;&amp;gt;&amp;gt;) in addition to running scripts as above.&lt;br /&gt;
&lt;br /&gt;
The Shakespeare directory also contains a sample sbatch submit script that will run the &lt;br /&gt;
same shakespeare.py code through the Slurm batch queue.  &lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --job-name=shakespeare&lt;br /&gt;
  #SBATCH --mem=10G&lt;br /&gt;
  #SBATCH --time=01:00:00&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=1&lt;br /&gt;
  &lt;br /&gt;
  # Load Spark and Python (version 3 here)&lt;br /&gt;
  module load Spark&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  &lt;br /&gt;
  spark-submit shakespeare.py&lt;br /&gt;
&lt;br /&gt;
When you run interactively, pyspark initializes your spark context &amp;lt;B&amp;gt;sc&amp;lt;/B&amp;gt;.&lt;br /&gt;
You will need to do this manually as in the sample python code when you want&lt;br /&gt;
to submit jobs through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
  # If there is no Spark Context (not running interactive from pyspark), create it&lt;br /&gt;
  try:&lt;br /&gt;
     sc&lt;br /&gt;
  except NameError:&lt;br /&gt;
     from pyspark import SparkConf, SparkContext&lt;br /&gt;
     conf = SparkConf().setMaster(&amp;quot;local&amp;quot;).setAppName(&amp;quot;App&amp;quot;)&lt;br /&gt;
     sc = SparkContext(conf = conf)&lt;br /&gt;
&lt;br /&gt;
=== [http://www.perl.org/ Perl] ===&lt;br /&gt;
The system-wide version of perl is tracking the stable releases of perl. Unfortunately there are some features that we do not include in the system distribution of perl, namely threads.&lt;br /&gt;
&lt;br /&gt;
To use perl with threads, out a newer version, you can load it with the module command. To see what versions of perl we provide, you can use 'module avail Perl/'&lt;br /&gt;
&lt;br /&gt;
==== Submitting a job with Perl ====&lt;br /&gt;
Much like R (above), you cannot simply '&amp;lt;tt&amp;gt;sbatch myProgram.pl&amp;lt;/tt&amp;gt;', but you must create a [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|submit script]] which will call perl. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --mem-per-cpu=1G&lt;br /&gt;
# Now we tell sbatch how long we expect our work to take: 15 minutes (H:MM:SS)&lt;br /&gt;
#SBATCH --time=0-0:15:00&lt;br /&gt;
# Now lets do some actual work. &lt;br /&gt;
module load Perl&lt;br /&gt;
perl /path/to/myProgram.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Octave for MatLab codes ===&lt;br /&gt;
&lt;br /&gt;
'module avail Octave/'&lt;br /&gt;
&lt;br /&gt;
The 64-bit version of Octave can be loaded using the command above.  Octave can then be used&lt;br /&gt;
to work with MatLab codes on the head node and to submit jobs to the compute nodes through the&lt;br /&gt;
sbatch scheduler.  Octave is made to run MatLab code, but it does have limitations and does not support&lt;br /&gt;
everything that MatLab itself does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=octave&lt;br /&gt;
#SBATCH --output=octave.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load Octave/4.2.1-foss-2017beocatb-enable64&lt;br /&gt;
&lt;br /&gt;
octave &amp;lt; matlab_code.m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MatLab compiler ===&lt;br /&gt;
&lt;br /&gt;
Beocat also has a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for the MatLab compiler and the most common toolboxes&lt;br /&gt;
including the Parallel Computing Toolbox, Optimization Toolbox, Statistics and Machine Learning Toolbox,&lt;br /&gt;
Image Processing Toolbox, Curve Fitting Toolbox, Neural Network Toolbox, Sumbolic Math Toolbox, &lt;br /&gt;
Global Optimization Toolbox, and the Bioinformatics Toolbox.&lt;br /&gt;
&lt;br /&gt;
Since we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt;, this means that you will be expected to develop your MatLab code&lt;br /&gt;
with Octave or elsewhere on a laptop or departmental server.  Once you're ready to do large runs, then you&lt;br /&gt;
move your code to Beocat, compile the MatLab code into an executable, and you can submit as many jobs as&lt;br /&gt;
you want to the scheduler.  To use the MatLab compiler, you need to load the MATLAB module to compile code and&lt;br /&gt;
load the mcr module to run the resulting MatLab executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have addpath() commands in your code, you will need to wrap them in an &amp;quot;if ~deployed&amp;quot; block and tell the&lt;br /&gt;
compiler to include that path via the -I flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;MATLAB&amp;quot;&amp;gt;&lt;br /&gt;
% wrap addpath() calls like so:&lt;br /&gt;
if ~deployed&lt;br /&gt;
    addpath('./another/folder/with/code/')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  The license manager checks the mcc compiler out for a minimum of 30 minutes, so if another user compiles a code&lt;br /&gt;
you unfortunately may need to wait for up to 30 minutes to compile your own code.&lt;br /&gt;
&lt;br /&gt;
Compiling with additional paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -I ./another/folder/with/code/ -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any directories added with addpath() will need to be added to the list of compile options as -I arguments.  You&lt;br /&gt;
can have multiple -I arguments in your compile command.&lt;br /&gt;
&lt;br /&gt;
Here is an example job submission script.  Modify time, memory, tasks-per-node, and job name as you see fit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=matlab&lt;br /&gt;
#SBATCH --output=matlab.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load mcr&lt;br /&gt;
&lt;br /&gt;
./matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those who make use of mex files - compiled C and C++ code with matlab bindings - you will need to add these&lt;br /&gt;
files to the compiled archive via the -a flag.  See the behavior of this flag in the [https://www.mathworks.com/help/compiler/mcc.html compiler documentation].  You can either target specific .mex files or entire directories.&lt;br /&gt;
&lt;br /&gt;
Because codes often require adding several directories to the Matlab path as well as mex files from several locations,&lt;br /&gt;
we recommend writing a script to preserve and help document the steps to compile your Matlab code.  Here is an&lt;br /&gt;
abbreviated example from a current user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module load MATLAB&lt;br /&gt;
&lt;br /&gt;
cd matlabPyrTools/MEX/&lt;br /&gt;
&lt;br /&gt;
# compile mex files&lt;br /&gt;
mex upConv.c convolve.c wrap.c edges.c&lt;br /&gt;
mex corrDn.c convolve.c wrap.c edges.c&lt;br /&gt;
mex histo.c&lt;br /&gt;
mex innerProd.c&lt;br /&gt;
&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;br /&gt;
mcc -m mongrel_creation.m \&lt;br /&gt;
  -I ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -I ./matlabPyrTools/ \&lt;br /&gt;
  -I ./FastICA/ \&lt;br /&gt;
  -a ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -a ./texturesynth/ \&lt;br /&gt;
  -o mongrel_creation_binary&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for MatLab so the model is to develop and debug your MatLab code&lt;br /&gt;
elsewhere or using Octave on Beocat, then you can compile the MatLab code into an executable and run it without&lt;br /&gt;
limits on Beocat.  &lt;br /&gt;
&lt;br /&gt;
For more info on the mcc compiler see:  https://www.mathworks.com/help/compiler/mcc.html&lt;br /&gt;
&lt;br /&gt;
=== COMSOL ===&lt;br /&gt;
Beocat has no license for COMSOL. If you want to use it, you must provide your own.&lt;br /&gt;
&lt;br /&gt;
 module spider COMSOL/&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
  COMSOL: COMSOL/5.3&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
    Description:&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling&lt;br /&gt;
      and simulating scientific and engineering problems&lt;br /&gt;
 &lt;br /&gt;
    This module can be loaded directly: module load COMSOL/5.3&lt;br /&gt;
 &lt;br /&gt;
    Help:&lt;br /&gt;
      &lt;br /&gt;
      Description&lt;br /&gt;
      ===========&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling and &lt;br /&gt;
 simulating scientific and engineering problems&lt;br /&gt;
      You must provide your own license.&lt;br /&gt;
      export LM_LICENSE_FILE=/the/path/to/your/license/file&lt;br /&gt;
      *OR*&lt;br /&gt;
      export LM_LICENSE_FILE=$LICENSE_SERVER_PORT@$LICENSE_SERVER_HOSTNAME&lt;br /&gt;
      e.g. export LM_LICENSE_FILE=1719@some.flexlm.server.ksu.edu&lt;br /&gt;
      &lt;br /&gt;
      More information&lt;br /&gt;
      ================&lt;br /&gt;
       - Homepage: https://www.comsol.com/&lt;br /&gt;
==== Graphical COMSOL ====&lt;br /&gt;
Running COMSOL in graphical mode on a cluster is generally a bad idea. If you choose to run it in graphical mode on a compute node, you will need to do something like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to the cluster with X11 forwarding (ssh -Y or mobaxterm)&lt;br /&gt;
# load the comsol module on the headnode&lt;br /&gt;
module load COMSOL&lt;br /&gt;
# export your comsol license as mentioned above, and tell the scheduler to run the software&lt;br /&gt;
srun --nodes=1 --time=1:00:00 --mem=1G --pty --x11 comsol -3drend sw&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .NET Core ===&lt;br /&gt;
==== Load .NET ====&lt;br /&gt;
 mozes@[eunomia] ~ $ module load dotNET-Core-SDK&lt;br /&gt;
==== create an application ====&lt;br /&gt;
Following instructions from [https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-with-xplat-cli here], we'll create a simple 'Hello World' application&lt;br /&gt;
 mozes@[eunomia] ~ $ mkdir Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~ $ cd Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet new console&lt;br /&gt;
 The template &amp;quot;Console Application&amp;quot; was created successfully.&lt;br /&gt;
 &lt;br /&gt;
 Processing post-creation actions...&lt;br /&gt;
 Running 'dotnet restore' on /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Restoring packages for /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.props.&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.targets.&lt;br /&gt;
  Restore completed in 358.43 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
 &lt;br /&gt;
 Restore succeeded.&lt;br /&gt;
&lt;br /&gt;
==== Edit your program ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ vi Program.cs&lt;br /&gt;
==== Run your .NET application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet run&lt;br /&gt;
 Hello World!&lt;br /&gt;
==== Build and run the built application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet build&lt;br /&gt;
 Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core&lt;br /&gt;
 Copyright (C) Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
  Restore completed in 106.12 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
  Hello -&amp;gt; /homes/mozes/Hello/bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 &lt;br /&gt;
 Build succeeded.&lt;br /&gt;
    0 Warning(s)&lt;br /&gt;
    0 Error(s)&lt;br /&gt;
 &lt;br /&gt;
 Time Elapsed 00:00:02.86&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 Hello World!&lt;br /&gt;
&lt;br /&gt;
== Installing my own software ==&lt;br /&gt;
Installing and maintaining software for the many different users of Beocat would be very difficult, if not impossible. For this reason, we don't generally install user-run software on our cluster. Instead, we ask that you install it into your home directories.&lt;br /&gt;
&lt;br /&gt;
In many cases, the software vendor or support site will incorrectly assume that you are installing the software system-wide or that you need 'sudo' access.&lt;br /&gt;
&lt;br /&gt;
As a quick example of installing software in your home directory, we have a sample video on our [[Training Videos]] page. If you're still having problems or questions, please contact support as mentioned on our [[Main Page]].&lt;/div&gt;</summary>
		<author><name>Jhauser</name></author>
	</entry>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=484</id>
		<title>Installed software</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=484"/>
		<updated>2019-05-28T18:36:59Z</updated>

		<summary type="html">&lt;p&gt;Jhauser: fix the version of the python package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Module Availability ==&lt;br /&gt;
For a complete list of all installed modules, check [https://modules.beocat.ksu.edu/ our modules website]&lt;br /&gt;
&lt;br /&gt;
We try to keep the same software available across all node classes, but sometimes it is impossible. Please check the modules website if you have any questions about software availability on each node class.&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
A toolchain is a set of compilers, libraries and applications that are needed to build software. Some software functions better when using specific toolchains.&lt;br /&gt;
&lt;br /&gt;
We provide a good number of toolchains and versions of toolchains make sure your applications will compile and/or run correctly.&lt;br /&gt;
&lt;br /&gt;
These toolchains include (you can run 'module keyword toolchain'):&lt;br /&gt;
; foss:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.&lt;br /&gt;
; fosscuda:    GNU Compiler Collection (GCC) based compiler toolchain based on FOSS with CUDA support.&lt;br /&gt;
; gmvapich2:    GNU Compiler Collection (GCC) based compiler toolchain, including MVAPICH2 for MPI support. '''DEPRECATED'''&lt;br /&gt;
; gompi:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support.&lt;br /&gt;
; goolfc:    GCC based compiler toolchain __with CUDA support__, and including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. '''DEPRECATED'''&lt;br /&gt;
; iomkl:    Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL &amp;amp; OpenMPI.&lt;br /&gt;
&lt;br /&gt;
You can run 'module spider $toolchain/' to see the versions we have:&lt;br /&gt;
 $ module spider iomkl/&lt;br /&gt;
* iomkl/2017a&lt;br /&gt;
* iomkl/2017b&lt;br /&gt;
* iomkl/2017beocatb&lt;br /&gt;
&lt;br /&gt;
If you load one of those (module load iomkl/2017b), you can see the other modules and versions of software that it loaded with the 'module list':&lt;br /&gt;
 $ module list&lt;br /&gt;
 Currently Loaded Modules:&lt;br /&gt;
   1) icc/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   2) binutils/2.28-GCCcore-6.4.0&lt;br /&gt;
   3) ifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   4) iccifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   5) GCCcore/6.4.0&lt;br /&gt;
   6) numactl/2.0.11-GCCcore-6.4.0&lt;br /&gt;
   7) hwloc/1.11.7-GCCcore-6.4.0&lt;br /&gt;
   8) OpenMPI/2.1.1-iccifort-2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   9) iompi/2017b&lt;br /&gt;
  10) imkl/2017.3.196-iompi-2017b&lt;br /&gt;
  11) iomkl/2017b&lt;br /&gt;
&lt;br /&gt;
As you can see, toolchains can depend on each other. For instance, the iomkl toolchain, depends on iompi, which depends on iccifort, which depend on icc and ifort, which depend on GCCcore which depend on GCC. Hence it is very important that the correct versions of all related software are loaded.&lt;br /&gt;
&lt;br /&gt;
With software we provide, the toolchain used to compile is always specified in the &amp;quot;version&amp;quot; of the software that you want to load.&lt;br /&gt;
&lt;br /&gt;
If you mix toolchains, inconsistent things may happen.&lt;br /&gt;
== Most Commonly Used Software ==&lt;br /&gt;
Check our [https://modules.beocat.ksu.edu/ modules website] for the most up to date software availability.&lt;br /&gt;
&lt;br /&gt;
The versions mentioned below are representations of what was available at the time of writing, not necessarily what is currently available.&lt;br /&gt;
=== [http://www.open-mpi.org/ OpenMPI] ===&lt;br /&gt;
We provide lots of versions, you are most likely better off directly loading a toolchain or application to make sure you get the right version, but you can see the versions we have with 'module avail OpenMPI/'&lt;br /&gt;
&lt;br /&gt;
The first step to run an MPI application is to load one of the OpenMPI modules.  You normally will just need to load the default version as below.  If your code needs access to nVidia GPUs you'll need the cuda version above.  Otherwise some codes are picky about what versions of the underlying GNU or Intel compilers that are needed.&lt;br /&gt;
&lt;br /&gt;
  module load OpenMPI&lt;br /&gt;
&lt;br /&gt;
If you are working with your own MPI code you will need to start by compiling it.  MPI offers &amp;lt;B&amp;gt;mpicc&amp;lt;/B&amp;gt; for compiling codes written in C, &amp;lt;B&amp;gt;mpic++&amp;lt;/B&amp;gt; for compiling C++ code, and &amp;lt;B&amp;gt;mpifort&amp;lt;/B&amp;gt; for compiling Fortran code.  You can get a complete listing of parameters to use by running them with the &amp;lt;B&amp;gt;--help&amp;lt;/B&amp;gt; parameter.  Below are some examples of compiling with each.&lt;br /&gt;
&lt;br /&gt;
  mpicc --help&lt;br /&gt;
  mpicc -o my_code.x my_code.c&lt;br /&gt;
  mpic++ -o my_code.x my_code.cc&lt;br /&gt;
  mpifort -o my_code.x my_code.f&lt;br /&gt;
&lt;br /&gt;
In each case above, you can name the executable file whatever you want (I chose &amp;lt;T&amp;gt;my_code.x&amp;lt;/I&amp;gt;).  It is common to use different optimization levels, for example, but those may depend on the version of OpenMPI you choose.  Some are based on the Intel compilers so you'd need to use  optimizations for the underlying icc or ifort compilers they call, and some are GNU based so you'd use compiler optimizations for gcc or gfortran.&lt;br /&gt;
&lt;br /&gt;
We have many MPI codes in our modules that you simply need to load before using.  Below is an example of loading and running Gromacs which is an MPI based code to simulate large numbers of atoms classically.&lt;br /&gt;
&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
&lt;br /&gt;
This loads the Gromacs modules and sets all the paths so you can run the scalar version &amp;lt;B&amp;gt;gmx&amp;lt;/B&amp;gt; or the MPI version &amp;lt;B&amp;gt;gmx_mpi&amp;lt;/B&amp;gt;.  Below is a sample job script for running a complete Gromacs simulation.&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --mem=120G&lt;br /&gt;
  #SBATCH --time=24:00:00&lt;br /&gt;
  #SBATCH --job-name=gromacs&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=4&lt;br /&gt;
  &lt;br /&gt;
  module purge&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Running Gromacs on $HOSTNAME&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export OMP_NUM_THREADS=1&lt;br /&gt;
  time mpirun -x OMP_NUM_THREADS=1 gmx_mpi mdrun -nsteps 500000 -ntomp 1 -v -deffnm 1ns -c 1ns.pdb -nice 0&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Finished run on $SLURM_NTASKS $HOSTNAME cores&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;mpirun&amp;lt;/B&amp;gt; will run your job on all cores requested which in this case is 4 cores on a single node.  You will often just need to guess at the memory size for your code, then check on the memory usage with &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt; and adjust the memory in future jobs.&lt;br /&gt;
&lt;br /&gt;
I prefer to put a &amp;lt;B&amp;gt;module purge&amp;lt;/B&amp;gt; in my scripts then manually load the modules needed to insure each run is using the modules it needs.  If you don't do this when you submit a job script it will simply use the modules you currently have loaded which is fine too.&lt;br /&gt;
&lt;br /&gt;
I also like to put a &amp;lt;B&amp;gt;time&amp;lt;/B&amp;gt; command in front of each part of the script that can use significant amounts of time.  This way I can track the amount of time used in each section of the job script.  This can prove very useful if your job script copies large data files around at the start, for example, allowing you to see how much time was used for each stage of the job if it runs longer than expected.&lt;br /&gt;
&lt;br /&gt;
The OMP_NUM_THREADS environment variable is set to 1 and passed to the MPI system to insure that each MPI task only uses 1 thread.  There are some MPI codes that are also multi-threaded, so this insures that this particular code uses the cores allocated to it in the manner we want.&lt;br /&gt;
&lt;br /&gt;
Once you have your job script ready, submit it using the &amp;lt;B&amp;gt;sbatch&amp;lt;/B&amp;gt; command as below where the job script is in the file &amp;lt;I&amp;gt;sb.gromacs&amp;lt;/I&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  sbatch sb.gromacs&lt;br /&gt;
&lt;br /&gt;
You should then monitor your job as it goes through the queue and starts running using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  You code will also generate an output file, usually of the form &amp;lt;I&amp;gt;slurm-#######.out&amp;lt;/I&amp;gt; where the 7 # signs are the 7 digit job ID number.  If you need to cancel your job use &amp;lt;B&amp;gt;scancel&amp;lt;/B&amp;gt; with the 7 digit job ID number.&lt;br /&gt;
&lt;br /&gt;
   scancel #######&lt;br /&gt;
&lt;br /&gt;
=== [http://www.r-project.org/ R] ===&lt;br /&gt;
You can see what versions of R we provide with 'module avail R/'&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
We provide a small number of R modules installed by default, these are generally modules that are needed by more than one person.&lt;br /&gt;
&lt;br /&gt;
==== Installing your own R Packages ====&lt;br /&gt;
To install your own module, login to Beocat and start R interactively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load R&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then install the package using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
install.packages(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Follow the prompts. Note that there is a CRAN mirror at KU - it will be listed as &amp;quot;USA (KS)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After installing you can test before leaving interactive mode by issuing the command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
library(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Running R Jobs ====&lt;br /&gt;
&lt;br /&gt;
You cannot submit an R script directly. '&amp;lt;tt&amp;gt;sbatch myscript.R&amp;lt;/tt&amp;gt;' will result in an error. Instead, you need to make a bash [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|script]] that will call R appropriately. Here is a minimal example. We'll save this as submit-R.sbatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --mem-per-cpu=4G&lt;br /&gt;
# Now we tell Slurm how long we expect our work to take: 15 minutes (D-HH:MM:SS)&lt;br /&gt;
#SBATCH --time=0-00:15:00&lt;br /&gt;
&lt;br /&gt;
# Now lets do some actual work. This starts R and loads the file myscript.R&lt;br /&gt;
module purge&lt;br /&gt;
module load R&lt;br /&gt;
R --no-save -q &amp;lt; myscript.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to submit your R job, you would type&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch submit-R.sbatch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can monitor your jobs using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  The output of your job will be in a slurm-#.out file where '#' is the 7 digit job ID number for your job.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.java.com/ Java] ===&lt;br /&gt;
You can see what versions of Java we support with 'module avail Java/'&lt;br /&gt;
&lt;br /&gt;
=== [http://www.python.org/about/ Python] ===&lt;br /&gt;
You can see what versions of Python we support with 'module avail Python/'&lt;br /&gt;
&lt;br /&gt;
If you need libraries that we do not have installed, you should use [https://virtualenv.pypa.io/en/stable/userguide/ virtualenv] to setup a virtual python environment in your home directory. This will let you install python libraries as you please.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your virtual environment ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Load Python&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command Python is loaded.  After you logoff and then logon again Python will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* Create a location for your virtual environments (optional, but helps keep things organized)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/virtualenvs&lt;br /&gt;
cd ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Create a virtual environment. Here I will create a default virtual environment called 'test'. Note that &amp;lt;code&amp;gt;virtualenv --help&amp;lt;/code&amp;gt; has many more useful options.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
virtualenv test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Lets look at our virtual environments (the virtual environment name should be in the output):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Activate one of these&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command your virtual environment is activated.  After you logoff and then logon again your virtual environment will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* You can now install the python modules you want. This can be done using &amp;lt;tt&amp;gt;pip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pip install numpy biopython&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using your virtual environment within a job ====&lt;br /&gt;
Here is a simple job script using the virtual environment test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
python ~/path/to/your/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using MPI with Python within a job ====&lt;br /&gt;
Here is a simple job script using MPI with Python&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.6.3-iomkl-2017beocatb&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
PYTHON_BINARY=$(which python)&lt;br /&gt;
mpirun ${PYTHON_BINARY} ~/path/to/your/mpi/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://spark.apache.org/ Spark] ===&lt;br /&gt;
&lt;br /&gt;
Spark is a programming language for large scale data processing.&lt;br /&gt;
It can be used in conjunction with Python, R, Scala, Java, and SQL.&lt;br /&gt;
Spark can be run on Beocat interactively or through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
To run interactively, you must first request a node or nodes from the Slurm queue.&lt;br /&gt;
The line below requests 1 node and 1 core for 24 hours and if available will drop&lt;br /&gt;
you into the bash shell on that node.&lt;br /&gt;
&lt;br /&gt;
  srun -J srun -N 1 -n 1 -t 24:00:00 --mem=10G --pty bash&lt;br /&gt;
&lt;br /&gt;
We have some sample python based Spark code you can try out that came from the &lt;br /&gt;
exercises and homework from the PSC Spark workshop.  &lt;br /&gt;
&lt;br /&gt;
  mkdir spark-test&lt;br /&gt;
  cd spark-test&lt;br /&gt;
  cp -rp /homes/daveturner/projects/PSC-BigData-Workshop/Shakespeare/* .&lt;br /&gt;
&lt;br /&gt;
You will need to set up a python virtual environment and load the &amp;lt;B&amp;gt;nltk&amp;lt;/B&amp;gt; package &lt;br /&gt;
before you run the first time.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  mkdir -p ~/virtualenvs&lt;br /&gt;
  cd ~/virtualenvs&lt;br /&gt;
  virtualenv spark-test&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  pip install nltk&lt;br /&gt;
  pip install numpy&lt;br /&gt;
  deactivate&lt;br /&gt;
&lt;br /&gt;
To run the sample code interactively, load the Python and Spark modules,&lt;br /&gt;
source your python virtual environment, change to the sample directory, fire up pyspark, &lt;br /&gt;
then execute the sample code.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  module load Spark&lt;br /&gt;
  cd ~/spark-test&lt;br /&gt;
  pyspark&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; exec(open(&amp;quot;shakespeare.py&amp;quot;).read())&lt;br /&gt;
&lt;br /&gt;
You can work interactively from the pyspark prompt (&amp;gt;&amp;gt;&amp;gt;) in addition to running scripts as above.&lt;br /&gt;
&lt;br /&gt;
The Shakespeare directory also contains a sample sbatch submit script that will run the &lt;br /&gt;
same shakespeare.py code through the Slurm batch queue.  &lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --job-name=shakespeare&lt;br /&gt;
  #SBATCH --mem=10G&lt;br /&gt;
  #SBATCH --time=01:00:00&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=1&lt;br /&gt;
  &lt;br /&gt;
  # Load Spark and Python (version 3 here)&lt;br /&gt;
  module load Spark&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  &lt;br /&gt;
  spark-submit shakespeare.py&lt;br /&gt;
&lt;br /&gt;
When you run interactively, pyspark initializes your spark context &amp;lt;B&amp;gt;sc&amp;lt;/B&amp;gt;.&lt;br /&gt;
You will need to do this manually as in the sample python code when you want&lt;br /&gt;
to submit jobs through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
  # If there is no Spark Context (not running interactive from pyspark), create it&lt;br /&gt;
  try:&lt;br /&gt;
     sc&lt;br /&gt;
  except NameError:&lt;br /&gt;
     from pyspark import SparkConf, SparkContext&lt;br /&gt;
     conf = SparkConf().setMaster(&amp;quot;local&amp;quot;).setAppName(&amp;quot;App&amp;quot;)&lt;br /&gt;
     sc = SparkContext(conf = conf)&lt;br /&gt;
&lt;br /&gt;
=== [http://www.perl.org/ Perl] ===&lt;br /&gt;
The system-wide version of perl is tracking the stable releases of perl. Unfortunately there are some features that we do not include in the system distribution of perl, namely threads.&lt;br /&gt;
&lt;br /&gt;
To use perl with threads, out a newer version, you can load it with the module command. To see what versions of perl we provide, you can use 'module avail Perl/'&lt;br /&gt;
&lt;br /&gt;
==== Submitting a job with Perl ====&lt;br /&gt;
Much like R (above), you cannot simply '&amp;lt;tt&amp;gt;sbatch myProgram.pl&amp;lt;/tt&amp;gt;', but you must create a [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|submit script]] which will call perl. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --mem-per-cpu=1G&lt;br /&gt;
# Now we tell sbatch how long we expect our work to take: 15 minutes (H:MM:SS)&lt;br /&gt;
#SBATCH --time=0-0:15:00&lt;br /&gt;
# Now lets do some actual work. &lt;br /&gt;
module load Perl&lt;br /&gt;
perl /path/to/myProgram.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Octave for MatLab codes ===&lt;br /&gt;
&lt;br /&gt;
'module avail Octave/'&lt;br /&gt;
&lt;br /&gt;
The 64-bit version of Octave can be loaded using the command above.  Octave can then be used&lt;br /&gt;
to work with MatLab codes on the head node and to submit jobs to the compute nodes through the&lt;br /&gt;
sbatch scheduler.  Octave is made to run MatLab code, but it does have limitations and does not support&lt;br /&gt;
everything that MatLab itself does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=octave&lt;br /&gt;
#SBATCH --output=octave.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load Octave/4.2.1-foss-2017beocatb-enable64&lt;br /&gt;
&lt;br /&gt;
octave &amp;lt; matlab_code.m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MatLab compiler ===&lt;br /&gt;
&lt;br /&gt;
Beocat also has a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for the MatLab compiler and the most common toolboxes&lt;br /&gt;
including the Parallel Computing Toolbox, Optimization Toolbox, Statistics and Machine Learning Toolbox,&lt;br /&gt;
Image Processing Toolbox, Curve Fitting Toolbox, Neural Network Toolbox, Sumbolic Math Toolbox, &lt;br /&gt;
Global Optimization Toolbox, and the Bioinformatics Toolbox.&lt;br /&gt;
&lt;br /&gt;
Since we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt;, this means that you will be expected to develop your MatLab code&lt;br /&gt;
with Octave or elsewhere on a laptop or departmental server.  Once you're ready to do large runs, then you&lt;br /&gt;
move your code to Beocat, compile the MatLab code into an executable, and you can submit as many jobs as&lt;br /&gt;
you want to the scheduler.  To use the MatLab compiler, you need to load the MATLAB module to compile code and&lt;br /&gt;
load the mcr module to run the resulting MatLab executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have addpath() commands in your code, you will need to wrap them in an &amp;quot;if ~deployed&amp;quot; block and tell the&lt;br /&gt;
compiler to include that path via the -I flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;MATLAB&amp;quot;&amp;gt;&lt;br /&gt;
% wrap addpath() calls like so:&lt;br /&gt;
if ~deployed&lt;br /&gt;
    addpath('./another/folder/with/code/')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  The license manager checks the mcc compiler out for a minimum of 30 minutes, so if another user compiles a code&lt;br /&gt;
you unfortunately may need to wait for up to 30 minutes to compile your own code.&lt;br /&gt;
&lt;br /&gt;
Compiling with additional paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -I ./another/folder/with/code/ -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any directories added with addpath() will need to be added to the list of compile options as -I arguments.  You&lt;br /&gt;
can have multiple -I arguments in your compile command.&lt;br /&gt;
&lt;br /&gt;
Here is an example job submission script.  Modify time, memory, tasks-per-node, and job name as you see fit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=matlab&lt;br /&gt;
#SBATCH --output=matlab.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load mcr&lt;br /&gt;
&lt;br /&gt;
./matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those who make use of mex files - compiled C and C++ code with matlab bindings - you will need to add these&lt;br /&gt;
files to the compiled archive via the -a flag.  See the behavior of this flag in the [https://www.mathworks.com/help/compiler/mcc.html compiler documentation].  You can either target specific .mex files or entire directories.&lt;br /&gt;
&lt;br /&gt;
Because codes often require adding several directories to the Matlab path as well as mex files from several locations,&lt;br /&gt;
we recommend writing a script to preserve and help document the steps to compile your Matlab code.  Here is an&lt;br /&gt;
abbreviated example from a current user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module load MATLAB&lt;br /&gt;
&lt;br /&gt;
cd matlabPyrTools/MEX/&lt;br /&gt;
&lt;br /&gt;
# compile mex files&lt;br /&gt;
mex upConv.c convolve.c wrap.c edges.c&lt;br /&gt;
mex corrDn.c convolve.c wrap.c edges.c&lt;br /&gt;
mex histo.c&lt;br /&gt;
mex innerProd.c&lt;br /&gt;
&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;br /&gt;
mcc -m mongrel_creation.m \&lt;br /&gt;
  -I ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -I ./matlabPyrTools/ \&lt;br /&gt;
  -I ./FastICA/ \&lt;br /&gt;
  -a ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -a ./texturesynth/ \&lt;br /&gt;
  -o mongrel_creation_binary&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for MatLab so the model is to develop and debug your MatLab code&lt;br /&gt;
elsewhere or using Octave on Beocat, then you can compile the MatLab code into an executable and run it without&lt;br /&gt;
limits on Beocat.  &lt;br /&gt;
&lt;br /&gt;
For more info on the mcc compiler see:  https://www.mathworks.com/help/compiler/mcc.html&lt;br /&gt;
&lt;br /&gt;
=== COMSOL ===&lt;br /&gt;
Beocat has no license for COMSOL. If you want to use it, you must provide your own.&lt;br /&gt;
&lt;br /&gt;
 module spider COMSOL/&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
  COMSOL: COMSOL/5.3&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
    Description:&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling&lt;br /&gt;
      and simulating scientific and engineering problems&lt;br /&gt;
 &lt;br /&gt;
    This module can be loaded directly: module load COMSOL/5.3&lt;br /&gt;
 &lt;br /&gt;
    Help:&lt;br /&gt;
      &lt;br /&gt;
      Description&lt;br /&gt;
      ===========&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling and &lt;br /&gt;
 simulating scientific and engineering problems&lt;br /&gt;
      You must provide your own license.&lt;br /&gt;
      export LM_LICENSE_FILE=/the/path/to/your/license/file&lt;br /&gt;
      *OR*&lt;br /&gt;
      export LM_LICENSE_FILE=$LICENSE_SERVER_PORT@$LICENSE_SERVER_HOSTNAME&lt;br /&gt;
      e.g. export LM_LICENSE_FILE=1719@some.flexlm.server.ksu.edu&lt;br /&gt;
      &lt;br /&gt;
      More information&lt;br /&gt;
      ================&lt;br /&gt;
       - Homepage: https://www.comsol.com/&lt;br /&gt;
==== Graphical COMSOL ====&lt;br /&gt;
Running COMSOL in graphical mode on a cluster is generally a bad idea. If you choose to run it in graphical mode on a compute node, you will need to do something like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to the cluster with X11 forwarding (ssh -Y or mobaxterm)&lt;br /&gt;
# load the comsol module on the headnode&lt;br /&gt;
module load COMSOL&lt;br /&gt;
# export your comsol license as mentioned above, and tell the scheduler to run the software&lt;br /&gt;
srun --nodes=1 --time=1:00:00 --mem=1G --pty --x11 comsol -3drend sw&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .NET Core ===&lt;br /&gt;
==== Load .NET ====&lt;br /&gt;
 mozes@[eunomia] ~ $ module load dotNET-Core-SDK&lt;br /&gt;
==== create an application ====&lt;br /&gt;
Following instructions from [https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-with-xplat-cli here], we'll create a simple 'Hello World' application&lt;br /&gt;
 mozes@[eunomia] ~ $ mkdir Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~ $ cd Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet new console&lt;br /&gt;
 The template &amp;quot;Console Application&amp;quot; was created successfully.&lt;br /&gt;
 &lt;br /&gt;
 Processing post-creation actions...&lt;br /&gt;
 Running 'dotnet restore' on /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Restoring packages for /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.props.&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.targets.&lt;br /&gt;
  Restore completed in 358.43 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
 &lt;br /&gt;
 Restore succeeded.&lt;br /&gt;
&lt;br /&gt;
==== Edit your program ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ vi Program.cs&lt;br /&gt;
==== Run your .NET application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet run&lt;br /&gt;
 Hello World!&lt;br /&gt;
==== Build and run the built application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet build&lt;br /&gt;
 Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core&lt;br /&gt;
 Copyright (C) Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
  Restore completed in 106.12 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
  Hello -&amp;gt; /homes/mozes/Hello/bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 &lt;br /&gt;
 Build succeeded.&lt;br /&gt;
    0 Warning(s)&lt;br /&gt;
    0 Error(s)&lt;br /&gt;
 &lt;br /&gt;
 Time Elapsed 00:00:02.86&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 Hello World!&lt;br /&gt;
&lt;br /&gt;
== Installing my own software ==&lt;br /&gt;
Installing and maintaining software for the many different users of Beocat would be very difficult, if not impossible. For this reason, we don't generally install user-run software on our cluster. Instead, we ask that you install it into your home directories.&lt;br /&gt;
&lt;br /&gt;
In many cases, the software vendor or support site will incorrectly assume that you are installing the software system-wide or that you need 'sudo' access.&lt;br /&gt;
&lt;br /&gt;
As a quick example of installing software in your home directory, we have a sample video on our [[Training Videos]] page. If you're still having problems or questions, please contact support as mentioned on our [[Main Page]].&lt;/div&gt;</summary>
		<author><name>Jhauser</name></author>
	</entry>
	<entry>
		<id>https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=483</id>
		<title>Installed software</title>
		<link rel="alternate" type="text/html" href="https://support.beocat.ksu.edu/BeocatDocs/index.php?title=Installed_software&amp;diff=483"/>
		<updated>2019-05-28T18:29:37Z</updated>

		<summary type="html">&lt;p&gt;Jhauser: fixed default Python&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Module Availability ==&lt;br /&gt;
For a complete list of all installed modules, check [https://modules.beocat.ksu.edu/ our modules website]&lt;br /&gt;
&lt;br /&gt;
We try to keep the same software available across all node classes, but sometimes it is impossible. Please check the modules website if you have any questions about software availability on each node class.&lt;br /&gt;
&lt;br /&gt;
== Toolchains ==&lt;br /&gt;
A toolchain is a set of compilers, libraries and applications that are needed to build software. Some software functions better when using specific toolchains.&lt;br /&gt;
&lt;br /&gt;
We provide a good number of toolchains and versions of toolchains make sure your applications will compile and/or run correctly.&lt;br /&gt;
&lt;br /&gt;
These toolchains include (you can run 'module keyword toolchain'):&lt;br /&gt;
; foss:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.&lt;br /&gt;
; fosscuda:    GNU Compiler Collection (GCC) based compiler toolchain based on FOSS with CUDA support.&lt;br /&gt;
; gmvapich2:    GNU Compiler Collection (GCC) based compiler toolchain, including MVAPICH2 for MPI support. '''DEPRECATED'''&lt;br /&gt;
; gompi:    GNU Compiler Collection (GCC) based compiler toolchain, including OpenMPI for MPI support.&lt;br /&gt;
; goolfc:    GCC based compiler toolchain __with CUDA support__, and including OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. '''DEPRECATED'''&lt;br /&gt;
; iomkl:    Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL &amp;amp; OpenMPI.&lt;br /&gt;
&lt;br /&gt;
You can run 'module spider $toolchain/' to see the versions we have:&lt;br /&gt;
 $ module spider iomkl/&lt;br /&gt;
* iomkl/2017a&lt;br /&gt;
* iomkl/2017b&lt;br /&gt;
* iomkl/2017beocatb&lt;br /&gt;
&lt;br /&gt;
If you load one of those (module load iomkl/2017b), you can see the other modules and versions of software that it loaded with the 'module list':&lt;br /&gt;
 $ module list&lt;br /&gt;
 Currently Loaded Modules:&lt;br /&gt;
   1) icc/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   2) binutils/2.28-GCCcore-6.4.0&lt;br /&gt;
   3) ifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   4) iccifort/2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   5) GCCcore/6.4.0&lt;br /&gt;
   6) numactl/2.0.11-GCCcore-6.4.0&lt;br /&gt;
   7) hwloc/1.11.7-GCCcore-6.4.0&lt;br /&gt;
   8) OpenMPI/2.1.1-iccifort-2017.4.196-GCC-6.4.0-2.28&lt;br /&gt;
   9) iompi/2017b&lt;br /&gt;
  10) imkl/2017.3.196-iompi-2017b&lt;br /&gt;
  11) iomkl/2017b&lt;br /&gt;
&lt;br /&gt;
As you can see, toolchains can depend on each other. For instance, the iomkl toolchain, depends on iompi, which depends on iccifort, which depend on icc and ifort, which depend on GCCcore which depend on GCC. Hence it is very important that the correct versions of all related software are loaded.&lt;br /&gt;
&lt;br /&gt;
With software we provide, the toolchain used to compile is always specified in the &amp;quot;version&amp;quot; of the software that you want to load.&lt;br /&gt;
&lt;br /&gt;
If you mix toolchains, inconsistent things may happen.&lt;br /&gt;
== Most Commonly Used Software ==&lt;br /&gt;
Check our [https://modules.beocat.ksu.edu/ modules website] for the most up to date software availability.&lt;br /&gt;
&lt;br /&gt;
The versions mentioned below are representations of what was available at the time of writing, not necessarily what is currently available.&lt;br /&gt;
=== [http://www.open-mpi.org/ OpenMPI] ===&lt;br /&gt;
We provide lots of versions, you are most likely better off directly loading a toolchain or application to make sure you get the right version, but you can see the versions we have with 'module avail OpenMPI/'&lt;br /&gt;
&lt;br /&gt;
The first step to run an MPI application is to load one of the OpenMPI modules.  You normally will just need to load the default version as below.  If your code needs access to nVidia GPUs you'll need the cuda version above.  Otherwise some codes are picky about what versions of the underlying GNU or Intel compilers that are needed.&lt;br /&gt;
&lt;br /&gt;
  module load OpenMPI&lt;br /&gt;
&lt;br /&gt;
If you are working with your own MPI code you will need to start by compiling it.  MPI offers &amp;lt;B&amp;gt;mpicc&amp;lt;/B&amp;gt; for compiling codes written in C, &amp;lt;B&amp;gt;mpic++&amp;lt;/B&amp;gt; for compiling C++ code, and &amp;lt;B&amp;gt;mpifort&amp;lt;/B&amp;gt; for compiling Fortran code.  You can get a complete listing of parameters to use by running them with the &amp;lt;B&amp;gt;--help&amp;lt;/B&amp;gt; parameter.  Below are some examples of compiling with each.&lt;br /&gt;
&lt;br /&gt;
  mpicc --help&lt;br /&gt;
  mpicc -o my_code.x my_code.c&lt;br /&gt;
  mpic++ -o my_code.x my_code.cc&lt;br /&gt;
  mpifort -o my_code.x my_code.f&lt;br /&gt;
&lt;br /&gt;
In each case above, you can name the executable file whatever you want (I chose &amp;lt;T&amp;gt;my_code.x&amp;lt;/I&amp;gt;).  It is common to use different optimization levels, for example, but those may depend on the version of OpenMPI you choose.  Some are based on the Intel compilers so you'd need to use  optimizations for the underlying icc or ifort compilers they call, and some are GNU based so you'd use compiler optimizations for gcc or gfortran.&lt;br /&gt;
&lt;br /&gt;
We have many MPI codes in our modules that you simply need to load before using.  Below is an example of loading and running Gromacs which is an MPI based code to simulate large numbers of atoms classically.&lt;br /&gt;
&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
&lt;br /&gt;
This loads the Gromacs modules and sets all the paths so you can run the scalar version &amp;lt;B&amp;gt;gmx&amp;lt;/B&amp;gt; or the MPI version &amp;lt;B&amp;gt;gmx_mpi&amp;lt;/B&amp;gt;.  Below is a sample job script for running a complete Gromacs simulation.&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --mem=120G&lt;br /&gt;
  #SBATCH --time=24:00:00&lt;br /&gt;
  #SBATCH --job-name=gromacs&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=4&lt;br /&gt;
  &lt;br /&gt;
  module purge&lt;br /&gt;
  module load GROMACS&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Running Gromacs on $HOSTNAME&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  export OMP_NUM_THREADS=1&lt;br /&gt;
  time mpirun -x OMP_NUM_THREADS=1 gmx_mpi mdrun -nsteps 500000 -ntomp 1 -v -deffnm 1ns -c 1ns.pdb -nice 0&lt;br /&gt;
  &lt;br /&gt;
  echo &amp;quot;Finished run on $SLURM_NTASKS $HOSTNAME cores&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;B&amp;gt;mpirun&amp;lt;/B&amp;gt; will run your job on all cores requested which in this case is 4 cores on a single node.  You will often just need to guess at the memory size for your code, then check on the memory usage with &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt; and adjust the memory in future jobs.&lt;br /&gt;
&lt;br /&gt;
I prefer to put a &amp;lt;B&amp;gt;module purge&amp;lt;/B&amp;gt; in my scripts then manually load the modules needed to insure each run is using the modules it needs.  If you don't do this when you submit a job script it will simply use the modules you currently have loaded which is fine too.&lt;br /&gt;
&lt;br /&gt;
I also like to put a &amp;lt;B&amp;gt;time&amp;lt;/B&amp;gt; command in front of each part of the script that can use significant amounts of time.  This way I can track the amount of time used in each section of the job script.  This can prove very useful if your job script copies large data files around at the start, for example, allowing you to see how much time was used for each stage of the job if it runs longer than expected.&lt;br /&gt;
&lt;br /&gt;
The OMP_NUM_THREADS environment variable is set to 1 and passed to the MPI system to insure that each MPI task only uses 1 thread.  There are some MPI codes that are also multi-threaded, so this insures that this particular code uses the cores allocated to it in the manner we want.&lt;br /&gt;
&lt;br /&gt;
Once you have your job script ready, submit it using the &amp;lt;B&amp;gt;sbatch&amp;lt;/B&amp;gt; command as below where the job script is in the file &amp;lt;I&amp;gt;sb.gromacs&amp;lt;/I&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  sbatch sb.gromacs&lt;br /&gt;
&lt;br /&gt;
You should then monitor your job as it goes through the queue and starts running using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  You code will also generate an output file, usually of the form &amp;lt;I&amp;gt;slurm-#######.out&amp;lt;/I&amp;gt; where the 7 # signs are the 7 digit job ID number.  If you need to cancel your job use &amp;lt;B&amp;gt;scancel&amp;lt;/B&amp;gt; with the 7 digit job ID number.&lt;br /&gt;
&lt;br /&gt;
   scancel #######&lt;br /&gt;
&lt;br /&gt;
=== [http://www.r-project.org/ R] ===&lt;br /&gt;
You can see what versions of R we provide with 'module avail R/'&lt;br /&gt;
&lt;br /&gt;
==== Packages ====&lt;br /&gt;
We provide a small number of R modules installed by default, these are generally modules that are needed by more than one person.&lt;br /&gt;
&lt;br /&gt;
==== Installing your own R Packages ====&lt;br /&gt;
To install your own module, login to Beocat and start R interactively&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load R&lt;br /&gt;
R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then install the package using&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
install.packages(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Follow the prompts. Note that there is a CRAN mirror at KU - it will be listed as &amp;quot;USA (KS)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After installing you can test before leaving interactive mode by issuing the command&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;R&amp;quot;&amp;gt;&lt;br /&gt;
library(&amp;quot;PACKAGENAME&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Running R Jobs ====&lt;br /&gt;
&lt;br /&gt;
You cannot submit an R script directly. '&amp;lt;tt&amp;gt;sbatch myscript.R&amp;lt;/tt&amp;gt;' will result in an error. Instead, you need to make a bash [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|script]] that will call R appropriately. Here is a minimal example. We'll save this as submit-R.sbatch&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --mem-per-cpu=4G&lt;br /&gt;
# Now we tell Slurm how long we expect our work to take: 15 minutes (D-HH:MM:SS)&lt;br /&gt;
#SBATCH --time=0-00:15:00&lt;br /&gt;
&lt;br /&gt;
# Now lets do some actual work. This starts R and loads the file myscript.R&lt;br /&gt;
module purge&lt;br /&gt;
module load R&lt;br /&gt;
R --no-save -q &amp;lt; myscript.R&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, to submit your R job, you would type&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sbatch submit-R.sbatch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can monitor your jobs using &amp;lt;B&amp;gt;kstat --me&amp;lt;/B&amp;gt;.  The output of your job will be in a slurm-#.out file where '#' is the 7 digit job ID number for your job.&lt;br /&gt;
&lt;br /&gt;
=== [http://www.java.com/ Java] ===&lt;br /&gt;
You can see what versions of Java we support with 'module avail Java/'&lt;br /&gt;
&lt;br /&gt;
=== [http://www.python.org/about/ Python] ===&lt;br /&gt;
You can see what versions of Python we support with 'module avail Python/'&lt;br /&gt;
&lt;br /&gt;
If you need libraries that we do not have installed, you should use [https://virtualenv.pypa.io/en/stable/userguide/ virtualenv] to setup a virtual python environment in your home directory. This will let you install python libraries as you please.&lt;br /&gt;
&lt;br /&gt;
==== Setting up your virtual environment ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Load Python&lt;br /&gt;
module load Python/3.7.0-iomkl-2018b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command Python is loaded.  After you logoff and then logon again Python will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* Create a location for your virtual environments (optional, but helps keep things organized)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir ~/virtualenvs&lt;br /&gt;
cd ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Create a virtual environment. Here I will create a default virtual environment called 'test'. Note that &amp;lt;code&amp;gt;virtualenv --help&amp;lt;/code&amp;gt; has many more useful options.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
virtualenv test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Lets look at our virtual environments (the virtual environment name should be in the output):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ls ~/virtualenvs&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Activate one of these&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
(After running this command your virtual environment is activated.  After you logoff and then logon again your virtual environment will not be loaded so you must rerun this command every time you logon.)&lt;br /&gt;
* You can now install the python modules you want. This can be done using &amp;lt;tt&amp;gt;pip&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pip install numpy biopython&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using your virtual environment within a job ====&lt;br /&gt;
Here is a simple job script using the virtual environment test&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.6.3-iomkl-2017beocatb&lt;br /&gt;
source ~/virtualenvs/test/bin/activate&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
python ~/path/to/your/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using MPI with Python within a job ====&lt;br /&gt;
Here is a simple job script using MPI with Python&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
module load Python/3.6.3-iomkl-2017beocatb&lt;br /&gt;
export PYTHONDONTWRITEBYTECODE=1&lt;br /&gt;
PYTHON_BINARY=$(which python)&lt;br /&gt;
mpirun ${PYTHON_BINARY} ~/path/to/your/mpi/python/script.py&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [http://spark.apache.org/ Spark] ===&lt;br /&gt;
&lt;br /&gt;
Spark is a programming language for large scale data processing.&lt;br /&gt;
It can be used in conjunction with Python, R, Scala, Java, and SQL.&lt;br /&gt;
Spark can be run on Beocat interactively or through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
To run interactively, you must first request a node or nodes from the Slurm queue.&lt;br /&gt;
The line below requests 1 node and 1 core for 24 hours and if available will drop&lt;br /&gt;
you into the bash shell on that node.&lt;br /&gt;
&lt;br /&gt;
  srun -J srun -N 1 -n 1 -t 24:00:00 --mem=10G --pty bash&lt;br /&gt;
&lt;br /&gt;
We have some sample python based Spark code you can try out that came from the &lt;br /&gt;
exercises and homework from the PSC Spark workshop.  &lt;br /&gt;
&lt;br /&gt;
  mkdir spark-test&lt;br /&gt;
  cd spark-test&lt;br /&gt;
  cp -rp /homes/daveturner/projects/PSC-BigData-Workshop/Shakespeare/* .&lt;br /&gt;
&lt;br /&gt;
You will need to set up a python virtual environment and load the &amp;lt;B&amp;gt;nltk&amp;lt;/B&amp;gt; package &lt;br /&gt;
before you run the first time.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  mkdir -p ~/virtualenvs&lt;br /&gt;
  cd ~/virtualenvs&lt;br /&gt;
  virtualenv spark-test&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  pip install nltk&lt;br /&gt;
  pip install numpy&lt;br /&gt;
  deactivate&lt;br /&gt;
&lt;br /&gt;
To run the sample code interactively, load the Python and Spark modules,&lt;br /&gt;
source your python virtual environment, change to the sample directory, fire up pyspark, &lt;br /&gt;
then execute the sample code.&lt;br /&gt;
&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  module load Spark&lt;br /&gt;
  cd ~/spark-test&lt;br /&gt;
  pyspark&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; exec(open(&amp;quot;shakespeare.py&amp;quot;).read())&lt;br /&gt;
&lt;br /&gt;
You can work interactively from the pyspark prompt (&amp;gt;&amp;gt;&amp;gt;) in addition to running scripts as above.&lt;br /&gt;
&lt;br /&gt;
The Shakespeare directory also contains a sample sbatch submit script that will run the &lt;br /&gt;
same shakespeare.py code through the Slurm batch queue.  &lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash -l&lt;br /&gt;
  #SBATCH --job-name=shakespeare&lt;br /&gt;
  #SBATCH --mem=10G&lt;br /&gt;
  #SBATCH --time=01:00:00&lt;br /&gt;
  #SBATCH --nodes=1&lt;br /&gt;
  #SBATCH --ntasks-per-node=1&lt;br /&gt;
  &lt;br /&gt;
  # Load Spark and Python (version 3 here)&lt;br /&gt;
  module load Spark&lt;br /&gt;
  module load Python&lt;br /&gt;
  source ~/virtualenvs/spark-test/bin/activate&lt;br /&gt;
  &lt;br /&gt;
  spark-submit shakespeare.py&lt;br /&gt;
&lt;br /&gt;
When you run interactively, pyspark initializes your spark context &amp;lt;B&amp;gt;sc&amp;lt;/B&amp;gt;.&lt;br /&gt;
You will need to do this manually as in the sample python code when you want&lt;br /&gt;
to submit jobs through the Slurm queue.&lt;br /&gt;
&lt;br /&gt;
  # If there is no Spark Context (not running interactive from pyspark), create it&lt;br /&gt;
  try:&lt;br /&gt;
     sc&lt;br /&gt;
  except NameError:&lt;br /&gt;
     from pyspark import SparkConf, SparkContext&lt;br /&gt;
     conf = SparkConf().setMaster(&amp;quot;local&amp;quot;).setAppName(&amp;quot;App&amp;quot;)&lt;br /&gt;
     sc = SparkContext(conf = conf)&lt;br /&gt;
&lt;br /&gt;
=== [http://www.perl.org/ Perl] ===&lt;br /&gt;
The system-wide version of perl is tracking the stable releases of perl. Unfortunately there are some features that we do not include in the system distribution of perl, namely threads.&lt;br /&gt;
&lt;br /&gt;
To use perl with threads, out a newer version, you can load it with the module command. To see what versions of perl we provide, you can use 'module avail Perl/'&lt;br /&gt;
&lt;br /&gt;
==== Submitting a job with Perl ====&lt;br /&gt;
Much like R (above), you cannot simply '&amp;lt;tt&amp;gt;sbatch myProgram.pl&amp;lt;/tt&amp;gt;', but you must create a [[AdvancedSlurm#Running_from_a_sbatch_Submit_Script|submit script]] which will call perl. Here is an example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --mem-per-cpu=1G&lt;br /&gt;
# Now we tell sbatch how long we expect our work to take: 15 minutes (H:MM:SS)&lt;br /&gt;
#SBATCH --time=0-0:15:00&lt;br /&gt;
# Now lets do some actual work. &lt;br /&gt;
module load Perl&lt;br /&gt;
perl /path/to/myProgram.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Octave for MatLab codes ===&lt;br /&gt;
&lt;br /&gt;
'module avail Octave/'&lt;br /&gt;
&lt;br /&gt;
The 64-bit version of Octave can be loaded using the command above.  Octave can then be used&lt;br /&gt;
to work with MatLab codes on the head node and to submit jobs to the compute nodes through the&lt;br /&gt;
sbatch scheduler.  Octave is made to run MatLab code, but it does have limitations and does not support&lt;br /&gt;
everything that MatLab itself does.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=octave&lt;br /&gt;
#SBATCH --output=octave.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load Octave/4.2.1-foss-2017beocatb-enable64&lt;br /&gt;
&lt;br /&gt;
octave &amp;lt; matlab_code.m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MatLab compiler ===&lt;br /&gt;
&lt;br /&gt;
Beocat also has a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for the MatLab compiler and the most common toolboxes&lt;br /&gt;
including the Parallel Computing Toolbox, Optimization Toolbox, Statistics and Machine Learning Toolbox,&lt;br /&gt;
Image Processing Toolbox, Curve Fitting Toolbox, Neural Network Toolbox, Sumbolic Math Toolbox, &lt;br /&gt;
Global Optimization Toolbox, and the Bioinformatics Toolbox.&lt;br /&gt;
&lt;br /&gt;
Since we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt;, this means that you will be expected to develop your MatLab code&lt;br /&gt;
with Octave or elsewhere on a laptop or departmental server.  Once you're ready to do large runs, then you&lt;br /&gt;
move your code to Beocat, compile the MatLab code into an executable, and you can submit as many jobs as&lt;br /&gt;
you want to the scheduler.  To use the MatLab compiler, you need to load the MATLAB module to compile code and&lt;br /&gt;
load the mcr module to run the resulting MatLab executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have addpath() commands in your code, you will need to wrap them in an &amp;quot;if ~deployed&amp;quot; block and tell the&lt;br /&gt;
compiler to include that path via the -I flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;MATLAB&amp;quot;&amp;gt;&lt;br /&gt;
% wrap addpath() calls like so:&lt;br /&gt;
if ~deployed&lt;br /&gt;
    addpath('./another/folder/with/code/')&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  The license manager checks the mcc compiler out for a minimum of 30 minutes, so if another user compiles a code&lt;br /&gt;
you unfortunately may need to wait for up to 30 minutes to compile your own code.&lt;br /&gt;
&lt;br /&gt;
Compiling with additional paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
module load MATLAB&lt;br /&gt;
mcc -m matlab_main_code.m -I ./another/folder/with/code/ -o matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any directories added with addpath() will need to be added to the list of compile options as -I arguments.  You&lt;br /&gt;
can have multiple -I arguments in your compile command.&lt;br /&gt;
&lt;br /&gt;
Here is an example job submission script.  Modify time, memory, tasks-per-node, and job name as you see fit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
#SBATCH --job-name=matlab&lt;br /&gt;
#SBATCH --output=matlab.o%j&lt;br /&gt;
#SBATCH --time=1:00:00&lt;br /&gt;
#SBATCH --mem=4G&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --ntasks-per-node=1&lt;br /&gt;
&lt;br /&gt;
module purge&lt;br /&gt;
module load mcr&lt;br /&gt;
&lt;br /&gt;
./matlab_executable_name&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those who make use of mex files - compiled C and C++ code with matlab bindings - you will need to add these&lt;br /&gt;
files to the compiled archive via the -a flag.  See the behavior of this flag in the [https://www.mathworks.com/help/compiler/mcc.html compiler documentation].  You can either target specific .mex files or entire directories.&lt;br /&gt;
&lt;br /&gt;
Because codes often require adding several directories to the Matlab path as well as mex files from several locations,&lt;br /&gt;
we recommend writing a script to preserve and help document the steps to compile your Matlab code.  Here is an&lt;br /&gt;
abbreviated example from a current user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -l&lt;br /&gt;
&lt;br /&gt;
module load MATLAB&lt;br /&gt;
&lt;br /&gt;
cd matlabPyrTools/MEX/&lt;br /&gt;
&lt;br /&gt;
# compile mex files&lt;br /&gt;
mex upConv.c convolve.c wrap.c edges.c&lt;br /&gt;
mex corrDn.c convolve.c wrap.c edges.c&lt;br /&gt;
mex histo.c&lt;br /&gt;
mex innerProd.c&lt;br /&gt;
&lt;br /&gt;
cd ../..&lt;br /&gt;
&lt;br /&gt;
mcc -m mongrel_creation.m \&lt;br /&gt;
  -I ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -I ./matlabPyrTools/ \&lt;br /&gt;
  -I ./FastICA/ \&lt;br /&gt;
  -a ./matlabPyrTools/MEX/ \&lt;br /&gt;
  -a ./texturesynth/ \&lt;br /&gt;
  -o mongrel_creation_binary&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, we only have a &amp;lt;B&amp;gt;single-user license&amp;lt;/B&amp;gt; for MatLab so the model is to develop and debug your MatLab code&lt;br /&gt;
elsewhere or using Octave on Beocat, then you can compile the MatLab code into an executable and run it without&lt;br /&gt;
limits on Beocat.  &lt;br /&gt;
&lt;br /&gt;
For more info on the mcc compiler see:  https://www.mathworks.com/help/compiler/mcc.html&lt;br /&gt;
&lt;br /&gt;
=== COMSOL ===&lt;br /&gt;
Beocat has no license for COMSOL. If you want to use it, you must provide your own.&lt;br /&gt;
&lt;br /&gt;
 module spider COMSOL/&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
  COMSOL: COMSOL/5.3&lt;br /&gt;
 ----------------------------------------------------------------------------&lt;br /&gt;
    Description:&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling&lt;br /&gt;
      and simulating scientific and engineering problems&lt;br /&gt;
 &lt;br /&gt;
    This module can be loaded directly: module load COMSOL/5.3&lt;br /&gt;
 &lt;br /&gt;
    Help:&lt;br /&gt;
      &lt;br /&gt;
      Description&lt;br /&gt;
      ===========&lt;br /&gt;
      COMSOL Multiphysics software, an interactive environment for modeling and &lt;br /&gt;
 simulating scientific and engineering problems&lt;br /&gt;
      You must provide your own license.&lt;br /&gt;
      export LM_LICENSE_FILE=/the/path/to/your/license/file&lt;br /&gt;
      *OR*&lt;br /&gt;
      export LM_LICENSE_FILE=$LICENSE_SERVER_PORT@$LICENSE_SERVER_HOSTNAME&lt;br /&gt;
      e.g. export LM_LICENSE_FILE=1719@some.flexlm.server.ksu.edu&lt;br /&gt;
      &lt;br /&gt;
      More information&lt;br /&gt;
      ================&lt;br /&gt;
       - Homepage: https://www.comsol.com/&lt;br /&gt;
==== Graphical COMSOL ====&lt;br /&gt;
Running COMSOL in graphical mode on a cluster is generally a bad idea. If you choose to run it in graphical mode on a compute node, you will need to do something like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to the cluster with X11 forwarding (ssh -Y or mobaxterm)&lt;br /&gt;
# load the comsol module on the headnode&lt;br /&gt;
module load COMSOL&lt;br /&gt;
# export your comsol license as mentioned above, and tell the scheduler to run the software&lt;br /&gt;
srun --nodes=1 --time=1:00:00 --mem=1G --pty --x11 comsol -3drend sw&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .NET Core ===&lt;br /&gt;
==== Load .NET ====&lt;br /&gt;
 mozes@[eunomia] ~ $ module load dotNET-Core-SDK&lt;br /&gt;
==== create an application ====&lt;br /&gt;
Following instructions from [https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-with-xplat-cli here], we'll create a simple 'Hello World' application&lt;br /&gt;
 mozes@[eunomia] ~ $ mkdir Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~ $ cd Hello&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet new console&lt;br /&gt;
 The template &amp;quot;Console Application&amp;quot; was created successfully.&lt;br /&gt;
 &lt;br /&gt;
 Processing post-creation actions...&lt;br /&gt;
 Running 'dotnet restore' on /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Restoring packages for /homes/mozes/Hello/Hello.csproj...&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.props.&lt;br /&gt;
  Generating MSBuild file /homes/mozes/Hello/obj/Hello.csproj.nuget.g.targets.&lt;br /&gt;
  Restore completed in 358.43 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
 &lt;br /&gt;
 Restore succeeded.&lt;br /&gt;
&lt;br /&gt;
==== Edit your program ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ vi Program.cs&lt;br /&gt;
==== Run your .NET application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet run&lt;br /&gt;
 Hello World!&lt;br /&gt;
==== Build and run the built application ====&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet build&lt;br /&gt;
 Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core&lt;br /&gt;
 Copyright (C) Microsoft Corporation. All rights reserved.&lt;br /&gt;
 &lt;br /&gt;
  Restore completed in 106.12 ms for /homes/mozes/Hello/Hello.csproj.&lt;br /&gt;
  Hello -&amp;gt; /homes/mozes/Hello/bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 &lt;br /&gt;
 Build succeeded.&lt;br /&gt;
    0 Warning(s)&lt;br /&gt;
    0 Error(s)&lt;br /&gt;
 &lt;br /&gt;
 Time Elapsed 00:00:02.86&lt;br /&gt;
&lt;br /&gt;
 mozes@[eunomia] ~/Hello $ dotnet bin/Debug/netcoreapp2.1/Hello.dll&lt;br /&gt;
 Hello World!&lt;br /&gt;
&lt;br /&gt;
== Installing my own software ==&lt;br /&gt;
Installing and maintaining software for the many different users of Beocat would be very difficult, if not impossible. For this reason, we don't generally install user-run software on our cluster. Instead, we ask that you install it into your home directories.&lt;br /&gt;
&lt;br /&gt;
In many cases, the software vendor or support site will incorrectly assume that you are installing the software system-wide or that you need 'sudo' access.&lt;br /&gt;
&lt;br /&gt;
As a quick example of installing software in your home directory, we have a sample video on our [[Training Videos]] page. If you're still having problems or questions, please contact support as mentioned on our [[Main Page]].&lt;/div&gt;</summary>
		<author><name>Jhauser</name></author>
	</entry>
</feed>