-
Notifications
You must be signed in to change notification settings - Fork 24
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
Total number of bodies exceeds NMAX (ONLY in close6 execution) #21
Comments
The source file close6.for will not even compile with those parameter values:
The problem is that parameter (NMESS = 100) caused the miscompile. You must have changed that to get the compiles to work before running the 3 programs. |
I changed NMESS back to 200 (original value) but kept your other parameters.
No early terminations and no crashes. |
Please note that these 20-to-30-year-old Fortran programs are fragile in terms of self-diagnosing and error prevention. You can see that they root from older Fortran programs that obeyed 80-column cards and 121-character-line printers. Recently, some capability towards enhanced parameterization and error checking has been added but the code remains far from "perfect". If I had a magic wand, this code would be all Java or some other strong type-checking language. This project is a great candidate for rewrite by some enterprising Physics upper division or graduate students. I am sure that 4xxi would welcome suggestions and a helping hand if you find areas of improvement. |
Hi texadactyl! Regards |
This is the file I am using for small bodies. |
You never before mentioned big.in, param.in, and small.in. That would have been helpful. |
Sorry, no, I did not mention the files specifically. I said I used 200 small bodies, which I took for granted it was clear as the name of the file usually is "small.in" for small bodies. |
Okay, using your versions of big.in, param.in, and small.in:
No aborts/crashes. |
The *.in files are attached. |
Is it possible that you have made other changes than what is listed here thus far? |
In my case still gives the same error. I downloaded again mercury6_2.for, element6.for, and close6.for
May be if I could see the rest of your files, cause I do not see what is going on |
I will give a look |
The rest of my files are the same as the project defaults (*.sample). |
I have identical .inc files as the ones you just posted. And for the trial I just re-downloaded .for files |
What about the *.in files that I posted? |
They are essentially what you supplied. |
I used yours for the compile and execution (which in turn are mines originally uploaded). |
So, our *.inc and *.in files are identical? |
yes they are. I check the .txt and for the .in you used mines. |
So, starting over .....
No crashes. *.in files and generated files are attached. |
That's what you did too? |
Steps 2 & 3 are only necessary if an *.inc file is changed. |
No, I was not doing steps 2 & 3. |
Now it does not crash |
Okay, that means that you changed mercury.inc after you compiled but did not recompile to pick up the changes. But, excellent. I hope that your results are interesting now! |
What language do you normally program in? If C, this is like changing a .h file but not recompiling the dependent *.c files, right? All's well that ends well. |
Many thanks!! I did not know about these 2 commands of building/unbuilding. I checked the Read.Me and that is not stated there. May be I missed it and it is stated somewhere else. Definetely thank you. I'm quite foreign to Fortran and I highly doubt I had figure this out on my own. |
You are most welcome. YES, the documentation leaves a lot to be desired. I wrote up a separate bug report on that subject. Happy computing! |
Well, if it can be considered a programming language at all... Matlab. It was a while ago since last I had to preocupy about compilations and .h .c files on C :S Thanks again! |
Out of curiosity, are you a Physicist? |
Uy no. I'm from UPC (Polytechnic University of Catalonia, Spain). Master student in aerospace engineering, Space track. Actually, after the first overview on mercury6 and Chamber's paper I was a bit lost... coming from engineering my physics knowledge was too tangential to completely follow the explanations!! |
May be nobody reads to this far but it can be helpful if someone is in the same situation... before, I was recompiling mercury only doing this (as suggested in the Read.me):
Instead of the steps 2 and 3 of make unbuild/build. |
Best to follow steps outlined in issue #22 for preparation and execution. |
Hi everyone,
I have realized during test of hundreds small particles that when the number of bodies in small.in is greater than 200, close6 execution crashes giving the following error:
ERROR: The total number of bodies exceeds NMAX.
I have made the pertinent changes in mercury.inc and swift.inc. The mercury6 and element6 executions work fine with any number of small bodies (always according to the specified limits on the .inc files) but close6 execution crashes at the 200th small body. For example, if the Moon is where all small bodies are having a close encounter (they launch from the Moon's surface) the list of the close encounter (dmin, orbital elements, etc.) is completed until 200th body.
I cannot figure out why this is happening. Any help will be much welcomed! thanks
PS: Current parameters defined:
in swift.inc
NPLMAX = 2002
NTPMAX = 2000
in mercury.inc
parameter (NMAX = 4003)
parameter (CMAX = 8000)
parameter (NMESS = 100)
parameter (HUGE = 9.9d29)
parameter (NFILES = 50)
See attachments for big.in, small.in, param.in
i_VgitTEST.tar.gz
The text was updated successfully, but these errors were encountered: