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

Support for various tw_stime types #71

Closed
gonsie opened this issue Sep 8, 2015 · 2 comments
Closed

Support for various tw_stime types #71

gonsie opened this issue Sep 8, 2015 · 2 comments

Comments

@gonsie
Copy link
Member

gonsie commented Sep 8, 2015

We have had several requests for supporting arbitrary tw_stime types (see #58 and #34). Could we provide an API for developers to specify their own tw_stime type? What would we need to change?

@JohnPJenkins
Copy link

The toughest part from a modeling perspective IMO is handling the relationship between tw_stimes and RNGs. For example, floating-point random functions are used fairly extensively in models to add random noise to functions, many of which are less than 1 - tw_rand_unif, for example, returns values in the range (0.0, 1.0) (not sure whether the range is exclusive or not). We'd need to make our models aware that we may no longer be using fractional values. Similarly, we'd likely want to drop down below nanosecond granularity if using integer tw_stime, so handling units correctly would be important (more of a CODES issue than a ROSS one, but mentioning here for completeness).

A cmake option at ROSS build time for controlling the type of tw_stime would be sufficient (this is probably obvious, but wasn't sure whether you were talking about a programmatic API or a build option).

@gonsie
Copy link
Member Author

gonsie commented Sep 18, 2019

resolved by #159.

As to @JohnPJenkins 's comment: This is the responsibility of the model developers. The model developers must determine which type they are using for tw_stime and adjust accordingly. Since it's a build-time thing, there should be no impact to codes.

@gonsie gonsie closed this as completed Sep 18, 2019
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

2 participants