passive tracers - segmentation error ......help? :(

Suggest improvements/optimizations to the ROMS code.

Moderators: arango, robertson

Post Reply
Message
Author
aakashsane
Posts: 14
Joined: Tue Sep 19, 2017 2:14 pm
Location: Brown University

passive tracers - segmentation error ......help? :(

#1 Unread post by aakashsane »

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
Attachments
tracer_ngbay.h
cpp def file for reference.
(1.63 KiB) Downloaded 428 times
segmenfaulterror.txt
the output text file which shows segmentation fault error.
(46.22 KiB) Downloaded 451 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: passive tracers - segmentation error ......help? :(

#2 Unread post by kate »

If you recompile with USE_DEBUG=on, you should get filenames and linenumbers instead of those annoying UNKNOWNS:

Code: Select all

oceanS             000000000059C85A  Unknown               Unknown  Unknown
oceanS             000000000059BF55  Unknown               Unknown  Unknown
Without line numbers, we're pretty blind!

aakashsane
Posts: 14
Joined: Tue Sep 19, 2017 2:14 pm
Location: Brown University

Re: passive tracers - segmentation error ......help? :(

#3 Unread post by aakashsane »

well...when I switched on the debug mode, it did not compile but gave error. :oops: :oops: :oops:
attaching the error.
Attachments
compileerror.txt
(50.57 KiB) Downloaded 405 times

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: passive tracers - segmentation error ......help? :(

#4 Unread post by kate »

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

Code: Select all

LDFLAGS += -L/location_of_libcurl -lcurl
LDFLAGS gets set in your Compilers/Sys_comp.mk file.

aakashsane
Posts: 14
Joined: Tue Sep 19, 2017 2:14 pm
Location: Brown University

Re: passive tracers - segmentation error ......help? :(

#5 Unread post by aakashsane »

I added the code

Code: Select all

 LDFLAGS += -L/location_of_libcurl -lcurl 
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

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: passive tracers - segmentation error ......help? :(

#6 Unread post by kate »

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.

aakashsane
Posts: 14
Joined: Tue Sep 19, 2017 2:14 pm
Location: Brown University

Re: passive tracers - segmentation error ......help? :(

#7 Unread post by aakashsane »

okay, thanks!

Post Reply