Git Product home page Git Product logo

Comments (3)

pnorbert avatar pnorbert commented on June 5, 2024

Hi Andrew,

ADIOS types are fixed size, they don't depend on compiler settings. So I
don't know how to support bool type with who knows what size.

On the other hand, adios_long is defined as 8 bytes integer (handled as
int64_t), so if you see it behaves differently, that's a bug.

Best regards
Norbert

On Fri, Oct 4, 2013 at 3:19 PM, Andrew Corrigan [email protected]:

First of all: Sorry for all the nitpicking! ADIOS is awesome, these are
just some minor issues that it would be nice to have resolved :)

Is it possible to define adios_long_long and adios_cxx_bool?

I see that there is adios_long, but adios_long is not necessarily
guaranteed to be 64-bit, and therefore my code uses 'long long', instead.
Currently I have a runtime check that sizeof(long) == sizeof(long long), in
order to process 'long long' data with ADIOS, but there is no guarantee of
this.

Likewise, I am currently working around the lack of adios_cxx_bool (as is
available in the latest MPI) by using adios_byte, but I do not believe that
there is any guarantee that bool is just 1 byte.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11
.

from adios.

andrewcorrigan avatar andrewcorrigan commented on June 5, 2024

I apologize for my misunderstanding, and thank you for the clarification.

Just to be sure I understand correctly now, I see in adios_types.h there are comments with sizes. I assume therefore that if I am on a machine where sizeof(long) == 4, I would not use adios_long (i.e. 8 bytes), and instead use adios_integer (i.e. 4 bytes), correct?

I understand that I am being pedantic, I just want to get this right in my code once and for all, and forget about it.

from adios.

pnorbert avatar pnorbert commented on June 5, 2024

Yes, that's right. And you are not pedantic. If you used a type with 4
bytes long and let ADIOS believe you have a type with 8 bytes that would
result in invalid memory accesses.

On Fri, Oct 4, 2013 at 6:00 PM, Andrew Corrigan [email protected]:

I apologize for my misunderstanding, and thank you for the clarification.

Just to be sure I understand correctly now, I see in adios_types.h there
are comments with sizes. I assume therefore that if I am on a machine where
sizeof(long) == 4, I would not use adios_long (i.e. 8 bytes), and
instead use adios_integer (i.e. 4 bytes), correct?

I understand that I am being pedantic, I just want to get this right in my
code once and for all, and forget about it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-25733009
.

from adios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.