Newsgroups: comp.parallel.pvm
From: tabaer@beast.acs.ohio-state.edu (Troy Baer)
Reply-To: tabaer@magnus.acs.ohio-state.edu
Subject: LINUX.m4 (was Re: Pvmfspawn doesn't work under LINUX)
Organization: the Ohio State University, Aero./Astro. Engineering Dept.
Date: 11 Nov 1994 00:29:11 GMT
Message-ID: <TABAER.94Nov11002912@beast.acs.ohio-state.edu>

>>>>> "Benno" == Benno J Overeinder <overeind@fwi.uva.nl> writes:
In article <39srse$16u@word.fwi.uva.nl> overeind@fwi.uva.nl (Benno J. Overeinder) writes:
   [original post about problems with pvmfspawn deleted]

    Benno> The LINUX.m4 inputfile describes the way how, amongst
    Benno> others, strings should be handled in from FORTRAN to C
    Benno> function calls.  Currently, the m4 macros translates a
    Benno> FORTRAN string to a char pointer in C plus a integer
    Benno> pointer which denotes the length of the string buffer.
    Benno> (Please correct me, because I recollect it by heart.)  The
    Benno> f2c compiler however, translates a FORTRAN function call
    Benno> with strings as parameters to a character pointer, and an
    Benno> integer (thus not a pointer).  Next the positions of the
    Benno> parameters are not compatible.  The m4 macros put the
    Benno> character pointer an integer pointer together, f2c leaves
    Benno> the parameters in the same order, and puts the integer
    Benno> associated with a string at the end of the parameter list.

    Benno> Anyhow, the result in the pvmfspawn is that a string with
    Benno> incorrect lenght is copied and strncpy generates an error.
    Benno> (Segmentation volation?, I cann't remember)

    Benno> So, probably the only correct way to handle this problem is
    Benno> to rewrite the LINUX.m4 for the f2c compiler.

OK.  If I knew anything about f2c and m4, I'd try to fix this.
Unfortunately, I don't.  (Although in the process to trying to figure
this out last night, I *DID* find out that SUN3.m4, SUN4.m4, and
BSD386.m4 don't work...)

I would consider this a bug in the implementation of PVM, and it's
keeping from getting real work done.  (I'm trying to run the NAS
parallel benchmarks on my Linux box, partly out of curiosity and
partly to irk a colleague who tried them on a VAX/11-780.  11 seconds
on a Cray Y/MP; 23+ hours on the VAX...)  If anybody has any leads
and/or patches to fix this, PLEASE POST THEM!

TIA,

	--Troy
-- 
+----------------+---------------------------------------------------+
| Troy A. Baer   | There is no problem, personal or technical, which |
| Senior, AAE    | cannot be solved with either a faster computer,   |
| baer.3@osu.edu | a bigger hammer, or enough plastic explosives.    |
+----------------+---------------------------------------------------+

