From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: MPI lib with g77 (question 2) Date: 9 Feb 2000 11:18:37 GMT Organization: Aachen University of Technology (RWTH) Lines: 53 Message-ID: <87ried$s0p$1@nets3.rz.RWTH-Aachen.DE> References: <389F82B9 DOT 98AA9059 AT eecg DOT toronto DOT edu> <87ovsm$l1r$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <38A0BF11 DOT 1E851994 AT eecg DOT toronto DOT edu> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 950095117 28697 137.226.32.75 (9 Feb 2000 11:18:37 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 9 Feb 2000 11:18:37 GMT User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586)) Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Fan Zhang wrote: > Hans-Bernhard Broeker wrote: >> Fan Zhang wrote: > The MPI library is the standard Message Passing Interface library > using in the parallel computation. Since it is standard, I should > link to it without problem. A standard defined where, and by whom? Are you sure this really is a Fortran-callable library, to begin with? A side issue that isn't exactly clear, to me: is this MPI library something you only have in object file format, or do you compile it yourself from sources? >> > But it turns out that after g77 compiled, the MPI functions in the >> > object files change it's name to lower case. >> >> They don't exactly "change" to lower case, they are lower case all the >> time. FORTRAN 77, the language compiled by g77, is 100% >> case-insensitive > Since we can get the g77 source code, is it possible for us to change it so > that even under DOS enviroment it is case-sensitive? No. That would break g77 completely. It's a fundamental property of FORTRAN that you can write SUBROUTINE MPI_Something and later call it with any of the following: call mpi_something C A L L MPI_ SOME THING Call MPI_SomeThing and literally hundreds of other similar variations. As I said: a library that expects function names like 'MPI_Something' to stay untouched, in the object files cannot possibly be written in, or called from, FORTRAN 77 code. > I found that the f2c did the same thing to "change" the subroutines to lower > case. [ ie. MPI_Something() is change to mpi_something__() ]. Of course it does. f2c tries to generate code that, after compilation with a C compiler, will behave exactly the same as code compiled with a real fortran compiler. That includes name unification to all-lowercase, and the appended __ to signify these are FORTRAN-compiled objects. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.