Hello!
I have a working version which uses external forcing files (wind, BCs, rivers, ...)
On top of that I wanted to simulate non reactive passive tracers.
So I added variable 'dye_01' to
initial conditions netcdf file, with the same dimensions as that of temperature.
and in the cpp file (.h) file I switched on the following:
#define T_PASSIVE
#define ANA_BPFLUX
#define ANA_SPFLUX
In the input text file, I gave NPT == 1. and switched on Aout(inert) == T .
Apart from the above I haven't made any changes.
I compiled using serial mode (to check), got the oceanS, but when I run I got into segmentation fault error.
I am attaching the .out text file as well as the cpp file, any suggestions would be appreciated.
Best,
Aakash
passive tracers - segmentation error ......help? :(
-
- Posts: 14
- Joined: Tue Sep 19, 2017 2:14 pm
- Location: Brown University
passive tracers - segmentation error ......help? :(
- Attachments
-
- tracer_ngbay.h
- cpp def file for reference.
- (1.63 KiB) Downloaded 442 times
-
- segmenfaulterror.txt
- the output text file which shows segmentation fault error.
- (46.22 KiB) Downloaded 461 times
Re: passive tracers - segmentation error ......help? :(
If you recompile with USE_DEBUG=on, you should get filenames and linenumbers instead of those annoying UNKNOWNS:
Without line numbers, we're pretty blind!
Code: Select all
oceanS 000000000059C85A Unknown Unknown Unknown
oceanS 000000000059BF55 Unknown Unknown Unknown
-
- Posts: 14
- Joined: Tue Sep 19, 2017 2:14 pm
- Location: Brown University
Re: passive tracers - segmentation error ......help? :(
well...when I switched on the debug mode, it did not compile but gave error.
attaching the error.
attaching the error.
- Attachments
-
- compileerror.txt
- (50.57 KiB) Downloaded 429 times
Re: passive tracers - segmentation error ......help? :(
Did you change anything in your build except USE_DEBUG? I assume you cleaned out the old build first. Anyway, it's a link error, not a compile error. The netCDF library wants to link to the curl library. Sometimes, "nc-config --flibs" will want to bring in the curl library. You can add it explicitly to the link statement, but you might have to track it down first. Add to LDFLAGS with
LDFLAGS gets set in your Compilers/Sys_comp.mk file.
Code: Select all
LDFLAGS += -L/location_of_libcurl -lcurl
-
- Posts: 14
- Joined: Tue Sep 19, 2017 2:14 pm
- Location: Brown University
Re: passive tracers - segmentation error ......help? :(
I added the code
and it got rid of the 'lcurl' error which I was getting while compiling in the debug mode.
Thanks Kate for this suggestion.
Debug mode compilation still was not successful due to some other error.
Anyways I went ahead and compiled with MPI == on and ran the model to see if it runs,
and it ran and I am getting some tracer flow.
So now I have a working tracer model, but the debug mode shows some error which is not affecting my run. Is that normal?
Best,
Aakash
Code: Select all
LDFLAGS += -L/location_of_libcurl -lcurl
Thanks Kate for this suggestion.
Debug mode compilation still was not successful due to some other error.
Anyways I went ahead and compiled with MPI == on and ran the model to see if it runs,
and it ran and I am getting some tracer flow.
So now I have a working tracer model, but the debug mode shows some error which is not affecting my run. Is that normal?
Best,
Aakash
Re: passive tracers - segmentation error ......help? :(
It is possible for problems to show up in debug mode that are not fatal when optimized. I still like to get to the bottom of all such issues, if I can.
-
- Posts: 14
- Joined: Tue Sep 19, 2017 2:14 pm
- Location: Brown University
Re: passive tracers - segmentation error ......help? :(
okay, thanks!