pgCC errors compiling MET

We’re attempting to help a user compile a code called MET from UCAR. The following errors are seen, which seem to indicate problems in PGI related source, and please feel free to post any thoughts or suggestions:


pgCC -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o dumppb.o
-g -Bstatic -DMET_BASE="/wrkdir/user/MET/METv1.0"
-I/usr/local/pkg/gsl/gsl-1.8.gcc/include
-I…/…/lib -I…/…/lib -I/usr/local/pkg/netcdf/netcdf-3.6.1.pgi/include -I/wrkdir/user/MET/BUFRLIB -I/wrkdir/user/MET/F2C
-L…/…/lib -L…/…/lib “-L/usr/local/pkg/netcdf/netcdf-3.6.1.pgi/lib -L/usr/local/pkg/netcdf/netcdf-3.6.1.pgi/include” -L/wrkdir/user/MET/BUFRLIB -L/wrkdir/user/MET/F2C
-lbufr -lvx_grib_classes -lvx_wrfdata -lvx_econfig
-lvx_data_grids -lvx_math -lvx_cal -lvx_util -lvx_met_util -lm -lf2c
-lnetcdf_c++ -lnetcdf -lpgftnrtl -lrt -lpthread
pb2nc.cc:
“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 55: error:
the global scope has no “isalnum”
using _STLP_VENDOR_CSTD::isalnum;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 56: error:
the global scope has no “isalpha”
using _STLP_VENDOR_CSTD::isalpha;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 57: error:
the global scope has no “iscntrl”
using _STLP_VENDOR_CSTD::iscntrl;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 58: error:
the global scope has no “isdigit”
using _STLP_VENDOR_CSTD::isdigit;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 59: error:
the global scope has no “isgraph”
using _STLP_VENDOR_CSTD::isgraph;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 60: error:
the global scope has no “islower”
using _STLP_VENDOR_CSTD::islower;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 61: error:
the global scope has no “isprint”
using _STLP_VENDOR_CSTD::isprint;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 62: error:
the global scope has no “ispunct”
using _STLP_VENDOR_CSTD::ispunct;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 63: error:
the global scope has no “isspace”
using _STLP_VENDOR_CSTD::isspace;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 64: error:
the global scope has no “isupper”
using _STLP_VENDOR_CSTD::isupper;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 65: error:
the global scope has no “isxdigit”
using _STLP_VENDOR_CSTD::isxdigit;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 66: error:
the global scope has no “tolower”
using _STLP_VENDOR_CSTD::tolower;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/cctype”, line 67: error:
the global scope has no “toupper”
using _STLP_VENDOR_CSTD::toupper;
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 43: error:
identifier “_ISspace” is undefined
space = _Locale_SPACE,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 44: error:
identifier “_ISprint” is undefined
print = _Locale_PRINT,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 45: error:
identifier “_IScntrl” is undefined
cntrl = _Locale_CNTRL,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 46: error:
identifier “_ISupper” is undefined
upper = _Locale_UPPER,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 47: error:
identifier “_ISlower” is undefined
lower = _Locale_LOWER,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 48: error:
identifier “_ISalpha” is undefined
alpha = _Locale_ALPHA,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 49: error:
identifier “_ISdigit” is undefined
digit = _Locale_DIGIT,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 50: error:
identifier “_ISpunct” is undefined
punct = _Locale_PUNCT,
^

“/import/local/pkg/pgi/pgi-7.1.6/linux86-64/7.1-6/include/CC/stl/_ctype.h”, line 51: error:
identifier “_ISxdigit” is undefined
xdigit = _Locale_XDIGIT,
^

“/usr/local/pkg/netcdf/netcdf-3.6.1.pgi/include/ncvalues.h”, line 35: warning:
integer conversion resulted in a change of sign
static const ncbyte ncBad_byte = NC_FILL_BYTE;
^

“…/…/lib/vx_econfig/symtab.h”, line 210: warning: type qualifier on return
type is meaningless
const SymbolTableEntry * const entry(int) const;
^

“pb2nc.cc”, line 86: warning: variable “mxstrl” was declared but never
referenced
static const int mxstrl = 80; // Maximum BUFR string length
^

“pb2nc.cc”, line 96: warning: variable “var_char” was declared but never
referenced
static const char var_char[mxr8vt] = {
^

22 errors detected in the compilation of “pb2nc.cc”.
make[3]: *** [pb2nc] Error 2
make[2]: *** [all] Error 2
make[1]: *** [targets] Error 2
make: *** [all] Error 2

Hi,

What OS do you compile on? I just downloaded MET v1.0 and compiled with 7.1-6 on SUSE10.0 and it seems to compile.

Did you try the latest release? Perhaps there was a bug that got fixed.

Hongyon

We’re using SLES 9 SP 3. I attempted 7.1-6 and also tried building it with PGI 7.2-2, receiving similar erros both times. Unfortunately we do not have the option to upgrade this system to SLES 10+. F2C and BUFRLIB were also rebuilt for this, and we already had GSL and NetCDF available. Did you build those libraries yourself, or obtain RPM’s for any?

Also, thanks for the feedback.

Hi,

I just compiled on SLES9 and it compiled OK. It is SLES9 (with no SP3) that is the closest system that we have here.

I download and compile everything except -lg2c. I used -lg2c instead of -lf2c because it already exists on the system. Perhaps this is the reason? Can you check if you have /usr/lib/libg2c.a or /usr/lib/libf2c.a? If you do have either on a system, unset F2C_INCS and then set F2C_LIBS = -lg2c ?

I also set PGI_LIBS=-pgf90libs because I compile other libraries with pgf90. If you use pgf77, it would be -pgf77libs.

Hope this helps,
Hongyon

I am also having this exact same problem. Has there been any resolution? I tried all of the suggestions posted above. I’m running PG version 7.0-2.

Hi,

What OS did you compile on? We tried on SLES9, SLES9 SP2, SLES10 they all compile just fine. Unfortunately we don’t have SLES9 SP3. Perhaps it has something to do with Makefile? Can you let us know what OS and send your Makefile you use to compile to trs@pgroup.com and mentioned that you post this on user forum.

Hongyon

It works now! Built using SLES 9 SP 3 (and PGI 7.1-6).

I switched the PGI_LIBS flag to include the -pgf90libs, which made it to the following:

PGI_LIBS = -pgf90libs -lpgftnrtl -lrt -lpthread

Also, unset the F2C_INCS as mentioned and set F2C_LIBS to -lg2c (completely got rid of F2C)

This time it got further, and I started seeing undefined symbol errors, but these had to do with some tweaking I had done in building libbufr.a which had been messed up, so I rebuilt that, reran the MET build, and with the above changes everything worked! Thanks for the help!

I am also trying to compile MET and it is necessary to put my WRF output through the WRF post processor but I do not have /usr/bin/ld/-lrsl_lite. Has anyone else run into this problem, and if so how did you resolve this issue?

librsl_lite.a should be built as part of WRF in external/RSL_LITE directory.

Hongyon