On Mon, 23 Jun 2003, x z wrote:
> Forgive my ignorance. I am really a newbie. When I read the man page
> for "lam", it has the following:
>
> LAM TOOLS HCC(1)
> [snipped]
>
> What is a convenience wrapper for a native compiler? Does that mean
It simply means that you should use the mpicc, mpif77, and mpiCC commands
just like you would use real compiler commands (e.g., gcc, f77, g++). All
that these three commands do is add relevant -I, -L, and other flags to
what you entered and then turn around and invoke the real, underlying
compiler. For example:
mpicc hello.c -o hello
will compile and link the MPI source file named hello.c into the hello
executable.
> when lam-mpicc is installed (sorry, I am not the sys adm, I am just a
I'm assuming that your sysadmin has renamed LAM's "mpicc" command to be
"lam-mpicc"...?
> novice user), it has to be linked with a C compiler, be it the Sun C
> compiler, or gcc, or whatever? That is, if I want to compile a
> sequential program to compare its performance with a MPI program, for
> instance, I need to compile the sequential program using the same C
> compiler to be fair?
Our man page does not say that, but yes, that is generally a good idea.
> And also, does it also mean that the compiler flags that I include after
> "mpicc" should be consistent with the underlying C compiler? That is,
> if the -O flag, for example, is not supported by the underlying C
> compiler, I should not include it after mpicc? Conversely, if a certain
Correct. mpicc will invoke gcc (or cc or whatever your underlying C
compiler is). So whatever flags are legal to cc (or whatever) are also
legal for mpicc.
> -XYZ flag is supported by the C compiler, I can include it after
> "mpicc"?
Yes.
> Finally, is there a command to find out which C compiler lam-mpicc is
> using? I mean, can I type something like "mpicc -help" to get
> information on the underlying C compiler? Thank you very much.
"mpicc -showme" will show the command that mpicc would have invoked (to
include the name of the underlying complier).
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|