Prerequisites

Navigate: Overview | Configuration →

Prerequisites

Download, build and run Musubi.

Download

We use Mercurial (hg) for revision control. You need to have it installed on your system in order to download Musubi. Follow these instructions if you haven't, yet. Then, create a directory for everything that happens in these tutorials (we will call this directory apes, but you can use a different name. Inside this directory, clone the Musubi repository from https://hg.osdn.net/view/apes/musubi by running

hg clone https://hg.osdn.net/view/apes/musubi

in your console. If this worked, you have an up-to-date copy of the Musubi source code, which we will compile now.

If you already cloned Musubi you can update Musubi via:

hg pull
hg up

Build

We use the waf build system, you can learn more about it from its website. Also, you need MPI installed on your system, see for example the OpenMPI website for instructions. Finally, you need to set environment variables FC and CC in order to assign the correct Fortran and C compilers to waf. The compilers should point to the MPI wrappers from your MPI installation. Typically these are mpif90 (Fortran) and mpicc (C). Set them with the bash commands

export CC=mpicc; export FC=mpif90

If you updated Musubi you need yo clean the old build and the coco preprocessor. If you cloned Musubi there is no need to do so.

./waf cleanall

Once you have done all this, navigate to your Musubi directory and use the command

./waf configure

to configure the compilation.

We are now ready to compile Musubi. Run

./waf build

to get a Musubi executable including Mus_Harvester for post-processing in the build subdirectory. To compile musubi only add the following argument:

--target="musubi"

If the compilation finishes without errors, you have Musubi ready to run your first test case!

Run

To check your Musubi-installation, navigate to your musubi directory and create a required tracking directory for the output with

mkdir tracking

Execute Musubi with

./build/musubi

which should result in loads of output, ending with a message similar to

Done with Musubi in [s]    1.864378E-01

indicating that everything worked fine. If you get any errors up to here, read the instructions again and follow them carefully. You need to have this running before you proceed.

Mesh Generation and Post-Processing

Most of the tutorials will require creation of a mesh and some post-processing of the results. The corresponding tools in our toolchain "APES tool chain" are Seeder for mesh-generation, for post-processing Seeder-Harvesting and Musubi-Harvesting. The installation procedure for Seeder is very similar to Musubi. Again, navigate to your apes directory and run

hg clone https://hg.osdn.net/view/apes/seeder

to get a fresh copy of Seeder. Compile it by running

cd seeder
./waf configure build

and fix any errors before you proceed.

Once you are done with all that, we can start defining our first simulation.

Troubleshooting

Once you get errors running Musubi, it is possible that something is wrong with your code version. In order to get more detailed information concerning the errors you can type this command inside the musubi directory which is apes/musubi/ as default:

./waf distclean configure debug

If you run your simulation once again, you will get more information about the files that cause errors.

Now, you have to run Musubi from a different directory which is /build/debug/musubi instead of /build/musubi.

Next chapter: Configuration →