Coder Social home page Coder Social logo

Comments (4)

taylor13 avatar taylor13 commented on July 23, 2024

It might have something to do with use of 64 bit integers (integer*4 in FORTRAN) , which allows a maximum value of 2147483647.
Note that for T=30, the array size is 2005401600 (smaller than max integer), but T=45 is larger than the maximum value represented by a 64 bit integer.
I agree that we should trap the problem if we can and display a clear error message.

from cmor.

taylor13 avatar taylor13 commented on July 23, 2024

If the problem could be easily corrected by judicious use of integer*8 for the allocation step, that might be an option, but only if not a lot of work since the huge array can be broken down a written in smaller segments (if Matt's supposition is correct).

from cmor.

matthew-mizielinski avatar matthew-mizielinski commented on July 23, 2024

Hi @taylor13, yes upping the type of appropriate variables to integer*8 is one option. Another would be deal with this in the python layer; if product of the array shape exceeds 2^31 raise an exception (ideally a dedicated one). Users can then react to this (e.g. by halving chunk size being written).

from cmor.

mauzey1 avatar mauzey1 commented on July 23, 2024

I have identified that this issue was being caused by the use of the type int in the function cmor_write_var_to_file when calculating the number of elements in the data. I have resolved this by replacing int with size_t for variables used to calculate the size of the data and indexes.

I have a branch that should be ready to merge but I am now encountering issues with the udunits2 library in the Linux builds. That's a separate issue that seems to be tied with the latest release of udunits2 on conda.

from cmor.

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.