Professional Documents
Culture Documents
GUIDE FOR INSTALLING ``nsim``/``nmag`` all FROM SOURCES (big tar ball)
======================================================================
Installation requirements
-------------------------
Download
--------
Installation
------------
At this point you should know that, once the package has been compiled,
you won't be able to move the nmag-0.2.0 directory to another location.
Doing so would make the package unusable, since absolute paths are hard-coded
inside the executables.
Therefore be sure to unpack the package into an appropriate directory.
Enter the directory just created by the tar command (which should be
named "nmag-0.2.0")::
$ cd nmag-0.2.0
$ make
If all goes well, nsim can be started once the 'make' command has completed::
$ ./nsim/bin/nsim
>>>
then ``nsim`` was compiled successfully from source. (However, the libreadline-dev
libraries were missing, and thus the prompt is not an Interactive Python prompt.)
If::
$ ./nsim/bin/nsim
In [1]:
then libreadline-dev has been found during the compilation, and the prompt
resembles the IPython prompt.
For the widespread ``bash`` shell, this can be done with these
commands::
$ cd nmag-0.2.0
$ make hints
Note that there are other shells which behave differently from bash,
such as in particular cshell or tcshell. For these in particular, the
command to set environment variables is ``setenv`` rather than
``export``.
$ cd nmag-0.2.0
$ make check
This should take less than one minute to complete. If the output finishes with ::
The l tests that have been skipped, take a bit more computation time (of the
order of 1 hour). To test them as well, one can use::
$ cd nmag-0.2.0
$ make checkslow
If, after completion of either of these checks, the last line reads::
then m tests have failed. You will also get further debug output
following this summary line.
The following messages are typical for the output of ``make check`` if the zlib
library was not present *during the compilation of nmag*. (This relates to the
pytables python module using hdf5 which in turn relies on zlib to read and write
compressed data.)
::
regression/nmesh/import/gmsh1_0/test_gmsh1_0_import.py[2] .F
../../../nsim/mpi/test_mpi_hello.py[2] ss
../../../unit/nmeshmirror/test_nmeshmirror.py[1] .
../../../unit/pycaml/test_refcount.py[1] .
../../../unit/pycaml/test_trial.py[2] ..
../../nmag/bigbar/mpi/test_slow_mpi_bigbar.py[2] ss
../../nmag/bigbar/nmag4/test_slow_bigbar.py[2] ss
../../nmag/bugs/twohmx/test_hlib_twohmx.py[1] s
../../nmag/demag_twomat/test_slow_bug_ticket175.py[1] s
../../nmag/nmagprobe/test_all.py[1] F
../../nmag/pymodules/test_python_modules_installed.py[1] .
../../nmag/restart/test_restart.py[1] .
../../nmesh/import/gmsh1_0/test_gmsh1_0_import.py[2] .F
../../../nsim/mpi/test_mpi_hello.py[2] ss
../../../../unit/nmeshmirror/test_nmeshmirror.py[1] .
../../../unit/pycaml/test_refcount.py[1] .
../../../unit/pycaml/test_trial.py[2] ..
<snip>
[/home/test/local/nmag-0.2.0/nsim/interface/nmeshlib/lib1.py:853]
- - - - - - - - test_gmsh_1_0_import_gzipped: recorded stdout - - - - - - - - -
root:2011-12-07 11:24:05,242 nmesh_exceptions.py 8 CRITICAL Exception
type: NmeshUserError
root:2011-12-07 11:24:05,243 nmesh_exceptions.py 9 CRITICAL Exception
msg : file 'sphere2.nmesh' does not exist
________________________________________________________________________________
======= tests finished: 52 passed, 4 failed, 16 skipped in 18.17 seconds =======
root:2011-12-07 11:24:05,664 shell.py 85 WARNING SystemExit with
exit_status=1
make[1]: *** [check] Error 1
make[1]: Leaving directory `/home/test/local/nmag-0.2.0/nsim/tests'
.. comment:
$ cd nmag-0.2.0
$ cd nsim/tests/regression/nmag/bigbar
$ make check
$ gv results/results.eps
This graph shows the time evolution of the three components of the
mean magnetization for a Permalloy bar of size 30 nm x 30 nm x 100
nm. There should be good agreement between the ``nsim`` data and those
produced using ``OOMMF`` and ``Magpar`` for the same problem.
$ rm -rf nmag-0.2.0
The packages which are more likely to be missing are ``gawk`` and
``readline``.
These are widespread developer tools and --- as for ``gawk`` --- the
operating system distribution should provide an easy way to install
them.
The same holds for the ``lapack`` and the ``blas`` linear algebra
libraries.
Debian/Ubuntu
+++++++++++++
Mac OS X
++++++++
The Nmag 0.1 software has been compiled successfully (and without intervention)
on the following systems:
- Dual Xeon quad core processors, 2.4 GHz, 24GB RAM, Red Hat Enterprise Linux
Desktop 5.3
- Fedora 12
- Aspire One Netbook running the (Fedora based) Linux Linpus Lite
on intel Atom processor. The user reports that the 'diffutils'
package on the Linpus is broken and stopped the installation. He
downloaded the original diffutils from the GNU webpage, installed
this. Afterwards, Nmag compiled automatically from source (Dec 2008).
The Nmag 0.2 software has been compiled successfully (and without intervention)
on the following systems:
- Ubuntu 11.04
.. _FAQ:
.. contents::
:local:
What is all this talk about ``nsim`` --- Isn't the package named ``nmag``?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See `Platforms that compile nmag from source`_ for a list of systems on
which a successful compilation has been reported.
You have just installed ``nsim``. And ``nsim_i`` works, but the
``nsim_i`` output is not coloured and the auto-completition is not
available either.
$ cd nmag-0.2.0
$ rm -rf .deps_python_* python/
$ make .deps_python_install
$ make --dry-run | grep touch | sh
How can I recompile the ``nsim`` package, *together* with all the required
libraries*?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
$ cd nmag-0.2.0
$ make uninstall
$ make
Note that ``make uninstall`` will remove all the files produced by a
previous compilation of ``nsim``. So, all the programs and libraries
required by ``nsim`` will be rebuilt by these commands (this can take
some time).
Can I free some (unused) disk space after compiling nsim from source?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You have compiled ``nsim`` from source and it occupies more about 1.4 GB
of space on your hard-drive. Some directories which were necessary for
the compilation can be removed after the compilation has finished. The
command is::
$ cd nmag-0.2.0
$ make clean
If (for some strange reason) you want to execute the binary files
under ``.../nmag-0.2.0/bin``, these definitions have to be pre-loaded
into the shell. For example, to start the Objective Caml interpreter
that is compiled as part of the ``nsim`` installation from source, you
could use::
$ cd nmag-0.2.0
$ . exports.bash
$ ./bin/ocaml
This should not be necessary for normal users. If you are a developer
and you are extending the ``nsim`` OCaml core, then this is what you
need::
$ cd nmag-0.2.0
$ . exports.bash
$ cd nsim # enter the nsim source directory
$ make
$ cd nmag-0.2.0
$ rm nsim/config/configuration.inc
$ make
Note that the ``make`` command is used from the main ``nmag-0.2.0``
directory, not ``nmag-0.2.0/nsim``. These commands will configure
``nsim`` by running ``nmag-0.2.0/config/configure.py`` and passing to it
the proper command line options to specify the paths of the required
libraries.
$ cp /usr/lib/libz.so.* nmag-0.2.0/lib
Known issues
------------
$ cd nmag-0.2.0
$ export LDFLAGS=-lgfortran
$ make
.. _fink: http://finkproject.org/
.. _`nsim developers`: nmag@soton.ac.uk