G’day Rob
I am working on this its because we changed how we set up the recruitment calendar and it sounds like the synch is out of step. I am testing a fix working with Isaac’s model but will get a patch out as soon as possible
Thanks for the info, it all helps
Beth
--
You received this message because you are subscribed to the Google Groups "Atlantis ecosystem model" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
atlantis-ecosystem...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/atlantis-ecosystem-model/CAM8_J-Ufv%3D6QXL3rCQdYPMyWvm6ckmRBvEWLzQwSvGZqs0VTKw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/atlantis-ecosystem-model/6EA32CAA-2865-4736-8500-CB915F0F53D4%40csiro.au.
G’day
That sounds more like a memory bug.
When these kind of error messages come up do a quick find in the code and see what the test actually is. In this case
if ((EMBRYO[sp].next_spawn_any_age < 0) || (EMBRYO[sp].next_spawn_any_age > ((365.0 * bm->tstop) / 86400.0)))
quit("First spawning date for %s (%d) makes no sense\n", FunctGroupArray[sp].groupCode, EMBRYO[sp].next_spawn_any_age);
The fact that you answer is coming back as 90 or 200 indicates its likely memory as both 90 and 200 shouldn’t satisfy this criteria without a really weird tstop.
I’ll expand the message to see what that is too. Once I’ve gotten through sorting Isaac and Rob’s weirdness I’ll do you and Ceclie in parallel. In reality I am hoping sorting Isaac and Rob will significantly help (or even automatically solve it for everyone else, but I have hoped that before!!!)
Beth
NOAA IRC
Attn: NMFS/PIFSC/ESD/Mariska Weijerman
1845 Wasp Boulevard, Building 176
Mail Rm 2247
Honolulu, HI 96818
t: 808 725-5468
f: 808 725-5429
--
Dr Mariska Weijerman
Ecosystem Modeler
if ((EMBRYO[sp].next_spawn_any_age < 0) || (EMBRYO[sp].next_spawn_any_age > ((365.0 * bm->tstop) / 86400.0)))
quit("First spawning date for %s (%d) makes no sense\n", FunctGroupArray[sp].groupCode, EMBRYO[sp].next_spawn_any_age);
Hi Jacob,
the ENG_Spawn_Time was set to 60 and I got this error:
First spawning date for ENG (60) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
I have tried switching off the ENG, anchovy, group that is the first group in the fg list .csv, but I get the same error for the second group in the list SAR, sardine.
Interestingly changing the SAR_Spawn_Time (0,1,2,3,10,20,150) I get different numbers in brackets, which corrsponds to the variable EMBRYO[sp].next_spawn_any_age:
SAR_Time_Spawn 0: First spawning date for SAR (2) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 1: First spawning date for SAR (2) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 2: First spawning date for SAR (2) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 3: First spawning date for SAR (3) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 10: First spawning date for SAR (10) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 20: First spawning date for SAR (20) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
SAR_Time_Spawn 150: First spawning date for SAR (150) makes no sense - note testing against 0 and 1.541956e+00 as tstop is : 3.650000e+02
With SAR_Time_Spawn = 0,1,2 the EMBRYO[sp].next_spawn_any_age is 2.
With SAR_Time_Spawn = 3,10, 20,150 EMBRYO[sp].next_spawn_any_age changes to the value of SAR_Time_Spawn (3,10,20,150).
I am trying to get my round the if statement logic:
if ((EMBRYO[sp].next_spawn_any_age < 0) || (EMBRYO[sp].next_spawn_any_age > ((365.0 * bm->tstop) / 86400.0)))
I have also check for memory bugs using valgrind and this is the final part of the output:
==177643== 8,192 bytes in 1 blocks are still reachable in loss record 289 of 289
==177643== at 0x4846828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==177643== by 0x18F939: hash_create (in /usr/bin/bash)
==177643== by 0x162274: initialize_shell_variables (in /usr/bin/bash)
==177643== by 0x13E67A: ??? (in /usr/bin/bash)
==177643== by 0x13B26D: main (in /usr/bin/bash)
==177643==
==177643== LEAK SUMMARY:
==177643== definitely lost: 0 bytes in 0 blocks
==177643== indirectly lost: 0 bytes in 0 blocks
==177643== possibly lost: 0 bytes in 0 blocks
==177643== still reachable: 63,864 bytes in 645 blocks
==177643== suppressed: 0 bytes in 0 blocks
==177643==
==177643== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
G’day
Ok finally wading my way through more email than should be humanely allowed. Starting at the beginning an unpacking
Spawn_Now = calendar day as noted in the prm file
Startday = Spawn_Now + Recruit_Time
EndDay = StartDay + RecruitPeriod
Age_Now = Startday -1
If things wrap over the end of a year (day 365 in the calendar) then it has to account for that by taking 365 away from the relevant times and noting “wraps = 1”
It then creates a diary of when the group will spawn, age and settle every year of the model. If it is a “wrapping” species or if it is one with a long recruit_time so there has to be larvae coming from a spawning prior to model start it needs to have these ready to go too.
The very original version of Atlantis didn’t have the big long queue of babies coming and tried to handle wrapping as it went year to year but some of the crazy life histories out there forced a rewrite.
The biggest issues occur around
There was also a memory leak back in the trunk version of 2020, but that has been trapped and fixed. Any weird shit “change parameter” and it crashes stuff will be due to a memory leak or overwrite. They are a freakin sod to find as memory is done differently windws to mac to unix so being able to reproduce them is very hard. Nevertheless I do think that issue is sorted now, but let me know if its still tripping you up and the hunt can begin again.
So now back to Matteo. The test tripping this up is
if ((EMBRYO[sp].next_spawn_any_age < 0) || (EMBRYO[sp].next_spawn_any_age > ((365.0 * bm->tstop) / 86400.0)))
quit("First spawning date for %s (%d) makes no sense - note testing against 0 and %e as tstop is : %e\n", FunctGroupArray[sp].groupCode, EMBRYO[sp].next_spawn_any_age, ((365.0 * bm->tstop) / 86400.0), bm->tstop);
So what was your tstop from the run.prm? At present the code thinks for your model its 365 seconds (thus a day of 60 puts the first spawn after the end of the model which makes no sense).
Cheers
Beth
G’day Matteo,
Sounds like there might be some bracket alignment issues going on. Any possibility you can put your files somewhere I can access so we can try to run it under a stable version of the code to try to figure out what’s up?
Beth
From: <atlantis-eco...@googlegroups.com> on behalf of "matteo.sinerchia" <cnrfis...@gmail.com>
Date: Wednesday 27 November 2024 at 10:08 pm
To: Atlantis ecosystem model <atlantis-eco...@googlegroups.com>
Subject: Re: Weird recruitiment issue
|
You don't often get email from cnrfis...@gmail.com. Learn why this is important |
--
You received this message because you are subscribed to the Google Groups "Atlantis ecosystem model" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
atlantis-ecosystem...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/atlantis-ecosystem-model/9c105ae7-a32f-4752-8c40-d6416d18e282n%40googlegroups.com.