Re: Possible block data solution

From: David Kennison <kennison_at_nyahnyahspammersnyahnyah>
Date: Mon, 24 Mar 2008 16:57:11 -0600

Ted,

What a wonderfully clever idea! Mind you, I haven't tested it yet,
but I have a feeling that it's bound to work.

My hat's off ...

Thank you,

Dave Kennison

On Mar 24, 2008, at 2:19 PM, Edward (Ted) Mansell wrote:

> In working with Mac OS X, I have been plagued with the problem of
> block data not getting loaded from libraries. I think this is more
> a problem with ld, since the same thing can happen with Fortan90
> module data in other code I maintain. Declaring the block data
> name as external does not work for gfortran, xlf, or ifort on OS X
> (ppc or intel).
>
> At some point I figured out that a simple empty subroutine put into
> the code along with the block data (or module data) will force the
> data to be loaded from the library if the subroutine is called.
> (Some compilers seem also to allow "calling" the block data name,
> but I got errors from one compiler for that.)
>
> An enhanced version of the blockdata_test code is here:
>
> <http://www.cimms.ou.edu/~mansell/blockdata_testexp.tgz>
>
> It takes the original code and adds a version with the subroutine
> approach.
>
>
> Since I recently moved to Intel-based Macs, I wanted to avoid using
> non-64bit compilers (g77/g95), so I am working on patching the
> ncarg5.0 source to use this trick. I will post more if I get that
> working right. Ncarg has compiled with ifort (had to use -g for 64-
> bit version), but have to test my programs with the libraries. (I
> ncl turned off for the moment.) I don't mind trying gfortran to
> compile the libraries, as well, since it seems to be compatible
> with ifort binaries. I'll post a link to the modified code seems
> to work (or perhaps diff output would suffice?)
>
> I hope this helps fix the long-standing issue with block data stuff.
>
> Best,
>
> Ted
>
> --
> __________________________________________________________
> | Edward Mansell <ted.mansell_at_noaa.gov>
> | National Severe Storms Laboratory
> | 120 David L. Boren Blvd.
> | Room 4354
> | Norman, OK 73072
> | NEW NUMBER !! (405) 325-6177 http://www.cimms.ou.edu/~mansell
> | FAX: (405) 325-2316
> |
> |---------------------------------------------------------------------
> -------
> |
> | "The contents of this message are mine personally and
> | do not reflect any position of the U.S. Government or NOAA."
> |
> |---------------------------------------------------------------------
> -------
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk

_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Mon Mar 24 2008 - 16:57:11 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 11 2008 - 10:59:48 MDT