Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Conversation

@tapaswenipathak
Copy link
Contributor

@tapaswenipathak tapaswenipathak commented Jun 17, 2019

Fix #95.

  • Run and write few logs

@bbpbuildbot
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@bbpbuildbot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion there is still a lot to be done before this PR can be considered for merging. Just to give a few high-level remarks:

  • The PR should come along with a clear explanation on the technical choices taken and the changes done. The commit & PR messages are non-existent here.
  • The code has to compile and pass tests before merging can be considered
  • The code has to adhere to our standard and must be commented
  • The PR has to address the issue fully. While a possible logger implementation has been provided (I'm still wondering why this particular logger was chosen), the logger is almost not used anywhere in the code.

Feel free to update the PR to resolve above issues.

@@ -0,0 +1,6663 @@
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't favor simply including external libraries. Much better would be to add git submodules for such libraries

#include <mpi.h>
#endif

#include "CORENEURON/config.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this is referring to?

static const string reset;
};

const string OUT::black = "\033[30m";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would those assignments not be done inside the struct?

*/
#define ML_CVLOG_IF(condition, verbose_level, logger_id, x) CVLOG_IF(condition, verbose_level, logger_id) << x
#else
#define ML_LOG(level, x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see here and further below that in your implementation (maybe that's the easylogging way to do it) you heavily rely on macros. I think that's a bad idea. We are trying to modernize this code, moving away from macros and defines as possible. C++ offers other, more powerful and flexible features to build and use APIs.

namespace CORENEURON
{
/**
* Logging facilities for CORENEURONT++.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit puzzled about this naming?


namespace coreneuron
{
namespace mpi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in many other places in this PR it's not entirely clear where your choice comes from and what this particular change is there for. There is a lot of documentation / commenting missing

printf("Error: Stop time (%lf) < Start time (%lf), restoring from checkpoint? \n",
tstop, t);
abort();
ML_LOG(ERROR, "Error: Stop time" << tstop << "Start time" << "restoring from checkpoint? \n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code cannot have been compiled. The line above could not compile, I believe.

abort();
}
ML_LOG(FATAL, "fatal error");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad indenting...

#endif
{
abort();
ML_LOG(FATAL, "fatal error");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The program will still need to be aborted.

@ohm314
Copy link
Contributor

ohm314 commented Jan 23, 2020

No change requests were implemented. No activity for half a year, I'll close this now.

@ohm314 ohm314 closed this Jan 23, 2020
@alkino alkino mentioned this pull request Feb 13, 2020
18 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamlining exit on error procedures

3 participants