failonerror(3)

NAME
failonerror - Prints error message and terminates program

SYNOPSIS
#include "lpj.h"
void failonerror(const Config *config,int rc,int errcode,const char *msg);

DESCRIPTION
Function writes out error message and terminates program. The parallel version checks the return code on all tasks and prints error message only on task zero. The arguments of failonerror are:

config
    LPJmL configuration data. Must be initialized by initmpiconfig() or initconfig().

rc  Return code of last function call. Program will be terminated if value on any task is greater than zero.

errcode
    Value returned from main program.

msg Error message printed on error stream.

RETURN VALUE
None.

AUTHORS
Werner von Bloh (Werner.von.Bloh@pik-potsdam.de), Sibyll Schaphoff (Sibyll.Schaphoff@pik-potsdam.de), Stefanie Rost (Jachner) (Stefanie.Rost@pik-potsdam.de), Marlies Gumpenberger (Marlies.Gumpenberger@pik-potsdam.de), Tim Beringer (Erbrecht) (Tim.Beringer@pik-potsdam.de), Christoph Mueller (Christoph.Mueller@pik-potsdam.de) Jens Heinke (Jens.Heinke@pik-potsdam.de), Hester Biemans (Hester.Biemans@wur.nl), Kirsten Thonicke (Kirsten.Thonicke@pik-potsdam.de), Ursula Heyder (Ursula.Heyder@pik-potsdam.de),

SEE ALSO
initconfig(3), initmpiconfig(3)