Discussion:
Repacling mpif77 instead with g77 in a build
(too old to reply)
Olumide
2009-04-28 17:16:16 UTC
Permalink
Hello,

I would am looking to compile OOC LAPACK for Windows with Cygwin, and
I need adapting the makefiles for Cygwin, because mpif77 is not
available on Cygwin. However, I believe g77 supports MPI but I'm not
sure what flags to pass to it/how to edit the SLmake.inc file [
http://pastebin.com/f78ee649a ], which is included by Makefile
[ http://pastebin.com/f32da8812 ]

Many thanks,

- Olumide
Craig Powers
2009-04-28 19:37:33 UTC
Permalink
Post by Olumide
Hello,
I would am looking to compile OOC LAPACK for Windows with Cygwin, and
I need adapting the makefiles for Cygwin, because mpif77 is not
available on Cygwin. However, I believe g77 supports MPI but I'm not
sure what flags to pass to it/how to edit the SLmake.inc file [
http://pastebin.com/f78ee649a ], which is included by Makefile
[ http://pastebin.com/f32da8812 ]
Offhand, the main result of using mpif77 is to automagically provide the
right linker flags for linking with the MPI library. In generaly, it's
just a wrapper around whichever compiler was specified as the system F77
compiler when MPI was built. Consequently, for the compile step, you
shouldn't need to alter the Makefile at all.

Does your Cygwin have MPI at all? I suspect not if it doesn't have an
mpif77. If that's the case, if you build with any MPI features, you're
going to have problems when you try to link. You need to either install
MPI (which will probably also get rid of your problem with a lack of
mpif77) or provide stubs for the MPI routines that the code uses.
Olumide
2009-04-28 23:43:08 UTC
Permalink
Post by Craig Powers
Offhand, the main result of using mpif77 is to automagically provide the
right linker flags for linking with the MPI library.  In generaly, it's
just a wrapper around whichever compiler was specified as the system F77
compiler when MPI was built.  Consequently, for the compile step, you
shouldn't need to alter the Makefile at all.
Does your Cygwin have MPI at all?  I suspect not if it doesn't have an
mpif77.
I've compiled and installed MPICH2 (version 1.0.8p1), and it installed
without a hitch (I've never seen a config file work so hard!).
Thereafter, I ran 'make' in the OOC-LAPACK source folder, and things
worked well enough for a while, but the process suddenly terminated
with the following error message:

mpicc -c -DAdd_ -DUsingMpiBlacs -C -g mapblock.c
gcc: GCC does not support -C or -CC without -E
make: *** [mapblock.o] Error 1

I've tried adding the -E flag to CCFLAGS in SLmake.inc (I also tried
adding it to CDEFS and CC) but the make process spat out endless lines
of source code when I did.
Ian Bush
2009-04-30 05:21:54 UTC
Permalink
Post by Olumide
Post by Craig Powers
Offhand, the main result of using mpif77 is to automagically provide the
right linker flags for linking with the MPI library.  In generaly, it's
just a wrapper around whichever compiler was specified as the system F77
compiler when MPI was built.  Consequently, for the compile step, you
shouldn't need to alter the Makefile at all.
Does your Cygwin have MPI at all?  I suspect not if it doesn't have an
mpif77.
I've compiled and installed MPICH2 (version 1.0.8p1), and it installed
without a hitch (I've never seen a config file work so hard!).
Thereafter, I  ran 'make' in the  OOC-LAPACK source folder, and things
worked well enough for a while, but the process suddenly terminated
mpicc -c -DAdd_ -DUsingMpiBlacs -C -g  mapblock.c
gcc: GCC does not support -C or -CC without -E
make: *** [mapblock.o] Error 1
I've tried adding the -E flag to CCFLAGS in SLmake.inc (I also tried
adding it to CDEFS and CC) but the make process spat out endless lines
of source code when I did.
Rather than adding the -E ( preprocess only ) flag I would rather ask
why do you need the -C flag ? The solution is probably just to get rid
of that,

Ian

Loading...