LAPS Users Discussion Forum Welcome, Guest. Please Login or Register
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Build LAPS with gfortran? (Read 3448 times)
Matt Foster
Guest


Build LAPS with gfortran?
Mar 26th, 2010 at 2:29pm
 
Has anyone ever built LAPS with gfortran? It appears that there is an attempt within the code (machine_dependent.F) to deal with the use of non-standard intrinsics (e.g. sind, cosd, etc), but gfortran still fails to find those "machine dependent" functions.
Back to top
 

Re: Build LAPS with gfortran? (Attachment deleted)
 
IP Logged
 
Matt Foster
Guest


Re: Build LAPS with gfortran?
Reply #1 - Apr 5th, 2010 at 11:51am
 
configure has correctly detected that gfortran doesn't have sind, cosd, etc. I used the 'nm' utility to list out the symbols that are present in liblaps.a, and it lists the 'subordinate' functions (e.g. dsind, rsind, etc.), but does NOT list sind, cosd, etc. I don't know enough about Fortran or gfortran to diagnose why that is.
Back to top
 
 
IP Logged
 
Matt Foster
Guest


Re: Build LAPS with gfortran?
Reply #2 - Apr 9th, 2010 at 2:37pm
 
Another issue has come up compiling with gfortran. This is in src_tmatrix.f90. gfortran does not support the syntax 'real*16' for declaring a quad-precision real. I further found that when I tried to use the slightly-more-standard 'real(kind=16)' that it said Kind 16 is not supported. I think Intel (and AMD) hardware don't do 128-bit arithmetic, and gfortran doesn't do it in software either. I think 80-bit is the maximum that the Intel-ish hardware can do. This is confirmed by the fact that real(kind=10) compiles without error.

The 'really F90+ standard way' would be to call the intrinsic selected_real_kind with arguments of desired decimal precision and/or exponent range to get the appropriate kind parameter for the given hardware. So, my question is: How much precision is needed in this module?
Back to top
 
 
IP Logged
 
Steve Albers
Guest


Re: Build LAPS with gfortran?
Reply #3 - May 1st, 2010 at 7:08pm
 
Matt - the real*16 can be simply changed to real*8 to get it to compile properly.

Regarding the 'grib2', is this memory issue happening when you are running a particular program?
Back to top
 
 
IP Logged
 
Matt Foster
Guest


Re: Build LAPS with gfortran?
Reply #4 - May 5th, 2010 at 5:47pm
 
Yes. It was happening in lga. There were issues (e.g. seg faults) in other executables, but I don't recall what they were now.
Back to top
 

Re: Build LAPS with gfortran? (Attachment deleted)
 
IP Logged
 
Matt Foster
Guest


Re: Build LAPS with gfortran?
Reply #5 - Apr 20th, 2010 at 12:12pm
 
Hit a dead end (for me anyway) on this. Having bad problems with memory allocation, which appear to be originating in the grib2 library. It goes far beyond my limited Fortran experience!
Back to top
 

Re: Build LAPS with gfortran? (Attachment deleted)
 
IP Logged
 
Steve Albers
Administrator
*****
Offline


I Love YaBB 2.4!

Posts: 48
Boulder, CO
Re: Build LAPS with gfortran?
Reply #6 - Sep 13th, 2010 at 10:21pm
 
We now have 'gfortran' installed here in the LAPS development area so we set up a regular build. We are in the process of addressing some compile time issues. Once this compiles we can do runtime tests with selected programs.

Our compilation results can be seen here ('gfortran' entries):

http://laps.noaa.gov/builds/laps_builds.html
Back to top
« Last Edit: Oct 6th, 2010 at 9:42pm by Steve Albers »  
 
IP Logged
 
Steve Albers
Administrator
*****
Offline


I Love YaBB 2.4!

Posts: 48
Boulder, CO
Re: Build LAPS with gfortran?
Reply #7 - Oct 29th, 2010 at 12:28am
 
Reflecting recent software adjustments to accommodate GFORTRAN, our latest software version (at least the in-house one) is down to just one severe error (in a single subroutine) in the 'src/lib' directory when compiled with GFORTRAN.

There might still be some issues in other directories. The 'src/lib' directory is a good one to focus on at first since most of the executables depend on 'make'  successfully completing in this directory.
Back to top
 
 
IP Logged
 
Steve Albers
Administrator
*****
Offline


I Love YaBB 2.4!

Posts: 48
Boulder, CO
Re: Build LAPS with gfortran?
Reply #8 - Nov 5th, 2010 at 12:14am
 
The 'gfortran' issue in the main LAPS library has been fixed so this should hopefully compile OK with our next weekly build.
Back to top
 
 
IP Logged
 
Steve Albers
Administrator
*****
Offline


I Love YaBB 2.4!

Posts: 48
Boulder, CO
Re: Build LAPS with gfortran?
Reply #9 - Nov 10th, 2010 at 5:27pm
 
Our latest in-house build has 34 out of 44 GFORTRAN executables compiling; this is up from 0 out of 44 in the previous build.
Back to top
« Last Edit: Jan 26th, 2013 at 6:49pm by Steve Albers »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print