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

This is function should take an unsigned long long type as it's parameter #133

Closed
ndp-opendap opened this issue Nov 12, 2020 · 1 comment
Assignees

Comments

@ndp-opendap
Copy link
Contributor

ndp-opendap commented Nov 12, 2020

void set_size(unsigned long size) { d_size = size; }

Because the internal variable d_size is an unsigned long long (and why don't we just migrate to size_t?) and setting it's value with an unsigned long is, well, it defeats the purpose of making the internal variable an unsigned long long and screws the whole deal for large datasets.

For example if I make a D4Dimension with size 3429693028 I get this gem:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" xmlns:dmrpp="http://xml.opendap.org/dap/dmrpp/1.0.0#" dapVersion="4.0" dmrVersion="1.0" name="" dmrpp:href="https://harmony-uat-staging.s3.us-west-2.amazonaws.com/public/sds/staged/ATL03_20200714235814_03000802_003_01.h5">
    <Byte name="data">
        <Dim size="-865274268"/>
        <dmrpp:chunks byteOrder="LE">
            <dmrpp:chunkDimensionSizes>342969302</dmrpp:chunkDimensionSizes>
            <dmrpp:chunk offset="0" nBytes="342969302" chunkPositionInArray="[0]"/>
            <dmrpp:chunk offset="342969302" nBytes="342969302" chunkPositionInArray="[342969302]"/>
            <dmrpp:chunk offset="685938604" nBytes="342969302" chunkPositionInArray="[685938604]"/>
            <dmrpp:chunk offset="1028907906" nBytes="342969302" chunkPositionInArray="[1028907906]"/>
            <dmrpp:chunk offset="1371877208" nBytes="342969302" chunkPositionInArray="[1371877208]"/>
            <dmrpp:chunk offset="1714846510" nBytes="342969302" chunkPositionInArray="[1714846510]"/>
            <dmrpp:chunk offset="2057815812" nBytes="342969302" chunkPositionInArray="[2057815812]"/>
            <dmrpp:chunk offset="2400785114" nBytes="342969302" chunkPositionInArray="[2400785114]"/>
            <dmrpp:chunk offset="2743754416" nBytes="342969302" chunkPositionInArray="[2743754416]"/>
            <dmrpp:chunk offset="3086723718" nBytes="342969302" chunkPositionInArray="[3086723718]"/>
            <dmrpp:chunk offset="3429693020" nBytes="8" chunkPositionInArray="[3429693020]"/>
        </dmrpp:chunks>
    </Byte>
</Dataset>
@jgallagher59701
Copy link
Member

Fixed. Merged. Tested against the BES on OSX. Reopen if a force BES build fails.

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