[Met_help] Re: Success and a fix!

John Halley Gotway johnhg at rap.ucar.edu
Fri Jul 11 15:12:52 MDT 2008


Joe,

Interesting.  Thanks for the info.  I wasn't aware of that issue.

In looking at the man page for the gfortran compiler, it looks like using the "-ff2c" compiler flag will generate code compatible with the F2C library.  I wonder if supplying that in the Makefile on 
the "FC_FLAGS" line would solve anything?

Can you tell me how exactly did you "remove" -lf2c?  Did you change it to -lg2c?  Would you mind sending me a copy of your Makefile that was successful in building MET?  I'm just trying to figure out 
what's going on.  Because I'm able to build MET on my machine using gfortran and linking to the F2C.  Perhaps the F2C library to which I'm linking differs in some way from the one you were trying to 
link to.

But I'm glad it finally compiled for you.  Have you run the test scripts yet.  In particular, are you able to run the "scripts/test_pb2nc.sh" or does it error out.  If you're getting an error, you'll 
likely need to reblock the PrepBufr observation files in the METv1.1/data/sample_obs/prepbufr directory.  We recently posted a MET Online tutorial (this morning actually).  This page discusses running 
the cwordsh utility: http://www.dtcenter.org/met/users/support/online_tutorial/pb2nc/index.php

Thanks,
John

Joe Galewsky wrote:
> John:
> 
> I got MET to compile - I don't fully understand it, but the issue is 
> apparently related to the fact that gfortran is incompatible with f2c. 
> When I simply remove the -lf2c altogether, the compilation proceeds to 
> completion and all of the tests run successfully.  This is referenced in 
> a few places on the web . . . it might be worth documenting this, as I 
> am surely not the only person dealing with gfortran.
> 
> thx,
> 
> Joe
> 
> John Halley Gotway wrote:
>> Joe,
>>
>> Hmmm.  I'm not sure.  I'm asking around to see if anyone has any 
>> suggestions here.
>>
>> In the meantime, if you have access to the GNU compilers, you could 
>> try building MET with them.  MET was developed and tested primarily 
>> with the GNU compilers.  You could use g++ for the C++ compiler and 
>> either g77 or gfortran for the FORTRAN compiler.  The only downside 
>> however is that you'd need to build versions of the required libraries 
>> using the GNU compilers as well.
>>
>> John
>>
>> Joe Galewsky wrote:
>>> John:
>>>
>>> Thanks for your quick reply!  I just tried the compilation of the 
>>> beta version, and I am still getting the same error on pb2nc, posted 
>>> below. I am also attaching the Makefile I used.  Someone posted the 
>>> exact same error message on the Portland Group web site, so I am not 
>>> the only one with this problem.  Everything else compiled 
>>> more-or-less smoothly up to this point (a few warning messages).
>>>
>>> Thanks for any assistance you can provide!
>>>
>>> --Joe
>>>
>>>
>>>
>>> pgCC -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o readpb.o 
>>> dumppb.o  \
>>> -Bstatic   -DMET_BASE=\"/users/galewsky/METv1.1beta9\" \
>>> -I../../lib -I/users/galewsky/netcdf-3.6.2/include 
>>> -I/users/galewsky/gsl -I/users/galewsky/bufr -I/users/galewsky/libf2c \
>>> -L../../lib -L/users/galewsky/netcdf-3.6.2/lib 
>>> -L/users/galewsky/gsl/libs -L/users/galewsky/bufr 
>>> -L/users/galewsky/libf2c \
>>> -lvx_met_util -lvx_analysis_util -lvx_wrfdata -lvx_met_util \
>>>         -lvx_contable -lvx_grib_classes \
>>> -lvx_econfig -lvx_gsl_prob -lgsl \
>>> -lvx_plot_util  -lvx_render -lvx_pxm -lvx_color -lvx_ps -lvx_afm \
>>> -lvx_data_grids -lvx_gnomon -lvx_nav -lvx_cal -lvx_util -lvx_math -lm \
>>> -lnetcdf_c++ -lnetcdf \
>>> -lbufr -lf2c  -lpgftnrtl -lrt -lpthread
>>> pb2nc.cc:
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 55: error:
>>>           the global scope has no "isalnum"
>>>   using _STLP_VENDOR_CSTD::isalnum;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 56: error:
>>>           the global scope has no "isalpha"
>>>   using _STLP_VENDOR_CSTD::isalpha;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 57: error:
>>>           the global scope has no "iscntrl"
>>>   using _STLP_VENDOR_CSTD::iscntrl;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 58: error:
>>>           the global scope has no "isdigit"
>>>   using _STLP_VENDOR_CSTD::isdigit;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 59: error:
>>>           the global scope has no "isgraph"
>>>   using _STLP_VENDOR_CSTD::isgraph;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 60: error:
>>>           the global scope has no "islower"
>>>   using _STLP_VENDOR_CSTD::islower;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 61: error:
>>>           the global scope has no "isprint"
>>>   using _STLP_VENDOR_CSTD::isprint;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 62: error:
>>>           the global scope has no "ispunct"
>>>   using _STLP_VENDOR_CSTD::ispunct;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 63: error:
>>>           the global scope has no "isspace"
>>>   using _STLP_VENDOR_CSTD::isspace;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 64: error:
>>>           the global scope has no "isupper"
>>>   using _STLP_VENDOR_CSTD::isupper;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 65: error:
>>>           the global scope has no "isxdigit"
>>>   using _STLP_VENDOR_CSTD::isxdigit;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 66: error:
>>>           the global scope has no "tolower"
>>>   using _STLP_VENDOR_CSTD::tolower;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/cctype", line 
>>> 67: error:
>>>           the global scope has no "toupper"
>>>   using _STLP_VENDOR_CSTD::toupper;
>>>                            ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 43: error:
>>>           identifier "_ISspace" is undefined
>>>       space   = _Locale_SPACE,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 44: error:
>>>           identifier "_ISprint" is undefined
>>>       print   = _Locale_PRINT,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 45: error:
>>>           identifier "_IScntrl" is undefined
>>>       cntrl   = _Locale_CNTRL,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 46: error:
>>>           identifier "_ISupper" is undefined
>>>       upper   = _Locale_UPPER,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 47: error:
>>>           identifier "_ISlower" is undefined
>>>       lower   = _Locale_LOWER,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 48: error:
>>>           identifier "_ISalpha" is undefined
>>>       alpha   = _Locale_ALPHA,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 49: error:
>>>           identifier "_ISdigit" is undefined
>>>       digit   = _Locale_DIGIT,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 50: error:
>>>           identifier "_ISpunct" is undefined
>>>       punct   = _Locale_PUNCT,
>>>                 ^
>>>
>>> "/users/system/pgi-7.0-2/linux86-64/7.0-2/include/CC/stl/_ctype.h", 
>>> line 51: error:
>>>           identifier "_ISxdigit" is undefined
>>>       xdigit  = _Locale_XDIGIT,
>>>                 ^
>>>
>>> 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
>>>
>>>
>>>
>>>
>>> John Halley Gotway wrote:
>>>> Joe,
>>>>
>>>> We're actually getting ready to release the next version of MET - 
>>>> version 1.1 by the end of the week.  We're basically just finalizing 
>>>> the updates to the User's Guide now.  Why don't you try building a 
>>>> beta version of this next release and see if you're still having the 
>>>> same problems.  We can keep our fingers crossed that the problem 
>>>> will have been resolved.
>>>>
>>>> You can access the beta version at: 
>>>> ftp://ftp.rap.ucar.edu/incoming/irap/johnhg/METv1.1beta9.20080702.tar.gz 
>>>>
>>>>
>>>> The User's Guide in there isn't updated yet for METv1.1.
>>>>
>>>> You'll first copy over Makefile_pgi to Makefile - and then configure 
>>>> that top-level Makefile with the paths to the library dependencies.
>>>> Then do: make >& make_met.log
>>>>
>>>> Please let me know how it goes.  If you run into problems with the 
>>>> build, please send back a copy of the Makefile you're using and a 
>>>> copy of the build log (make_met.log).  That'll help diagnose the 
>>>> problems.
>>>>
>>>> Thanks,
>>>> John Halley-Gotway
>>>> johnhg at ucar.edu
>>>>
>>>> Joe Galewsky wrote:
>>>>> Hi:
>>>>>
>>>>> I'm trying to compile METV1.0 on our Linux system with the Portland 
>>>>> Group compilers, version 7.0.2, and am getting fatal errors 
>>>>> compiling pb2nc.  I made the changes indicated in your patched 
>>>>> makefile, but it's still barfing.  The error messages are identical 
>>>>> to those listed here on the PG website:
>>>>> http://www.pgroup.com/userforum/viewtopic.php?p=4531&sid=b0bbd1c7125df703be228aa3228f8546 
>>>>>
>>>>>
>>>>> Do you have any suggestions on how to successfully compile this 
>>>>> code? Can I provide you with further information?  All of the other 
>>>>> libraries and dependencies have been successfully compiled.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Joe Galewsky
>>>>>
>>>>>
>>>>
>>>
>>
> 


More information about the Met_help mailing list