Today I want to say some few words about the multithreading OOMMF in Linux.
As I know in Windows the last versions of OOMMF, like 12a4 and later (OOMMF), are basically could keep more than 1 thread and accelerate the simulations by paralleling calculations, but you may use for this multithreading Tcl/Tk. In the same time, in Linux we have a little more difficult task, because it’s insufficiently to download the last Tcl/Tk packages from the site — we must compile them with enable-threads function and below I will show how can we do it.
1. Download the last packages of Tcl and Tk from the official site Tcl/Tk and I recomend the version 8.5.13 or 8.6.0, because the version 8.4.19 sometimes gives problems.
2. When your download process was fully completed then you should unzip the packages and compile it. So go to the tcl8.X.X directory that will appear after unziping and go to the unix directory:
After that make the commands:
./configure --enable-threads make make test make install
After your compiling will complete go to the directory tk8.X.X/unix and make same commands:
./configure make make install
After this you will get totaly installed tclsh on our system, in my case I find it in the /usr/local/bin-directory, so that’s why I will use below tclsh in this way, for your system you can find it by using the command:
3. Now you should download the OOMMF package from the official site and I chose for myself the new version of it (12a5), this version is basically was created for parallel-computing as one can see from the comand output:
/usr/local/bin/tclsh8.6 oommf.tcl +platform
I think it’s more user-friendly but first things first. When you download the OOMMF package unzip it, go to the OOMMF directory and make the last command that I wrote. You must get something like this:
$ /usr/local/bin/tclsh8.6 oommf.tcl +platform oommf.tcl 184.108.40.206 info: OOMMF release 220.127.116.11, snapshot 2012.09.28 Platform Name: linux-x86_64 Tcl name for OS: Linux 3.2.0-4-amd64 C++ compiler: /usr/bin/g++ Version string: g++ (Debian 4.7.2-4) 4.7.2 Shell details --- tclsh (running): /usr/local/bin/tclsh8.6 --> Version 8.6.0, 64 bit, threaded tclsh (OOMMF): /usr/local/bin/tclsh8.6 --> Version 8.6.0, 64 bit, threaded filtersh: /home/alex/oommf/app/omfsh/linux-x86_64/filtersh --> Version 8.6.0, 64 bit, threaded tclConfig.sh: /usr/local/lib/tclConfig.sh --> Version 8.6.0 wish (OOMMF): /usr/local/bin/wish8.6 --> Version 8.6.0, Tk 8.6.0, 64 bit, threaded tkConfig.sh: /usr/local/lib/tkConfig.sh --> Tk Version 8.6.0 OOMMF threads: Yes Default thread count: 8 NUMA support: No OOMMF API index: 20120928 Temp file directory: /tmp
As you can see from this moment we can start compiling OOMMF.
4. For OOMMF compiling make next commands:
/usr/local/bin/tclsh8.6 oommf.tcl pimake upgrade /usr/local/bin/tclsh8.6 oommf.tcl pimake distclean /usr/local/bin/tclsh8.6 oommf.tcl pimake
From the moment of the end of compilation you can run your parallel simulations with the command:
/usr/local/bin/tclsh8.6 oommf.tcl boxsi -kill all sample.mif -threads N
where N – is the number of threads, by the default it set to the 4.
Enjoy the result!
For any questions: