Git Product home page Git Product logo

boris2's Introduction

Boris2

Boris Computational Spintronics.

This is the single-GPU version. There is a multi-GPU version here: https://github.com/SerbanL/BORIS

Development of the single-GPU version is largely finished, all functionality is included in the multi-GPU upgraded codebase.

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 Python3 development version : https://www.python.org/downloads/ 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):

Extract the archive. On Linux-based OS the program needs to be compiled from source using the provided makefile in the extracted BorisLin directory. Make sure you have all the required updates and dependencies:

Step 0: 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 install libtbb-dev
  4. Get latest CUDA Toolkit (see manual for further details)
  5. Get and install FFTW3: Instructions at http://www.fftw.org/fftw2_doc/fftw_6.html
  6. Get Python3 development version, required for running Python scripts in embedded mode. To get 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) (python=x.x) (cuda=x.x) (conda-env-path=/../..)

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.

• arch=90 is required for Ada (and Hopper) architecture; translates to -arch=sm_90 in nvcc compilation.

sprec sets either single precision (1) or double precision (0) for CUDA computations.

python is the Python version installed, e.g. 3.8

if conda-env-path is not set the system installed python will be used.

if you would like to use conda python distribution use conda-env-path variable.

for base environment set the conda installation path (e.g. /opt/conda or /home/USERNAME/miniconda3)

for specific environment set specify the environment path (e.g. /opt/conda/envs/your_desired_env or /home/USERNAME/miniconda3/envs/your_desired_env)

cuda is the CUDA Toolkit version installed, e.g. 12.0.

Example: $ make configure arch=80 sprec=1 python=3.8 cuda=12.0

Step 2: Compilation.

$ make compile -j N

(replace N with the number of logical cores on your CPU for multi-processor compilation)

Example: $ make compile -j 16

Step 3: Installation.

$ make install

Step4: Run.

$ ./BorisLin

Step5: python package NetSocks

For proper use of python bindings you will need a NetSocks binding. You can find it in the src folder. It is already packaged so you can install with:

$ pip install .

Publications

There are a number of articles which cover various parts of the software.

General (if using Boris for published works please use this as a reference)

• S. Lepadatu, “Boris computational spintronics — High performance multi-mesh magnetic and spin transport modeling software”, Journal of Applied Physics 128, 243902 (2020)

Differential equation solvers

• S. Lepadatu “Speeding Up Explicit Numerical Evaluation Methods for Micromagnetic Simulations Using Demagnetizing Field Polynomial Extrapolation” IEEE Transactions on Magnetics 58, 1 (2022)

Multilayered convolution

• S. Lepadatu, “Efficient computation of demagnetizing fields for magnetic multilayers using multilayered convolution” Journal of Applied Physics 126, 103903 (2019)

Parallel Monte Carlo algorithm

• S. Lepadatu, G. Mckenzie, T. Mercer, C.R. MacKinnon, P.R. Bissell, “Computation of magnetization, exchange stiffness, anisotropy, and susceptibilities in large-scale systems using GPU-accelerated atomistic parallel Monte Carlo algorithms” Journal of Magnetism and Magnetic Materials 540, 168460 (2021)

Micromagnetic Monte Carlo algorithm (with demagnetizing field parallelization)

• S. Lepadatu “Micromagnetic Monte Carlo method with variable magnetization length based on the Landau–Lifshitz–Bloch equation for computation of large-scale thermodynamic equilibrium states” Journal of Applied Physics 130, 163902 (2021)

Roughness effective field

• S. Lepadatu, “Effective field model of roughness in magnetic nano-structures” Journal of Applied Physics 118, 243908 (2015)

Heat flow solver, LLB and 2-sublattice LLB

• S. Lepadatu, “Interaction of Magnetization and Heat Dynamics for Pulsed Domain Wall Movement with Joule Heating” Journal of Applied Physics 120, 163908 (2016)

• S. Lepadatu “Emergence of transient domain wall skyrmions after ultrafast demagnetization” Physical Review B 102, 094402 (2020)

Spin transport solver

• S. Lepadatu, “Unified treatment of spin torques using a coupled magnetisation dynamics and three-dimensional spin current solver” Scientific Reports 7, 12937 (2017)

• S. Lepadatu, “Effect of inter-layer spin diffusion on skyrmion motion in magnetic multilayers” Scientific Reports 9, 9592 (2019)

• C.R. MacKinnon, S. Lepadatu, T. Mercer, and P.R. Bissell “Role of an additional interfacial spin-transfer torque for current-driven skyrmion dynamics in chiral magnetic layers” Physical Review B 102, 214408 (2020)

• C.R. MacKinnon, K. Zeissler, S. Finizio, J. Raabe, C.H. Marrows, T. Mercer, P.R. Bissell, and S. Lepadatu, “Collective skyrmion motion under the influence of an additional interfacial spin transfer torque” Scientific Reports 12, 10786 (2022)

• S. Lepadatu and A. Dobrynin, “Self-consistent computation of spin torques and magneto-resistance in tunnel junctions and magnetic read-heads with metallic pinhole defects” Journal of Physics: Condensed Matter 35, 115801 (2023)

Elastodynamics solver with thermoelastic effect and magnetostriction

• S. Lepadatu, “All-Optical Magnetothermoelastic Skyrmion Motion” Physical Review Applied 19, 044036 (2023)

boris2's People

Contributors

acaprez avatar lrlunin avatar serbanl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

boris2's Issues

Boris2 in Docker

Hello together,
currently, I am trying to make Boris2 run in a docker container, since it is supposed to be used in a simulation plattform that automatizes simulations and the analysis.
The issue I am facing is that Boris2 seems to not compile correctly?
On a system using a GPU that has an Ampere architecture Boris is compiled in docker with the arch setting being 80.
Afterwards, Boris starts successfully.
If I use a different setup, with a GPU that has a Volta or Turing architecture and using arch=70 the container is build successfully, without errors. Same concerning the compiling process of Boris.
Unfortunately, Boris2 will not start in this configuration, if docker is forwarding GPUs. There is no error message.
If Boris2 is started without forwarding GPUs to the container, Boris2 starts.
Here is the docker file I am using:

FROM nvidia/cuda:11.4.3-devel-ubuntu20.04
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="Europe/Berlin"

RUN apt-get update
RUN apt-get install build-essential -y
RUN apt-get install libomp-dev -y
RUN apt-get install libtbb-dev -y
RUN apt-get install wget -y
RUN apt-get install libx11-dev -y
RUN apt-get install nano
RUN apt-get install python3.8-dev -y
RUN apt-get install python3-pip -y
RUN apt-get install git -y
RUN python3.8 -m pip install --upgrade pip
RUN pip3 install matplotlib numpy notebook

RUN wget www.fftw.org/fftw-3.3.10.tar.gz
RUN tar -xzf fftw-3.3.10.tar.gz
RUN cd fftw-3.3.10
RUN chmod +x fftw-3.3.10/configure
RUN bash fftw-3.3.10/configure
RUN make
RUN make install

RUN git clone https://github.com/SerbanL/Boris2.git /Boris2
RUN cd /Boris2
RUN make -C /Boris2 configure arch=70  sprec=1 python=3.8 cuda=11.4
RUN make -C /Boris2 compile -j 30
RUN make -C /Boris2 install

RUN chmod ugo+rwx /Boris2/BorisLin
RUN cp -r /Boris2/BorisPythonScripts/* /Boris2/
WORKDIR /Boris2/BorisPythonScripts
ENV PATH=${PATH}:/Boris2/BorisLin
RUN cp -r /Boris2/src/NetSocks /usr/lib/python3.8/

Thank you for your help
Yours faithfully
Tim Vogel

Compiling on Linux

Hi,

I'm trying to compile Boris on linux. For my sanity and the sake of reproducibility and portability, I'm using docker to compile with the following Dockerfile:

FROM nvidia/cuda:12.0.1-devel-ubuntu20.04

RUN DEBIAN_FRONTEND=noninteractive apt update && \
    apt-get -qq install \
    wget \
    build-essential \
    libomp-dev \
    libtbb-dev \
    python-dev \
    git
RUN wget https://www.fftw.org/fftw-3.3.10.tar.gz && \
    tar -xf fftw-3.3.10.tar.gz && \
    cd fftw-3.3.10 && \
    ./configure && \
    make && \
    make install
RUN git clone https://github.com/SerbanL/Boris2 /src

CMD cd /src && \
    make configure arch=80 sprec=1 python=3.8 cuda=12.0 && \
    make compile -j 16
    make install

I run with docker build -t boris . && docker run -it --rm --gpus all --name borisc boris. I get the following result :

mkdir -p Boris/Boris_o
mkdir -p Boris/Boris_cuo
Configured for -arch=sm_80 and SINGLEPRECISION = 1. Python version 3.8. CUDA Toolkit version 12.0.
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/SMElastic.cpp -o Boris/Boris_o/SMElastic.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DiffEq_Iterate.cpp -o Boris/Boris_o/DiffEq_Iterate.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/TMRCUDA.cpp -o Boris/Boris_o/TMRCUDA.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/STransportCUDA.cpp -o Boris/Boris_o/STransportCUDA.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DipoleDipoleTFunc_Self.cpp -o Boris/Boris_o/DipoleDipoleTFunc_Self.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DemagTFunc_L.cpp -o Boris/Boris_o/DemagTFunc_L.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/Atom_Demag_N.cpp -o Boris/Boris_o/Atom_Demag_N.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DiffEqAFMCUDA.cpp -o Boris/Boris_o/DiffEqAFMCUDA.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DWRunTimeFit.cpp -o Boris/Boris_o/DWRunTimeFit.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DiffEqFMCUDA.cpp -o Boris/Boris_o/DiffEqFMCUDA.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/ModulesCUDA.cpp -o Boris/Boris_o/ModulesCUDA.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/SimFiles.cpp -o Boris/Boris_o/SimFiles.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/SurfExchange.cpp -o Boris/Boris_o/SurfExchange.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/DiffEqFM_Evals_RK4.cpp -o Boris/Boris_o/DiffEqFM_Evals_RK4.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/Demag.cpp -o Boris/Boris_o/Demag.o
g++ -I/usr/local/cuda-12.0/targets/x86_64-linux/include/ -c -Ofast -std=c++17 -I/usr/include/python3.8/ -IBorisLib -IBorisCUDALib -fopenmp Boris/STransport_Charge.cpp -o Boris/Boris_o/STransport_Charge.o
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/Simulation.h:36,
                 from Boris/SimFiles.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/SMElastic.h:3,
                 from Boris/SMElastic.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DiffEq.h:3,
                 from Boris/DiffEq_Iterate.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DipoleDipoleTFunc.h:3,
                 from Boris/DipoleDipoleTFunc_Self.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DemagTFunc.h:3,
                 from Boris/DemagTFunc_L.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/STransport.h:3,
                 from Boris/STransport_Charge.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DWRunTimeFit.h:5,
                 from Boris/DWRunTimeFit.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/SimFiles.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [makefile:78: Boris/Boris_o/SMElastic.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/Atom_Demag_N.h:3,
                 from Boris/Atom_Demag_N.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
make: *** [makefile:78: Boris/Boris_o/DiffEq_Iterate.o] Error 1
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/DemagTFunc_L.o] Error 1
make: *** [makefile:78: Boris/Boris_o/STransport_Charge.o] Error 1
make: *** [makefile:78: Boris/Boris_o/DipoleDipoleTFunc_Self.o] Error 1
make: *** [makefile:78: Boris/Boris_o/DWRunTimeFit.o] Error 1
make: *** [makefile:78: Boris/Boris_o/Atom_Demag_N.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DiffEq.h:3,
                 from Boris/DiffEqFM.h:3,
                 from Boris/DiffEqFM_Evals_RK4.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/DiffEqFM_Evals_RK4.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/Demag.h:3,
                 from Boris/Demag.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/Demag.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/SurfExchange.h:3,
                 from Boris/SurfExchange.cpp:2:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/SurfExchange.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/TMR.h:3,
                 from Boris/TMRCUDA.cpp:8:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/STransport.h:3,
                 from Boris/STransportCUDA.cpp:8:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/TMRCUDA.o] Error 1
make: *** [makefile:78: Boris/Boris_o/STransportCUDA.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DiffEq.h:3,
                 from Boris/DiffEqFM.h:3,
                 from Boris/DiffEqFMCUDA.cpp:7:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/DiffEqFMCUDA.o] Error 1
In file included from BorisLib/BLib_Funcs.h:10,
                 from BorisLib/BorisLib.h:15,
                 from Boris/DiffEq.h:3,
                 from Boris/DiffEqAFM.h:3,
                 from Boris/DiffEqAFMCUDA.cpp:7:
BorisLib/Funcs_Files_Linux.h:11:10: fatal error: X11/Xlib.h: No such file or directory
   11 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [makefile:78: Boris/Boris_o/DiffEqAFMCUDA.o] Error 1

I tried installing xorg but it doesn't change a thing.

Examples don't work correctly.

I am using v3.80 (22nd February 2023).
But examples cannot run properly. For example, $BorisLin/Boris_Data/Examples/Tutorial 0/hysteresis.py.
I found this command

Py = ns.Ferromagnet([160e-9, 80e-9, 10e-9], [5e-9])

causes an error

ERROR : Parameter out of bounds. Info : Parameter 1, Min : -1m, -1m, -1m; -1000mm, -1000mm, -1000mm to Max : -1m, -1m, -1m; 1m, 1m, 1m

which can be corrected by replacing the command with

Py = ns.Ferromagnet([-160e-9, -80e-9, -10e-9, 160e-9, 80e-9, 10e-9], [5e-9])

Bugs Status

NOT SOLVED:

Saving simulation file sometimes sets dT to zero (to a floating point error). I've only seen it happen with CUDA enabled. Very rare, no apparent cause found yet.
LIKELY SOLVED:

Using a python script may result in program hanging if issuing a flood of commands.

If heat solver diverges (e.g. due to too high a time step), and at least 1 material parameter has a temperature dependence, when in CUDA mode out of gpu memory errors can result requiring a program restart. I seem to have fixed it using extra checks on Temperature when getting updated parameter values, but I don't understand why this happens without the checks so the solution seems like a hack. Not happy with this!

SOLVED:

Drag and drop simulation file sometimes crashes program. Found bad conversion function - I'm certain that was the problem, so consider this solved but keep an eye on this for a while.

Consider Splitting this repo

Hi :),

The current breakdown of the disk usage of this repo is as follows (I used dust):

  18M     ┌── Boris_o                                               │                                                                                          ░░░████ │   3%
  33M   ┌─┴ Boris                                                   │                                                                                          ███████ │   6%
 8.9M   │   ┌── Porter Comparison                                   │                                                                                     ░░░░░░░░▒▒██ │   2%
 8.9M   │   ├── Spin Transport                                      │                                                                                     ░░░░░░░░▒▒██ │   2%
  19M   │ ┌─┴ muMAG5                                                │                                                                                     ░░░░░░░░████ │   4%
  11M   │ │   ┌── ufsky_fm.bsm                                      │                                                                                     ░░░░░▒▒▒▒███ │   2%
  11M   │ │ ┌─┴ High                                                │                                                                                     ░░░░░▒▒▒▒███ │   2%
  11M   │ │ │ ┌── ufsky_fm.bsm                                      │                                                                                     ░░░░░▒▒▒▒███ │   2%
  11M   │ │ ├─┴ Low                                                 │                                                                                     ░░░░░▒▒▒▒███ │   2%
  11M   │ │ │ ┌── ufsky_fm.bsm                                      │                                                                                     ░░░░░▒▒▒▒███ │   2%
  11M   │ │ ├─┴ Medium                                              │                                                                                     ░░░░░▒▒▒▒███ │   2%
  35M   │ ├─┴ UFSky_FM                                              │                                                                                     ░░░░░███████ │   7%
  61M   ├─┴ BorisArticle                                            │                                                                                     ████████████ │  11%
 8.7M   │     ┌── skyrmion_x3.out                                   │                                                                                     ░▒▓▓▓▓▓▓▓▓██ │   2%
10.0M   │     ├── skyrmion_x4.out                                   │                                                                                     ░▒▓▓▓▓▓▓▓▓██ │   2%
  10M   │     ├── skyrmion_x6.out                                   │                                                                                     ░▒▓▓▓▓▓▓▓▓██ │   2%
  10M   │     ├── skyrmion_x5.out                                   │                                                                                     ░▒▓▓▓▓▓▓▓▓██ │   2%
  50M   │   ┌─┴ mumax3                                              │                                                                                     ░▒██████████ │   9%
  59M   │ ┌─┴ 2D                                                    │                                                                                     ░███████████ │  11%
  64M   ├─┴ MLConv Paper                                            │                                                                                     ████████████ │  12%
 8.7M   │ ┌── BorisManual-v340.pdf                                  │                                                                                    ░░░░░░░░░░░██ │   2%
 8.3M   │ │ ┌── Tutorial 29                                         │                                                                                    ░░░▒▒▒▒▒▒▒▒██ │   2%
 8.6M   │ │ ├── Tutorial 24                                         │                                                                                    ░░░▒▒▒▒▒▒▒▒██ │   2%
10.0M   │ │ ├── Tutorial 23                                         │                                                                                    ░░░▒▒▒▒▒▒▒▒██ │   2%
  52M   │ ├─┴ Examples                                              │                                                                                    ░░░██████████ │  10%
  69M   ├─┴ Manual                                                  │                                                                                    █████████████ │  13%
 9.3M   │ ┌── Boris                                                 │                                                                                  ░░░░░░░░░░░░░██ │   2%
 8.3M   │ │   ┌── Tutorial 29                                       │                                                                                  ░░░▒▒▓▓▓▓▓▓▓▓██ │   2%
 8.6M   │ │   ├── Tutorial 24                                       │                                                                                  ░░░▒▒▓▓▓▓▓▓▓▓██ │   2%
10.0M   │ │   ├── Tutorial 23                                       │                                                                                  ░░░▒▒▓▓▓▓▓▓▓▓██ │   2%
  52M   │ │ ┌─┴ Examples                                            │                                                                                  ░░░▒▒██████████ │  10%
  60M   │ ├─┴ Boris_Data                                            │                                                                                  ░░░████████████ │  11%
  79M   ├─┴ BorisLin                                                │                                                                                  ███████████████ │  15%
 215M   │     ┌── pack-6e2dba985484ef1466014b7238341112b0c5ecb1.pack│                                                         ████████████████████████████████████████ │  40%
 215M   │   ┌─┴ pack                                                │                                                         ████████████████████████████████████████ │  40%
 215M   │ ┌─┴ objects                                               │                                                         ████████████████████████████████████████ │  40%
 215M   ├─┴ .git                                                    │                                                         ████████████████████████████████████████ │  40%
 534M ┌─┴ .                                                         │█████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%

Many git tools will time out for such a large repo. Also only a small part of it is source code. I think it would be possible to move the Manual, Papers, etc to different repos. What do you think ?

GPU select

Hi,

I would like to suggest that the user should be able to choose the GPU on which the calculations will be performed.

Regards,
Mateusz

Spherical shell

Hi, do you have a spherical shell option in Boris?

Like you do have the one Shape.ellipsoid. But I am not sure if you have an option for Shape.shell or anything like that?

Kind Regards

Could not load embedded Python wrapper file : /src/EmbeddedPythonWrapper.py

Hi :),

I don't seem to be able to run a script:

./boris -s ./script.py
Script server running.
Console activated...
To open manual use the manual command.
Could not load embedded Python wrapper file : /src/EmbeddedPythonWrapper.py
Started Python script : ./script.py
Finished Python script : ./script.py
Terminated

Here is the inside of script.py directly from the manual page 17

from NetSocks import NSClient
import matplotlib.pyplot as plt
import numpy as np
ns = NSClient(); ns.configure(True)
########################################
#This is based on Exercise 8.3, done entirely using a Python script
Py = ns.Ferromagnet([160e-9, 80e-9, 10e-9], [5e-9, 5e-9, 5e-9])
Py.modules(['Zeeman', 'demag', 'exchange', 'transport'])
#set amr percentage of 2%
Py.param.amr = 2.0
#amr loop angle (deg.)
direction_deg = 5
ns.setangle(90, 180.0 + direction_deg)
#set electrodes at x-axis ends with a 1 mV potential drop
ns.setdefaultelectrodes()
ns.setpotential(1e-3)
#save applied field (A/m) and resistance (Ohms)
ns.setsavedata('amr_rawdata.txt', ['Ha', Py], ['R'])
#Run hysteresis loop
ns.setode('LLGStatic', 'SDesc')
ns.Hpolar_seq(
 [Py, [-100e3, 90, direction_deg, 100e3, 90, direction_deg, 200],
 'mxh', 1e-6, 'step'])
ns.Hpolar_seq(
 [Py, [100e3, 90, direction_deg, -100e3, 90, direction_deg, 200],
 'mxh', 1e-6, 'step'])
########################################
#Plot loop
#load all columns from file (0, 1, 2, 3) into internal arrays (0, 1, 2, 4)
ns.dp_load('amr_rawdata.txt', [0, 1, 2, 3, 0, 1, 2, 4])
#get field strength along loop direction and save it in internal array 3
ns.dp_dotprod(0, np.cos(np.radians(direction_deg)),
np.sin(np.radians(direction_deg)), 0, 3)
#save field strength and resistance in processed file, then plot it here
ns.dp_save('amr_loop.txt', [3, 4])
amr_data = ns.Get_Data_Columns('amr_loop.txt', [0, 1])
plt.axes(xlabel = 'H (kA/m)', ylabel = 'R (Ohms)', title = 'AMR Loop')
plt.plot(np.array(amr_data[0])/1e3, amr_data[1])
plt.show()

What could be the issue ?

Asynchronous data saving

Hi,

I have found one more issue - I think in Boris is missing asynchronous data saving procedure -

image

I noticed that when Boris needs to save a lot of data on the disk (and there is a connection problem or the disk is busy), calculations are stopped. Is writing files in Boris asynchronous (e.g. writing files on disk is queued in RAM and a separate process is responsible for writing them on disk)? If not, maybe it is worth to do it?

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.