4
\$\begingroup\$

Post is here: parsing large data file in the context of mpirun

Why did this get put on hold? This is functioning code, it just blows up in memory when the file is too large.

\$\endgroup\$
6
\$\begingroup\$

As the post notice says (emphasis mine):

"Questions containing broken code or asking for advice about code not yet written are off-topic, as the code is not ready for review. After the question has been edited to contain working code, we will consider reopening it."

Your question is literally saying:

[...] often my program will fail within the following lines of code.

Working code, by our definition, does not "blow up", or "fail". Working code that's ready for review, is code that works exactly as intended, to the best of your knowledge.

Asking what boils down to "where's my bug?" with a wall of code on Stack Overflow is very much frowned upon, because SO doesn't want to hunt down your bugs either - they want to see a Minimal, Complete, Verifiable Example (MCVE) that reproduces the issue with as little code as possible; often, uninformed SO users that haven't read the Guide to CR for SO users make comments and vote to close these posts "because it belongs on CodeReview.SE" - which is misguided, misleading, and wrong.


I strongly suspect your question was closed on these grounds.

Now, there's a difference between "it's not efficient enough and consumes more memory than it should" and "it consumes so much memory it blows up somewhere in this code below": the former suggests your code works as intended, and you're asking for ways to improve its efficiency. The latter suggests your code does not work as intended, and you're asking for help fixing a specific programming issue. The former is precisely what we do on CR, the latter is explicitly off-topic.

I'd reopen your question, but this sentence:

[...] often my program will fail within the following lines of code.

...needs to be reworded to better convey that your code is actually working, and that you're looking to reduce the memory footprint, as opposed to find and fix a bug.


It's down to what you want.

If your Stack Overflow post gets answered, and someone points a finger at the problem.. would you still be interested in general feedback about any & all aspects of your code? If so, then I suggest you edit the working code into your CR post - doing that will automatically make the question enter the reopen review queue, where the community will vote to reopen your edited question.

If what you want is to fix the specific issue with memory, then your question is where it belongs, on Stack Overflow.

\$\endgroup\$
8
\$\begingroup\$

I don't believe that the question is off-topic. However, the way that it was posted is problematic.

The likely trigger for closure was the first sentence:

I am parsing a large data file, and often my program will fail within the following lines of code.

The way you phrased that sounds a lot like your code is broken: you say that your code occasionally "fails", but didn't specify that it is a scalability problem. If you could amend the question to clarify that it works correctly for small inputs but needs some help with to scale to handle large inputs, then your question would be on-topic. (This is not very different from the many questions we have on the site. Instead of failing to complete in a reasonable amount of time for large inputs, your program is failing to run in a reasonable amount of memory for large inputs.)

That said, even if reopened with that clarification, I would still downvote that question. All that you have told us is that it's using MPI to parse a large data file. You should explain what you are really trying to accomplish, including the goal of your project, a sample of the input file, and the corresponding output, so that we don't need to reverse-engineer your code to guess at your intentions.

If you are still interested in having your code reviewed, edit the question to add those clarifications and undelete it.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .