GADGET2 Simulations: Fixing N-GenIC Error

Click For Summary

Discussion Overview

The discussion revolves around a technical issue encountered while running the N-body simulation software GADGET2, specifically related to generating initial conditions using N-GenIC and addressing a compile error when enabling gas particles in the makefile.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes encountering a compile error in the source code when trying to enable gas particles in GADGET2.
  • Another participant suggests that debugging the code may be necessary if one has coding experience, otherwise, they imply that waiting for the original developer to fix the issue might be the only option.
  • A later reply proposes a workaround by removing undefined variables and corresponding if statements from the code, claiming that this allowed the code to compile properly.
  • Another participant agrees with the workaround and speculates that the issue may have originated from a bad merge before the code submission.

Areas of Agreement / Disagreement

There is no consensus on the best approach to resolve the compile error, as participants offer different perspectives on debugging and potential workarounds.

Contextual Notes

Participants note the presence of undefined variables in the code as a contributing factor to the compile error, but the exact implications of these changes and their long-term effects remain unresolved.

Plaetean
Messages
35
Reaction score
0
So this is a pretty specific technical question - but if anyone has experience running the N-body simulation GADGET2, I'm generating initial conditions using N-GenIC, and trying to turn on gas particles in the makefile gives the same error as described here: https://wwwmpa.mpa-garching.mpg.de/gadget/gadget-list/0506.html

I can't find a fix for this anywhere despite it being quite an old question, just wondering if anyone knows how to resolve this.

Thanks as always
 
Last edited:
Space news on Phys.org
That tells me there's a compile error in the source code. If you've got some coding experience, you might be able to debug and fix it. Otherwise the only answer is to wait for the original developer to do so. Since they haven't fixed it in five years, though, sounds like that's highly unlikely to happen.
 
kimbyd said:
That tells me there's a compile error in the source code. If you've got some coding experience, you might be able to debug and fix it. Otherwise the only answer is to wait for the original developer to do so. Since they haven't fixed it in five years, though, sounds like that's highly unlikely to happen.

Thanks for replying - just in case anyone else ends up with the problem I think I may have found a workaround. So the error results from the fact that there are undefined variable in the code - I have simply removed troublesome variables and corresponding if statement from the code, and they do not appear in any other of the codes so everything compiled properly. I think it's all working OK now, but I will update this post if I find anything else.
 
Plaetean said:
Thanks for replying - just in case anyone else ends up with the problem I think I may have found a workaround. So the error results from the fact that there are undefined variable in the code - I have simply removed troublesome variables and corresponding if statement from the code, and they do not appear in any other of the codes so everything compiled properly. I think it's all working OK now, but I will update this post if I find anything else.
That makes sense. It was probably a bad merge before they submitted the code.
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
4K
Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K