New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Name insertion is done in thread-serial context and replace strings with Name objects #724

Merged
merged 13 commits into from May 22, 2017

Conversation

Projects
None yet
5 participants
@stinebuu
Contributor

stinebuu commented May 19, 2017

This PR fixes #722 and #719 by

  • Adding an assert to make sure Name::insert() is only executed in thread-serial context.
  • Replacing strings in get_status() and set_status() dictionary lookups to Name objects.
@heplesser

This looks very fine, just some minor points on alphabetical order. A proper regression test for this issue would be difficult to create, since the Name table is created only once per nest invocation and not reset by ResetKernel. Since we are playing it safe now with the assertion in Name::insert() and had some other tests that triggered when the Name table got corrupted, I think we can proceed without an explicit unit test here.

Show outdated Hide outdated librandom/librandom_names.h
Show outdated Hide outdated sli/name.cc
Show outdated Hide outdated sli/name.cc
Show outdated Hide outdated nestkernel/nest_names.h
extern const Name alpha; //!< stdp_synapse parameter
extern const Name alpha_1; //!< Specific to Kobayashi, Tsubo, Shinomoto 2009
extern const Name alpha_2; //!< Specific to Kobayashi, Tsubo, Shinomoto 2009
extern const Name Aminus; //!< Used by stdp_connection_facetshw_hom

This comment has been minimized.

@heplesser

heplesser May 19, 2017

Contributor

Here we get a problem that nest_names was meant to avoid: we introduce A_minus and Aminus. But we cannot fix this here, that is something for NEST3.

@heplesser

heplesser May 19, 2017

Contributor

Here we get a problem that nest_names was meant to avoid: we introduce A_minus and Aminus. But we cannot fix this here, that is something for NEST3.

Show outdated Hide outdated nestkernel/nest_names.h
Show outdated Hide outdated nestkernel/nest_names.h
@heplesser

Approved conditional to Travis passing.

@heplesser heplesser requested a review from gtrensch May 19, 2017

@gtrensch

This looks ok to me !

@jougs

jougs approved these changes May 22, 2017

Nice works! Many thanks for fixing.

@jougs jougs merged commit 15ac89b into nest:master May 22, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stinebuu stinebuu deleted the stinebuu:convert_to_names branch May 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment