JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for COMP-FORTRAN-90 Archives


COMP-FORTRAN-90 Archives

COMP-FORTRAN-90 Archives


COMP-FORTRAN-90@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

COMP-FORTRAN-90 Home

COMP-FORTRAN-90 Home

COMP-FORTRAN-90  2000

COMP-FORTRAN-90 2000

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: module

From:

"David Vowles" <[log in to unmask]>

Reply-To:

David Vowles

Date:

Wed, 14 Jun 2000 11:12:46 +0930

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (91 lines)

This is a problem that I have been struggling with also. In my case the general 
purpose module A requires certain problem specific information from the user. 
This information is but one by-product of a complex system model and associated 
operations. The information required by module A is naturally represented by 
Fortran's intrinsic data structures (scalars and vectors); however the data 
from which this information is obtained has a much more complex structure.

So one solution I have implemented (for evaluation) is a reverse communication 
interface in module A. That is module A requests information from the user 
module (B) when required. The implementation and maintenance of a reverse-
communication interface in Fortran 95 is facilitated by derived types. 
(Information on the state of module A can be encapsulated in a single derived 
type variable and the components can be made private)

The prime advantages that I see for such an interface are:
(1) The user has complete freedom in the way they implement higher-level data-
structures and procedures. (In my case sparse matrices and the solution of 
sparse-linear equations).
(2) Since module A is but one tool in my problem domain it is not given special 
precedence; module B USEs module A and not the other way around -- (i.e. the 
tail does not wag the dog).
(3) The interface of Module A can be published and a compiled version of Module 
A is all that needs to be distributed to end users.

The disadvantages that I see are:
(1) The user module B must call the driver routine of module A repeatedly and
include logic and procedures to provide the information requested by module A. 
(In my own case the procedures to service module A are generally required and 
would have to be provided anyway). One way to ameliorate the calling sequence 
complexity is to publish examples that can be easily adapted by the user.
(2) A more complex module A, including the maintenance of a stack of state 
information to allow module A to return to the state it was in prior to 
reversal (but updated with the requested information). Note that the SAVEd 
attribute is not used to preserve state information between calls. This allows 
for the possibility of multiple simultaneous use of module A.
(3) A higher level of programmer discipline is required for module A.

I would appreciate comments from list members on any additional pro's and con's 
of reverse-communication interfaces in the context of Fortran95.

Regards,
David Vowles.

Date sent:      	Tue, 13 Jun 2000 17:03:25 +0200
Organization:   	TU Dresden
Subject:        	module
From:           	Jörg Stiller <[log in to unmask]>
To:             	[log in to unmask], [log in to unmask]
Send reply to:  	Jörg Stiller <[log in to unmask]>

> Hello,
> 
> I am working on a library module (A), which makes uses of an 
> user supplied procedure (P) which, preferably, is placed in 
> another module (B). In particular, it should be possible to 
> compile A without knowing the body of B. However, a rudimental
> version of B containing a dummy for P could be supplied. 
> 
> Is there a legal way to do this in Fortran 95?
> If not, what is the "textbook solution" for this problem?
> 
> Regards
> Joerg
> 
> -- 
> Dr.-Ing. Joerg Stiller, Dozent fuer Geo- und Magnetofluiddynamik
> ----------------------------------------------------------------
> Technische Universitaet Dresden          TEL : (0351) 463 - 8328
> Institut f. Luft- und Raumfahrtechnik    FAX : (0351) 463 - 8087
> D-1062 Dresden                           [log in to unmask]


Regards,
David.

----------------------------------------------------------

David Vowles
Research Officer
Department of Electrical and Electronic Engineering
The University of Adelaide
Australia 5005

Voice:     +61 8 8303 5416
Fax:       +61 8 8303 4360
Email:     [log in to unmask]
Home Page: http://www.eleceng.adelaide.edu.au/Personal/dvowles/home.html


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

December 2023
February 2023
November 2022
September 2022
February 2022
January 2022
June 2021
November 2020
September 2020
June 2020
May 2020
April 2020
December 2019
October 2019
September 2019
March 2019
February 2019
January 2019
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
December 2015
November 2015
October 2015
September 2015
August 2015
June 2015
April 2015
March 2015
January 2015
December 2014
November 2014
October 2014
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
July 2013
June 2013
May 2013
April 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
August 2010
July 2010
June 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
July 2009
June 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager