Hi Surya,
> I am learning to use NCAR's Shallow Water Model (STSWM). I am
> porting this model to my System which is having the LINUX (Fedora
> Core4) as operating system. And the compilers are:
>
> C compiler : gcc
> Fortran compiler : ifort.
Note that you may find it useful to set the following environment
variables for your compilers prior to configuring/building:
setenv CC gcc
setenv CPPFLAGS '-DNDEBUG -Df2cFortran'
setenv CFLAGS '-O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC'
setenv FC ifort
setenv F77 ifort
setenv FFLAGS -O
Could you send the version of each compiler you're using?
As well, is it possible to use either the Intel C compiler with
ifort, or alternatively, the GNU Fortran compiler with gcc?
> This model requires two external libraries i.e., NetCDF and NCARG.
> I installed both the libraries. But when I porting the model, it is
> giving following errors:
>
> /home/surya/ncarg-4.4.1/ncarg2d/src/libncarg/libncarg.a(arinit.o)
> (.text+0x82):arinit.f:
> undefined reference to `i1mach_'
> /home/surya/ncarg-4.4.1/ncarg2d/src/libncarg/libncarg.a(cpcldm.o)
> (.text+0x6d4):
> In function `cpcldm_':
> cpcldm.f: undefined reference to `gqplci_'
> /home/surya/ncarg-4.4.1/ncarg2d/src/libncarg/libncarg.a(cpcldm.o)
> (.text+0x6fb):cpcldm.f:
> undefined reference to `gqtxci_'
>
> These are some of the errors which i mentioned. Here I am
> attaching the
> total error list file. The attachment are:
> 1) Installation of NCARG output.
Please be sure to edit the file $NCARG_SRC/config/LINUX to include
the proper set of libraries for mixing compilers. In this case, I
suggest starting with:
#define CCompiler gcc
#define FCompiler ifort
#define CtoFLibraries -lg2c -lgcc -lm -lifcore
and seeing how this goes. It may be necessary to iterate on these a
bit until you find the proper combination. I don't have a way to
test this locally.
Please also have a look at the ifort man page, specifically options
concerning the appending (or not) of underscores to external user-
defined names. The options in question are '-nus' (no underscores)
and '-us' (underscores) -- this may come into play when working with
the STSWM.
In looking at the output of the NCAR Graphics build, it shows that
libncarg_c.a is not being built. The 'make depend' portion of the
configure/build shows some errors I've not ever seen:
defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 && defined
__OPTIMIZE__ && __OPTIMIZE__ > 0 && (__GNUC_PREREQ (4,
1) || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4,
0)) || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3,
4) && __GNUC_MINOR__ == 4 &&
(__GNUC_PATCHLEVEL__ > 2 || (__GNUC_PATCHLEVEL__ ==
2 && __GNUC_RH_RELEASE__ >= 8))))
^
--- expecting )
Do you know where these might be coming from? Regardless, they are
preventing the proper configuration and dependency building for
libncarg_c, which then prevents it from building.
-Rick.
----
Rick Grubin NCAR/CISL/VETS
Visualization + Enabling Technologies
grubin_at_ucar.edu 303.497.1832
_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Wed Mar 14 2007 - 11:37:57 MDT
This archive was generated by hypermail 2.2.0 : Sun Apr 01 2007 - 17:29:32 MDT