Graduate GADGET2 Simulations: Fixing N-GenIC Error

Click For Summary
The discussion centers on resolving a compile error encountered while using GADGET2 for N-body simulations, specifically when enabling gas particles via N-GenIC. Users identified the issue as stemming from undefined variables in the source code, which has not been addressed by the original developers for over five years. A workaround was discovered by removing the problematic variables and corresponding conditional statements, allowing the code to compile successfully. Participants noted that the error likely resulted from a bad merge prior to code submission. The thread highlights the importance of community support in troubleshooting technical issues in simulation software.
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.
 
I always thought it was odd that we know dark energy expands our universe, and that we know it has been increasing over time, yet no one ever expressed a "true" size of the universe (not "observable" universe, the ENTIRE universe) by just reversing the process of expansion based on our understanding of its rate through history, to the point where everything would've been in an extremely small region. The more I've looked into it recently, I've come to find that it is due to that "inflation"...

Similar threads

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