15 | | = The code = |
| 15 | = Step By Step Guide = |
| 16 | == linking with MUSCLE == |
| 17 | PIERNIK uses own build system based on Python scripts, all set of flags used for compilation are stored in plain configuration files like this one: |
| 18 | {{{ |
| 19 | PROG = piernik |
| 20 | USE_GNUCPP = yes |
| 21 | F90 = mpif90 |
| 22 | F90FLAGS = -ggdb -fdefault-real-8 -ffree-form -std=gnu -fimplicit-none -ffree-line-length-none |
| 23 | F90FLAGS += -Ofast -funroll-loops |
| 24 | F90FLAGS += -I/software/local/libs/hdf5/1.8.9-pre1/gnu-4.7.2-ompi/include |
| 25 | LDFLAGS = -Wl,--as-needed -Wl,-O1 -L/software/local/libs/hdf5/1.8.9-pre1/gnu-4.7.2-ompi/lib |
| 26 | }}} |
| 27 | In order to link with MUSCLE 2.0 we have to alted the last lines of the file: |
| 28 | {{{ |
| 29 | ... |
| 30 | LDFLAGS = -Wl,--as-needed -Wl,-O1 -L/software/local/libs/hdf5/1.8.9-pre1/gnu-4.7.2-ompi/lib -L/mnt/lustre/scratch/groups/plggmuscle/2.0/devel-debug/lib |
| 31 | LIBS = -lmuscle2 |
| 32 | }}} |
| 33 | Then we build the code with the following command: |
| 34 | {{{ |
| 35 | # load MUSCLE |
| 36 | module load muscle2/devel-debug |
| 37 | # load PIERN dependencies (HDF5, OpenMPI, newest GNU compiler) |
| 38 | module load plgrid/libs/hdf5/1.8.9-gnu-4.7.2-ompi |
| 39 | ./setup mc_collisions_test -c gnufast -d HDF5,MUSCLE,MHD_KERNEL |
| 40 | }}} |
| 41 | |