Giter Site home page Giter Site logo

Comments (33)

texadactyl avatar texadactyl commented on June 9, 2024

The source file close6.for will not even compile with those parameter values:

gfortran -g -O2 -Wline-truncation -Wsurprising -Werror -o ./close6 ./close6.for
./close6.for:832:31:

  832 |         write (*,'(/,3a)') mem(121)(1:lmem(121)),mem(87)(1:lmem(87)),
      |                               1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:832:43:

  832 |         write (*,'(/,3a)') mem(121)(1:lmem(121)),mem(87)(1:lmem(87)),
      |                                           1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:832:43:

  832 |         write (*,'(/,3a)') mem(121)(1:lmem(121)),mem(87)(1:lmem(87)),
      |                                           1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:306:37:

  306 |         write (*,'(2a,/,a,i10)') mem(121)(1:lmem(121)),
      |                                     1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:306:49:

  306 |         write (*,'(2a,/,a,i10)') mem(121)(1:lmem(121)),
      |                                                 1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:306:49:

  306 |         write (*,'(2a,/,a,i10)') mem(121)(1:lmem(121)),
      |                                                 1
Error: Array reference at (1) is out of bounds (121 > 100) in dimension 1 [-Werror]
./close6.for:307:30:

  307 |      %    infile(i)(1:60),mem(104)(1:lmem(104)),line_num
      |                              1
Error: Array reference at (1) is out of bounds (104 > 100) in dimension 1 [-Werror]
./close6.for:307:42:

  307 |      %    infile(i)(1:60),mem(104)(1:lmem(104)),line_num
      |                                          1
Error: Array reference at (1) is out of bounds (104 > 100) in dimension 1 [-Werror]
./close6.for:307:42:

  307 |      %    infile(i)(1:60),mem(104)(1:lmem(104)),line_num
      |                                          1
Error: Array reference at (1) is out of bounds (104 > 100) in dimension 1 [-Werror]
f951: all warnings being treated as errors
make: *** [Makefile:27: close6] Error 1

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.

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

I changed NMESS back to 200 (original value) but kept your other parameters.

base) elkins@biostar:~/projects/mercury-master$ mercury6
   Integrating massive bodies and particles up to the same epoch.
   Beginning the main integration.
 Date:       2119  8  6.4   dE/E: -4.79971E-13   dL/L: -2.81091E-13
 Date:       2229  2 15.8   dE/E: -4.79807E-13   dL/L: -2.61420E-13
 Date:       2338  8 24.1   dE/E: -1.97181E-13   dL/L: -1.94135E-13
 Date:       2448  2 29.3   dE/E: -4.84736E-13   dL/L: -3.12712E-13
 Date:       2557  9 11.9   dE/E: -4.15394E-13   dL/L: -2.84584E-13
 Date:       2667  3 22.5   dE/E:  3.28799E-13   dL/L: -1.55345E-13
 Date:       2776  9 28.9   dE/E:  5.13821E-13   dL/L: -1.18577E-13
 Date:       2886  4  6.5   dE/E:  3.96005E-14   dL/L: -4.56474E-13
 Date:       2995 10 18.9   dE/E:  6.32622E-14   dL/L: -4.88462E-13
 Date:       3105  5  2.0   dE/E:  1.14694E-12   dL/L: -1.31445E-13
 Date:       3214 11 10.4   dE/E:  5.12999E-13   dL/L: -4.65299E-13
 Date:       3324  5 22.7   dE/E:  2.86898E-13   dL/L: -6.88296E-13
 Date:       3433 11 30.4   dE/E: -2.41875E-13   dL/L: -8.90704E-13
   Integration complete.
(base) elkins@biostar:~/projects/mercury-master$ element6
(base) elkins@biostar:~/projects/mercury-master$ close6
(base) elkins@biostar:~/projects/mercury-master$ 

No early terminations and no crashes.
I do not know if the results are valid. See attached ZIP file.
results.zip

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

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.

from mercury.

sretsa avatar sretsa commented on June 9, 2024

Hi texadactyl!
Thanks for your response.
Mine still crashes... but because your compilation is with only 2 small bodies (APOLLO and APOPHIS) I have more than 200 (I generate them with an external programme). But I do not get why mercury6 and element6 do not crash and close6 yes.
NMESS = 200 does not solve the issue.

Regards

from mercury.

sretsa avatar sretsa commented on June 9, 2024

This is the file I am using for small bodies.

i_VgitTEST.tar.gz

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

You never before mentioned big.in, param.in, and small.in. That would have been helpful.

from mercury.

sretsa avatar sretsa commented on June 9, 2024

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.
I will edit that for clarification.

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

Okay, using your versions of big.in, param.in, and small.in:

mercury6
   Integrating massive bodies and particles up to the same epoch.
   Beginning the main integration.
   Integration complete.
(base) elkins@biostar:~/projects/mercury-master$ element6
(base) elkins@biostar:~/projects/mercury-master$ close6

No aborts/crashes.
See attached ZIP of generated files.
generated_files.zip

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

The *.in files are attached.
in_files.zip

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

Is it possible that you have made other changes than what is listed here thus far?
My mercury.inc and swift.inc files are attached.

mercury.inc.txt

swift.inc.txt

from mercury.

sretsa avatar sretsa commented on June 9, 2024

In my case still gives the same error. I downloaded again mercury6_2.for, element6.for, and close6.for
used my .inc files (mercury.inc and swift.inc) and your input files. Still crashes at close6:

esther@esther-hp ~/Escritorio/mercury-master/git_trial $ ./mercury6 && ./element6
   Integrating massive bodies and particles up to the same epoch
   Beginning the main integration.
   Integration complete.
esther@esther-hp ~/Escritorio/mercury-master/git_trial $ ./close6
 ERROR: The total number of bodies exceeds NMAX.

May be if I could see the rest of your files, cause I do not see what is going on

from mercury.

sretsa avatar sretsa commented on June 9, 2024

Is it possible that you have made other changes than what is listed here thus far?
My mercury.inc file is attached.

mercury.inc.txt

I will give a look

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

The rest of my files are the same as the project defaults (*.sample).

from mercury.

sretsa avatar sretsa commented on June 9, 2024

I have identical .inc files as the ones you just posted. And for the trial I just re-downloaded .for files

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

What about the *.in files that I posted?

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

They are essentially what you supplied.

from mercury.

sretsa avatar sretsa commented on June 9, 2024

What about the *.in files that I posted?

I used yours for the compile and execution (which in turn are mines originally uploaded).

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

So, our *.inc and *.in files are identical?

from mercury.

sretsa avatar sretsa commented on June 9, 2024

yes they are. I check the .txt and for the .in you used mines.
Here it is what I am using and the output. Note that all .aei files are created but when close6 is executed, 48 small bodies and the first 200th Moon close encounters.

git_in.tar.gz
git_output.tar.gz

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

So, starting over .....

(base) elkins@biostar:~/projects/mercury-master$ make rm-gen
rm -f ./{ *.dmp *.clo *.out *.tmp *.aei } 2> /dev/null
(base) elkins@biostar:~/projects/mercury-master$ make unbuild
rm -f ./element6 ./close6 ./mercury6
(base) elkins@biostar:~/projects/mercury-master$ make build
gfortran -g -O2 -Wline-truncation -Wsurprising -Werror -o ./close6 ./close6.for
gfortran -g -O2 -Wline-truncation -Wsurprising -Werror -o ./element6 ./element6.for
gfortran -g -O2 -Wline-truncation -Wsurprising -Werror -o ./mercury6 ./mercury6_2.for
(base) elkins@biostar:~/projects/mercury-master$ mercury6
   Integrating massive bodies and particles up to the same epoch.
   Beginning the main integration.
   Integration complete.
(base) elkins@biostar:~/projects/mercury-master$ element6
(base) elkins@biostar:~/projects/mercury-master$ close6
(base) elkins@biostar:~/projects/mercury-master$ 

No crashes. *.in files and generated files are attached.
in_files.zip

generated_files.zip

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024
  1. Remove existing generated files: make rm-gen
  2. Un-build Fortran programs: make unbuild
  3. Build Fortran programs: make build
  4. mercury6
  5. element6
  6. close6

That's what you did too?

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

Steps 2 & 3 are only necessary if an *.inc file is changed.

from mercury.

sretsa avatar sretsa commented on June 9, 2024
  1. Remove existing generated files: make rm-gen
  2. Un-build Fortran programs: make unbuild
  3. Build Fortran programs: make build
  4. mercury6
  5. element6
  6. close6

That's what you did too?

No, I was not doing steps 2 & 3.

from mercury.

sretsa avatar sretsa commented on June 9, 2024

Steps 2 & 3 are only necessary if an *.inc file is changed.

Now it does not crash

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

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!

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

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.

from mercury.

sretsa avatar sretsa commented on June 9, 2024

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.
I am closing the thread.
Regards

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

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!

from mercury.

sretsa avatar sretsa commented on June 9, 2024

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.

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!

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

Out of curiosity, are you a Physicist?
Any association with Caltech?

from mercury.

sretsa avatar sretsa commented on June 9, 2024

Out of curiosity, are you a Physicist?
Any association with Caltech?

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!!

from mercury.

sretsa avatar sretsa commented on June 9, 2024

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):

esther@esther-hp ~/Escritorio/mercury-master/git_trial $ f77 -o mercury6 mercury6_2.for && f77 -o element6 element6.for && f77 -o close6 close6.for

Instead of the steps 2 and 3 of make unbuild/build.

from mercury.

texadactyl avatar texadactyl commented on June 9, 2024

Best to follow steps outlined in issue #22 for preparation and execution.
Hopefully, the 4xxi team will update the README.md instructions soon.

from mercury.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.