Skip to content

Compiling VLSV Library

Arto Sandroos edited this page Jul 2, 2015 · 1 revision

Configuration

Architecture-dependent compiler, linker, and archiver flags are set in Makefile.arch file(s), where ".arch" is file suffix for your architecture. For example, in server called meteo flags are set in Makefile.meteo. You need to make your own copy of Makefile.arch file and set correct flags. Currently you need to set C++ compiler and linker flags, define the name of archiver, and set include and library paths to SILO library (needed by vlsv2silo). Note that you should not touch Makefile file.

Here is an example architecture Makefile here:

##############################################
###         ARCHITECTURE-DEPENDENT         ###
### MAKEFILE FOR VLSV PARALLEL FILE FORMAT ###
###                                        ###
###    Make a copy of this file and edit   ###
###     include and library paths below    ###
##############################################

# Compiler and its flags. Leave FLAGS empty, it is
# intended to be used to override the options given here.
# For example,
# make "FLAGS=-O0 -g" "ARCH=arch"
# would re-set optimization level to 0 and define debugging flag -g.

# Name of MPI compiler and its flags:
CMP = mpic++
CXXFLAGS = -O3 -std=c++0x -Wall
FLAGS =

# Name of archiver:
AR = ar

# SILO include and library paths:
INC_SILO=-I<path to SILO include dir>
LIB_SILO=-L<path to SILO library dir> -lsilo

Compilation

After you have created your own architecture Makefile, for example Makefile.myarch, compile VLSV library using make:

> make "ARCH=myarch"

Upon successful compilation VLSV library file libvlsv.a should appear in the directory.