Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
output.cc File Reference
#include <iostream>
#include <string>
#include <stdarg.h>
#include <stdio.h>
#include "output.h"
#include "MPImanager.h"

Functions

void message (const char *message,...)
 
void warning (const char *str,...)
 
int error (const char *str,...)
 
void fatal (const char *str,...)
 
void abort ()
 

Variables

bool SILENT_RUN = false
 

Detailed Description

Id
output.cc,v 1.10 2015-07-13 08:52:58 fred Exp

Nemo2

Copyright (C) 2006-2015 Frederic Guillaume frede.nosp@m.ric..nosp@m.guill.nosp@m.aume.nosp@m.@ieu..nosp@m.uzh..nosp@m.ch

This file is part of Nemo

Nemo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Nemo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

created on

Date
08.09.05
Author
fred

Function Documentation

◆ abort()

void abort ( )
116{
117 std::cerr<<"***ERROR*** Aborting the simulation.\n";
118
119 MPIenv::abort(1);
120}
static void abort(int i)
Definition: MPImanager.cc:60

References MPIenv::abort().

Referenced by LCE_Breed_Selection_Disperse::breed_selection_disperse().

+ Here is the caller graph for this function:

◆ error()

int error ( const char *  str,
  ... 
)
78{
79 va_list(ap);
80
81 std::cerr<<"***ERROR*** ";
82
83 va_start(ap, str);
84
85#ifdef _R_OUTPUT_
86 REvprintf(str, ap);
87#else
88 vfprintf(stderr,str, ap);
89#endif
90
91 va_end(ap);
92
93 return 0;
94}

Referenced by LifeCycleEvent::attach_trait(), LCE_Disperse_base::checkBackwardDispersalMatrix(), LCE_Disperse_base::checkForwardDispersalMatrix(), TMatrix::copy_recycle(), TMatrix::divide(), BinaryDataLoader::extractPop(), FHPedigreeReader::FHread(), TTDeletMutBitstrFH::FHread(), TTNeutralGenesFH::FHread(), TTQuantiFH::FHread(), BinaryDataSaver::finish(), LCE_Cross::generatePedigree(), tstring::getBlock(), TMatrix::getColumnView(), GeneticMap::getGeneticMap(), TMatrix::getRowView(), Individual::init(), Metapop::init(), SimRunner::init(), StatServices::init(), FileServices::init(), SimRunner::init_components(), TProtoQuanti::loadFileServices(), LCE_StatServiceNotifier::loadStatServices(), IndFactory::makePrototype(), TMatrix::minus(), TMatrix::multi(), FHLogWriter::open_logfile4writing(), Individual::operator=(), ParamManager::param_consistency_check(), Param::parseArgument(), Param::parseTemporalArgument(), TMatrix::plus(), SimRunner::printLog(), SimRunner::printLogHeader(), BinaryDataSaver::printOffsetTable(), IndFactory::recycle(), Patch::remove(), tstring::removeEnclosingChar(), GeneticMap::reset_tables(), TProtoDeletMutations_bitstring::resetParameterFromSource(), TProtoNeutralGenes::resetParameterFromSource(), Metapop::retrieve_data(), TProtoDeletMutations_bitstring::retrieve_data(), SimRunner::run_event(), SimRunner::runPostExec(), SimRunner::runPostExecReplicateWise(), TMatrix::set(), LCE_Selection_base::set_fit_model(), LCE_Selection_base::set_local_optima(), LCE_Patch_Extinction::set_matrix_param(), ParamSet::set_param(), LCE_Selection_base::set_param_rate_of_change(), ParamManager::set_parameters(), FileHandler::set_path(), LCE_Selection_base::set_sel_model(), ParamManager::setArgString(), LCE_Disperse_base::setBaseParameters(), LCE_Disperse_base::setBasicLatticeMatrix(), TProtoQuanti::setContinuousMutationModel(), TProtoQuanti::setDiallelicMutationModel(), LCE_Disperse_base::setDispMatrix(), TProtoQuanti::setDominanceParameters(), TProtoDeletMutations_bitstring::setEffectsFromInput(), LCE_Breed_base::setFecundity(), TTProtoWithMap::setGeneticMapParameters(), LCE_Disperse_base::setIsland_PropagulePool_Matrix(), LCE_Disperse_base::setLatticeMatrix(), TProtoQuanti::setMutationParameters(), TProtoDispersal::setNonRandom(), LCE_Breed_Selection::setNonSelectedTraitTable(), TTProtoWithMap::setNumLociPerChromosome(), LCE_Breed_Disperse::setParameters(), LCE_Breed_Selection::setParameters(), LCE_Disperse_EvolDisp::setParameters(), LCE_Patch_Extinction::setParameters(), LCE_QuantiInit::setParameters(), LCE_QuantiModifier::setParameters(), LCE_Selection_base::setParameters(), TProtoBDMI::setParameters(), LCE_Init_BDMI::setParameters(), TProtoDeletMutations_bitstring::setParameters(), TProtoNeutralGenes::setParameters(), LCE_NtrlInit::setParameters(), TProtoQuanti::setParameters(), LCE_Disperse_ConstDisp::setParameters(), LCE_Init_BDMI::setPatchFreq(), Metapop::setPopulationParameters(), TProtoDispersal::setRandom(), LCE_Disperse_base::setReducedMatricesBySex(), LCE_Selection_base::setSelectionMatrix(), TProtoDeletMutations_bitstring::setSelectionParameters(), LCE_Breed_base::setSexRatio(), setSpatialMatrix(), Param::update(), LCE_Disperse_base::updateDispMatrix(), and LCE_Resize::updateParameters().

◆ fatal()

void fatal ( const char *  str,
  ... 
)
97{
98 va_list(ap);
99
100 std::cerr<<"***ERROR*** ";
101
102 va_start(ap, str);
103
104#ifdef _R_OUTPUT_
105 REvprintf(str, ap);
106#else
107 vfprintf(stderr,str,ap);
108#endif
109
110 va_end(ap);
111
112 MPIenv::abort(1);
113}

References MPIenv::abort().

Referenced by tstring::__get_block(), GeneticMap::addTrait(), Individual::addTrait(), ParamManager::build_records(), ParamsParser::callMacro(), Individual::create(), Individual::createTrait(), ParamsParser::diag_matrix(), LCE_Breed_Disperse::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Resize::execute(), BinaryStorageBuffer::extend_buff(), BinaryDataLoader::extractOffsetTable(), BinaryDataLoader::extractPop(), FHPedigreeReader::FHread(), TTDeletMutBitstrFH::FHread(), TTNeutralGenesFH::FHread(), TTQuantiFH::FHread(), LCE_SelectionFH::FHwrite(), MPFileHandler::FHwrite(), LCE_StatFH::FHwrite(), TTBDMI_FH::FHwrite(), TTDeletMutBitstrFH::FHwrite(), TTQuantiFH::FHwrite(), TTQFreqExtractor::FHwrite(), TTWolbachiaFH::FHwrite(), TMatrix::get(), ParamSet::get_param(), Param::getArgumentFromFile(), tstring::getBlock(), ParamsParser::getMacroArgs(), ParamsParser::getMacroParamValue(), ParamsParser::getMacroSepParamChar(), ParamsParser::getParameters(), Metapop::getPatchPtr(), FileServices::getSampledPop(), TTQuantiSH::getSNPalleleFreqInPatch(), Individual::getTrait(), StatHandlerBase::init(), TT_BDMI::init(), TTDeletMutations_bitstring::init(), TTNeutralGenes::init(), FileServices::init(), LifeCycleEvent::init(), TTDispersal::init_sequence(), LCE_Selection_base::loadFileServices(), Metapop::loadFileServices(), LCE_FileServicesNotifier::loadFileServices(), TProtoNeutralGenes::loadFileServices(), TProtoQuanti::loadFileServices(), Metapop::loadPopFromBinarySource(), Metapop::loadPopFromTraitFile(), Metapop::loadSourcePopulation(), main(), LCE_Breed_Selection::makeOffspringWithSelection(), IndFactory::makePrototype(), ParamsParser::matrix(), nChooseK(), Individual::operator=(), Param::parse_matrix(), ParamsParser::parseMacroFunctionBlock(), BinaryDataSaver::printData(), BinaryDataSaver::printHeader(), BinaryDataSaver::printOffsetTable(), LCE_StatFH::PrintStat_byGen(), ParamsParser::rbernoul(), FileParser::read(), BinaryFileParser::read(), BinaryStorageBuffer::read(), StreamParser::readArguments(), StreamParser::readUntilCharacter(), LCE_Resize::removeDesignatedPatch(), ParamsParser::rep(), ParamsParser::rexp(), ParamsParser::rgamma(), ParamsParser::rlognorm(), ParamsParser::rnorm(), ParamsParser::rpoiss(), SimRunner::run(), ParamsParser::runif(), ParamsParser::seq(), BinaryStorageBuffer::set_buff(), ParamManager::set_parameters(), ParamManager::setArgString(), LCE_SelectionSH::setDataTable(), TTQuantiSH::setDataTables(), BinaryDataSaver::setFileDescriptor(), ParamManager::setFilename(), TTDeletMutBitstrSH::setLethalEquivalents(), GeneticMap::setLookupTable(), LCE_Breed_base::setMatingSystem(), LCE_StatServiceNotifier::setOccurence(), StatServices::setOccurrences(), TTQuantiFH::setOutputOption(), LCE_QuantiInit::setParameters(), LCE_QuantiModifier::setParameters(), TProtoQuanti::setParameters(), TTQuantiSH::setStats(), StatRecorder< S >::setVal(), ParamManager::stripFormatString(), FileServices::subSamplePatch(), ParamsParser::sym_matrix(), ParamsParser::tempseq(), GeneticMap::unregisterTrait(), LCE_Resize::updatePatchCapacities(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), TTNeutralGenesFH::write_GENEPOP(), TTNeutralGenesFH::write_PLINK(), TTQuantiFH::write_PLINK(), TTNeutralGenesFH::write_TAB(), TTQuantiFH::write_TABLE(), and TTNeutralGenesFH::write_varcompWC().

◆ message()

void message ( const char *  message,
  ... 
)
41{
42
43 if(SILENT_RUN) return;
44
45 va_list(ap);
46
47 va_start(ap, message);
48
49#ifdef _R_OUTPUT_
50 Rvprintf(message, ap);
51#else
52 vprintf(message,ap);
53#endif
54
55 va_end(ap);
56}
bool SILENT_RUN
Definition: output.cc:37
void message(const char *message,...)
Definition: output.cc:40

References message(), and SILENT_RUN.

Referenced by SimBuilder::build_currentParams(), ParamsParser::callMacro(), ParamSet::check_consistency(), Metapop::clear(), IndFactory::clearPrototype(), SimRunner::Cycle(), LCE_Breed::execute(), LCE_Breed_Disperse::execute(), LCE_Breed_Selection::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Disperse_EvolDisp::execute(), LCE_Regulation::execute(), LCE_Aging::execute(), LCE_Patch_Extinction::execute(), LCE_Cross::execute(), LCE_Resize::execute(), LCE_Breed_Quanti::execute(), LCE_Selection_base::execute(), LCE_ParamUpdaterNotifier::execute(), LCE_FileServicesNotifier::execute(), LCE_StatServiceNotifier::execute(), LCE_Breed_Wolbachia::execute(), BinaryDataLoader::extractOffsetTable(), BinaryDataLoader::extractPop(), FHPedigreeReader::FHread(), LCE_StatFH::FHwrite(), TTDeletMutBitstrFH::FHwrite(), FileServices::getSampledPop(), TTQuantiSH::getVaNoDominance(), TTQuantiSH::getVaWithDominance(), FileServices::init(), SimRunner::init_components(), SimRunner::init_random_seed(), Metapop::loadPopFromBinarySource(), Metapop::loadSourcePopulation(), FileServices::log(), IndFactory::makePrototype(), message(), LCE_Breed_base::NonWrightFisherPopulation(), LCE_Breed_Quanti::NonWrightFisherPopulation(), StatServices::notify(), ParamsParser::parse(), BinaryDataSaver::printHeader(), BinaryDataSaver::printOffsetTable(), FileParser::read(), StreamParser::read(), SimRunner::Replicate_LOOP(), SimRunner::reset(), SimRunner::reset_services(), Metapop::retrieve_data(), SimRunner::run(), SimRunner::runPostExec(), SimRunner::runPostExecReplicateWise(), TProtoQuanti::set_mutation_matrix_decomposition(), ParamManager::set_parameters(), TProtoQuanti::setContinuousMutationModel(), LCE_Disperse_base::setLatticeMatrix(), TProtoBDMI::setParameters(), Metapop::setPopulation(), Metapop::setPopulationFromSourceInPreserveMode(), LCE_Disperse_base::setReducedDispMatrix(), MPStatHandler::setStatRecorders(), TTBDMI_SH::setStatRecorders(), TTDeletMutBitstrSH::setStatRecorders(), TTDispersalSH::setStatRecorders(), TTNeutralGenesSH::setStatRecorders(), TTQuantiSH::setStatRecorders(), LCE_Disperse_base::setSteppingStone1DMatrix(), StatRecorder< S >::setVal(), DataTable< T >::show_up(), Individual::show_up(), Metapop::show_up(), Patch::show_up(), Param::show_up(), ParamSet::show_up(), TMatrix::show_up(), TTDispersal::show_up(), TTNeutralGenes::show_up(), TTQuanti::show_up(), START_MESSAGE(), Metapop::store_data(), BinaryDataSaver::storeData(), LCE_Breed_base::WrightFisherPopulation(), LCE_Breed_Quanti::WrightFisherPopulation(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), TTNeutralGenesFH::write_GENEPOP(), TTNeutralGenesFH::write_PLINK(), TTQuantiFH::write_PLINK(), TTNeutralGenesFH::write_TAB(), TTQuantiFH::write_TABLE(), TTNeutralGenesFH::write_varcompWC(), Metapop::~Metapop(), SimBuilder::~SimBuilder(), and SimRunner::~SimRunner().

◆ warning()

void warning ( const char *  str,
  ... 
)
59{
60 if(SILENT_RUN) return;
61
62 va_list(ap);
63
64 std::cout<<"\n>>>> WARNING::";
65
66 va_start(ap, str);
67
68#ifdef _R_OUTPUT_
69 Rvprintf(str, ap);
70#else
71 vprintf(str,ap);
72#endif
73
74 va_end(ap);
75}

References SILENT_RUN.

Referenced by TTQuantiSH::addEigen(), TTQuantiSH::addEigenPerPatch(), TTQuantiSH::addEigenValues(), TTQuantiSH::addEigenValuesPerPatch(), TTQuantiSH::addEigenVect1(), TTQuantiSH::addEigenVect1PerPatch(), LCE_Breed_Selection_Disperse::breed_selection_disperse(), ParamSet::check_consistency(), LCE_Breed::execute(), LCE_Breed_Selection::execute(), LCE_Cross::execute(), LCE_Resize::execute(), LCE_Breed_Quanti::execute(), LCE_Breed_Wolbachia::execute(), BinaryDataLoader::extractPop(), Metapop::fillPopulationFromSource(), LCE_Cross::generatePedigree(), Param::getMatrix(), Param::getVariableMatrix(), FileServices::init(), TProtoNeutralGenes::loadFileServices(), Param::parseArgument(), TProtoBDMI::retrieve_data(), TProtoDeletMutations_bitstring::retrieve_data(), TProtoNeutralGenes::retrieve_data(), SimRunner::run(), LCE_Cross::sampleWithinPop(), ParamManager::set_parameters(), FileHandler::set_path(), LCE_Selection_base::set_sel_model(), LCE_Disperse_base::setBaseParameters(), TProtoQuanti::setContinuousMutationModel(), TProtoQuanti::setDiallelicMutationModel(), ParamManager::setFilename(), TTProtoWithMap::setGeneticMapParameters(), LCE_Patch_Extinction::setParameters(), LCE_QuantiInit::setParameters(), TProtoDispersal::setParameters(), Metapop::setPatchCapacities(), Metapop::setPopulation(), Metapop::setPopulationFromSource(), Metapop::setPopulationFromSourceInPreserveMode(), TTQuantiSH::setStats(), UpdaterServices::update_components(), LCE_Resize::updateParameters(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_PLINK(), and TTQuantiFH::write_PLINK().

Variable Documentation

◆ SILENT_RUN

bool SILENT_RUN = false

Referenced by SimRunner::init(), message(), and warning().


Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR