NDSPMHD Documentation: home | installing | running the examples | basic tutorial | references

Installing/compiling the NDSPMHD code

See the main NDSPMHD page for details about the code.

System requirements

The basic requirements for compiling and running ndspmhd are simply a reasonably modern Fortran compiler. The instructions below assume a unix-based operating system (e.g., Linux or Mac OS/X). There is no reason in principle why ndspmhd should not run under Windows, but I can offer no support in this regard (likewise for SPLASH).

Getting a Fortran compiler

As NDSPMHD is written in Fortran 90, you will need to have a modern Fortran compiler installed. Options include:

Compiling the code

Uncompress the tar file:

tar xvfz ndspmhd-v2.0.tar.gz
and enter the directory
cd ndspmhd
Compile the code by typing "make" whilst specifying the number of spatial dimensions, e.g.
make 1D
which gives the following error
make: WARNING: value of SYSTEM =  not recognised...
=>set the environment variable SYSTEM to one listed 
  in the Makefile and try again

I suggest one of the following, based on detected Fortran compilers...

make SYSTEM=gfortran
make SYSTEM=g95
(end of possible selections)
settings for different SYSTEMs are listed in src/Makefile. Either choose one suggested above or add your own customised setup in src/Makefile. Compile for your chosen system using (e.g.)
make SYSTEM=gfortran 2D
or by setting SYSTEM as an environment variable, e.g. in bash:
export SYSTEM=gfortran;
make 2D

Compiling the code will produce a binary called either 1DSPMHD, 2DSPMHD or 3DSPMHD in the root-level ndspmhd directory.

Running the exercises...

Once the code has compiled successfully, you should proceed to running the examples.

next »

« ndspmhd home