#include <iostream>
#include <string>
#include <stdarg.h>
#include <stdio.h>
#include "output.h"
#include "MPImanager.h"

Go to the source code of this file.
Functions | |
| void | message (const char *message,...) |
| void | warning (const char *str,...) |
| void | error (const char *str,...) |
| void | fatal (const char *str,...) |
Nemo2
Copyright (C) 2006 Frederic Guillaume guillaum@zoology.ubc.ca
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
Definition in file output.cc.
| void error | ( | const char * | str, | |
| ... | ||||
| ) |
Definition at line 65 of file output.cc.
Referenced by LifeCycleEvent::attach_trait(), LCE_Disperse_base::checkBackwardDispersalMatrix(), LCE_Disperse_base::checkForwardDispersalMatrix(), TMatrix::divide(), StatHandler< SH >::execute(), BinaryDataLoader::extractPop(), TTNeutralGenesFH::FHread(), TTDeletMutBitstrFH::FHread(), BinaryDataSaver::finish(), TMatrix::get(), tstring::getBlock(), TMatrix::getColumnView(), TMatrix::getRowView(), StatHandlerBase::getStatRecIndex(), StatServices::init(), SimRunner::init(), Metapop::init(), Individual::init(), SimRunner::init_components(), LCE_StatServiceNotifier::loadStatServices(), TMatrix::minus(), TMatrix::multi(), Individual::operator=(), ParamManager::param_consistency_check(), Param::parseArgument(), Param::parseTemporalArgument(), TMatrix::plus(), BinaryDataSaver::printData(), SimRunner::printLog(), SimRunner::printLogHeader(), IndFactory::recycle(), Patch::remove(), tstring::removeEnclosingChar(), TProtoNeutralGenes::retrieve_data(), TProtoDeletMutations_bitstring::retrieve_data(), Metapop::retrieve_data(), SimRunner::run_event(), SimRunner::runPostExec(), FHLogWriter::save_simparams(), TMatrix::set(), LCE_Selection_base::set_fit_model(), LCE_Patch_Extinction::set_matrix_param(), FileHandler::set_path(), LCE_Selection_base::set_sel_model(), LCE_Disperse_base::setDispMatrix(), LCE_Breed_base::setFecundity(), LCE_Disperse_base::setIsland_PropagulePool_Matrix(), LCE_Disperse_base::setLatticeMatrix(), TProtoNeutralGenes::setParameters(), LCE_Patch_Extinction::setParameters(), LCE_Disperse_EvolDisp::setParameters(), LCE_Disperse_ConstDisp::setParameters(), LCE_Disperse_base::setParameters(), LCE_Breed_Selection::setParameters(), LCE_Breed_Disperse::setParameters(), Metapop::setPopulationParameters(), LCE_Selection_base::setSelectionMatrix(), TProtoDeletMutations_bitstring::setSelectionParameters(), LCE_Breed_base::setSexRatio(), LCE_Selection_base::setSpatialMatrix(), StatRecorder< S >::setVal(), Param::update(), LCE_Disperse_base::updateDispMatrix(), and LCE_Resize::updateParameters().
00066 { 00067 va_list(ap); 00068 00069 std::cerr<<"***ERROR*** "; 00070 00071 va_start(ap, str); 00072 #ifdef _R_OUTPUT_ 00073 REvprintf(str, ap); 00074 #else 00075 vfprintf(stderr,str, ap); 00076 #endif 00077 va_end(ap); 00078 }
| void fatal | ( | const char * | str, | |
| ... | ||||
| ) |
Definition at line 80 of file output.cc.
Referenced by tstring::__get_block(), Individual::addTrait(), Individual::create(), Individual::createTrait(), LCE_Resize::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Breed_Disperse::execute(), BinaryStorageBuffer::extend_buff(), BinaryDataLoader::extractOffsetTable(), BinaryDataLoader::extractPop(), TTNeutralGenesFH::FHread(), TTDeletMutBitstrFH::FHread(), TTDeletMutBitstrFH::FHwrite(), LCE_StatFH::FHwrite(), RAND::Gamma(), tstring::getBlock(), ParamsParser::getParameters(), Metapop::getPatchPtr(), Individual::getTrait(), TTNeutralGenes::init(), TTDeletMutations_bitstring::init(), StatHandlerBase::init(), StatRecBase::init(), LifeCycleEvent::init(), FileServices::init(), LCE_Breed_Wolbachia::inoculate_wolbachia(), TProtoNeutralGenes::loadFileServices(), Metapop::loadPopFromBinarySource(), Metapop::loadPopFromTraitFile(), Metapop::loadSourcePopulation(), main(), IndFactory::makePrototype(), Individual::operator=(), Param::parse_matrix(), BinaryDataSaver::printData(), BinaryDataSaver::printHeader(), LCE_StatFH::PrintStat_byGen(), BinaryFileParser::read(), FileParser::read(), BinaryStorageBuffer::read(), StreamParser::readUntilCharacter(), LCE_Resize::removeDesignatedPatch(), SimRunner::run(), BinaryStorageBuffer::set_buff(), ParamManager::setArgString(), ParamManager::setFilename(), Metapop::setPopulation(), ParamManager::stripFormatString(), LCE_Resize::updatePatchCapacities(), TTNeutralGenesFH::write_freq(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), and TTNeutralGenesFH::write_varcompWC().
00081 { 00082 va_list(ap); 00083 00084 std::cerr<<"***ERROR*** "; 00085 00086 va_start(ap, str); 00087 #ifdef _R_OUTPUT_ 00088 REvprintf(str, ap); 00089 #else 00090 vfprintf(stderr,str,ap); 00091 #endif 00092 va_end(ap); 00093 00094 MPIenv::abort(1); 00095 // exit(1); 00096 }
| void message | ( | const char * | message, | |
| ... | ||||
| ) |
Definition at line 37 of file output.cc.
Referenced by SimBuilder::build_currentParams(), SimRunner::Cycle(), LCE_StatServiceNotifier::execute(), LCE_FileServicesNotifier::execute(), LCE_ParamUpdaterNotifier::execute(), LCE_Resize::execute(), LCE_Cross::execute(), LCE_Patch_Extinction::execute(), LCE_Regulation::execute(), LCE_Aging::execute(), LCE_Disperse_EvolDisp::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Breed_Selection::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Breed_Disperse::execute(), LCE_Breed_Wolbachia::execute(), LCE_Breed::execute(), BinaryDataLoader::extractPop(), TTDeletMutBitstrFH::FHread(), TTDeletMutBitstrFH::FHwrite(), LCE_StatFH::FHwrite(), FileServices::init(), SimRunner::init_components(), SimRunner::init_random_seed(), Metapop::loadSourcePopulation(), IndFactory::makePrototype(), StatServices::notify(), ParamsParser::parse(), BinaryDataSaver::printData(), BinaryDataSaver::printHeader(), StreamParser::read(), FileParser::read(), SimRunner::Replicate_LOOP(), Metapop::retrieve_data(), SimRunner::run(), SimRunner::runPostExec(), LCE_Disperse_base::setLatticeMatrix(), Metapop::setPopulation(), TTNeutralGenesSH::setStatRecorders(), TTDeletMutBitstrSH::setStatRecorders(), LCE_Disperse_base::setSteppingStone1DMatrix(), StatRecorder< S >::setVal(), TTNeutralGenes::show_up(), TMatrix::show_up(), Patch::show_up(), Param::show_up(), Metapop::show_up(), Individual::show_up(), DataTable< unsigned int >::show_up(), Metapop::store_data(), BinaryDataSaver::storeData(), TTNeutralGenesFH::write_freq(), TTNeutralGenesFH::write_Fst_i(), TTNeutralGenesFH::write_FSTAT(), TTNeutralGenesFH::write_varcompWC(), and Metapop::~Metapop().
00038 { 00039 va_list(ap); 00040 00041 va_start(ap, message); 00042 #ifdef _R_OUTPUT_ 00043 Rvprintf(message, ap); 00044 #else 00045 vprintf(message,ap); 00046 #endif 00047 va_end(ap); 00048 }
| void warning | ( | const char * | str, | |
| ... | ||||
| ) |
Definition at line 50 of file output.cc.
Referenced by LCE_Resize::execute(), LCE_Cross::execute(), LCE_Breed_Selection::execute(), LCE_Breed_Wolbachia::execute(), LCE_Breed::execute(), BinaryDataLoader::extractPop(), Metapop::fillPopulationFromSource(), Param::getMatrix(), LCE_StatFH::ifExist(), FileHandler::ifExist(), Param::parseArgument(), StreamParser::readArguments(), Individual::reset(), LCE_Selection_base::set_sel_model(), ParamManager::setFilename(), LCE_Patch_Extinction::setParameters(), LCE_Disperse_base::setParameters(), Metapop::setPatchCapacities(), Metapop::setPopulation(), Metapop::setPopulationFromSource(), Metapop::setPopulationFromSourceInPreserveMode(), UpdaterServices::update_components(), LCE_Resize::updateParameters(), TTNeutralGenesFH::write_Fst_i(), and TTNeutralGenesFH::write_varcompWC().
00051 { 00052 va_list(ap); 00053 00054 std::cout<<"-WARNING- "; 00055 00056 va_start(ap, str); 00057 #ifdef _R_OUTPUT_ 00058 Rvprintf(str, ap); 00059 #else 00060 vprintf(str,ap); 00061 #endif 00062 va_end(ap); 00063 }
1.5.8 -- Nemo is hosted by