-
Notifications
You must be signed in to change notification settings - Fork 36
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
scda: Write and read a file header #193
Conversation
srand may be used by other programs and hence interfer with scda's fuzzy error testing.
When merging the latest develop branch, will the CI go through? |
Yes, I think so. I merged the latest develop branch into this PR and the CI looks good to me. |
* \return True if \b errcode encodes success and | ||
* false otherwise. | ||
*/ | ||
int sc_scda_is_success (sc_scda_ferror_t errorcode); |
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.
Thanks! I'll be merging this one now.
For future development: Would it be more intuitive to rename the function to sc_scda_ferror_success (or something else -- open for suggestions) and to return MPI_SUCCESS on success and some MPI error otherwise?
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 think that a function sc_scda_ferror_success
that returns MPI error codes may be unexpected to the user and we also have the sc_scda_ret_t
value SC_SCDA_FERR_SUCCESS
that may be named too similar.
Do you think it is sensible to name the function sc_scda_ferror_is_success
to be consistent to the other scda function names but still use the semantic of mapping an error code to a Boolean?
+/** Check if a scda_errorcode_t encodes success.
+ *
+ * \param [in] errorcode An errcode that is output by a sc_scda function.
+ * \return True if \b errcode encodes success and
+ * false otherwise.
+ */
+int sc_scda_is_success (sc_scda_ferror_t errorcode);
I think that a function `sc_scda_ferror_success` that returns MPI error codes may be unexpected to the user and we also have the `sc_scda_ret_t` value `SC_SCDA_FERR_SUCCESS` that may be named too similar.
Good point.
Do you think it is sensible to name the function `sc_scda_ferror_is_success` to be consistent to the other scda function names but still use the semantic of mapping an error code to a Boolean?
I like this proposal!
|
scda: Write and read a file header
This PR adds the functionality to read and write a scda file header, i.e. implementing in particular the functions
fopen_write
andfopen_read
according to the scda API introduced in #132 and #156.A list of some of the functionalities that are implemented in this PR is
fopen_read
andfopen_write
,fopen_read
andfopen_write
; including MPI count error management,ferror_string
to convert error codes to error strings,sc_scda_is_success
to check if an error code encodes success.