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

Ability to call scream_kerror_msg with a string variable #6

Closed
singhbalwinder opened this issue Aug 11, 2020 · 2 comments · Fixed by #25
Closed

Ability to call scream_kerror_msg with a string variable #6

singhbalwinder opened this issue Aug 11, 2020 · 2 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request new feature

Comments

@singhbalwinder
Copy link
Contributor

I am trying to do the following using scream_kerror_msg function :

const char* errstr = "some error message";
scream_kerror_msg(errstr);

and getting the following error:

scream/components/scream/src/physics/share/physics_saturation_impl.hpp(21): error: expected a ")"
          detected during:
            instantiation of "scream::physics::Functions<ScalarT, DeviceT>::Spack scream::physics::Functions<ScalarT, DeviceT>::qv_sat(const screa\
m::physics::Functions<ScalarT, DeviceT>::Spack &, const scream::physics::Functions<ScalarT, DeviceT>::Spack &, __nv_bool, const scream::physics::F\
unctions<ScalarT, DeviceT>::Smask &, scream::physics::Functions<ScalarT, DeviceT>::SaturationFcn) [with ScalarT=scream::Real, DeviceT=scream::Defa\
ultDevice]"

Please note that the following code works:

scream_kerror_msg("Some error message");

Therefore, scream_kerror_msg is not able to take a variable as an argument.

Is your feature request related to a problem? Please describe.
A : Yes, I am trying to build an error message dynamically but this function requires an explicit string.

Describe the solution you'd like
A Ability to call this function with a variable argument

@singhbalwinder singhbalwinder added enhancement New feature or request new feature labels Aug 11, 2020
@welcome
Copy link

welcome bot commented Aug 11, 2020

Thanks for opening your first issue here! Be sure to follow the issue template!

@jgfouca
Copy link
Member

jgfouca commented Aug 11, 2020

@bartgol , I wrote our assertion macros, so I can take this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants