[Met_help] error compiling METv2 Beta

John Halley Gotway johnhg at rap.ucar.edu
Tue Feb 17 10:28:12 MST 2009


Jonathan,

I checked with the developer who wrote this section of code, and he told me that it would be fine to use a "long" instead of a "long long" where you're seeing this error.  So I've replaced the call to
"atoll" with one to "atol", which should be defined in the PGI compilers.

Please replace the file "METv2.0beta6/lib/vx_util/ascii_table.cc" with the attached version of "ascii_table.cc".  And then try recompiling with PGI.

Please let me know if you find any other problems.

Thanks,
John

John Halley Gotway wrote:
> Jonathan,
> 
> Hmmm.  Good question.  It's funny, we've built this code with the PGI
> compilers many times, but haven't seen that error yet.  In fact, we used
> the PGI compilers during the recent MET tutorial.
> 
> The 'atoll' function converts a string to a 'long long'.  It's defined in
> the GNU headers in the "stdlib.h" file.  But looking at the corresponding
> header file for PGI, it's NOT defined there.  The PGI version has atoi
> (integer), atof (float), and atol (long), but no atoll for some reason. 
> I'm surprised that I didn't run into this error myself.
> 
> I'll talk to the developer who wrote this section of the code.  It may be
> sufficient to use a long (atol, which is defined), rather than a long long
> (atoll, which is not defined).
> 
> Thanks for raising this issue!
> 
> Until we sort this out, I'd say your only option would be to use the GNU
> compilers if you have them available.
> 
> John
> 
>> Hello John,
>>
>>
>>
>> Based on your last email, I opted to try building METv2 Beta that you
>> linked to me.
>>
>> So far, I have encountered an error in building one of the libraries as
>> follows:
>>
>>
>>
>> *** Making vx_util Library ***
>>
>>
>>
>> /usr/local/tools/pgi-7.1-4/linux86-64/7.1-4/bin/pgCC ascii_table.cc
>> -Bstatic   -c -I..
>>
>> ascii_table.cc:
>>
>> "ascii_table.cc", line 871: error: identifier "atoll" is undefined
>>
>>      X = atoll(junk);
>>
>>          ^
>>
>>
>>
>> 1 error detected in the compilation of "ascii_table.cc".
>>
>> make[3]: *** [ascii_table.o] Error 2
>>
>> make[2]: *** [vx_util_all] Error 2
>>
>> make[1]: *** [libs] Error 2
>>
>> make: *** [all] Error 2
>>
>>
>>
>> Any suggestions?  It appears that "atoll" was not used in MET v1.1.
>>
>> Jon
>>
>>
>>
>> ***********************************************************
>> Jonathan Case, ENSCO, Inc.
>> Aerospace Sciences & Engineering Division
>> Short-term Prediction Research and Transition Center
>> 320 Sparkman Drive, Room 3062
>> Huntsville, AL 35805-1912
>> Voice: (256) 961-7504   Fax: (256) 961-7788
>> Emails: Jonathan.Case-1 at nasa.gov
>>
>>              case.jonathan at ensco.com
>>
>> ***********************************************************
>>
>>
>>
>>
> 
> 
> _______________________________________________
> Met_help mailing list
> Met_help at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/met_help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ascii_table.cc
Type: text/x-c++src
Size: 19935 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20090217/7dabab60/attachment.bin 


More information about the Met_help mailing list