1
0
Fork 0
mirror of https://github.com/cosmo-sims/monofonIC.git synced 2024-09-19 17:03:45 +02:00

renaming (csoca->music)

This commit is contained in:
Oliver Hahn 2020-04-04 20:27:51 +02:00
parent 8c24becc92
commit 2315515305
26 changed files with 234 additions and 231 deletions

2
external/class vendored

@ -1 +1 @@
Subproject commit 083efeb043fca85418c1ea02f062be111b970b28
Subproject commit 52bc3126fca4415c4f541d47d43ffdb9763e0464

View file

@ -66,7 +66,7 @@ public:
if (!ss.eof()) {
//.. conversion error
csoca::elog << "Error: conversion of \'" << ival << "\' failed."
music::elog << "Error: conversion of \'" << ival << "\' failed."
<< std::endl;
throw ErrInvalidConversion(std::string("invalid conversion to ") +
typeid(out_value).name() + '.');
@ -80,7 +80,7 @@ public:
std::ifstream file(FileName.c_str());
if (!file.is_open()){
csoca::elog << "Could not open config file \'" << FileName << "\'." << std::endl;
music::elog << "Could not open config file \'" << FileName << "\'." << std::endl;
throw std::runtime_error(
std::string("Error: Could not open config file \'") + FileName +
std::string("\'"));
@ -117,19 +117,19 @@ public:
if ((size_t)posEqual == std::string::npos &&
(name.size() != 0 || value.size() != 0)) {
csoca::wlog << "Ignoring non-assignment in " << FileName << ":"
music::wlog << "Ignoring non-assignment in " << FileName << ":"
<< m_iLine << std::endl;
continue;
}
if (name.length() == 0 && value.size() != 0) {
csoca::wlog << "Ignoring assignment missing entry name in "
music::wlog << "Ignoring assignment missing entry name in "
<< FileName << ":" << m_iLine << std::endl;
continue;
}
if (value.length() == 0 && name.size() != 0) {
csoca::wlog << "Empty entry will be ignored in " << FileName << ":"
music::wlog << "Empty entry will be ignored in " << FileName << ":"
<< m_iLine << std::endl;
continue;
}
@ -139,7 +139,7 @@ public:
//.. add key/value pair to hash table ..
if (m_Items.find(inSection + '/' + name) != m_Items.end()) {
csoca::wlog << "Redeclaration overwrites previous value in "
music::wlog << "Redeclaration overwrites previous value in "
<< FileName << ":" << m_iLine << std::endl;
}
@ -232,7 +232,7 @@ public:
}
catch (ErrItemNotFound& e)
{
csoca::elog << e.what() << std::endl;
music::elog << e.what() << std::endl;
throw;
}
return r;
@ -282,11 +282,11 @@ public:
}
void LogDump(void) {
csoca::ilog << "List of all configuration options:" << std::endl;
music::ilog << "List of all configuration options:" << std::endl;
std::map<std::string, std::string>::const_iterator i = m_Items.begin();
while (i != m_Items.end()) {
if (i->second.length() > 0)
csoca::ilog << std::setw(28) << i->first << " = " << i->second
music::ilog << std::setw(28) << i->first << " = " << i->second
<< std::endl;
++i;
}
@ -330,7 +330,7 @@ inline bool ConfigFile::GetValue<bool>(std::string const &strSection,
return true;
if (r1 == "false" || r1 == "no" || r1 == "off" || r1 == "0")
return false;
csoca::elog << "Illegal identifier \'" << r1 << "\' in \'" << strEntry << "\'." << std::endl;
music::elog << "Illegal identifier \'" << r1 << "\' in \'" << strEntry << "\'." << std::endl;
throw ErrIllegalIdentifier(std::string("Illegal identifier \'") + r1 +
std::string("\' in \'") + strEntry +
std::string("\'."));

View file

@ -444,7 +444,7 @@ private:
/////////////////////////////////////////////////////////////////////
double tstart = get_wtime();
csoca::dlog << "[MPI] Started scatter for convolution" << std::endl;
music::dlog << "[MPI] Started scatter for convolution" << std::endl;
//... collect offsets
@ -589,7 +589,7 @@ private:
// std::cerr << ">>>>> task " << CONFIG::MPI_task_rank << " all transfers completed! <<<<<"
// << std::endl; ofs << ">>>>> task " << CONFIG::MPI_task_rank << " all transfers completed!
// <<<<<" << std::endl;
csoca::dlog.Print("[MPI] Completed scatter for convolution, took %fs\n",
music::dlog.Print("[MPI] Completed scatter for convolution, took %fs\n",
get_wtime() - tstart);
#endif /// end of ifdef/ifndef USE_MPI ///////////////////////////////////////////////////////////////
@ -639,7 +639,7 @@ private:
double tstart = get_wtime();
csoca::dlog << "[MPI] Started gather for convolution";
music::dlog << "[MPI] Started gather for convolution";
MPI_Barrier(MPI_COMM_WORLD);
@ -833,7 +833,7 @@ private:
MPI_Barrier(MPI_COMM_WORLD);
csoca::dlog.Print("[MPI] Completed gather for convolution, took %fs", get_wtime() - tstart);
music::dlog.Print("[MPI] Completed gather for convolution, took %fs", get_wtime() - tstart);
#endif /// end of ifdef/ifndef USE_MPI //////////////////////////////////////////////////////////////
}

View file

@ -57,7 +57,7 @@ private:
gsl_set_error_handler(NULL);
if (error / result > REL_PRECISION)
csoca::wlog << "no convergence in function 'integrate', rel. error=" << error / result << std::endl;
music::wlog << "no convergence in function 'integrate', rel. error=" << error / result << std::endl;
return (real_t)result;
}
@ -152,17 +152,17 @@ public:
else{
cosmo_param_.pnorm = 1.0;
auto sigma8 = this->compute_sigma8();
csoca::ilog << "Measured sigma_8 for given PS normalisation is " << sigma8 << std::endl;
music::ilog << "Measured sigma_8 for given PS normalisation is " << sigma8 << std::endl;
}
cosmo_param_.sqrtpnorm = std::sqrt(cosmo_param_.pnorm);
csoca::ilog << std::setw(32) << std::left << "TF supports distinct CDM+baryons"
music::ilog << std::setw(32) << std::left << "TF supports distinct CDM+baryons"
<< " : " << (transfer_function_->tf_is_distinct() ? "yes" : "no") << std::endl;
csoca::ilog << std::setw(32) << std::left << "TF maximum wave number"
music::ilog << std::setw(32) << std::left << "TF maximum wave number"
<< " : " << transfer_function_->get_kmax() << " h/Mpc" << std::endl;
// csoca::ilog << "D+(MUSIC) = " << this->get_growth_factor( 1.0/(1.0+cf.GetValue<double>("setup","zstart")) ) << std::endl;
// csoca::ilog << "pnrom = " << cosmo_param_.pnorm << std::endl;
// music::ilog << "D+(MUSIC) = " << this->get_growth_factor( 1.0/(1.0+cf.GetValue<double>("setup","zstart")) ) << std::endl;
// music::ilog << "pnrom = " << cosmo_param_.pnorm << std::endl;
}
~calculator()
@ -213,7 +213,7 @@ public:
#warning Check whether output is at redshift that is indicated!
}
}
csoca::ilog << "Wrote power spectrum at a=" << a << " to file \'" << fname << "\'" << std::endl;
music::ilog << "Wrote power spectrum at a=" << a << " to file \'" << fname << "\'" << std::endl;
}
const cosmology::parameters &get_parameters(void) const noexcept

View file

@ -87,22 +87,22 @@ struct parameters
pnorm = 0.0;
vfact = 0.0;
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << "Cosmological parameters are: " << std::endl;
csoca::ilog << " H0 = " << std::setw(16) << H0 << "sigma_8 = " << std::setw(16) << sigma8 << std::endl;
csoca::ilog << " Omega_c = " << std::setw(16) << Omega_m-Omega_b << "Omega_b = " << std::setw(16) << Omega_b << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "Cosmological parameters are: " << std::endl;
music::ilog << " H0 = " << std::setw(16) << H0 << "sigma_8 = " << std::setw(16) << sigma8 << std::endl;
music::ilog << " Omega_c = " << std::setw(16) << Omega_m-Omega_b << "Omega_b = " << std::setw(16) << Omega_b << std::endl;
if (!cf.GetValueSafe<bool>("cosmology", "ZeroRadiation", false)){
csoca::ilog << " Omega_g = " << std::setw(16) << Omega_gamma << "Omega_nu = " << std::setw(16) << Omega_nu << std::endl;
music::ilog << " Omega_g = " << std::setw(16) << Omega_gamma << "Omega_nu = " << std::setw(16) << Omega_nu << std::endl;
}else{
csoca::ilog << " Omega_r = " << std::setw(16) << Omega_r << std::endl;
music::ilog << " Omega_r = " << std::setw(16) << Omega_r << std::endl;
}
csoca::ilog << " Omega_DE = " << std::setw(16) << Omega_DE << "nspect = " << std::setw(16) << nspect << std::endl;
csoca::ilog << " w0 = " << std::setw(16) << w_0 << "w_a = " << std::setw(16) << w_a << std::endl;
music::ilog << " Omega_DE = " << std::setw(16) << Omega_DE << "nspect = " << std::setw(16) << nspect << std::endl;
music::ilog << " w0 = " << std::setw(16) << w_0 << "w_a = " << std::setw(16) << w_a << std::endl;
if( Omega_r > 0.0 )
{
csoca::wlog << "Radiation enabled, using Omega_r=" << Omega_r << " internally."<< std::endl;
csoca::wlog << "Make sure your sim code supports this..." << std::endl;
music::wlog << "Radiation enabled, using Omega_r=" << Omega_r << " internally."<< std::endl;
music::wlog << "Make sure your sim code supports this..." << std::endl;
}
}

View file

@ -6,7 +6,7 @@
#include <fstream>
#include <iostream>
namespace csoca {
namespace music {
enum LogLevel : int {
Off = 0,
@ -132,4 +132,4 @@ extern LogStream wlog;
extern LogStream ilog;
extern LogStream dlog;
} // namespace csoca
} // namespace music

View file

@ -508,7 +508,7 @@ public:
grad_x_({ngrid_, ngrid_, ngrid_}, {1.0,1.0,1.0}), grad_y_({ngrid_, ngrid_, ngrid_}, {1.0,1.0,1.0}),
grad_z_({ngrid_, ngrid_, ngrid_}, {1.0,1.0,1.0})
{
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
std::string lattice_str = the_config.GetValueSafe<std::string>("setup","ParticleLoad","sc");
const lattice lattice_type =
((lattice_str=="bcc")? lattice_bcc
@ -516,15 +516,15 @@ public:
: ((lattice_str=="rsc")? lattice_rsc
: lattice_sc)));
csoca::ilog << "PLT corrections for " << lattice_str << " lattice will be computed on " << ngrid_ << "**3 mesh" << std::endl;
music::ilog << "PLT corrections for " << lattice_str << " lattice will be computed on " << ngrid_ << "**3 mesh" << std::endl;
double wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing PLT eigenmodes "<< std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing PLT eigenmodes "<< std::flush;
init_D( lattice_type );
// init_D__old();
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime()-wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime()-wtime << "s" << std::endl;
}
inline ccomplex_t gradient( const int idim, std::array<size_t,3> ijk ) const

View file

@ -9,7 +9,7 @@ void Grid_FFT<data_t, bdistributed>::Setup(void)
{
ntot_ = (n_[2] + 2) * n_[1] * n_[0];
csoca::dlog.Print("[FFT] Setting up a shared memory field %lux%lux%lu\n", n_[0], n_[1], n_[2]);
music::dlog.Print("[FFT] Setting up a shared memory field %lux%lux%lu\n", n_[0], n_[1], n_[2]);
if (typeid(data_t) == typeid(real_t))
{
data_ = reinterpret_cast<data_t *>(fftw_malloc(ntot_ * sizeof(real_t)));
@ -28,7 +28,7 @@ void Grid_FFT<data_t, bdistributed>::Setup(void)
}
else
{
csoca::elog.Print("invalid data type in Grid_FFT<data_t>::setup_fft_interface\n");
music::elog.Print("invalid data type in Grid_FFT<data_t>::setup_fft_interface\n");
}
fft_norm_fac_ = 1.0 / std::sqrt((real_t)((size_t)n_[0] * (real_t)n_[1] * (real_t)n_[2]));
@ -105,11 +105,11 @@ void Grid_FFT<data_t, bdistributed>::Setup(void)
}
else
{
csoca::elog.Print("unknown data type in Grid_FFT<data_t>::setup_fft_interface\n");
music::elog.Print("unknown data type in Grid_FFT<data_t>::setup_fft_interface\n");
abort();
}
csoca::dlog.Print("[FFT] Setting up a distributed memory field %lux%lux%lu\n", n_[0], n_[1], n_[2]);
music::dlog.Print("[FFT] Setting up a distributed memory field %lux%lux%lu\n", n_[0], n_[1], n_[2]);
fft_norm_fac_ = 1.0 / sqrt((real_t)n_[0] * (real_t)n_[1] * (real_t)n_[2]);
@ -151,7 +151,7 @@ void Grid_FFT<data_t, bdistributed>::Setup(void)
sizes_[3] = npc_; // holds the physical memory size along the 3rd dimension
}
#else
csoca::flog << "MPI is required for distributed FFT arrays!" << std::endl;
music::flog << "MPI is required for distributed FFT arrays!" << std::endl;
throw std::runtime_error("MPI is required for distributed FFT arrays!");
#endif //// of #ifdef #else USE_MPI ////////////////////////////////////////////////////////////////////////////////////
}
@ -178,13 +178,13 @@ void Grid_FFT<data_t, bdistributed>::FourierTransformForward(bool do_transform)
if (do_transform)
{
double wtime = get_wtime();
csoca::dlog.Print("[FFT] Calling Grid_FFT::to_kspace (%lux%lux%lu)", sizes_[0], sizes_[1], sizes_[2]);
music::dlog.Print("[FFT] Calling Grid_FFT::to_kspace (%lux%lux%lu)", sizes_[0], sizes_[1], sizes_[2]);
FFTW_API(execute)
(plan_);
this->ApplyNorm();
wtime = get_wtime() - wtime;
csoca::dlog.Print("[FFT] Completed Grid_FFT::to_kspace (%lux%lux%lu), took %f s", sizes_[0], sizes_[1], sizes_[2], wtime);
music::dlog.Print("[FFT] Completed Grid_FFT::to_kspace (%lux%lux%lu), took %f s", sizes_[0], sizes_[1], sizes_[2], wtime);
}
sizes_[0] = local_1_size_;
@ -209,14 +209,14 @@ void Grid_FFT<data_t, bdistributed>::FourierTransformBackward(bool do_transform)
//.............................
if (do_transform)
{
csoca::dlog.Print("[FFT] Calling Grid_FFT::to_rspace (%dx%dx%d)\n", sizes_[0], sizes_[1], sizes_[2]);
music::dlog.Print("[FFT] Calling Grid_FFT::to_rspace (%dx%dx%d)\n", sizes_[0], sizes_[1], sizes_[2]);
double wtime = get_wtime();
FFTW_API(execute)(iplan_);
this->ApplyNorm();
wtime = get_wtime() - wtime;
csoca::dlog.Print("[FFT] Completed Grid_FFT::to_rspace (%dx%dx%d), took %f s\n", sizes_[0], sizes_[1], sizes_[2], wtime);
music::dlog.Print("[FFT] Completed Grid_FFT::to_rspace (%dx%dx%d), took %f s\n", sizes_[0], sizes_[1], sizes_[2], wtime);
}
sizes_[0] = local_0_size_;
sizes_[1] = n_[1];
@ -285,7 +285,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
{
if (bdistributed)
{
csoca::elog << "Attempt to read from HDF5 into MPI-distributed array. This is not supported yet!" << std::endl;
music::elog << "Attempt to read from HDF5 into MPI-distributed array. This is not supported yet!" << std::endl;
abort();
}
@ -311,7 +311,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
//... dataset did not exist or was empty
if (HDF_DatasetID < 0)
{
csoca::elog << "Dataset \'" << ObjName.c_str() << "\' does not exist or is empty." << std::endl;
music::elog << "Dataset \'" << ObjName.c_str() << "\' does not exist or is empty." << std::endl;
H5Fclose(HDF_FileID);
abort();
}
@ -336,7 +336,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
if (Data.capacity() < HDF_StorageSize)
{
csoca::elog << "Not enough memory to store all data in HDFReadDataset!" << std::endl;
music::elog << "Not enough memory to store all data in HDFReadDataset!" << std::endl;
H5Sclose(HDF_DataspaceID);
H5Dclose(HDF_DatasetID);
H5Fclose(HDF_FileID);
@ -348,7 +348,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
if (Data.size() != HDF_StorageSize)
{
csoca::elog << "Something went wrong while reading!" << std::endl;
music::elog << "Something went wrong while reading!" << std::endl;
H5Sclose(HDF_DataspaceID);
H5Dclose(HDF_DatasetID);
H5Fclose(HDF_FileID);
@ -360,7 +360,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
H5Fclose(HDF_FileID);
assert(dimsize[0] == dimsize[1] && dimsize[0] == dimsize[2]);
csoca::ilog << "Read external constraint data of dimensions " << dimsize[0] << "**3." << std::endl;
music::ilog << "Read external constraint data of dimensions " << dimsize[0] << "**3." << std::endl;
for (size_t i = 0; i < 3; ++i)
this->n_[i] = dimsize[i];
@ -390,7 +390,7 @@ void Grid_FFT<data_t, bdistributed>::Read_from_HDF5(const std::string Filename,
sum1 /= Data.size();
sum2 /= Data.size();
auto stdw = std::sqrt(sum2 - sum1 * sum1);
csoca::ilog << "Constraint field has <W>=" << sum1 << ", <W^2>-<W>^2=" << stdw << std::endl;
music::ilog << "Constraint field has <W>=" << sum1 << ", <W^2>-<W>^2=" << stdw << std::endl;
#pragma omp parallel for reduction(+ : sum1, sum2)
for (size_t i = 0; i < size(0); ++i)

View file

@ -97,7 +97,7 @@ int Run( ConfigFile& the_config )
| the_config.ContainsKey("cosmology", "LSS_aniso_ly")
| the_config.ContainsKey("cosmology", "LSS_aniso_lz") ))
{
csoca::elog << "Not all dimensions of LSS_aniso_l{x,y,z} specified! Will ignore external tidal field!" << std::endl;
music::elog << "Not all dimensions of LSS_aniso_l{x,y,z} specified! Will ignore external tidal field!" << std::endl;
bAddExternalTides = false;
}
// Anisotropy parameters for beyond box tidal field
@ -108,7 +108,7 @@ int Run( ConfigFile& the_config )
};
if( std::abs(lss_aniso_lambda[0]+lss_aniso_lambda[1]+lss_aniso_lambda[2]) > 1e-10 ){
csoca::elog << "External tidal field is not trace-free! Will subtract trace!" << std::endl;
music::elog << "External tidal field is not trace-free! Will subtract trace!" << std::endl;
auto tr_l_3 = (lss_aniso_lambda[0]+lss_aniso_lambda[1]+lss_aniso_lambda[2])/3.0;
lss_aniso_lambda[0] -= tr_l_3;
lss_aniso_lambda[1] -= tr_l_3;
@ -122,10 +122,10 @@ int Run( ConfigFile& the_config )
the_cosmo_calc->write_powerspectrum(astart, "input_powerspec.txt" );
//csoca::ilog << "-----------------------------------------------------------------------------" << std::endl;
//music::ilog << "-----------------------------------------------------------------------------" << std::endl;
// if( bSymplecticPT && LPTorder!=2 ){
// csoca::wlog << "SymplecticPT has been selected and will overwrite chosen order of LPT to 2" << std::endl;
// music::wlog << "SymplecticPT has been selected and will overwrite chosen order of LPT to 2" << std::endl;
// LPTorder = 2;
// }
@ -180,8 +180,8 @@ int Run( ConfigFile& the_config )
//--------------------------------------------------------------------
// Fill the grid with a Gaussian white noise field
//--------------------------------------------------------------------
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << "Generating white noise field...." << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "Generating white noise field...." << std::endl;
the_random_number_generator->Fill_Grid(wnoise);
@ -241,11 +241,11 @@ int Run( ConfigFile& the_config )
}
}
// csoca::ilog << " ... old field: re <w>=" << rs1/count << " <w^2>-<w>^2=" << rs2/count-rs1*rs1/count/count << std::endl;
// csoca::ilog << " ... old field: im <w>=" << is1/count << " <w^2>-<w>^2=" << is2/count-is1*is1/count/count << std::endl;
// csoca::ilog << " ... new field: re <w>=" << nrs1/count << " <w^2>-<w>^2=" << nrs2/count-nrs1*nrs1/count/count << std::endl;
// csoca::ilog << " ... new field: im <w>=" << nis1/count << " <w^2>-<w>^2=" << nis2/count-nis1*nis1/count/count << std::endl;
csoca::ilog << "White noise field large-scale modes overwritten with external field." << std::endl;
// music::ilog << " ... old field: re <w>=" << rs1/count << " <w^2>-<w>^2=" << rs2/count-rs1*rs1/count/count << std::endl;
// music::ilog << " ... old field: im <w>=" << is1/count << " <w^2>-<w>^2=" << is2/count-is1*is1/count/count << std::endl;
// music::ilog << " ... new field: re <w>=" << nrs1/count << " <w^2>-<w>^2=" << nrs2/count-nrs1*nrs1/count/count << std::endl;
// music::ilog << " ... new field: im <w>=" << nis1/count << " <w^2>-<w>^2=" << nis2/count-nis1*nis1/count/count << std::endl;
music::ilog << "White noise field large-scale modes overwritten with external field." << std::endl;
}
//--------------------------------------------------------------------
@ -293,11 +293,11 @@ int Run( ConfigFile& the_config )
//======================================================================
// phi = - delta / k^2
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << "Generating white noise field...." << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "Generating white noise field...." << std::endl;
double wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(1) term" << std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(1) term" << std::flush;
phi.FourierTransformForward(false);
phi.assign_function_of_grids_kdep([&](auto k, auto wn) {
@ -308,7 +308,7 @@ int Run( ConfigFile& the_config )
phi.zero_DC_mode();
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
//======================================================================
//... compute 2LPT displacement potential ....
@ -316,7 +316,7 @@ int Run( ConfigFile& the_config )
if (LPTorder > 1)
{
wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(2) term" << std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(2) term" << std::flush;
phi2.FourierTransformForward(false);
Conv.convolve_SumOfHessians(phi, {0, 0}, phi, {1, 1}, {2, 2}, op::assign_to(phi2));
Conv.convolve_Hessians(phi, {1, 1}, phi, {2, 2}, op::add_to(phi2));
@ -334,12 +334,12 @@ int Run( ConfigFile& the_config )
}
phi2.apply_InverseLaplacian();
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
if (bAddExternalTides)
{
csoca::wlog << "Added external tide contribution to phi(2)... Make sure your N-body code supports this!" << std::endl;
csoca::wlog << " lss_aniso = (" << lss_aniso_lambda[0] << ", " << lss_aniso_lambda[1] << ", " << lss_aniso_lambda[2] << ")" << std::endl;
music::wlog << "Added external tide contribution to phi(2)... Make sure your N-body code supports this!" << std::endl;
music::wlog << " lss_aniso = (" << lss_aniso_lambda[0] << ", " << lss_aniso_lambda[1] << ", " << lss_aniso_lambda[2] << ")" << std::endl;
}
}
@ -350,7 +350,7 @@ int Run( ConfigFile& the_config )
{
//... 3a term ...
wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(3a) term" << std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(3a) term" << std::flush;
phi3a.FourierTransformForward(false);
Conv.convolve_Hessians(phi, {0, 0}, phi, {1, 1}, phi, {2, 2}, op::assign_to(phi3a));
Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 2}, phi, {1, 2}, op::add_twice_to(phi3a));
@ -358,11 +358,11 @@ int Run( ConfigFile& the_config )
Conv.convolve_Hessians(phi, {0, 2}, phi, {0, 2}, phi, {1, 1}, op::subtract_from(phi3a));
Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 1}, phi, {2, 2}, op::subtract_from(phi3a));
phi3a.apply_InverseLaplacian();
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
//... 3b term ...
wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(3b) term" << std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing phi(3b) term" << std::flush;
phi3b.FourierTransformForward(false);
Conv.convolve_SumOfHessians(phi, {0, 0}, phi2, {1, 1}, {2, 2}, op::assign_to(phi3b));
Conv.convolve_SumOfHessians(phi, {1, 1}, phi2, {2, 2}, {0, 0}, op::add_to(phi3b));
@ -372,11 +372,11 @@ int Run( ConfigFile& the_config )
Conv.convolve_Hessians(phi, {1, 2}, phi2, {1, 2}, op::subtract_twice_from(phi3b));
phi3b.apply_InverseLaplacian();
phi3b *= 0.5; // factor 1/2 from definition of phi(3b)!
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
//... transversal term ...
wtime = get_wtime();
csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing A(3) term" << std::flush;
music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing A(3) term" << std::flush;
for (int idim = 0; idim < 3; ++idim)
{
// cyclic rotations of indices
@ -388,13 +388,13 @@ int Run( ConfigFile& the_config )
Conv.convolve_DifferenceOfHessians(phi2, {idimp, idimpp}, phi, {idimp, idimp}, {idimpp, idimpp}, op::subtract_from(*A3[idim]));
A3[idim]->apply_InverseLaplacian();
}
csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime() - wtime << "s" << std::endl;
}
// if( bSymplecticPT ){
// //... transversal term ...
// wtime = get_wtime();
// csoca::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing vNLO(3) term" << std::flush;
// music::ilog << std::setw(40) << std::setfill('.') << std::left << "Computing vNLO(3) term" << std::flush;
// for( int idim=0; idim<3; ++idim ){
// // cyclic rotations of indices
// A3[idim]->FourierTransformForward(false);
@ -402,7 +402,7 @@ int Run( ConfigFile& the_config )
// Conv.convolve_Gradient_and_Hessian( phi, {1}, phi2, {idim,1}, add_to(*A3[idim]) );
// Conv.convolve_Gradient_and_Hessian( phi, {2}, phi2, {idim,2}, add_to(*A3[idim]) );
// }
// csoca::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime()-wtime << "s" << std::endl;
// music::ilog << std::setw(20) << std::setfill(' ') << std::right << "took " << get_wtime()-wtime << "s" << std::endl;
// }
@ -415,7 +415,7 @@ int Run( ConfigFile& the_config )
(*A3[1]) *= g3c;
(*A3[2]) *= g3c;
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
///////////////////////////////////////////////////////////////////////
// we store the densities here if we compute them
@ -426,7 +426,7 @@ int Run( ConfigFile& the_config )
if (testing != "none")
{
csoca::wlog << "you are running in testing mode. No ICs, only diagnostic output will be written out!" << std::endl;
music::wlog << "you are running in testing mode. No ICs, only diagnostic output will be written out!" << std::endl;
if (testing == "potentials_and_densities"){
testing::output_potentials_and_densities(the_config, ngrid, boxlen, phi, phi2, phi3a, phi3b, A3);
}
@ -437,14 +437,14 @@ int Run( ConfigFile& the_config )
testing::output_convergence(the_config, the_cosmo_calc.get(), ngrid, boxlen, vfac, Dplus0, phi, phi2, phi3a, phi3b, A3);
}
else{
csoca::flog << "unknown test '" << testing << "'" << std::endl;
music::flog << "unknown test '" << testing << "'" << std::endl;
std::abort();
}
}
for( auto& this_species : species_list )
{
csoca::ilog << std::endl
music::ilog << std::endl
<< ">>> Computing ICs for species \'" << cosmo_species_name[this_species] << "\' <<<\n" << std::endl;
{
@ -468,7 +468,7 @@ int Run( ConfigFile& the_config )
real_t std_phi1 = phi.std();
const real_t hbar = 2.0 * M_PI/ngrid * (2*std_phi1/Dplus0); //3sigma, but this might rather depend on gradients of phi...
csoca::ilog << "Semiclassical PT : hbar = " << hbar << " from sigma(phi1) = " << std_phi1 << std::endl;
music::ilog << "Semiclassical PT : hbar = " << hbar << " from sigma(phi1) = " << std_phi1 << std::endl;
if( LPTorder == 1 ){
psi.assign_function_of_grids_r([hbar,Dplus0]( real_t pphi ){

View file

@ -1,6 +1,6 @@
#include <logger.hh>
namespace csoca {
namespace music {
std::ofstream Logger::output_file_;
LogLevel Logger::log_level_ = LogLevel::Off;
@ -39,4 +39,4 @@ LogStream wlog(glogger, LogLevel::Warning);
LogStream ilog(glogger, LogLevel::Info);
LogStream dlog(glogger, LogLevel::Debug);
} // namespace csoca
} // namespace music

View file

@ -38,14 +38,14 @@ void handle_eptr(std::exception_ptr eptr) // passing by value is ok
std::rethrow_exception(eptr);
}
} catch(const std::exception& e) {
csoca::elog << "This happened: \"" << e.what() << "\"" << std::endl;
music::elog << "This happened: \"" << e.what() << "\"" << std::endl;
}
}
int main( int argc, char** argv )
{
csoca::Logger::SetLevel(csoca::LogLevel::Info);
// csoca::Logger::SetLevel(csoca::LogLevel::Debug);
music::Logger::SetLevel(music::LogLevel::Info);
// music::Logger::SetLevel(music::LogLevel::Debug);
//------------------------------------------------------------------------------
// initialise MPI
@ -61,12 +61,12 @@ int main( int argc, char** argv )
// set up lower logging levels for other tasks
if( CONFIG::MPI_task_rank!=0 )
{
csoca::Logger::SetLevel(csoca::LogLevel::Error);
music::Logger::SetLevel(music::LogLevel::Error);
}
#endif
// Ascii ART logo. generated via http://patorjk.com/software/taag/#p=display&f=Nancyj&t=monofonIC
csoca::ilog << "\n"
music::ilog << "\n"
<< " The unigrid version of MUSIC-2 .8888b dP a88888b. \n"
<< " 88 \" 88 d8\' `88 \n"
<< " 88d8b.d8b. .d8888b. 88d888b. .d8888b. 88aaa .d8888b. 88d888b. 88 88 \n"
@ -75,17 +75,17 @@ int main( int argc, char** argv )
<< " dP dP dP `88888P\' dP dP `88888P\' dP `88888P\' dP dP dP Y88888P\' \n" << std::endl;
// Compilation CMake configuration, time etc info:
csoca::ilog << "This " << CMAKE_BUILDTYPE_STR << " build was compiled at " << __TIME__ << " on " << __DATE__ << std::endl;
music::ilog << "This " << CMAKE_BUILDTYPE_STR << " build was compiled at " << __TIME__ << " on " << __DATE__ << std::endl;
// git and versioning info:
csoca::ilog << "Version: v0.1a, git rev.: " << GIT_REV << ", tag: " << GIT_TAG << ", branch: " << GIT_BRANCH << std::endl;
music::ilog << "Version: v0.1a, git rev.: " << GIT_REV << ", tag: " << GIT_TAG << ", branch: " << GIT_BRANCH << std::endl;
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << "Compile time options : " << std::endl;
csoca::ilog << " Precision : " << CMAKE_PRECISION_STR << std::endl;
csoca::ilog << " Convolutions : " << CMAKE_CONVOLVER_STR << std::endl;
csoca::ilog << " PLT : " << CMAKE_PLT_STR << std::endl;
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "Compile time options : " << std::endl;
music::ilog << " Precision : " << CMAKE_PRECISION_STR << std::endl;
music::ilog << " Convolutions : " << CMAKE_CONVOLVER_STR << std::endl;
music::ilog << " PLT : " << CMAKE_PLT_STR << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
//------------------------------------------------------------------------------
@ -99,7 +99,7 @@ int main( int argc, char** argv )
print_RNG_plugins();
print_output_plugins();
csoca::elog << "In order to run, you need to specify a parameter file!\n" << std::endl;
music::elog << "In order to run, you need to specify a parameter file!\n" << std::endl;
exit(0);
}
@ -144,10 +144,10 @@ int main( int argc, char** argv )
// Write code configuration to screen
//------------------------------------------------------------------------------
// hardware related infos
csoca::ilog << std::setw(32) << std::left << "CPU vendor string" << " : " << SystemStat::Cpu().get_CPUstring() << std::endl;
music::ilog << std::setw(32) << std::left << "CPU vendor string" << " : " << SystemStat::Cpu().get_CPUstring() << std::endl;
// multi-threading related infos
csoca::ilog << std::setw(32) << std::left << "Available HW threads / task" << " : " << std::thread::hardware_concurrency() << " (" << CONFIG::num_threads << " used)" << std::endl;
music::ilog << std::setw(32) << std::left << "Available HW threads / task" << " : " << std::thread::hardware_concurrency() << " (" << CONFIG::num_threads << " used)" << std::endl;
// memory related infos
SystemStat::Memory mem;
@ -164,34 +164,34 @@ int main( int argc, char** argv )
MPI_Allreduce(&minupmem,&temp,1,MPI_UNSIGNED,MPI_MIN,MPI_COMM_WORLD); minupmem = temp;
MPI_Allreduce(&maxupmem,&temp,1,MPI_UNSIGNED,MPI_MAX,MPI_COMM_WORLD); maxupmem = temp;
#endif
csoca::ilog << std::setw(32) << std::left << "Total system memory (phys)" << " : " << mem.get_TotalMem()/1024/1024 << " Mb" << std::endl;
csoca::ilog << std::setw(32) << std::left << "Used system memory (phys)" << " : " << "Max: " << maxupmem << " Mb, Min: " << minupmem << " Mb" << std::endl;
csoca::ilog << std::setw(32) << std::left << "Available system memory (phys)" << " : " << "Max: " << maxpmem << " Mb, Min: " << minpmem << " Mb" << std::endl;
music::ilog << std::setw(32) << std::left << "Total system memory (phys)" << " : " << mem.get_TotalMem()/1024/1024 << " Mb" << std::endl;
music::ilog << std::setw(32) << std::left << "Used system memory (phys)" << " : " << "Max: " << maxupmem << " Mb, Min: " << minupmem << " Mb" << std::endl;
music::ilog << std::setw(32) << std::left << "Available system memory (phys)" << " : " << "Max: " << maxpmem << " Mb, Min: " << minpmem << " Mb" << std::endl;
// MPI related infos
#if defined(USE_MPI)
csoca::ilog << std::setw(32) << std::left << "MPI is enabled" << " : " << "yes (" << CONFIG::MPI_task_size << " tasks)" << std::endl;
csoca::dlog << std::setw(32) << std::left << "MPI version" << " : " << MPI::get_version() << std::endl;
music::ilog << std::setw(32) << std::left << "MPI is enabled" << " : " << "yes (" << CONFIG::MPI_task_size << " tasks)" << std::endl;
music::dlog << std::setw(32) << std::left << "MPI version" << " : " << MPI::get_version() << std::endl;
#else
csoca::ilog << std::setw(32) << std::left << "MPI is enabled" << " : " << "no" << std::endl;
music::ilog << std::setw(32) << std::left << "MPI is enabled" << " : " << "no" << std::endl;
#endif
csoca::ilog << std::setw(32) << std::left << "MPI supports multi-threading" << " : " << (CONFIG::MPI_threads_ok? "yes" : "no") << std::endl;
music::ilog << std::setw(32) << std::left << "MPI supports multi-threading" << " : " << (CONFIG::MPI_threads_ok? "yes" : "no") << std::endl;
// Kernel related infos
SystemStat::Kernel kern;
auto kinfo = kern.get_kernel_info();
csoca::ilog << std::setw(32) << std::left << "OS/Kernel version" << " : " << kinfo.kernel << " version " << kinfo.major << "." << kinfo.minor << " build " << kinfo.build_number << std::endl;
music::ilog << std::setw(32) << std::left << "OS/Kernel version" << " : " << kinfo.kernel << " version " << kinfo.major << "." << kinfo.minor << " build " << kinfo.build_number << std::endl;
// FFTW related infos
csoca::ilog << std::setw(32) << std::left << "FFTW version" << " : " << fftw_version << std::endl;
csoca::ilog << std::setw(32) << std::left << "FFTW supports multi-threading" << " : " << (CONFIG::FFTW_threads_ok? "yes" : "no") << std::endl;
csoca::ilog << std::setw(32) << std::left << "FFTW mode" << " : ";
music::ilog << std::setw(32) << std::left << "FFTW version" << " : " << fftw_version << std::endl;
music::ilog << std::setw(32) << std::left << "FFTW supports multi-threading" << " : " << (CONFIG::FFTW_threads_ok? "yes" : "no") << std::endl;
music::ilog << std::setw(32) << std::left << "FFTW mode" << " : ";
#if defined(FFTW_MODE_PATIENT)
csoca::ilog << "FFTW_PATIENT" << std::endl;
music::ilog << "FFTW_PATIENT" << std::endl;
#elif defined(FFTW_MODE_MEASURE)
csoca::ilog << "FFTW_MEASURE" << std::endl;
music::ilog << "FFTW_MEASURE" << std::endl;
#else
csoca::ilog << "FFTW_ESTIMATE" << std::endl;
music::ilog << "FFTW_ESTIMATE" << std::endl;
#endif
//--------------------------------------------------------------------
// Initialise plug-ins
@ -201,7 +201,7 @@ int main( int argc, char** argv )
ic_generator::Initialise( the_config );
}catch(...){
handle_eptr( std::current_exception() );
csoca::elog << "Problem during initialisation. See error(s) above. Exiting..." << std::endl;
music::elog << "Problem during initialisation. See error(s) above. Exiting..." << std::endl;
#if defined(USE_MPI)
MPI_Finalize();
#endif
@ -221,8 +221,8 @@ int main( int argc, char** argv )
MPI_Finalize();
#endif
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << "Done. Have a nice day!\n" << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << "Done. Have a nice day!\n" << std::endl;
return 0;
}

View file

@ -142,8 +142,8 @@ protected:
ifs.read((char *)&blk, sizeof(size_t));
if (blk != npart * (size_t)sizeof(T_store))
{
csoca::elog.Print("Internal consistency error in gadget2 output plug-in");
csoca::elog.Print("Expected %ld bytes in temp file but found %ld", npart * (size_t)sizeof(T_store), blk);
music::elog.Print("Internal consistency error in gadget2 output plug-in");
music::elog.Print("Expected %ld bytes in temp file but found %ld", npart * (size_t)sizeof(T_store), blk);
throw std::runtime_error("Internal consistency error in gadget2 output plug-in");
}
ifs.seekg(offset, std::ios::cur);
@ -161,7 +161,7 @@ protected:
if (!this->good())
{
csoca::elog.Print("Could not open buffer file in gadget2 output plug-in");
music::elog.Print("Could not open buffer file in gadget2 output plug-in");
throw std::runtime_error("Could not open buffer file in gadget2 output plug-in");
}
@ -169,8 +169,8 @@ protected:
if (blk != npart * sizeof(T_store))
{
csoca::elog.Print("Internal consistency error in gadget2 output plug-in");
csoca::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
music::elog.Print("Internal consistency error in gadget2 output plug-in");
music::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
throw std::runtime_error("Internal consistency error in gadget2 output plug-in");
}
@ -188,7 +188,7 @@ protected:
if (!this->good())
{
csoca::elog.Print("Could not open buffer file \'%s\' in gadget2 output plug-in", fname.c_str());
music::elog.Print("Could not open buffer file \'%s\' in gadget2 output plug-in", fname.c_str());
throw std::runtime_error("Could not open buffer file in gadget2 output plug-in");
}
@ -196,8 +196,8 @@ protected:
if (blk != npart * sizeof(T_store))
{
csoca::elog.Print("Internal consistency error in gadget2 output plug-in");
csoca::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
music::elog.Print("Internal consistency error in gadget2 output plug-in");
music::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
throw std::runtime_error("Internal consistency error in gadget2 output plug-in");
}
@ -215,7 +215,7 @@ protected:
if (!this->good())
{
csoca::elog.Print("Could not open buffer file in gadget2 output plug-in");
music::elog.Print("Could not open buffer file in gadget2 output plug-in");
throw std::runtime_error("Could not open buffer file in gadget2 output plug-in");
}
@ -223,8 +223,8 @@ protected:
if (blk != npart * sizeof(T_store))
{
csoca::elog.Print("Internal consistency error in gadget2 output plug-in");
csoca::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
music::elog.Print("Internal consistency error in gadget2 output plug-in");
music::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
throw std::runtime_error("Internal consistency error in gadget2 output plug-in");
}
@ -246,7 +246,7 @@ protected:
if (!this->good())
{
csoca::elog.Print("Could not open buffer file \'%s\' in gadget2 output plug-in", fname.c_str());
music::elog.Print("Could not open buffer file \'%s\' in gadget2 output plug-in", fname.c_str());
throw std::runtime_error("Could not open buffer file in gadget2 output plug-in");
}
@ -254,8 +254,8 @@ protected:
if (blk != npart * sizeof(T_store))
{
csoca::elog.Print("Internal consistency error in gadget2 output plug-in");
csoca::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
music::elog.Print("Internal consistency error in gadget2 output plug-in");
music::elog.Print("Expected %ld bytes in temp file but found %ld", npart * sizeof(T_store), blk);
throw std::runtime_error("Internal consistency error in gadget2 output plug-in");
}
@ -394,7 +394,7 @@ protected:
std::cout << " - Gadget2 : writing " << nptot << " particles to file...\n";
for (int i = 0; i < 6; ++i)
if (np_per_type_[i] > 0)
csoca::ilog.Print(" type %d : %12llu [m=%g]", i, np_per_type_[i], header_.mass[i]);
music::ilog.Print(" type %d : %12llu [m=%g]", i, np_per_type_[i], header_.mass[i]);
bool bbaryons = np_per_type_[0] > 0;
@ -419,10 +419,10 @@ protected:
if (nfiles_ > 1)
{
csoca::ilog.Print("Gadget2 : distributing particles to %d files", nfiles_);
music::ilog.Print("Gadget2 : distributing particles to %d files", nfiles_);
//<< " " << std::setw(12) << "type 0" << "," << std::setw(12) << "type 1" << "," << std::setw(12) << "type " << bndparticletype_ << std::endl;
for (unsigned i = 0; i < nfiles_; ++i)
csoca::ilog.Print(" file %i : %12llu", i, np_tot_per_file[i], header_.mass[i]);
music::ilog.Print(" file %i : %12llu", i, np_tot_per_file[i], header_.mass[i]);
}
size_t curr_block_buf_size = block_buf_size_;
@ -432,7 +432,7 @@ protected:
if (nptot >= 1ul << 32 && !bneed_long_ids)
{
bneed_long_ids = true;
csoca::wlog.Print("Need long particle IDs, will write 64bit, make sure to enable in Gadget!");
music::wlog.Print("Need long particle IDs, will write 64bit, make sure to enable in Gadget!");
}
for (unsigned ifile = 0; ifile < nfiles_; ++ifile)
@ -700,7 +700,7 @@ protected:
static bool bdisplayed = false;
if (!bdisplayed)
{
csoca::ilog.Print("Gadget2 : set initial gas temperature to %.2f K/mu", Tini / mu);
music::ilog.Print("Gadget2 : set initial gas temperature to %.2f K/mu", Tini / mu);
bdisplayed = true;
}
}
@ -827,7 +827,7 @@ public:
shift_halfcell_ = cf.GetValueSafe<bool>("output", "gadget_cell_centered", false);
//if( nfiles_ < (int)ceil((double)npart/(double)npartmax_) )
// csoca::wlog.Print("Should use more files.");
// music::wlog.Print("Should use more files.");
if (nfiles_ > 1)
{
@ -838,7 +838,7 @@ public:
ofs_.open(ffname, std::ios::binary | std::ios::trunc);
if (!ofs_.good())
{
csoca::elog.Print("gadget-2 output plug-in could not open output file \'%s\' for writing!", ffname);
music::elog.Print("gadget-2 output plug-in could not open output file \'%s\' for writing!", ffname);
throw std::runtime_error(std::string("gadget-2 output plug-in could not open output file \'") + std::string(ffname) + "\' for writing!\n");
}
ofs_.close();
@ -849,7 +849,7 @@ public:
ofs_.open(fname_.c_str(), std::ios::binary | std::ios::trunc);
if (!ofs_.good())
{
csoca::elog.Print("gadget-2 output plug-in could not open output file \'%s\' for writing!", fname_.c_str());
music::elog.Print("gadget-2 output plug-in could not open output file \'%s\' for writing!", fname_.c_str());
throw std::runtime_error(std::string("gadget-2 output plug-in could not open output file \'") + fname_ + "\' for writing!\n");
}
ofs_.close();
@ -875,7 +875,7 @@ public:
header_.flag_doubleprecision = 1;
else
{
csoca::elog.Print("Internal error: gadget-2 output plug-in called for neither \'float\' nor \'double\'");
music::elog.Print("Internal error: gadget-2 output plug-in called for neither \'float\' nor \'double\'");
throw std::runtime_error("Internal error: gadget-2 output plug-in called for neither \'float\' nor \'double\'");
}
@ -896,7 +896,7 @@ public:
unit_length_chosen_ = (*mapit).second;
else
{
csoca::elog.Print("Gadget: length unit \'%s\' unknown in gadget_lunit", lunitstr.c_str());
music::elog.Print("Gadget: length unit \'%s\' unknown in gadget_lunit", lunitstr.c_str());
throw std::runtime_error("Unknown length unit specified for Gadget output plugin");
}
@ -904,7 +904,7 @@ public:
unit_mass_chosen_ = (*mapit).second;
else
{
csoca::elog.Print("Gadget: mass unit \'%s\' unknown in gadget_munit", munitstr.c_str());
music::elog.Print("Gadget: mass unit \'%s\' unknown in gadget_munit", munitstr.c_str());
throw std::runtime_error("Unknown mass unit specified for Gadget output plugin");
}
@ -912,7 +912,7 @@ public:
unit_vel_chosen_ = (*mapit).second;
else
{
csoca::elog.Print("Gadget: velocity unit \'%s\' unknown in gadget_vunit", vunitstr.c_str());
music::elog.Print("Gadget: velocity unit \'%s\' unknown in gadget_vunit", vunitstr.c_str());
throw std::runtime_error("Unknown velocity unit specified for Gadget output plugin");
}
@ -922,14 +922,14 @@ public:
kpcunits_ = cf.GetValueSafe<bool>("output", "gadget_usekpc", false);
if (kpcunits_)
unit_length_chosen_ = 1e-3;
csoca::wlog.Print("Deprecated option \'gadget_usekpc\' may override unit selection. Use \'gadget_lunit\' instead.");
music::wlog.Print("Deprecated option \'gadget_usekpc\' may override unit selection. Use \'gadget_lunit\' instead.");
}
if (cf.ContainsKey("output", "gadget_usemsol"))
{
msolunits_ = cf.GetValueSafe<bool>("output", "gadget_usemsol", false);
if (msolunits_)
unit_mass_chosen_ = 1e-10;
csoca::wlog.Print("Deprecated option \'gadget_usemsol\' may override unit selection. Use \'gadget_munit\' instead.");
music::wlog.Print("Deprecated option \'gadget_usemsol\' may override unit selection. Use \'gadget_munit\' instead.");
}
//... coarse particle properties...
@ -944,14 +944,14 @@ public:
if (bndparticletype_ == 0 || //bndparticletype_ == 1 || bndparticletype_ == 4 ||
bndparticletype_ > 5)
{
csoca::elog.Print("Coarse particles cannot be of Gadget particle type %d in output plugin.", bndparticletype_);
music::elog.Print("Coarse particles cannot be of Gadget particle type %d in output plugin.", bndparticletype_);
throw std::runtime_error("Specified illegal Gadget particle type for coarse particles");
}
}
else
{
if (cf.GetValueSafe<unsigned>("output", "gadget_coarsetype", 5) != 5)
csoca::wlog.Print("Gadget: Option \'gadget_spreadcoarse\' forces \'gadget_coarsetype=5\'! Will override.");
music::wlog.Print("Gadget: Option \'gadget_spreadcoarse\' forces \'gadget_coarsetype=5\'! Will override.");
}
//... set time ......................................................
@ -1056,7 +1056,7 @@ public:
if (nwritten != npcoarse)
{
csoca::elog.Print("nwritten = %llu != npcoarse = %llu\n", nwritten, npcoarse);
music::elog.Print("nwritten = %llu != npcoarse = %llu\n", nwritten, npcoarse);
throw std::runtime_error("Internal consistency error while writing temporary file for masses");
}

View file

@ -23,14 +23,14 @@ void print_output_plugins()
std::map< std::string, output_plugin_creator *>::iterator it;
it = m.begin();
csoca::ilog << "Available output plug-ins:\n";
music::ilog << "Available output plug-ins:\n";
while( it!=m.end() )
{
if( it->second )
csoca::ilog << "\t\'" << it->first << "\'\n";
music::ilog << "\t\'" << it->first << "\'\n";
++it;
}
csoca::ilog << std::endl;
music::ilog << std::endl;
}
std::unique_ptr<output_plugin> select_output_plugin( ConfigFile& cf )
@ -42,13 +42,13 @@ std::unique_ptr<output_plugin> select_output_plugin( ConfigFile& cf )
if( !the_output_plugin_creator )
{
csoca::elog << "Error: output plug-in \'" << formatname << "\' not found." << std::endl;
music::elog << "Error: output plug-in \'" << formatname << "\' not found." << std::endl;
print_output_plugins();
throw std::runtime_error("Unknown output plug-in");
}else{
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << std::setw(32) << std::left << "Output plugin" << " : " << formatname << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << std::setw(32) << std::left << "Output plugin" << " : " << formatname << std::endl;
}
return std::move(the_output_plugin_creator->create( cf ));

View file

@ -154,7 +154,7 @@ public:
HDFWriteGroupAttribute(this_fname_, "Header", "suggested_highressoft", from_value<double>(softening_));
HDFWriteGroupAttribute(this_fname_, "Header", "suggested_gas_Tinit", from_value<double>(Tini_));
csoca::ilog << "Wrote" << std::endl;
music::ilog << "Wrote" << std::endl;
}
output_type write_species_as(const cosmo_species &) const { return output_type::particles; }

View file

@ -131,7 +131,7 @@ public:
uint32_t blocksz;
std::ofstream ofs(fname.c_str(), std::ios::binary);
csoca::ilog << "Writer \'" << this->interface_name_ << "\' : Writing data for " << pc.get_global_num_particles() << " particles." << std::endl;
music::ilog << "Writer \'" << this->interface_name_ << "\' : Writing data for " << pc.get_global_num_particles() << " particles." << std::endl;
blocksz = sizeof(header);
ofs.write(reinterpret_cast<char *>(&blocksz), sizeof(uint32_t));

View file

@ -101,6 +101,8 @@ public:
// use destructor to write header post factum
~gadget_hdf5_output_plugin()
{
if (!std::uncaught_exception())
{
HDFCreateGroup(this_fname_, "Header");
HDFWriteGroupAttribute(this_fname_, "Header", "NumPart_ThisFile", from_6array<unsigned>(header_.npart));
@ -121,7 +123,8 @@ public:
HDFWriteGroupAttribute(this_fname_, "Header", "NumPart_Total_HighWord", from_6array<unsigned>(header_.npartTotalHighWord));
HDFWriteGroupAttribute(this_fname_, "Header", "Flag_Entropy_ICs", from_value<int>(header_.flag_entropy_instead_u));
csoca::ilog << "Wrote Gadget-HDF5 file(s) to " << this_fname_ << std::endl;
music::ilog << "Wrote Gadget-HDF5 file(s) to " << this_fname_ << std::endl;
}
}
output_type write_species_as(const cosmo_species &) const { return output_type::particles; }
@ -151,7 +154,7 @@ public:
case cosmo_species::dm:
return 1;
case cosmo_species::baryon:
return 0;
return 2;
case cosmo_species::neutrino:
return 3;
}

View file

@ -99,7 +99,7 @@ void generic_output_plugin::write_grid_data(const Grid_FFT<real_t> &g, const cos
{
std::string field_name = this->get_field_name( s, c );
g.Write_to_HDF5(fname_, field_name);
csoca::ilog << interface_name_ << " : Wrote field \'" << field_name << "\' to file \'" << fname_ << "\'" << std::endl;
music::ilog << interface_name_ << " : Wrote field \'" << field_name << "\' to file \'" << fname_ << "\'" << std::endl;
}
namespace

View file

@ -60,7 +60,7 @@ public:
if (std::abs(std::pow(2.0, levelmin_) - double(ngrid)) > 1e-4)
{
csoca::elog << interface_name_ << " plugin requires setup/GridRes to be power of 2!" << std::endl;
music::elog << interface_name_ << " plugin requires setup/GridRes to be power of 2!" << std::endl;
abort();
}
@ -223,7 +223,7 @@ void grafic2_output_plugin::write_grid_data(const Grid_FFT<real_t> &g, const cos
} // end loop over write_rank
csoca::ilog << interface_name_ << " : Wrote field to file \'" << file_name << "\'" << std::endl;
music::ilog << interface_name_ << " : Wrote field to file \'" << file_name << "\'" << std::endl;
}
void grafic2_output_plugin::write_ramses_namelist(void) const
@ -279,7 +279,7 @@ void grafic2_output_plugin::write_ramses_namelist(void) const
<< "m_refine=" << 1 + naddref << "*8.,\n"
<< "/\n";
csoca::ilog << interface_name_ << " wrote partial RAMSES namelist file \'" << fname_ << "\'" << std::endl;
music::ilog << interface_name_ << " wrote partial RAMSES namelist file \'" << fname_ << "\'" << std::endl;
}
namespace

View file

@ -56,7 +56,7 @@ public:
if (restart_ && !disk_cached_)
{
csoca::elog.Print("Cannot restart from mem cached random numbers.");
music::elog.Print("Cannot restart from mem cached random numbers.");
throw std::runtime_error("Cannot restart from mem cached random numbers.");
}
@ -116,7 +116,7 @@ void RNG_music::parse_random_parameters(void)
{
if (ltemp <= 0)
{
csoca::elog.Print("Specified seed [random]/%s needs to be a number >0!", seedstr);
music::elog.Print("Specified seed [random]/%s needs to be a number >0!", seedstr);
throw std::runtime_error("Seed values need to be >0");
}
rngseeds_.push_back(ltemp);
@ -126,7 +126,7 @@ void RNG_music::parse_random_parameters(void)
{
rngfnames_.push_back(tempstr);
rngseeds_.push_back(-1);
csoca::ilog.Print("Random numbers for level %3d will be read from file.", i);
music::ilog.Print("Random numbers for level %3d will be read from file.", i);
}
}
@ -160,7 +160,7 @@ void RNG_music::compute_random_numbers(void)
//#warning add possibility to read noise from file also here!
if (rngfnames_[i].size() > 0)
csoca::ilog.Print("Warning: Cannot use filenames for higher levels currently! Ignoring!");
music::ilog.Print("Warning: Cannot use filenames for higher levels currently! Ignoring!");
randc[i] = new rng(*randc[i - 1], ran_cube_size_, rngseeds_[i], true);
delete randc[i - 1];
@ -180,7 +180,7 @@ void RNG_music::compute_random_numbers(void)
for (int ilevel = levelmin_seed_ - 1; ilevel >= (int)levelmin_; --ilevel)
{
if (rngseeds_[ilevel - levelmin_] > 0)
csoca::ilog.Print("Warning: random seed for level %d will be ignored.\n"
music::ilog.Print("Warning: random seed for level %d will be ignored.\n"
" consistency requires that it is obtained by restriction from level %d",
ilevel, levelmin_seed_);

View file

@ -11,7 +11,7 @@ template <typename T>
music_wnoise_generator<T>::music_wnoise_generator(unsigned res, unsigned cubesize, long baseseed, int *x0, int *lx)
: res_(res), cubesize_(cubesize), ncubes_(1), baseseed_(baseseed)
{
csoca::ilog.Print("Generating random numbers (1) with seed %ld", baseseed);
music::ilog.Print("Generating random numbers (1) with seed %ld", baseseed);
initialize();
fill_subvolume(x0, lx);
@ -21,7 +21,7 @@ template <typename T>
music_wnoise_generator<T>::music_wnoise_generator(unsigned res, unsigned cubesize, long baseseed, bool zeromean)
: res_(res), cubesize_(cubesize), ncubes_(1), baseseed_(baseseed)
{
csoca::ilog.Print("Generating random numbers (2) with seed %ld", baseseed);
music::ilog.Print("Generating random numbers (2) with seed %ld", baseseed);
double mean = 0.0;
size_t res_l = res;
@ -31,7 +31,7 @@ music_wnoise_generator<T>::music_wnoise_generator(unsigned res, unsigned cubesiz
cubesize_ = res_;
if (!musicnoise)
csoca::elog.Print("This currently breaks compatibility. Need to disable by hand! Make sure to not check into repo");
music::elog.Print("This currently breaks compatibility. Need to disable by hand! Make sure to not check into repo");
initialize();
@ -90,7 +90,7 @@ music_wnoise_generator<T>::music_wnoise_generator(unsigned res, std::string rand
std::ifstream ifs(randfname.c_str(), std::ios::binary);
if (!ifs)
{
csoca::elog.Print("Could not open random number file \'%s\'!", randfname.c_str());
music::elog.Print("Could not open random number file \'%s\'!", randfname.c_str());
throw std::runtime_error(std::string("Could not open random number file \'") + randfname + std::string("\'!"));
}
@ -186,7 +186,7 @@ music_wnoise_generator<T>::music_wnoise_generator(unsigned res, std::string rand
std::vector<float> in_float;
std::vector<double> in_double;
csoca::ilog.Print("Random number file \'%s\'\n contains %ld numbers. Reading...", randfname.c_str(), nx * ny * nz);
music::ilog.Print("Random number file \'%s\'\n contains %ld numbers. Reading...", randfname.c_str(), nx * ny * nz);
long double sum = 0.0, sum2 = 0.0;
size_t count = 0;
@ -285,7 +285,7 @@ music_wnoise_generator<T>::music_wnoise_generator(unsigned res, std::string rand
mean = sum / count;
var = sum2 / count - mean * mean;
csoca::ilog.Print("Random numbers in file have \n mean = %f and var = %f", mean, var);
music::ilog.Print("Random numbers in file have \n mean = %f and var = %f", mean, var);
}
//... copy construct by averaging down
@ -298,7 +298,7 @@ music_wnoise_generator<T>::music_wnoise_generator(/*const*/ music_wnoise_generat
long double sum = 0.0, sum2 = 0.0;
size_t count = 0;
csoca::ilog.Print("Generating a coarse white noise field by k-space degrading");
music::ilog.Print("Generating a coarse white noise field by k-space degrading");
//... initialize properties of container
res_ = rc.res_ / 2;
cubesize_ = res_;
@ -307,7 +307,7 @@ music_wnoise_generator<T>::music_wnoise_generator(/*const*/ music_wnoise_generat
if (sizeof(real_t) != sizeof(T))
{
csoca::elog.Print("type mismatch with real_t in k-space averaging");
music::elog.Print("type mismatch with real_t in k-space averaging");
throw std::runtime_error("type mismatch with real_t in k-space averaging");
}
@ -405,7 +405,7 @@ music_wnoise_generator<T>::music_wnoise_generator(/*const*/ music_wnoise_generat
rmean = sum / count;
rvar = sum2 / count - rmean * rmean;
csoca::ilog.Print("Restricted random numbers have\n mean = %f, var = %f", rmean, rvar);
music::ilog.Print("Restricted random numbers have\n mean = %f, var = %f", rmean, rvar);
}
template <typename T>
@ -438,7 +438,7 @@ music_wnoise_generator<T>::music_wnoise_generator(music_wnoise_generator<T> &rc,
if (kspace)
{
csoca::ilog.Print("Generating a constrained random number set with seed %ld\n using coarse mode replacement...", baseseed);
music::ilog.Print("Generating a constrained random number set with seed %ld\n using coarse mode replacement...", baseseed);
assert(lx[0] % 2 == 0 && lx[1] % 2 == 0 && lx[2] % 2 == 0);
size_t nx = lx[0], ny = lx[1], nz = lx[2],
nxc = lx[0] / 2, nyc = lx[1] / 2, nzc = lx[2] / 2;
@ -573,7 +573,7 @@ music_wnoise_generator<T>::music_wnoise_generator(music_wnoise_generator<T> &rc,
}
else
{
csoca::ilog.Print("Generating a constrained random number set with seed %ld\n using Hoffman-Ribak constraints...", baseseed);
music::ilog.Print("Generating a constrained random number set with seed %ld\n using Hoffman-Ribak constraints...", baseseed);
double fac = 1.0 / sqrt(8.0); //1./sqrt(8.0);
@ -613,7 +613,7 @@ void music_wnoise_generator<T>::register_cube(int i, int j, int k)
rnums_.push_back(NULL);
cubemap_[icube] = rnums_.size() - 1;
#ifdef DEBUG
csoca::dlog.Print("registering new cube %d,%d,%d . ID = %ld, memloc = %ld", i, j, k, icube, cubemap_[icube]);
music::dlog.Print("registering new cube %d,%d,%d . ID = %ld, memloc = %ld", i, j, k, icube, cubemap_[icube]);
#endif
}
}
@ -637,7 +637,7 @@ double music_wnoise_generator<T>::fill_cube(int i, int j, int k)
if (it == cubemap_.end())
{
csoca::elog.Print("Attempt to access non-registered random number cube!");
music::elog.Print("Attempt to access non-registered random number cube!");
throw std::runtime_error("Attempt to access non-registered random number cube!");
}
@ -674,7 +674,7 @@ void music_wnoise_generator<T>::subtract_from_cube(int i, int j, int k, double v
if (it == cubemap_.end())
{
csoca::elog.Print("Attempt to access unallocated RND cube %d,%d,%d in music_wnoise_generator::subtract_from_cube", i, j, k);
music::elog.Print("Attempt to access unallocated RND cube %d,%d,%d in music_wnoise_generator::subtract_from_cube", i, j, k);
throw std::runtime_error("Attempt to access unallocated RND cube in music_wnoise_generator::subtract_from_cube");
}
@ -700,7 +700,7 @@ void music_wnoise_generator<T>::free_cube(int i, int j, int k)
if (it == cubemap_.end())
{
csoca::elog.Print("Attempt to access unallocated RND cube %d,%d,%d in music_wnoise_generator::free_cube", i, j, k);
music::elog.Print("Attempt to access unallocated RND cube %d,%d,%d in music_wnoise_generator::free_cube", i, j, k);
throw std::runtime_error("Attempt to access unallocated RND cube in music_wnoise_generator::free_cube");
}
@ -724,7 +724,7 @@ void music_wnoise_generator<T>::initialize(void)
cubesize_ = res_;
}
csoca::ilog.Print("Generating random numbers w/ sample cube size of %d", cubesize_);
music::ilog.Print("Generating random numbers w/ sample cube size of %d", cubesize_);
}
template <typename T>
@ -741,8 +741,8 @@ double music_wnoise_generator<T>::fill_subvolume(int *i0, int *n)
ncube[2] = (int)(n[2] / cubesize_) + 2;
#ifdef DEBUG
csoca::dlog.Print("random numbers needed for region %d,%d,%d ..+ %d,%d,%d", i0[0], i0[1], i0[2], n[0], n[1], n[2]);
csoca::dlog.Print("filling cubes %d,%d,%d ..+ %d,%d,%d", i0cube[0], i0cube[1], i0cube[2], ncube[0], ncube[1], ncube[2]);
music::dlog.Print("random numbers needed for region %d,%d,%d ..+ %d,%d,%d", i0[0], i0[1], i0[2], n[0], n[1], n[2]);
music::dlog.Print("filling cubes %d,%d,%d ..+ %d,%d,%d", i0cube[0], i0cube[1], i0cube[2], ncube[0], ncube[1], ncube[2]);
#endif
double mean = 0.0;
@ -836,7 +836,7 @@ void music_wnoise_generator<T>::print_allocated(void)
if (rnums_[i] != NULL)
ncount++;
csoca::ilog.Print(" -> %d of %d random number cubes currently allocated", ncount, ntot);
music::ilog.Print(" -> %d of %d random number cubes currently allocated", ncount, ntot);
}
template class music_wnoise_generator<float>;

View file

@ -80,7 +80,7 @@ protected:
if (it == cubemap_.end())
{
csoca::elog.Print("attempting to copy data from non-existing RND cube %d,%d,%d", i, j, k);
music::elog.Print("attempting to copy data from non-existing RND cube %d,%d,%d", i, j, k);
throw std::runtime_error("attempting to copy data from non-existing RND cube");
}
@ -186,7 +186,7 @@ public:
if (it == cubemap_.end())
{
csoca::elog.Print("Attempting to copy data from non-existing RND cube %d,%d,%d @ %d,%d,%d", ic, jc, kc, i, j, k);
music::elog.Print("Attempting to copy data from non-existing RND cube %d,%d,%d @ %d,%d,%d", ic, jc, kc, i, j, k);
throw std::runtime_error("attempting to copy data from non-existing RND cube");
}
@ -194,7 +194,7 @@ public:
if (rnums_[cubeidx] == NULL)
{
csoca::elog.Print("Attempting to access data from non-allocated RND cube %d,%d,%d", ic, jc, kc);
music::elog.Print("Attempting to access data from non-allocated RND cube %d,%d,%d", ic, jc, kc);
throw std::runtime_error("attempting to access data from non-allocated RND cube");
}

View file

@ -39,7 +39,7 @@ private:
if (MPI::COMM_WORLD.Get_rank() == 0)
{
#endif
csoca::ilog.Print("Reading tabulated transfer function data from file \n \'%s\'", m_filename_Tk.c_str());
music::ilog.Print("Reading tabulated transfer function data from file \n \'%s\'", m_filename_Tk.c_str());
std::string line;
std::ifstream ifs(m_filename_Tk.c_str());
@ -89,7 +89,7 @@ private:
if (ss.bad() || ss.fail())
{
csoca::elog.Print("Error reading the transfer function file (corrupt or not in expected format)!");
music::elog.Print("Error reading the transfer function file (corrupt or not in expected format)!");
throw std::runtime_error("Error reading transfer function file \'" +
m_filename_Tk + "\'");
}
@ -134,10 +134,10 @@ private:
ifs.close();
csoca::ilog.Print("Read CAMB transfer function table with %d rows", m_nlines);
music::ilog.Print("Read CAMB transfer function table with %d rows", m_nlines);
if (m_linbaryoninterp)
csoca::ilog.Print("Using log-lin interpolation for baryons\n (TF is not "
music::ilog.Print("Using log-lin interpolation for baryons\n (TF is not "
"positive definite)");
#ifdef WITH_MPI

View file

@ -131,13 +131,13 @@ private:
zlist << std::max(ztarget_, zstart_) << ", " << std::min(ztarget_, zstart_) << ", 0.0";
add_class_parameter("z_pk", zlist.str());
csoca::ilog << "Computing transfer function via ClassEngine..." << std::endl;
music::ilog << "Computing transfer function via ClassEngine..." << std::endl;
double wtime = get_wtime();
the_ClassEngine_ = std::move(std::make_unique<ClassEngine>(pars_, false));
wtime = get_wtime() - wtime;
csoca::ilog << "CLASS took " << wtime << " s." << std::endl;
music::ilog << "CLASS took " << wtime << " s." << std::endl;
}
//! run ClassEngine with parameters set up
@ -196,7 +196,7 @@ public:
{
this->tf_isnormalised_ = true;
tnorm_ = std::sqrt(2.0 * M_PI * M_PI * A_s_ * std::pow(1.0 / k_p, n_s_ - 1) / std::pow(2.0 * M_PI, 3.0));
csoca::ilog << "Using A_s to normalise the transfer function!" << std::endl;
music::ilog << "Using A_s to normalise the transfer function!" << std::endl;
}
kmax_ = std::max(20.0, 2.0 * M_PI / lbox * nres / 2 * sqrt(3) * 2.0); // 120% of spatial diagonal, or k=10h Mpc-1
@ -230,7 +230,7 @@ public:
kmin_ = k[0];
kmax_ = k.back();
csoca::ilog << "CLASS table contains k = " << this->get_kmin() << " to " << this->get_kmax() << " h Mpc-1." << std::endl;
music::ilog << "CLASS table contains k = " << this->get_kmin() << " to " << this->get_kmax() << " h Mpc-1." << std::endl;
//--------------------------------------------------------------------------
// single fluid growing/decaying mode decomposition

View file

@ -13,15 +13,15 @@ void print_RNG_plugins()
std::map<std::string, RNG_plugin_creator *> &m = get_RNG_plugin_map();
std::map<std::string, RNG_plugin_creator *>::iterator it;
it = m.begin();
csoca::ilog << "Available random number generator plug-ins:" << std::endl;
music::ilog << "Available random number generator plug-ins:" << std::endl;
while (it != m.end())
{
if ((*it).second){
csoca::ilog.Print("\t\'%s\'\n", (*it).first.c_str());
music::ilog.Print("\t\'%s\'\n", (*it).first.c_str());
}
++it;
}
csoca::ilog << std::endl;
music::ilog << std::endl;
}
std::unique_ptr<RNG_plugin> select_RNG_plugin(ConfigFile &cf)
@ -32,14 +32,14 @@ std::unique_ptr<RNG_plugin> select_RNG_plugin(ConfigFile &cf)
if (!the_RNG_plugin_creator)
{
csoca::ilog.Print("Invalid/Unregistered random number generator plug-in encountered : %s", rngname.c_str());
music::ilog.Print("Invalid/Unregistered random number generator plug-in encountered : %s", rngname.c_str());
print_RNG_plugins();
throw std::runtime_error("Unknown random number generator plug-in");
}
else
{
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << std::setw(32) << std::left << "Random number generator plugin" << " : " << rngname << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << std::setw(32) << std::left << "Random number generator plugin" << " : " << rngname << std::endl;
}
return std::move(the_RNG_plugin_creator->Create(cf));

View file

@ -232,7 +232,7 @@ void output_velocity_displacement_symmetries(
}
csoca::ilog << "std. deviation of invariant : ( D+ | I_xy | I_yz | I_zx ) \n"
music::ilog << "std. deviation of invariant : ( D+ | I_xy | I_yz | I_zx ) \n"
<< std::setw(16) << dplus << " "
<< std::setw(16) << Icomp[0] << " "
<< std::setw(16) << Icomp[1] << " "

View file

@ -13,14 +13,14 @@ void print_TransferFunction_plugins()
std::map<std::string, TransferFunction_plugin_creator *> &m = get_TransferFunction_plugin_map();
std::map<std::string, TransferFunction_plugin_creator *>::iterator it;
it = m.begin();
csoca::ilog << "Available transfer function plug-ins:" << std::endl;
music::ilog << "Available transfer function plug-ins:" << std::endl;
while (it != m.end())
{
if ((*it).second)
csoca::ilog << "\t\'" << (*it).first << "\'" << std::endl;
music::ilog << "\t\'" << (*it).first << "\'" << std::endl;
++it;
}
csoca::ilog << std::endl;
music::ilog << std::endl;
}
std::unique_ptr<TransferFunction_plugin> select_TransferFunction_plugin(ConfigFile &cf)
@ -31,14 +31,14 @@ std::unique_ptr<TransferFunction_plugin> select_TransferFunction_plugin(ConfigFi
if (!the_TransferFunction_plugin_creator)
{
csoca::elog << "Invalid/Unregistered transfer function plug-in encountered : " << tfname << std::endl;
music::elog << "Invalid/Unregistered transfer function plug-in encountered : " << tfname << std::endl;
print_TransferFunction_plugins();
throw std::runtime_error("Unknown transfer function plug-in");
}
else
{
csoca::ilog << "-------------------------------------------------------------------------------" << std::endl;
csoca::ilog << std::setw(32) << std::left << "Transfer function plugin" << " : " << tfname << std::endl;
music::ilog << "-------------------------------------------------------------------------------" << std::endl;
music::ilog << std::setw(32) << std::left << "Transfer function plugin" << " : " << tfname << std::endl;
}
return std::move(the_TransferFunction_plugin_creator->create(cf));