BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
48 stars 15 forks source link

Make non-thread-safe warnings more specific #1327

Open JCGoran opened 2 weeks ago

JCGoran commented 2 weeks ago

The warning MOD file uses non-thread safe constructs of NMODL does not really tell me which ones are not thread-safe, so this PR makes it more specific and now outputs a warning with about the ones which are not safe. More of a UX improvement than anything else.

bbpbuildbot commented 2 weeks ago

Logfiles from GitLab pipeline #217627 (:no_entry:) have been uploaded here!

Status and direct links:

pramodk commented 2 weeks ago

@JCGoran: just to expand a bit Luc’s comment: In the context of neuron, we will need to support code generation for all cases i.e. everything that nocmodl supports today. As part of the PR like https://github.com/neuronsimulator/nrn/pull/2906, we are removing/refactoring parts related to VECTORIZE. Hence this wouldn’t be needed.

1uc commented 2 weeks ago

I'm sorry, I confused myself. We're getting rid of vectorize by renaming it thread-safe and sometimes genuinely removing it. The problem is that vectorize refers to both putting data into vectors (which we always do nowadays); and being thread-safe (which MOD file may or may not be). These instances would likely just become info.thread_safe.

Personally, I'd do it differently. Keep the catch all as a warning (because users might want to know that something "is up") and make the new log messages info or debug (because the details are only important while debugging).