Additions to the repository

Carl Ollivier-Gooch cfog at mech.ubc.ca
Wed Dec 9 16:02:38 CST 2009


Tim Tautges wrote:
> 
> 
> Carl Ollivier-Gooch wrote:
>> Hello, all.
>>
>> I am (finally) finishing up sending the iMesh paper back to ACM TOMS
>> (revisions to the actual paper were very minor; the holdup was nearly
>> entirely me procrastinating, plus a last minute rush to do the things 
>> below.
>>
>> As part of this process, I've created two (presumably) useful things:
>>
>> 1.  A reference implementation of iMesh.  This is GRUMMP stripped down
>> to the bare database, so the iMesh wrappers are actually 2-3 times as
>> much code as the database itself.  And yes (unlike GRUMMP) it will read
>> set and tag data... time to backport....  The tarball for this will
>> appear in svn about the time you get this email.  It's been tested
>> against the compliance test suite and the swapping service, but I'd
>> appreciate it if those of you who have other stuff to test it against
>> would do so at your convenience.
>>
>> 2.  A set of Fortran 2003 bindings for the interface, and a F2003
>> version of one of the example programs.  Fortran 2003's C
>> interoperability stuff makes it much easier to handle pointers, etc.
>> Strings still suck.  But F2003 also eliminates the painful business with
>> adding underscores to get name mangling right, as it's possible to
>> specify the C name that a Fortran interface binds too.  (Of course, gcc
>> 4.3 doesn't support that particular feature yet...).  This stuff, too,
>> will be appearing in SVN any second now.
>>
> 
> Will this application successfully link against an iMesh implementation 
> that's compatible with the current approach to Fortran, i.e. one with 
> underscores and function name case modified according to the _protos.h 
> file?

In the short term, definitely, because I'm not currently taking 
advantage of the name bindings, so whatever the Fortran compiler 
normally does happens with those names.  I did this because, for some 
reason, gfortran 4.3.x doesn't support name bindings.  In the long run, 
I think the usual preprocessor magic can be used to have the same effect.

In the longer run, I'll wonder aloud whether we shouldn't look to some 
other solution for F77 compatibility.  For instance, commercial 
compilers presumably support Fortran 2003 and 77 in the same executable, 
so the cost to applications of compiling routines that access iMesh 
using the F2003 capabilities may not be too painful.  Alternatively, the 
wrappers to hide some of the ugliness that Fortran pushes on us (and fix 
the name thing) would be very thin, much thinner than the wrappers we 
all already have to convert iMesh calls to native database calls.

Carl

-- 
------------------------------------------------------------------------
Dr. Carl Ollivier-Gooch, P.Eng.                   Voice: +1-604-822-1854
Associate Professor                                 Fax: +1-604-822-2403
Department of Mechanical Engineering             email: cfog at mech.ubc.ca
University of British Columbia              http://www.mech.ubc.ca/~cfog
Vancouver, BC  V6T 1Z4                  http://tetra.mech.ubc.ca/ANSLab/
------------------------------------------------------------------------



More information about the tstt-interface mailing list