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 Post by aakashsane » Fri Jul 05, 2019 6:41 pm

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 24 times
segmenfaulterror.txt
the output text file which shows segmentation fault error.
(46.22 KiB) Downloaded 22 times

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

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

#2 Post by kate » Fri Jul 05, 2019 7:45 pm

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 Post by aakashsane » Fri Jul 05, 2019 8:15 pm

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 22 times

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

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

#4 Post by kate » Fri Jul 05, 2019 9:02 pm

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 Post by aakashsane » Sat Jul 06, 2019 10:41 pm

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: 3757
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

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

#6 Post by kate » Sun Jul 07, 2019 6:57 am

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 Post by aakashsane » Mon Jul 08, 2019 12:59 am

okay, thanks!

Post Reply