Boris v2.8g ported to Linux

 

I finally got around to porting the code to Linux-based OS, tested on Ubuntu 20.04. The latest source can be found on github: https://github.com/SerbanL/Boris2, which contains full instructions on compiling from source using a makefile. Both the CPU and GPU computational routines have been ported, but the graphical console available in the Windows compilation has not been ported yet for Linux. The reason for this, initially I’ve written the graphical interface using DirectX11 calls, so the plan is at some point in the near future to rewrite this into a portable graphical interface with SFML. For now however only a basic text console is available for Linux (this was initially intended just for debugging purposes as it’s really just the graphical console text output with all the text formatting specifiers stripped out), but the code is fully functional on Linux and can be conveniently controlled using Python scripts.

 

I’ve run a quick benchmarking test to compare performance for CPU and GPU computations in Windows and Linux (Ubuntu). On Windows the code was compiled with MSVC compiler, whilst on Ubuntu the code was compiled with g++. The results are shown in the figure below. You can download the python script and simulation file used to generate this – see links at the end.

 

The results for GPU computations are very close, with the Linux version running slightly faster especially for small problem sizes. The results for CPU computations are close for medium to large problem sizes, but slightly surprising for small problem sizes as I didn’t expect to see almost any difference (after all g++ and MSVC are both top notch compilers and can produce highly optimized code – I don’t expect the operating system makes much difference in terms of performance). The code runs slower on Linux for small problem sizes on the CPU, which is due to sub-optimal CPU usage. I didn’t investigate this thoroughly yet, but on first look this seems to be due to different FFTW3 performance on Linux and Windows (with demag field disabled benchmarking results are nearly identical). It could be the FFTW3 installation on Linux needs some tweaking to run as efficiently as possible so I’ll be looking into this.

 

The code version is 2.8 gamma. I need to update the manual and examples, and run an exhaustive testing cycle, but after this I’ll release v2.8, and this will finally be followed by a dedicated publication on Boris before I do any more development.

 

Python script and simulation file used for benchmarking (download, unzip, and run the bench.py script – this needs the bench.bsm simulation file and NetSocks.py module included):

http://boris-spintronics.uk/sim_files/bench.zip

 

2 thoughts on “Boris v2.8g ported to Linux”

    1. Great, I’ve updated the post with a bench.zip file at the end – this should download rather than open in a new page. bench.bsm is the simulation file that Boris loads, and you need to run the bench.py Python script which controls the benchmarking and produces results like in the graph.

Leave a Reply

Your email address will not be published.