--
You received this message because you are subscribed to the Google Groups "GOTM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gotm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gotm-users/3f1129cf-f8ab-4f9f-af47-49c8e00829ben%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gotm-users/27d7afc6-1888-4aa2-9ae6-d8cc9c4a5a32n%40googlegroups.com.
Dear Ian,
when I was working on a CRAY, they had their own system of
linking and managing the path to the libraries. Nobody really
understood, how it worked, but it worked perfectly. I have
forgotten details, so I cannot deliver syntax examples.
- using environmentel modules. On the CRAY loading the netcdf
module and just putting -lnetcdff into the flags did the job. In
the background a complex system of joint action of "modules" and
pkg-config was in action. Do they exist on your computer. All the
paths the compiler and linker needs, were set correctly. Explicit
determination of paths is not needed, just load the module. Do not
set environmental variables to find libraries. They may overwrite
the settings, CRAY is expecting and managing with the modules
system.
- CRAY is linking statically by default. I guess (do not know),
GOTM is aiming to build a dynamic library.
- I would read the documents of the compute centre or ask the sysadmins, how to link the netcdf library best. May be a simple example away from GOTM helps to understand the principles first.
- From here on dangerous! :-) nf-config is a simple script. May
be, flibs and fflags are intensionally empty not to disturb the
CRAY linker. If nothing helps, you could put nf-config into your
$HOME/bin and add the desired output for fflags and so on. A
"nf-config" from a correctly installed netcdf helps to find the
syntax details. But do not forget to remove it later, it may rise
strange side effects with other netcdf-related software.
- Finally, another option. Just check with "grep", where in the
GOTM scripts "nf-config" ist used. You could replace the call of
"nf-config" with the desired result.
Cheers,
Martin
The typical solution would be to provide -DNetCDF_INCLUDE_DIRs=<semicolon-separated-dirs> and -DNetCDF_LIBRARIES=<semicolon-separated-library-paths>. The segmentation fault that you get when you do this might indicate that the NetCDF library was compiled with a different compiler (or a different compiler version) than the one you’re using. But just to rule out other issues, you could try compiling with -DGOTM_USE_NetCDF=OFF, and rerunning GOTM. If it runs, NetCDF is the problem, and you might want to look for a different version (or build it yourself); if it does not run, you might want to try a different compiler such as gfortran, as it is then likely a Cray issue
Cheers,
Jorn
To view this discussion on the web visit https://groups.google.com/d/msgid/gotm-users/CAFvy56WzjJf3diws627VRpUk%3D6hPQ5RbWHYuHR%3D5MR_ysR9STw%40mail.gmail.com.