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

Don't call fs_read_and_perturb for bool array #136

Open
phmarti opened this issue Feb 20, 2018 · 7 comments
Open

Don't call fs_read_and_perturb for bool array #136

phmarti opened this issue Feb 20, 2018 · 7 comments

Comments

@phmarti
Copy link
Contributor

phmarti commented Feb 20, 2018

pp_ser.py generates the fortran calls for write, read and read & perturb but fs_read_and_perturb is not implemented for bool arrays.

It clearly doesn't really make sense to perturb the boolean masks, but in the current state trying to serialize a bool array generates non compilable code (even if only write or read is used).

I suspect pp_ser.py doesn't know about data types, right? Couldn't fs_read_and_perturb_bool simply call fs_read_bool?

@clementval
Copy link
Collaborator

@phmarti As you said, it doesn't make sense to perturb a boolean array. I think your solution is fine. By the way, what is done for integer at the moment? I think it also doesn't make so much sense to perturb it ...

@havogt
Copy link
Collaborator

havogt commented Feb 20, 2018

👍

@phmarti
Copy link
Contributor Author

phmarti commented Feb 20, 2018

integer also simply call fs_read_int

@phmarti
Copy link
Contributor Author

phmarti commented Feb 20, 2018

PR #138

How do you test the fs_read_and_perturb calls?

@clementval
Copy link
Collaborator

@phmarti So far looks like it's not tested

@havogt
Copy link
Collaborator

havogt commented Feb 26, 2018

I would like to keep this issue open as we are introducing again code in the serialbox core which is driven by an application (pp_ser) just because it is not smart enough to use the library properly...
To be more specific: the core API is complete and descriptive by not providing perturbation for datatypes where it does not make sense. #138 introduces (more) functions which are lying about its functionality. They pretend to perturb, but don't do it...

@clementval
Copy link
Collaborator

Ok ... make sense

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

No branches or pull requests

3 participants