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

Problem with dataset size #15

Open
rubencmu opened this issue Dec 8, 2016 · 7 comments
Open

Problem with dataset size #15

rubencmu opened this issue Dec 8, 2016 · 7 comments
Labels

Comments

@rubencmu
Copy link

rubencmu commented Dec 8, 2016

Hi, can I get help with this question that was asked in the CCD help desk. The user is working with the py-causal implementation.
Thanks.
I paste it below:


Also, I have a large (8GB) csv file that is able to eventually break your code:

Exception in thread "Thread-0" java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:869)
at edu.cmu.tetrad.io.AbstractContinuousDataReader.extractVariables(AbstractContinuousDataReader.java:75)
at edu.cmu.tetrad.io.AbstractContinuousDataReader.analyzeData(AbstractContinuousDataReader.java:59)
at edu.cmu.tetrad.io.TabularContinuousDataReader.readInData(TabularContinuousDataReader.java:62)

@chirayukong
Copy link
Collaborator

@jdramsey @kvb2univpitt It might be related to the DataReader module.

@jdramsey
Copy link
Contributor

jdramsey commented Dec 8, 2016

This isn't my code, but that's this line:

    try (FileChannel fc = new RandomAccessFile(dataFile.toFile(), "r").getChannel()) {
        MappedByteBuffer buffer = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());

The exception is in the second line.

@kvb2univpitt
Copy link

I'll take a look at the data reader. I just need to find 8GB or larger dataset to test on.

@espinoj
Copy link
Contributor

espinoj commented Dec 9, 2016

@rubencmu can you please share the file with @kvb2univpitt so he can replicate/debug

@rubencmu
Copy link
Author

rubencmu commented Dec 9, 2016

I will ask the user to share the location of the data. I will share it as soon as I get a response.
@kvb2univpitt @espinoj

@rubencmu
Copy link
Author

rubencmu commented Dec 9, 2016

@espinoj @kvb2univpitt Here is the answer from the user:


Yeah! It's the Higgs Boson dataset. I managed to contort things so it parsed. Deciding if I want to try to fix Javabridge (even if just with multiprocessing).

https://archive.ics.uci.edu/ml/datasets/HIGGS


@kvb2univpitt
Copy link

Sorry for the late response. There's a bug with reading large file via memory-mapped. The size of the region to be mapped cannot be greater than the max integer, even though the size parameter in the map method is a long type.

public abstract MappedByteBuffer map(MapMode mode, long position, long size)

This will be fixed in the new data reader.

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

No branches or pull requests

5 participants