OOMMF Tutorial Part 8: OOMMF on HPC

By | February 5, 2015


HPC facilities can be very useful for speeding up OOMMF calculations, both in terms of number of cores you can throw at the problem, and the number of simultaneous calculations you can run at once.

This post is a few tips and tricks I’ve picked up as I’ve been using OOMMF on HPC.

Installing OOMMF on an HPC

You almost certainly don’t have root access on your HPC account. To install OOMMF without root, I suggest you read this guide.

Check your mif files

For the most part your desktop and HPC mif files will be identical, but be careful about setting the scripts to automatically display on mmDisp or mmGraph. This will almost certainly cause your job to hang, probably without any error being reported – very frustrating!

Be clever about automatic saving

If space allows, set your mif file to automatically save the omf magnetisation output every 1000 steps or so, this means that if you do happen to reach your computation time limit, you won’t have to go back to the start when you re-run your calculation.

But do keep in mind the point above – don’t try to automatically display the data on the HPC.

Use a master script

For large jobs I like to use a python master script – like this one here. This helps me organise my submissions and outputs, and allows me to quickly and easily iterate through various parameters I might be interested in.

OOMMF Tutorial

8 thoughts on “OOMMF Tutorial Part 8: OOMMF on HPC

  1. Cupio Scire

    I can not run script with Oxs_ImageAtlas in the cluster.
    Boxsi run end.
    oommf.tcl panic:
    child process exited abnormally

    1. deparkes

      Could you show me your mif file? It might be that there is a problem there.

      1. Cupio Scire

        Specify Oxs_ImageAtlas:picture {
        xrange {0 30e-9}
        yrange {0 30e-9}
        zrange {0 10e-9}
        image picture1.gif
        viewplane xy
        colormap {
        white iron
        black cobalt
        Specify Oxs_MultiAtlas:atlas {
        atlas :picture

        In my personal machine I run normally, but not in the cluster.

        1. deparkes

          It’s interesting that it works on your own machine, but not the cluster.

          When you run it on your own machine, do you run it with boxsi? Or load it through the oxsi interface?

          Are you able to share your whole mif file? That might make it easier to see what might be wrong.

          1. Cupio Scire

            Yes, I’m using boxsi on both machines. Sorry, but I can not share the complete file.

            The boxsi.errors file says:

            Error thrown from inside “Oxs_ExtCreateAndRegister” — Incomplete or incorrect initialization — Error detected; refer to program source file /home/home1/labpc/oommf/pkg/nb/imgobj.cc, line 291, in class Nb_ImgObj, member function LoadFile.
            ERROR DETAILS: Oxs_Ext initialization error in construction of Oxs_ImageAtlas:magnetic — Premature EOF reading child process any2ppm output plus error closing input channel from file “r10.gif”.
            while executing
            “Oxs_ExtCreateAndRegister $key $init_str”
            (‘Oxs_Mif’ instance method ‘ReadMif’ line 130)
            invoked from within
            “_Oxs_Mif0 ReadMif /home/home1/labpc/test/test_1.mif {}”
            invoked from within
            “Oxs_ProbInit $f $MIF_params ”
            Additional info: OOMMF {} {Incomplete or incorrect initialization} -1


          2. deparkes

            Hmm. So it looks to me like your problem is with the conversion of your gif imagefile to a ppm. A few possible options come to mind:

            Reading the docs about anyppm (http://math.nist.gov/oommf/doc/userguide12a6/userguide/Bitmap_File_Format_Conversi.html – see the section on “Tk requirement”) it looks like you might have problems if Tk isn’t quite right on the cluster. This is very likely as Tk is usually used for visualisation, not something typically done on a cluster.

            So… What you could try is to do the conversion from gif to ppm before running the file on the cluster. The link above gives you the details of how do this, but it is quite easy. Something like:

            tclsh oommf.tcl any2ppm r10.gif

            should produce the ppm file you need. Copy this across to your cluster (same directory as r10.gif), and modify your mif file to have r10.ppm, rather than r10.gif.

            With any luck that will do the trick.

            The docs link above also talks about someother things you can do with Tk, but they looked more complicated than converting the image on your own machine.

  2. Shaik Wasef

    After I submit the job and include the above lines for saving the display and graph in my folder .. I dont find the files after the job is done

    1. deparkes

      Have you checked in the OOMMF root folder (i.e. where the oommf.tcl runs from)? Unless you specifiy otherwise, this is where the output is likely to be saved by default.

      I’ve written some more about this in the comments to this video: https://www.youtube.com/watch?v=-mJew6JYRZk – basically there is an option called ‘basename’ which lets you control the output location and filename. Exactly what you need to do depends on whether you are using MIF 2.1 or MIF 2.2 files (http://math.nist.gov/oommf/doc/userguide12b0/userguide/Standard_Oxs_Ext_Child_Clas.html#TD)

Comments are closed.