"how set this make file for gfortran and open mpi"?

"how set this make file for gfortran and open mpi"?


i need define this make file( parallel version)for openmpi and gfortran :


# Generic target template



$(MAKE) LD="path to Fortran 90 Linker-loaDer" \\

LDFLAGS="appropriate flags for LD (MPI libraries)" \\

FC="path to Fortran 90 compiler" \\

FCFLAGS="appropriate flags for FC (MPI include)" \\



I attached makefile.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You should read openMPI FAQ and subscribe to their excellent mailing list. Nothing you have brought up relates to Intel software tools, although it appears to be mostly standard MPI and Makefile stuff. For myself, I don't like building in paths to a specific installation in the Makefile, instead using the equivalent of Intel mpivars.sh and ifortvars.sh before running make. An intermediate way, compatible with what you have shown, is to specify those make variables in your command line e.g.:
make -j 4 LD=/usr/local/openmpi14/bin/mpif90 FC=/usr/local/openmpi14/bin/mpif90 FCFLAGS="-O3 -march=corei7 -fno-signed-zeros -fno-trapping-math -funroll-loops --param max-unroll-times=4"
but you will still need to set up PATH and LD_LIBRARY_PATH to your installation of gfortran 4.6 (assuming you built openmpi with that gfortran). I mention gfortran 4.6 as that is the first to support corei7 specifically. Up to date distros may include an adequate gfortran 4.4 and corresponding openmpi. You may be wasting your time with anything older.
I took gratuitous advantage of your question to show that gfortran options are as complicated as ifort ones.
If you haven't consulted the gfortran/gcc manuals, that would be important too.

Leave a Comment

Please sign in to add a comment. Not a member? Join today