GADGET2 Simulations: Fixing N-GenIC Error

In summary: Thanks for finding a workaround. That makes sense. It was probably a bad merge before they submitted the code. Thanks for finding a workaround.
  • #1
Plaetean
36
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
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 

1. What is GADGET2 Simulation?

GADGET2 Simulation is a computer simulation program used by astrophysicists to study the formation and evolution of galaxies. It is designed to model the behavior of dark matter, gas, and stars in a cosmological setting.

2. What is N-GenIC Error in GADGET2 Simulations?

N-GenIC Error is an error that occurs during the initial conditions generation process in GADGET2 Simulations. It can happen when there is an error in the input parameters or when the program cannot find a suitable starting point for the simulation.

3. What are the common causes of N-GenIC Error?

The most common causes of N-GenIC Error are incorrect input parameters, such as a wrong cosmological model or particle number, and issues with the starting point selection, such as an insufficient number of particles or a mismatch between starting points and input parameters.

4. How can N-GenIC Error be fixed?

To fix N-GenIC Error, the input parameters should be carefully checked and corrected if necessary. If the error persists, the starting point selection should be reviewed and adjusted accordingly. Sometimes, changing the simulation box size or the initial redshift can also resolve the error.

5. Is there a way to prevent N-GenIC Error in GADGET2 Simulations?

While N-GenIC Error cannot be completely prevented, it can be minimized by carefully choosing the input parameters and regularly checking for any potential issues with the starting point selection. It is also recommended to run test simulations with different inputs to ensure the accuracy of the results.

Similar threads

  • Programming and Computer Science
Replies
19
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Science and Math Textbooks
Replies
2
Views
2K
  • Programming and Computer Science
Replies
15
Views
2K
  • Mechanical Engineering
Replies
3
Views
2K
  • Programming and Computer Science
Replies
4
Views
5K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Programming and Computer Science
Replies
7
Views
2K
Replies
4
Views
1K
Replies
4
Views
1K
Back
Top