FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

added randon number and pid to outputlog. outputlog now uses folds in… · PCMSolver/pcmsolver@fc539a0 · GitHub

Repository navigation

Commit fc539a0

Browse files
committed
added randon number and pid to outputlog. outputlog now uses folds in vim
1 parent 08a29ad commit fc539a0

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎src/bin/poly_wavelet.cpp‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ void read_data(const std::string &filename, Compression *comp, std::vector<doub
2929
file.open(filename);
3030

3131
if(file.is_open()) {
32+
LOG(">>> DATA_FILE");
3233
file >> a >> dp >> b >> eps;
34+
LOG(a, " ", dp, " ", b, " ", eps);
3335
comp->aPrioriA = a;
3436
comp->aPrioridPrime = dp;
3537
comp->aPosterioriB = b;
3638
file >> nAtoms;
3739
for(unsigned int i = 0; i < nAtoms; ++i){
3840
file >> charge >> x >> y >> z;
41+
LOG(charge, " ", x," ", y, " ", z);
3942
Eigen::Vector3d position(x,y,z);
4043
atoms_->push_back(position);
4144
charge_->push_back(charge);
4245
}
46+
LOG("<<< DATA_FILE");
4347
} else {
4448
throw std::runtime_error("Data file could not be opened");
4549
}
@@ -53,7 +57,10 @@ int main(int argc, char* argv[]) {
5357
std::vector<double> charge_;
5458
std::vector<Eigen::Vector3d> atoms_;
5559
read_data(argv[2], &comp, &charge_, &atoms_);
56-
60+
61+
LOG(">>> GEOMETRY_FILE");
62+
LOG(argv[1]);
63+
LOG("<<< GEOMETRY_FILE");
5764
// Set up cavity, read it from Maharavo's file
5865
WaveletCavity cavity(argv[1]);
5966
//cavity.scaleCavity(1./convertBohrToAngstrom);
@@ -73,6 +80,7 @@ int main(int argc, char* argv[]) {
7380
FILE* debugFile = fopen("debug.out","w");
7481
fclose(debugFile);
7582
#endif
83+
LOG(">>> PCMSOLVER");
7684
PWCSolver solver(gfInside, gfOutside, comp, firstKind);
7785
solver.buildSystemMatrix(cavity);
7886
cavity.uploadPoints(solver.getQuadratureLevel(), solver.getT_());
@@ -102,5 +110,9 @@ int main(int argc, char* argv[]) {
102110
LOG("totalFakeASC = ", totalFakeASC);
103111
LOG("Delta = ", totalASC - totalFakeASC);
104112
LOG("Energy = ", energy);
113+
LOG("<<< PCMSOLVER");
114+
LOG(">>> TIMING");
105115
LOG_TIME;
116+
LOG("<<< TIMING");
117+
LOG("# vim: foldmarker=>>>,<<< foldlevel=0 foldmethod=marker");
106118
}

‎src/utils/Logger.hpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ namespace logging
6767
: globalPrintLevel_(print), policy_(new logPolicy)
6868
{
6969
std::stringstream namestream;
70-
namestream << "pcmsolver" << rand();
70+
srand(time(NULL));
71+
namestream << "pcmsolver" << "_" << rand() << "_" << getpid();
7172
std::string nameB = namestream.str();
7273
if(!policy_) {
7374
throw std::runtime_error("LOGGER: Unable to create the logger instance");

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL