Skip to content
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

Score-P User Parameter handling is broken #146

Open
AndreasGocht opened this issue May 4, 2022 · 0 comments
Open

Score-P User Parameter handling is broken #146

AndreasGocht opened this issue May 4, 2022 · 0 comments

Comments

@AndreasGocht
Copy link
Collaborator

The User Parameter handling is broken. E.g. the SCOREP_USER_PARAMETER_STRING expands to:

#define SCOREP_USER_PARAMETER_STRING( name, value ) { \
        static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER; \
        SCOREP_User_ParameterString( &scorep_param, name, value ); }

be aware of the curly brackets!

However, the bindings call the parameter like the following:

void parameter_string(std::string name, std::string value)
{
    static SCOREP_User_ParameterHandle scorep_param = SCOREP_USER_INVALID_PARAMETER;
    SCOREP_User_ParameterString(&scorep_param, name.c_str(), value.c_str());
}

which will result in always the same parameter being used, as scorep_param is only initialised once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant