-
Notifications
You must be signed in to change notification settings - Fork 28
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
create function to populate cell_in #251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comment.
@@ -62,7 +62,6 @@ void set_rotate_poly_true(void){ | |||
void error_handler(char *str) | |||
error handler: will print out error message and then abort | |||
***********************************************************/ | |||
#pragma acc routine seq | |||
void error_handler(const char *msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this function be cleaned up?
Also, it seems that there is an "exit(1)" that can be executed but without printing anything. Is this true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't changed the exit(1) statement.
I think this is as clean as we can get this function right now.
We need to look up what kind of error handling OpenACC has and I was going to leave that til the end.
I honestly have no idea what's happening, but I recently ran gpu_dev for benchmarking with respect to the CPU version and I'm seeing a lot more differences than I remember seeing several weeks ago (implying have I been doing something wrong this entire time?). The differences are in The other differences are seen with Are we good with these differences? |
It depends. Max diff of 0.0197258 for an xgrid areas doesseem high; but if you know that the percent differences are sufficiently small, then its its OK. Note that cell areas can be ~10^7 meters square is SOME grids cells in some grids, so if 0.0197258 meter square difference occurs for a large cell, then that is not really so bad. What is the highest pct difference in the same test case? |
The percentage difference for xgrid_area seems to be small, but seeing large percentage difference (up to 100%) for tile1_distance but these numbers are somewhere in the 10^-15 |
This kind of error (tiny field values, large pct error) in floating point output is acceptable in CPU vs GPU comparisons. |
This PR creates a new function called
get_CellStruct
. This function populates the component arrays of cell_in.