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

ADIOS_DATATYPES missing long long #153

Closed
burlen opened this issue Nov 7, 2017 · 5 comments
Closed

ADIOS_DATATYPES missing long long #153

burlen opened this issue Nov 7, 2017 · 5 comments

Comments

@burlen
Copy link

burlen commented Nov 7, 2017

not sure if this is intentional or not, but from the perspective of trying to integrate other library's data structures which make use of long long with ADIOS it seems to be an omission. according to c99 long is at least 32 bits and long long is at least 64 bits, so there could be (admittedly rare) cases when the two are not the same size.

@pnorbert
Copy link
Contributor

pnorbert commented Nov 7, 2017 via email

@burlen
Copy link
Author

burlen commented Nov 7, 2017

OK, works for me

@burlen burlen closed this as completed Nov 7, 2017
@burlen burlen reopened this Nov 7, 2017
@burlen
Copy link
Author

burlen commented Nov 7, 2017

Although I wonder then what happens on a system where long is 32 bits? My inclination would be to always map long to adios_long. But in ADIOS API void* is used, and it would catastrophic to pass a long(32 bits) and tell ADIOS it's adios_long(64 bits). I think ADIOS is doing a confusing thing here.

@burlen
Copy link
Author

burlen commented Nov 7, 2017

For instance here's a code snippet

  96   else if (dynamic_cast<vtkLongArray*>(da))
  97     {
  98     return adios_long;
  99     }

I will have to modify to this

  96   else if (dynamic_cast<vtkLongArray*>(da))
  97     {
  ++     if (sizeof(long) == 4)
  ++       return adios_integer; // always 32 bits
  98     return adios_long; // always 64 bits
  99     }

@burlen
Copy link
Author

burlen commented Nov 7, 2017

so rather than being equivalent their C counterparts, adios_integer is equivalent to int32_t, and adios_long is equivalent to int64_t this info would be a good addition to user manual

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