[97] | 1 | .\" Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. |
---|
| 2 | .TH mpif77 1 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 3 | |
---|
| 4 | . |
---|
| 5 | .SH NAME |
---|
| 6 | mpif77 -- Open MPI Fortran 77 wrapper compiler |
---|
| 7 | . |
---|
| 8 | .SH SYNTAX |
---|
| 9 | mpif77 [-showme|-showme:compile|-showme:link] ... |
---|
| 10 | . |
---|
| 11 | .SH OPTIONS |
---|
| 12 | .TP |
---|
| 13 | -showme |
---|
| 14 | Do not invoke the underlying compiler. Instead, show the command line |
---|
| 15 | that would be executed to compile the program. \fBNOTE:\fR If a |
---|
| 16 | non-filename argument is passed on the command line, the \fI-showme\fR |
---|
| 17 | option will \fInot\fR display any additional flags. For example, both |
---|
| 18 | "mpif77 --showme" and "mpif77 --showme my_source.c" will show all the |
---|
| 19 | wrapper-supplied flags. But "mpif77 -showme -v" will only show the |
---|
| 20 | underlying compiler name and "-v". |
---|
| 21 | .TP |
---|
| 22 | -showme:compile |
---|
| 23 | Do not invoke the underlying Fortran 77 compiler. Instead, show the |
---|
| 24 | compiler flags that would be supplied to the Fortran 77 compiler. |
---|
| 25 | .TP |
---|
| 26 | -showme:link |
---|
| 27 | Do not invoke the underlying Fortran 77 compiler. Instead, show the linker |
---|
| 28 | flags that would be supplied to the Fortran 77 compiler. |
---|
| 29 | .PP |
---|
| 30 | See the man page for your underlying compiler for other options that |
---|
| 31 | can be passed through mpif77 |
---|
| 32 | . |
---|
| 33 | . |
---|
| 34 | .SH DESCRIPTION |
---|
| 35 | .PP |
---|
| 36 | Conceptually, the role of these commands is quite simple: |
---|
| 37 | transparently add relevant compiler and linker flags to the user's |
---|
| 38 | command line that are necessary to compile / link Open MPI |
---|
| 39 | programs, and then invoke the underlying compiler to actually perform |
---|
| 40 | the command. |
---|
| 41 | . |
---|
| 42 | .PP |
---|
| 43 | As such, these commands are frequently referred to as "wrapper" |
---|
| 44 | compilers because they do not actually compile or link applications |
---|
| 45 | themselves; they only add in command line flags and invoke the |
---|
| 46 | back-end compiler. |
---|
| 47 | . |
---|
| 48 | . |
---|
| 49 | .SS Background |
---|
| 50 | Open MPI is comprised of three software layers: OPAL (Open Portable |
---|
| 51 | Access Layer), ORTE (Open Run-Time Environment), and OMPI (Open MPI). |
---|
| 52 | There are wrapper compilers for each layer; each layer's wrapper only |
---|
| 53 | links in the libraries relevant for that layer. Specifically, each |
---|
| 54 | layer provides the following wrapper compilers: |
---|
| 55 | . |
---|
| 56 | .TP 4 |
---|
| 57 | OPAL |
---|
| 58 | \fIopalcc\fR and \fIopalc++\fR |
---|
| 59 | . |
---|
| 60 | .TP |
---|
| 61 | ORTE |
---|
| 62 | \fIortecc\fR and \fIortec++\fR |
---|
| 63 | . |
---|
| 64 | .TP |
---|
| 65 | OMPI |
---|
| 66 | \fImpicc\fR, \fImpic++\fR, \fImpicxx\fR, \fImpiCC\fR (only on systems with |
---|
| 67 | case-senstive file systems), \fImpif77\fR, and \fImpif90\fR. Note |
---|
| 68 | that \fImpic++\fR, \fImpicxx\fR, and \fImpiCC\fR all invoke the same |
---|
| 69 | underlying C++ compiler with the same options. All are provided as |
---|
| 70 | compatibility with other MPI implementations. |
---|
| 71 | . |
---|
| 72 | .PP |
---|
| 73 | The Fortran wrapper compilers for MPI (\fImpif77\fR and \fImpif90\fR) |
---|
| 74 | will be inoperative and will return an error on use if Fortran 77 / |
---|
| 75 | Fortran 90 support was not built into the MPI layer. |
---|
| 76 | . |
---|
| 77 | . |
---|
| 78 | .SS Overview |
---|
| 79 | \fImpif77\fR is a convenience wrappers for the underlying |
---|
| 80 | Fortran 77 compiler. Translation of an Open MPI program requires the |
---|
| 81 | linkage of the Open MPI-specific libraries which may not reside in |
---|
| 82 | one of the standard search directories of ld(1). It also often |
---|
| 83 | requires the inclusion of header files what may also not be found in a |
---|
| 84 | standard location. |
---|
| 85 | . |
---|
| 86 | .PP |
---|
| 87 | \fImpif77\fR passes its arguments to the underlying Fortran 77 |
---|
| 88 | compiler along with the -I, -L and -l options required by Open MPI |
---|
| 89 | programs. |
---|
| 90 | . |
---|
| 91 | .PP |
---|
| 92 | The Open MPI Team \fIstrongly\fR encourages using the wrapper |
---|
| 93 | compilers instead of attempting to link to the Open MPI libraries |
---|
| 94 | manually. This allows the specific implementation of Open MPI to |
---|
| 95 | change without forcing changes to linker directives in users' |
---|
| 96 | Makefiles. Indeed, the specific set of flags and libraries used by |
---|
| 97 | the wrapper compilers depends on how Open MPI was configured and |
---|
| 98 | built; the values can change between different installations of the |
---|
| 99 | same version of Open MPI. |
---|
| 100 | . |
---|
| 101 | .PP |
---|
| 102 | Indeed, since the wrappers are simply thin shells on top of an |
---|
| 103 | underlying compiler, there are very, very few compelling reasons |
---|
| 104 | \fInot\fR to use \fImpif77\fR. When it is not possible to use the |
---|
| 105 | wrappers directly, the \fI-showme:compile\fR and \fI-showme:link\fR |
---|
| 106 | options should be used to determine what flags the wrappers would have |
---|
| 107 | used. For example: |
---|
| 108 | . |
---|
| 109 | .PP |
---|
| 110 | shell$ cc -c file1.c `mpicc -showme:compile` |
---|
| 111 | . |
---|
| 112 | .PP |
---|
| 113 | shell$ cc -c file2.c `mpicc -showme:compile` |
---|
| 114 | . |
---|
| 115 | .PP |
---|
| 116 | shell$ cc file1.o file2.o `mpicc -showme:link` -o my_mpi_program |
---|
| 117 | . |
---|
| 118 | . |
---|
| 119 | .SH NOTES |
---|
| 120 | .PP |
---|
| 121 | It is possible to make the wrapper compilers multi-lib aware. That |
---|
| 122 | is, the libraries and includes specified may differ based on the |
---|
| 123 | compiler flags specified (for example, with the GNU compilers on |
---|
| 124 | Linux, a different library path may be used if -m32 is seen versus |
---|
| 125 | -m64 being seen). This is not the default behavior in a standard |
---|
| 126 | build, but can be activated (for example, in a binary package |
---|
| 127 | providing both 32 and 64 bit support). More information can be found |
---|
| 128 | at: |
---|
| 129 | .PP |
---|
| 130 | https://svn.open-mpi.org/trac/ompi/wiki/compilerwrapper3264 |
---|
| 131 | . |
---|
| 132 | . |
---|
| 133 | .SH FILES |
---|
| 134 | .PP |
---|
| 135 | The string that the wrapper compilers insert into the command line |
---|
| 136 | before invoking the underlying compiler are stored in a text file |
---|
| 137 | created by Open MPI and installed to |
---|
| 138 | \fI$pkgdata/mpif77-wrapper-data.txt\fR, where \fI$pkgdata\fR |
---|
| 139 | is typically \fI$prefix/share/openmpi\fR, and \fI$prefix\fR is the top |
---|
| 140 | installation directory of Open MPI. |
---|
| 141 | . |
---|
| 142 | .PP |
---|
| 143 | It is rarely necessary to edit this file, but it can be examined to |
---|
| 144 | gain insight into what flags the wrappers are placing on the command |
---|
| 145 | line. |
---|
| 146 | . |
---|
| 147 | . |
---|
| 148 | .SH ENVIRONMENT VARIABLES |
---|
| 149 | .PP |
---|
| 150 | By default, the wrappers use the compilers that were selected when |
---|
| 151 | Open MPI was configured. These compilers were either found |
---|
| 152 | automatically by Open MPI's "configure" script, or were selected by |
---|
| 153 | the user in the CC, CXX, F77, and/or FC environment variables |
---|
| 154 | before "configure" was invoked. Additionally, other arguments |
---|
| 155 | specific to the compiler may have been selected by configure. |
---|
| 156 | . |
---|
| 157 | .PP |
---|
| 158 | These values can be selectively overridden by either editing the text |
---|
| 159 | files containing this configuration information (see the \fBFILES\fR |
---|
| 160 | section), or by setting selected environment variables of the |
---|
| 161 | form "OMPI_value". |
---|
| 162 | . |
---|
| 163 | .PP |
---|
| 164 | Valid value names are: |
---|
| 165 | . |
---|
| 166 | .TP |
---|
| 167 | CPPFLAGS |
---|
| 168 | Flags added when invoking the preprocessor (C or C++) |
---|
| 169 | . |
---|
| 170 | .TP |
---|
| 171 | LDFLAGS |
---|
| 172 | Flags added when invoking the linker (C, C++, or Fortran) |
---|
| 173 | . |
---|
| 174 | .TP |
---|
| 175 | LIBS |
---|
| 176 | Libraries added when invoking the linker (C, C++, or Fortran) |
---|
| 177 | . |
---|
| 178 | .TP |
---|
| 179 | CC |
---|
| 180 | C compiler |
---|
| 181 | . |
---|
| 182 | .TP |
---|
| 183 | CFLAGS |
---|
| 184 | C compiler flags |
---|
| 185 | . |
---|
| 186 | .TP |
---|
| 187 | CXX |
---|
| 188 | C++ compiler |
---|
| 189 | . |
---|
| 190 | .TP |
---|
| 191 | CXXFLAGS |
---|
| 192 | C++ compiler flags |
---|
| 193 | . |
---|
| 194 | . |
---|
| 195 | .TP |
---|
| 196 | F77 |
---|
| 197 | Fortran 77 compiler |
---|
| 198 | . |
---|
| 199 | .TP |
---|
| 200 | FFLAGS |
---|
| 201 | Fortran 77 compiler flags |
---|
| 202 | . |
---|
| 203 | . |
---|
| 204 | .TP |
---|
| 205 | FC |
---|
| 206 | Fortran 90 compiler |
---|
| 207 | . |
---|
| 208 | .TP |
---|
| 209 | FCFLAGS |
---|
| 210 | Fortran 90 compiler flags |
---|