Coder Social home page Coder Social logo

bk-211 / boris2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from serbanl/boris2

0.0 0.0 0.0 185.76 MB

Boris Computational Spintronics

Home Page: https://boris-spintronics.uk

License: GNU General Public License v3.0

C++ 64.43% Python 16.74% C 1.08% TeX 0.12% Cuda 17.59% Makefile 0.02% HLSL 0.01%

boris2's Introduction

Boris2

Boris Computational Spintronics.

C++17 used. The codebase is currently contained in 918 files (.h, .cpp, .cu, .cuh, .py), ~164k non-trivial loc, and can be compiled on Windows or Linux-based OS with MSVC compiler or g++ compiler respectively.

Download

Latest compiled version with installer, including source code with makefile for Linux-based OS, found here : https://boris-spintronics.uk/download

Manual

Latest manual rolled in with installer, also found here in the Manual directory together with examples.

External Dependencies

CUDA 9.2 or newer : https://developer.nvidia.com/cuda-92-download-archive

FFTW3 : http://www.fftw.org/download.html

OS

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:

  1. 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

Windows:

  1. Clone the project.
  2. Open the Visual Studio solution file (I use Visual Studio 2017).
  3. Make sure all external dependencies are updated - see above.
  4. Configure the compilation as needed - see CompileFlags.h, BorisLib_Config.h, and cuBLib_Flags.h, should be self explanatory.
  5. Compile!

Linux (tested on Ubuntu 20.04):

Make sure you have all the required updates and dependencies:

Updates:

  1. Get latest g++ compiler: $ sudo apt install build-essential
  2. Get OpenMP: $ sudo apt-get install libomp-dev
  3. Get LibTBB: $ sudo apt-get install libtbb-dev
  4. Get CUDA: $ sudo apt install nvidia-cuda-toolkit
  5. Get FFTW3: Instructions at http://www.fftw.org/fftw2_doc/fftw_6.html
  6. Python3 development version: $ sudo apt-get install python-dev

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:

  • arch=50 is required for Maxwell architecture; translates to -arch=sm_50 in nvcc compilation.
  • arch=60 is required for Pascal architecture; translates to -arch=sm_60 in nvcc compilation.
  • arch=70 is required for Volta (and Turing) architecture; translates to -arch=sm_70 in nvcc compilation.
  • arch=80 is required for Ampere architecture; translates to -arch=sm_80 in nvcc compilation.
  • 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

    Run

    $ ./BorisLin

    Publication

    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.

    boris2's People

    Contributors

    serbanl avatar acaprez avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.