Installation

From Spinach Documentation Wiki
Jump to: navigation, search

To get the current developer version, clone the following GitHub repository:

https://github.com/IlyaKuprov/Spinach

To get the latest deeply tested public release, download and unzip the files from:

https://github.com/IlyaKuprov/Spinach/releases

We recommend using a low-latency storage location, ideally a solid state disk. Avoid cloud-synchronised folders such as Dropbox or OneDrive: they interfere with Spinach scratch storage and caching operations.

Spinach and Matlab installations on the NMRBox cloud oscillate in and out of usability in a way we cannot forecast, please contact NMRBox data centre administrators if their Matlab refuses to start on a particular day. If Matlab does run on a particular NMRBox server, a guaranteed way to get Spinach to work is to clone the above repository and to run the fix_path.m file in the root of the resulting folder.

1. Hardware and Matlab requirements

Minimum version of Matlab is R2024b Update 8. The following Matlab toolboxes are required and must be selected during Matlab installation:

  • Parallel Computing Toolbox
  • Optimization Toolbox
  • Deep Learning Toolbox
  • Reinforcement Learning Toolbox
  • Statistics and Machine Learning Toolbox
  • Mapping Toolbox
  • Aerospace Toolbox

Spinach requires 1 GB of RAM per CPU core for basic simulations, 2 GB per core for advanced simulations, and 4 GB per core for protein-scale simulations. Computers not meeting these specifications will crash.

2. Spinach 2.x installation

  1. Start Matlab and add the following directories (and only those directories), including subdirectories, to the the top (not the bottom) of the Matlab path list (Menu/File/Set Path):
      <spinach root>/kernel
      <spinach root>/etc
      <spinach root>/experiments
      <spinach root>/interfaces
You may need to allow write access to <matlab root>/toolbox/local/pathdef.m in order to be able to save the updated path file. If you do not have access to that location, save the file in your home directory. Spinach validates paths and checks for function name collisions at run time; if the kernel refuses to start, it would tell you why.
  1. Disable automatic parallel pool shutdown by unticking the box in Preferences/Parallel Computing Toolbox.
  1. Spinach expects to be able to write into <spinach root>/scratch directory. If you are installing it on a server where the end users would not have write access to Spinach installation location, replace this directory with a link to a location that everyone can write into. Alternatively, edit <spinach root>/kernel/includes/autoexec.m and point the scratch directory somewhere that is writable to everyone.
  1. It may be necessary to increase Java heap size - Matlab's default is much too low. If you get Java out-of-memory errors, go to Preferences/General/Java Heap Memory and increase the amount to a few gigabytes.

3. Getting started

The best way to get started is to look through the code in the /examples directory. Clicking on any Spinach function in the example files and pressing Ctrl-D (Windows) or Shift-Cmd-D (Mac) brings up the function text. All functions are extensively annotated, it is always a good idea to look inside, even if you are not an expert in Matlab programming.

4. Multicore and GPU support

The default settings in the example set are conservative. If you have a system with a good Nvidia GPU (FP64 support required, we recommend Titan V), more than 16 GB of RAM, and more than 4 CPU cores, you can speed most calculations up significantly by adding

    sys.enable={'greedy','gpu'};

to Spinach options specification. See expert-level options for further details.

Version 2.10, authors: Ilya Kuprov