Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
mpifort(1)			      MPI			    mpifort(1)

NAME
       mpifort -  Compiles and links MPI programs written in Fortran 90

DESCRIPTION
       This  command  can  be used to compile and link MPI programs written in
       Fortran.	 It provides the options and any special  libraries  that  are
       needed to compile and link MPI programs.

       It  is  important  to  use this command,	particularly when linking pro-
       grams, as it provides the necessary libraries.

COMMAND	LINE ARGUMENTS
       -show  -	Show the commands that would be	used without running them
       -help  -	Give short help
       -fc=name
	      -	Use compiler name instead of the  default  choice.   Use  this
	      only  if	the compiler is	compatible with	the MPICH library (see
	      below)
       -config=name
	      -	Load a configuration file for a	particular compiler.  This al-
	      lows  a  single mpifort command to be used with multiple compil-
	      ers.
       -compile_info
	      -	Show the steps for compiling a program.	 This  option  can  be
	      used to see what options and include paths are used by mpifort.
       -link_info
	      -	Show the steps for linking a program.  This option can be used
	      to see what options and libraries	are used by mpifort.
       -profile=name
	      -	Use the	MPI profiling given by name.  See below	for details
       -echo  -	Show exactly what this program is doing.  This	option	should
	      normally not be used.
       others -	 are passed to the compiler or linker.	For example, -c	causes
	      files to be compiled, -g selects compilation with	 debugging  on
	      most  systems,  and  -o name causes linking with the output exe-
	      cutable given the	name name .

ENVIRONMENT VARIABLES
       The environment variables MPICH_FC may be used to select	different For-
       tran  compiler  and linker.  Note that since MPICH is built with	a par-
       ticular C and Fortran compiler, change the  compilers  used  can	 cause
       problems.   Use	this only if you could intermix	code compiled with the
       different compilers.

COMPATIBLE COMPILERS
       The MPI library may be used  with  any  compiler	 that  uses  the  same
       lengths	for  basic  data  objects (such	as long	double ) and that uses
       compatible run-time libraries.  On many systems,	the various  compilers
       are  compatible	and may	be used	interchangably.	 There are exceptions;
       if you use the MPICH_FC environment variable or the  -fc=name  command-
       line  argument  to  override the	choice of compiler and encounter prob-
       lems, try reconfiguring MPICH with  the	new  compiler  and  installing
       MPICH in	a separate location.  See the installation manual for more de-
       tails.

EXAMPLES
       To compile a single file	foo.f ,	use
       mpifort -c foo.f

       To link the output and make an executable, use
       mpifort -o foo foo.o

       Combining compilation and linking in a single command
       mpifort -o foo foo.f

       is a convenient way to build simple programs.

SELECTING A PROFILING LIBRARY
       The -profile=name argument allows you to	specify	an MPI	profiling  li-
       brary to	be used.  name can have	two forms:

       A library in the	same directory as the MPI library
       The name	of a profile configuration file

       If  name	is a library, then this	library	is included before the MPI li-
       brary.  This allows the simple use of libraries that make  use  of  the
       MPI profiling interface and that	are installed in the same directory as
       the MPI library.

       If name.conf is the name	of a file in the  sysconfdir  directory,  then
       this is read and	may define the following variables:
       PROFILE_PRELIB
	      -	Libraries (and paths) to include before	the MPI	library
       PROFILE_POSTLIB
	      -	Libraries to include after the MPI library
       PROFILE_INCPATHS
	      -	C preprocessor arguments for any include files For example, to
	      add /usr/local/myprof/include to the include path	 and  the  li-
	      brary libmyprof.a	in /usr/local/myprof/lib to the	link step, you
	      could create the file myprof.conf	with the lines

	      PROFILE_PRELIB="-L/usr/local/myprof/lib -lmyprof"
	      PROFILE_INCPATHS="-I/usr/local/myprof/include"

	      and place	it in the sysconfdir directory (this directory is  set
	      at configure time	when MPICH is built).  Then using the command-
	      line argument -profile=myprof will cause these definitions to be
	      added to the relevant compile commands.

SEE ALSO
       mpicc, mpicxx, mpifort, mpiexec

				  11/10/2017			    mpifort(1)

NAME | DESCRIPTION | COMMAND LINE ARGUMENTS | ENVIRONMENT VARIABLES | COMPATIBLE COMPILERS | EXAMPLES | SELECTING A PROFILING LIBRARY | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=mpifort&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help