Boris Computational Spintronics.
C++17 used. The codebase is currently contained in 878 files (.h, .cpp, .cu, .cuh, .py), ~160k non-trivial loc, and can be compiled on Windows or Linux-based OS with MSVC compiler or g++ compiler respectively.
Latest compiled version with installer, including source code with makefile for Linux-based OS, found here : https://boris-spintronics.uk/download
Latest manual rolled in with installer, also found here in the Manual directory together with examples.
CUDA 9.2 or newer : https://developer.nvidia.com/cuda-92-download-archive
The full code can be compiled on Windows 7 or Windows 10 using the MSVC compiler. The code has also been ported to Linux (I've tested on Ubuntu 20.04) and compiled with g++, but with restrictions:
- The graphical interface was originally written using DirectX11 so when compiling on Linux the GRAPHICS 0 flag needs to be set (see below). In the near future I plan to re-write the graphical interface in SFML.
Building From Source
- Clone the project.
- Open the Visual Studio solution file (I use Visual Studio 2017).
- Make sure all external dependencies are updated - see above.
- Configure the compilation as needed - see CompileFlags.h, BorisLib_Config.h, and cuBLib_Flags.h, should be self explanatory.
Linux (tested on Ubuntu 20.04):
Make sure you have all the required updates and dependencies:
- Get latest g++ compiler: $ sudo apt install build-essential
- Get OpenMP: $ sudo apt-get install libomp-dev
- Get LibTBB: $ sudo apt-get install libtbb-dev
- Get CUDA: $ sudo apt install nvidia-cuda-toolkit
- Get SFML: $ sudo apt-get install libsfml-dev
- Get FFTW3: Instructions at http://www.fftw.org/fftw2_doc/fftw_6.html
Open terminal and go to extracted BorisLin directory.
Step 1: Configuration.
$ make configure (arch=xx) (sprec=0/1)
Before compiling you need to set the correct CUDA architecture for your NVidia GPU.
For a list of architectures and more details see: https://en.wikipedia.org/wiki/CUDA.
Possible values for arch are:
Example: $ make configure arch=70
If arch is not specified a default value of 50 is used. You can also compile CUDA code with single or double precision floating point. The default value, if not specified, is sprec=1 (single precision – recommended for most users). If you have a GPU capable of handling double precision floating point efficiently you can configure with sprec=0.
Step 2: Compilation.
$ make compile -j N
(replace N with the number of logical cores on your CPU for multi-processor compilation, e.g. $ make compile -j 16)
Step 3: Installation.
$ make install
A technical paper on Boris has been published: S. Lepadatu, "Boris computational spintronics — High performance multi-mesh magnetic and spin transport modeling software", J. Appl. Phys. 128, 243902 (2020).
If using Boris for published works please use this as a reference.