From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47b8cc19a3b78b17,start X-Google-Attributes: gid103376,public From: Duncan Sands Subject: Using ATC to abort code written in Fortran Date: 2000/01/20 Message-ID: <3886CD8D.AFFEB635@topo.math.u-psud.fr>#1/1 X-Deja-AN: 575140178 Content-Transfer-Encoding: 7bit Organization: Universite Paris-Sud, France. X-Accept-Language: en Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353" Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-01-20T00:00:00+00:00 List-Id: I have a heavy calculation to do which may have to be aborted in the middle, using ATC. Thus select A.Trigger; then abort Huge_Calculation; end select; Most of the Huge_Calculation is performed by a numerical library written in Fortran. I am worried that ATC may not work correctly if the abort comes while in the Fortran code. Does anyone have any idea? I can see two kinds of potential problems. The first comes from how the fortran code is written. For example, if it stores information in global variables then these may be left corrupted after ATC. I'm not so worried by this, because I can check the code and do some rewriting if necessary. I am more worried about the second kind of potential problem: will ATC trash memory etc because the code produced by the fortran compiler is not compatible with ATC? I've no idea how ATC is implemented, so I've no idea if there could really be code compatibility problems or not. Perhaps someone out there has some experience with this kind of thing... I am using g77 (egcs version) for compiling the fortran and GNAT 3.12p for the Ada. Thanks for your help, Duncan Sands. PS: Of course, I could wrap the Fortran code up in a protected object, and exploit the abort deferred property of protected objects to avoid having the abort come during execution of the Fortran code. But since it is the Fortran part that is likely to need to be aborted (because it can take a long time to complete), this is not very satisfactory.