Hi!
I'm trying to run ROMS in our supercomputer and am having problems telling ROMS where the libraries are. I have netcdf-fortran and hdf5 in separate folders, and it seems like that is the problem.
I have tried to give build.bash the two folders, but despite using && or " " or ' ', it keeps telling me
./build.bash: line 298: export: `-lnetcdff': not a valid identifier
./build.bash: line 298: export: `../../../../../../packages/hdf5/1.8.19/lib': not a valid identifier
./build.bash: line 298: export: `-lnetcdf': not a valid identifier
What can I do?
Thanks in advance!
MariaJose
netcdf and hdf5 in different folders
Re: netcdf and hdf5 in different folders
Do you have USE_NETCDF4 turned on? That can often solve all these problems for you.
-
- Posts: 110
- Joined: Thu Mar 08, 2018 2:47 am
- Location: German Research Centre for Geosciences
Re: netcdf and hdf5 in different folders
Hi,
if you do not want to use NetCDF4, it may be necessary to change the library path settings in the compiler file.
In the respective file (according to your system and fortran compiler) in the 'Library locations' section you may paste the output of
"path/to/your/nf-config -flibs"
into the "ifdef USE_NETCDF4 ... else ... LIBS" line.
The "nf-config -flibs" output (or "nc-config -libs", respectively) should contain all flagged paths to the libraries needed.
You can find the config files in the bin folder of your netcdf_fortran (or netcdf_c) library path.
The compiler files are stored in the Compilers folder of your src path.
There are various ways of defining the right library paths, either in the compiler file, the makefile or the bash file already. Some definitions are added to others, or are only set if they are no yet defined, others are even overwritten. It is therefore worthwhile to take the time and get familiar with the structure of the various files used to compile ROMS. It took me a while, at least.
Good luck!
if you do not want to use NetCDF4, it may be necessary to change the library path settings in the compiler file.
In the respective file (according to your system and fortran compiler) in the 'Library locations' section you may paste the output of
"path/to/your/nf-config -flibs"
into the "ifdef USE_NETCDF4 ... else ... LIBS" line.
The "nf-config -flibs" output (or "nc-config -libs", respectively) should contain all flagged paths to the libraries needed.
You can find the config files in the bin folder of your netcdf_fortran (or netcdf_c) library path.
The compiler files are stored in the Compilers folder of your src path.
There are various ways of defining the right library paths, either in the compiler file, the makefile or the bash file already. Some definitions are added to others, or are only set if they are no yet defined, others are even overwritten. It is therefore worthwhile to take the time and get familiar with the structure of the various files used to compile ROMS. It took me a while, at least.
Good luck!
Re: netcdf and hdf5 in different folders
Thank you so much!
The netcdf ON fix did it.
I will try the other suggestion too!
The netcdf ON fix did it.
I will try the other suggestion too!