nvfortran(1)

๐Ÿ“ฆ version 26.9, in arch rolling

nvfortran(1) ๐Ÿ’–

okay so this is the nvfortran(1) page from the General Commands Manual, and it is literally the NVIDIA Fortran compiler. Buckle up, bestie โ€” we are keeping every flag, every suffix, and every vibe check intact. ๐Ÿซถ

NAME โœจ

nvfortran โ€” The NVIDIA Fortran compiler. ๐Ÿ‘‘

SYNOPSIS ๐ŸŽ€

nvfortran [ -flag ]...  sourcefile...

DESCRIPTION ๐ŸŒธ

nvfortran is a Fortran compiler for NVIDIA GPUs and AMD and Intel CPUs. It supports ISO Fortran 2003 and many features of Fortran 2008, supports GPU parallel programming with OpenACC, and supports multicore CPU programming with OpenACC and OpenMP. nvfortran invokes the Fortran compiler, assembler, and linker with options derived from its command line arguments.

Suffixes of source file names indicate the type of processing to be done:

  • .f, .for, .ftn โ€” fixed-format Fortran source; compile
  • .f90, .f95, .f03 โ€” free-format Fortran source; compile
  • .F, .FOR, .FTN, .fpp, .FPP โ€” fixed-format Fortran source; preprocess, compile
  • .F90, .F95, .F03 โ€” free-format Fortran source; preprocess, compile
  • .cuf โ€” free-format CUDA Fortran source; compile
  • .CUF โ€” free-format CUDA Fortran source; preprocess, compile
  • .s โ€” assembler source; assemble
  • .S โ€” assembler source; preprocess, assemble
  • .o โ€” object file; passed to linker
  • .a โ€” library archive file; passed to linker

C file suffixes are also recognized and compiled with the NVC compiler; see NVC and NVIDIA User's Guide. Other files are passed to the linker (if linking is requested) with a warning message.

Unless you override the default action using a command-line option, nvfortran deletes the intermediate preprocessor and assembler files (see the options -c, -E, -F, and -Mkeepasm); if a single Fortran program is compiled and linked with one nvfortran command, the intermediate object file is also deleted. Linking is the last stage of the compile process, unless you use one of the -c, -E, -F, or -S options, or unless compilation errors stop the whole process.

OPTIONS โœจ

Options must be separate; -cs is different from -c -s. Here is a list of all options, grouped by type. More detailed explanations are in following sections.

Overall Options ๐ŸŽ€

  • --
  • -#
  • -###
  • -c
  • -[no]defaultoptions
  • -dryrun
  • -drystdinc
  • -dumpversion
  • -echo
  • --flagcheck
  • -flags
  • -fmax-errors=<n>
  • --gcc-toolchain=path
  • -help[=option]
  • -Manno
  • -Minform=level
  • -Mdetail
  • -Mkeepasm
  • -M[no]list
  • -noswitcherror
  • -o file
  • -rc rcfile
  • -S
  • -show
  • -silent
  • -time
  • -V
  • -V<ver>
  • -v
  • --version
  • -w
  • -Werror
  • -x language
  • -x none
  • -Wpass,option
  • -Ypass,directory

Optimization Options ๐Ÿ”ฅ

  • -fast
  • -f[no-]cx-limited-range
  • -fastsse
  • -fPIC
  • -fpic
  • -KPIC
  • -Kpic
  • -Mcache_align
  • -Mconcur=option
  • -M[no]depchk
  • -M[no]dse
  • -Mextract=option
  • -M[no]fma
  • -M[no]frame
  • -M[no]idiom
  • -M[no]info=option
  • -Minline=option
  • -Minstrument=option
  • -M[no]ipa=option
  • -M[no]lre[=assoc|noassoc]
  • -M[no]movnt
  • -Mneginfo=option
  • -Mnoopenmp
  • -Mnosgimp
  • -Mnovintr
  • -Mpfi[=option]
  • -Mpfo[=option]
  • -M[no]pre
  • -M[no]prefetch=option
  • -Mprof=option
  • -M[no]propcond
  • -Mquad
  • -Msafe_lastval
  • -M[no-]signed-zeros
  • -M[no]stride0
  • -M[no]unroll=option
  • -M[no]unsafe_par_align
  • -M[no]vect=option
  • -M[no]zerotrip
  • -mp[=option]
  • -nomp
  • -Olevel
  • -pg

Debugging Options ๐Ÿซถ

  • -C
  • -g
  • -gopt
  • -M[no]bounds
  • -Mchkptr
  • -Mchkstk
  • -Mcoff
  • -Mdwarf2
  • -Mdwarf3
  • -Melf
  • -Mnodwarf
  • -[no]traceback

Preprocessor Options ๐Ÿฆ‹

  • -Dmacro
  • -E
  • -F
  • -Idirectory
  • -isystem directory
  • -Mcpp=[[no]comment|m|md|mm|mmd|mq:target|mt:target|suffix:suff]
  • -Mnostddef
  • -Mnostdinc
  • -Mpreprocess
  • -Umacro
  • -YI,directory
  • -Yp,directory

Assembler Options ๐Ÿงš

  • -Wa,argument[,argument]...
  • -Ya,directory

Linker Options ๐Ÿ’œ

  • -acclibs
  • --[no-]as-needed
  • -Bdynamic
  • -Bstatic
  • -Bstatic-nvidia
  • -c++libs
  • -cudaforlibs
  • -cudalib=libname
  • -cudalibs
  • -fortranlibs
  • -g77libs
  • -Ldirectory
  • -llibrary
  • -m
  • -Mcudalib=libname
  • -M[no]eh_frame
  • -Mnostartup
  • -Mnostdlib
  • -M[no]rpath
  • -Mmkl
  • -nvmalloc
  • -pthread
  • -Rdirectory
  • -r
  • -rpath directory
  • -s
  • -shared
  • -soname name
  • -static
  • -static-nvidia
  • -uname
  • --[no-]whole-archive
  • -Wl,option[,option]...
  • -Xlinker option[,option]...
  • -YC,directory
  • -Yl,directory
  • -YL,directory
  • -YS,directory
  • -YU,directory

Language Options ๐ŸŒˆ

  • -asmsuffix=suffix
  • -byteswapio
  • -csuffix=suffix
  • -fsuffix=suffix
  • -FSUFFIX=suffix
  • -cuda=option
  • -i2
  • -i4
  • -i8
  • -i8storage
  • -Mallocatable[=95|03]
  • -M[no]backslash
  • -Mbyteswapio
  • -Mcray=pointer
  • -Mcuda=option
  • -M[no]dalign
  • -M[no]dclchk
  • -M[no]defaultunit
  • -M[no]dlines
  • -Mdollar=char
  • -Mextend
  • -Mfixed
  • -M[no]free[form]
  • -M[no]i4
  • -M[no]iomutex
  • -Mlibsuffix=suffix
  • -M[no]llalign
  • -Mnomain
  • -Mobjsuffix=suffix
  • -M[no]onetrip
  • -M[no]r8
  • -M[no]r8intrinsics=float
  • -M[no]recursive
  • -M[no]ref_externals
  • -M[no]save
  • -M[no]signextend
  • -M[no]stack_arrays
  • -Mstandard
  • -Msyntax-only
  • -M[no]unixlogical
  • -M[no]upcase
  • -module directory
  • -Munlink_module
  • -r4
  • -r8
  • -Wh,argument[,argument]...

Target-specific Options ๐ŸŽฏ

  • -acc
  • -noacc
  • -gpu=option
  • -K[no]ieee
  • -Ktrap=option
  • -march=target
  • -m[no-]daz-ftz
  • -M[no]daz
  • -M[no]flushz
  • -M[no]fpmisalign
  • -M[no]fprelaxed=option
  • -M[no]func32
  • -M[no]longbranch
  • -M[no]second_underscore
  • -M[no]varargs
  • -Mwritable-strings
  • -mcmodel=small|medium
  • -stdpar=option
  • -nostdpar
  • -ta=target
  • -target=option
  • -tp=target
๐Ÿšจ Link-time reminder, bestie: when source files are compiled using any of the following options, the same option(s) should be passed when using nvfortran to link the objects: -g -mp -Mconcur -Mipa -Mprof.

โœจ Overall Options โœจ

okay bestie, these are the driver-level switches โ€” the ones that tell nvfortran how to behave overall. ๐Ÿ’…

  • -- โ€” Anything after this switch is treated as a filename. Note that most tools will not allow a filename starting with a dash, so these should be avoided. ๐Ÿซถ
  • -# โ€” Display the invocations of the compiler, assembler, and linker. These invocations are the command lines created by nvfortran.
  • -### โ€” Display invocations of the compiler, assembler and linker, but do not execute them.
  • -c โ€” Skip the link step; compile and assemble only.
  • -defaultoptions (default) / -nodefaultoptions โ€” Use (don't use) the default options set in site-specific or user-specific PREOPTIONS or POSTOPTIONS driver variables.
  • -dryrun โ€” Use this option to display the invocations of the compiler, assembler, and linker but do not execute them.
  • -drystdinc โ€” Display the standard include directories without invoking the compiler.
  • -dumpversion โ€” Display the shortened version of the compiler. For example, 21.11 or 22.3.
  • -echo [=go|stop] โ€” Echo the command line flags and (by default) stop. This is useful when the compiler is invoked by a script.
    • go โ€” Don't stop after echoing the command line.
    • stop (default) โ€” Do stop after echoing the command line.
  • --flagcheck โ€” Don't compile anything; just emit any messages for command-line switch errors. Return a success error code if there are no command-line switch errors.
  • -flags โ€” Display all valid nvfortran command-line options in alphabetical order.
  • -fmax-errors=<n> โ€” Specify maximun numbers of errors before terminating compilation.
  • --gcc-toolchain=path โ€” Specify gcc toolchain location using path to gcc directory or gcc executable. The argument can either be gcc root directory, <root directory>/bin, or the gcc executable itself.
  • -help[=option] โ€” Displays command-line options recognized by nvfortran on the standard output. nvfortran -help -otherswitch will give help about -otherswitch. The default is to list nvfortran command line options by group; options are:
    • groups โ€” Print out the groups into which the switches are organized.
    • asm โ€” Print help for assembler command-line options.
    • debug โ€” Print help for debugging command-line options.
    • language โ€” Print help for language-specific command-line options.
    • linker โ€” Print help for linker options.
    • opt โ€” Print help for optimization command-line options.
    • other โ€” Print help for any other command-line options.
    • overall โ€” Print help for overall command-line options.
    • phase โ€” Print help for the known compiler phases.
    • prepro โ€” Print help for preprocessor command-line options.
    • suffix โ€” Describe the known file suffixes.
    • switch โ€” Print all switches in alphabetical order.
    • target โ€” Print help for target-specific command-line options.
    • variable โ€” Show the nvfortran configuration; this is the same as -show.
  • -Manno โ€” Produce annotated assembly files, where source code is intermixed with assembly language; implies -Mkeepasm.
  • -Minform=level โ€” Specify the minimum level of error severity that the compiler displays during compilation.
    • fatal โ€” Instructs the compiler to display fatal error messages.
    • file (default) / nofile โ€” Print out (don't print out) the names of files as they are compiled; this is only active when there is more than one file on the command line.
    • severe โ€” Instructs the compiler to display severe and fatal error messages.
    • warn โ€” Instructs the compiler to display warning, severe and fatal error messages.
    • inform โ€” Instructs the compiler to display all error messages (inform, warn, severe and fatal).

The default is -Minform=warn.

  • -Mdetail โ€” Display enhanced error messages that include source line and column pointer. This is currently available for syntax errors and some semantic errors.
  • -Mkeepasm โ€” Keep the assembly file for each source file, but continue to assemble and link the program. This is mainly for use in compiler performance analysis and debugging.
  • -Mlist, -Mnolist (default) โ€” Create (don't create) a listing file.
  • -noswitcherror โ€” Ignore unknown command line switches after printing an warning message; the default behavior is to print an error message and halt.
  • -o file โ€” Use file as the name of the executable program, rather than the default a.out. If used with -c or -S and a single input file, file is used as the name of the object or assembler output file.
  • -rc rcfile โ€” Specifies the name of a nvfortran startup configuration file. If rcfile is a full pathname, then use the specified file. If rcfile is a relative pathname, use the file name as found in the $DRIVER directory.
  • -S โ€” Skip the assembly and link steps. Leave the output from the compile step in a file named file.s for each file named, for instance, file.f. See also -o.
  • -show โ€” Produce help information describing the current nvfortran configuration.
  • -silent โ€” Do not print warning messages. Same as -Minform=severe.
  • -time โ€” Print execution times for the various steps in the compiler itself.
  • -V โ€” Display version messages and other information.
  • -V<ver> โ€” If the specified version of the compiler is installed, that version of the compiler is invoked.
  • -v โ€” Verbose mode; print out the command line for each tool before it is executed.
  • --version โ€” Display version messages and other information.
  • -w โ€” Do not print warning messages.
  • -Werror โ€” Turn all warning messages into errors.
  • -x language โ€” Specify explicitly the language for the input files (instead of choosing based on the file name suffix). Possible values for language are:
    • c
    • cpp c++ cpp-output
    • f F
    • f95 f95-cpp-input
    • f90 F90
    • f77 f77-cpp-input
    • cuf CUF
    • asm ASM assembler assembler-with-cpp
  • -x none โ€” Turn off language specification, so the input files are handled according to their suffixes.
  • -Wpass,option[,option...] โ€” Pass option to the specified pass. Each comma-delimited option is passed as a separate argument. The passes are:
    • h โ€” for the Fortran 90/95 front end,
    • 0 โ€” for the compiler back end,
    • a โ€” for the assembler,
    • i โ€” for the interprocedural analyzer, and
    • l โ€” for the linker.
  • -Ypass,directory โ€” Look in directory for pass pass, rather than in the standard area. The passes are:
    • h โ€” Search for the Fortran 90/95 front end executable in directory.
    • 0 โ€” Search for the compiler back end executable in directory.
    • a โ€” Search for the assembler executable in directory.
    • C โ€” Search for the compiler library in directory.
    • i โ€” Search for the InterProcedural Analyzer (IPA) in directory.
    • l โ€” Search for the linker in directory.
    • I โ€” Set the compiler's standard include directory to directory. The standard include directory is set to a default value by the driver and can be overridden by this option.
    • L โ€” If the linker supports the -YL option, then pass the option -YL,directory to the linker. Otherwise, use directory as the standard library location.
    • S โ€” Search for the startup object files in directory.
    • U โ€” If the linker supports the -YU option, then pass the option -YU,directory to the linker. Otherwise this option is ignored.

๐Ÿ”ฅ Optimization Options ๐Ÿ”ฅ

okay, optimization section โ€” this is where the compiler gets its little performance goblin on. ๐Ÿ”ฅ

  • -fast โ€” Chooses generally optimal flags for the target platform. Use nvfortran -fast -help to see the equivalent switches. Note this sets the optimization level to a minimum of 2; see -O.
  • -fcx-limited-range โ€” Specify that complex division does not need range reduction. -fno-cx-limited-range specifies that complex division does need range reduction. -fcx-limited-range is the default setting at optimization level -Ofast.
  • -fastsse โ€” Chooses generally optimal flags for a processor that supports to vectorize for the SSE/AVX instructions. Use nvfortran -fastsse -help to see the equivalent switches.
  • -fPIC โ€” Equivalent to -fpic; provided for compatibility with other compilers.
  • -fpic โ€” Instructs the compiler to generate position-independent code which can be used to create shared object files (dynamically linked libraries).
  • -KPIC โ€” Equivalent to -fpic; provided for compatibility with other compilers.
  • -Kpic โ€” Equivalent to -fpic; provided for compatibility with other compilers.
  • -Mcache_align โ€” Align unconstrained data objects of size greater than or equal to 16 bytes on cache-line boundaries. An unconstrained object is a variable or array that is not a member of an aggregate structure or common block, is not allocatable, and is not an automatic array.
  • -Mconcur[=option[,option,...]] โ€” ๐Ÿšจ this option has been deprecated and will be removed in a future release. It instructs the compiler to enable auto-concurrentization of loops. This also sets the optimization level to a minimum of 2; see -O. If -Mconcur is specified, multiple processors will be used to execute loops which the compiler determines to be parallelizable. When linking, the -Mconcur switch must be specified or unresolved references will occur. The OMP_NUM_THREADS or NCPUS environment variables control how many processors will be used to execute parallelized loops. The options can be one or more of the following:
  • allcores โ€” bestie, this one uses all the available cores, but only when the env vars OMP_NUM_THREADS and NCPUS aren't set. Heads up tho: you gotta specify it at link time. ๐Ÿ’…
  • altcode:n / noaltcode โ€” generate (or don't generate, with noaltcode) alternate scalar code for parallelized loops. The parallelizer whips up scalar code that runs whenever the loop count is less than or equal to n. But if you say noaltcode, the parallelized version of the loop always runs, no matter what the loop count is. periodt.
  • altreduction[:n] โ€” same energy, but for parallelized loops that contain a reduction. If a parallelized loop has a reduction in it, the parallelizer generates scalar code that executes whenever the loop count is less than or equal to n.
  • assoc (default) / noassoc โ€” enable (or disable) parallelization of loops with reductions.
  • cncall / nocncall (default) โ€” assume (or don't assume) that loops containing calls are safe to parallelize. Also: no minimum loop count threshold has to be satisfied before parallelization kicks in, and last values of scalars are assumed to be safe.
  • dist:block โ€” parallelize with block distribution. Contiguous blocks of iterations of a parallelizable loop get assigned to the available processors.
  • dist:cyclic โ€” parallelize with cyclic distribution. The outermost parallelizable loop in any loop nest gets parallelized. If a parallelized loop is innermost, its iterations are allocated to processors cyclically. For example, if there are 3 processors executing a loop, processor 0 performs iterations 0, 3, 6, etc; processor 1 performs iterations 1, 4, 7, etc; and processor 2 performs iterations 2, 5, 8, etc. ๐ŸŒ€
  • innermost / noinnermost (default) โ€” enable (or disable) parallelization of innermost loops.
  • levels:n โ€” parallelize loops nested at most n levels deep; the default is 3.

  • -Mdepchk (default) / -Mnodepchk โ€” assume (or don't assume) that potential data dependencies exist. โš ๏ธ Lowkey important: -Mnodepchk may result in incorrect code. You've been warned, bestie.
  • -Mdse / -Mnodse (default) โ€” enable (or disable) the dead store elimination optimization.
  • -Mextract=[option[,option,...]] โ€” run the subprogram extraction phase to prepare for inlining. The =lib:filename option must be used with this switch to name an extract library. See -Minline for more deets on inlining. โœจ
    • subprogram[,subprogram] โ€” a non-numeric option that doesn't contain a period is assumed to be the name of a subprogram to be extracted.
    • name:subprogram[,subprogram] โ€” specifies the name of a subprogram or subprograms to be extracted.
    • lib:directory โ€” specifies the name of a directory to contain the extracted subprograms; this directory will be created if it doesn't already exist. ๐ŸŽ€
    • [size:]number โ€” a numeric option is assumed to be a size. Functions containing number or fewer statements are extracted. If both number and function are specified, then functions matching the given name(s) or meeting the size requirements are extracted.
  • -Mfma / -Mnofma (default) โ€” generate (or don't generate) fused multiply-add (FMA) instructions on the CPU and GPU for targets that support it. FMA instructions are generally faster than separate multiply-add instructions, and can generate higher precision results since the multiply result isn't rounded before the addition. But delaying rounding until after addition, however, may cause results to differ from those you'd get with the unfused multiply-add instructions. FMA instructions are enabled at optimization levels higher than -O1. ๐Ÿงฎ
  • -Mframe / -Mnoframe (default) โ€” set up (or don't set up) a true stack frame pointer for functions; -Mnoframe allows slightly more efficient operation when a stack frame isn't needed, but some options override -Mnoframe. ๐Ÿ’€
  • -Midiom / -Mnoidiom (default) โ€” enable loop idiom recognition. Memory copy, memory set, and memory zero loops are recognized and replaced with calls to their respective optimized versions. Iconic behavior honestly.
  • -Minfo[=option[,option,...]] / -Mnoinfo (default) โ€” emit useful information to stderr. The options are:
    • all โ€” includes options accel, inline, ipa, loop, lre, mp, opt, par, stdpar, vect.
    • accel โ€” emit information about accelerator region targeting.
    • ftn โ€” emit Fortran-specific information.
    • inline โ€” emit information about functions extracted and inlined.
    • intensity โ€” this option has been deprecated and will be removed in a future version. Emit compute intensity information about loops. ๐Ÿ‘€
    • ipa โ€” emit information about the optimizations enabled by interprocedural analysis (IPA).
    • loop | opt โ€” emit information about loop optimizations. This includes information about vectorization and loop unrolling.
    • lre โ€” emit information about loop-carried redundancy elimination.
    • mp โ€” emit information about OpenMP parallel regions.
    • par โ€” emit information about loop parallelization.
    • pfo โ€” emit profile feedback information.
    • time | stat โ€” emit compilation statistics.
    • stdpar โ€” emit information about parallelization of C++ parallel algorithms and Fortran DO CONCURRENT loops.
    • vect โ€” emit information about automatic loop vectorization.

With no options, -Minfo is the same as -Minfo=accel,ipa,loop,lre,mp,opt,par,stdpar,vect. ๐Ÿซถ

  • -Minline[=option[,option,...]] โ€” pass options to the function inliner. The options are:
    • lib:filename.ext โ€” specify an inline library created by a previous -Mextract option. Functions from the specified library are inlined. If no library is specified, functions are extracted from a temporary library created during an extract prepass.
    • except:func โ€” specifies which functions should not be inlined. ๐Ÿ™ˆ
    • [name:]function โ€” a non-numeric option is assumed to be a function name. If name: is specified, what follows is always the name of a function.
    • pragma โ€” Fortran Only: inline only those procedures that have a !NVF$ INLINE pragma on the source line immediately before the procedure's SUBROUTINE or FUNCTION statement.
    • [maxsize:]number โ€” a numeric option is assumed to be a size. Functions of size number or less are inlined. If both number and function are specified, then functions matching the given name(s) or meeting the size requirements are inlined.
    • reshape โ€” for Fortran, the default is to not inline subprograms with array arguments if the array shape doesn't match the shape in the caller. This overrides the default.
    • smallsize:number โ€” always inline functions of size smaller than number regardless of other size limits.
    • totalsize:number โ€” stop inlining in a function when the function's total inlined size reaches the number specified.
  • -Minstrument [=option] โ€” generate additional code to enable function-level instrumentation. This option implies -Mframe. The option is:
    • functions (default)
  • -Mipa [=option[,option,...]] / -Mnoipa (default) โ€” enable and specify options for InterProcedural Analysis (IPA). ๐Ÿ“Š Note: IPA is not compatible with parallel make environments (e.g., pmake). IPA also sets the optimization level to a minimum of 2; see -O. If no option list is specified, then it's equivalent to -Mipa=const. The options are:
    • align / noalign (default) โ€” enable (or disable) recognition when pointer targets are all cache-line aligned, allowing better SSE code generation.
    • arg / noarg (default) โ€” remove (or don't remove) arguments replaced by -Mipa=ptr,const. -Mipa=noarg implies -Mipa=nolocalarg.
    • const (default) / noconst โ€” enable (or disable) propagation of constants across procedure calls.
    • f90ptr / nof90ptr (default) โ€” enable (or disable) Fortran 90 pointer disambiguation across procedure calls.
    • fast โ€” chooses generally optimal -Mipa flags for the target platform; use nvfortran -Mipa -help to see the equivalent options.
    • force โ€” force all objects to recompile regardless of whether IPA information has changed.
    • globals / noglobals (default) โ€” analyze (or don't analyze) which globals are modified by procedure calls.
    • inline:n โ€” determine additional functions to inline, allowing up to n levels of inlining. Additional suboptions are:
      • except:proc โ€” disables inlining of procedure proc.
      • nopfo โ€” ignore any profile frequency information from -Mpfo when choosing which functions to inline.
      • reshape / noreshape (default) โ€” enable (or disable) Fortran inlining with mismatched array shapes.
    • ipofile โ€” save IPA information in a .ipo file instead of the default of appending the information to the object file.
    • jobs:n โ€” use up to n jobs in parallel to reoptimize object files. ๐Ÿงš
  • keepobj (this one's the default, bestie) / nokeepobj โ€” keep the optimized object files (or don't ๐Ÿ™ˆ), using file name mangling, so your next builds recompile faster. It's giving "save your progress" energy.
  • libc / nolibc (default) โ€” optimize calls to certain standard C library routines โœจ
  • libinline / nolibinline (default) โ€” allow (or don't allow) inlining from routines in libraries ๐Ÿซถ heads up: -Mipa=libinline implies -Mipa=inline.
  • libopt / nolibopt (default) โ€” allow (or don't allow) recompiling and reoptimizing routines from libraries with IPA information ๐Ÿ’…
  • localarg / nolocalarg (default) โ€” enable (or disable) the feature that externalizes local variables so arguments can be replaced by -Mipa=ptr. And yes: -Mipa=localarg implies -Mipa=arg โญ
  • main:func โ€” specify a function to serve as a global entry point ๐Ÿ‘‘ it may appear multiple times, and ngl it disables linking.
  • ptr / noptr (default) โ€” enable (or disable) pointer disambiguation across procedure calls ๐ŸŒธ
  • pure / nopure (default) โ€” detect (or don't detect) pure functions ๐Ÿฆ‹
  • quiet โ€” don't print out messages about which files are recompiled at link time ๐Ÿคซ lowkey the polite option.
  • reaggregation / noreaggregation (default) โ€” enable (or disable) global struct reaggregation ๐ŸŒˆ btw this one can change the order of struct members, or split structs into multiple structs, to improve memory locality and cache utilization. Iconic for performance, but know what you're signing up for ๐Ÿ’€
  • required โ€” return an error condition if IPA is inhibited for any reason, instead of the default behavior of just linking without IPA optimization ๐Ÿšจ
  • safe:[function|library] โ€” declares that the named function, or all functions in the named library, are safe ๐ŸŽ€ a safe procedure does not call back into the known procedures and does not change any known global variables. Warning tho: without -Mipa=safe, any unknown procedures will cause IPA to fail.
  • safeall / nosafeall (default) โ€” declares that all unknown functions are safe (or not safe, respectfully ๐Ÿ™ˆ); see -Mipa=safe above.
  • shape / noshape (default) โ€” perform (or don't perform) Fortran 90 shape propagation โœจ
  • summary โ€” only collect IPA summary information when compiling ๐Ÿซถ this prevents IPA optimization of this file, but allows optimization for other files linked with this file. Team player energy fr fr.
  • vestigial / novestigial (default) โ€” remove (or don't remove) functions that are not called ๐Ÿ’€ bye, dead code.
  • -Mlre[=assoc|noassoc], -Mnolre โ€” enable (or disable) loop-carried redundancy elimination โšก the assoc option allows expression reassociation, and noassoc disallows expression reassociation. Pick your fighter.
  • -Mmovnt, -Mnomovnt โ€” force (or disable) generation of nontemporal moves ๐Ÿ”ฅ -Mmovnt used with -fastsse can sometimes be faster than -fastsse alone. By default, nontemporal moves are generated for loops with large loop counts.
  • -Mneginfo=option[,option...] โ€” tells the compiler to produce information on why certain optimizations are not performed ๐Ÿ˜ญ (the "why didn't you slay" report). Use the -Minfo flag instead, bestie.
  • -Mnoopenmp โ€” when -mp is present, ignore the OpenMP pragmas ๐Ÿ™ˆ
  • -Mnosgimp โ€” when -mp is present, ignore the SGI parallelization pragmas ๐Ÿ˜Œ
  • -Mnovintr โ€” do not generate vector intrinsic calls ๐Ÿšซ
  • -Mpfi[=option] โ€” generate profile feedback instrumentation โœจ this includes extra code to collect run-time statistics to be used in a subsequent compile. Important: -Mpfi must also appear when the program is linked ๐Ÿ”— When the program is run, a profile feedback file pgfi.out will be generated; see -Mpfo. The allowed options are:
    • indirect / noindirect (default) โ€” enable (or disable) collection of indirect function call targets, which can be used for indirect function call inlining ๐ŸŽฏ
  • -Mpfo[=option[,option...]] โ€” enable profile feedback optimizations ๐Ÿ’… there must be a profile feedback file pgfi.out in the current directory, which contains the result of an execution of the program compiled with -Mpfi. The options are:
    • indirect / noindirect (default) โ€” enable (or disable) indirect function call inlining; this requires a pgfi.out file generated from a binary built with -Mpfi=indirect ๐Ÿ”—
    • layout (default) / nolayout โ€” enable (or disable) basic block layout to take advantage of instruction cache locality by keeping hot paths close together ๐Ÿ”ฅ cozy little hot paths.
    • dir=directory โ€” specify the directory containing the pgfi.out profile feedback information file; the default is the current directory ๐Ÿ—‚๏ธ
  • -Mpre, -Mnopre (default) โ€” enable (or disable) the partial redundancy elimination optimization โญ
  • -Mprefetch[=option:n], -Mnoprefetch โ€” add (or don't add) prefetch instructions for those processors that support them (Pentium 4, Opteron) ๐Ÿ–ฅ๏ธ heads up: -Mprefetch is default on Opteron; -Mnoprefetch is default on other processors. The options are:
    • distance:d โ€” set the fetch-ahead distance for prefetch instructions to d cache lines ๐Ÿ“
    • n:n โ€” set the maximum number of prefetch instructions to generate in a loop to n ๐Ÿ”ข
    • nta โ€” use the prefetchnta instruction โœจ
    • plain โ€” use the prefetch instruction ๐ŸŽ€
    • t0 โ€” use the prefetcht0 instruction ๐Ÿ’œ
    • w โ€” allow the AMD-specific prefetchw instruction ๐Ÿ”ฅ
  • -Mprof[=option[,option...]] โ€” set performance profiling options ๐Ÿ‘‘ using these makes the resulting executable create a performance profile that you can view and analyze with the PGPROF performance profiler. Quick vocab check: old-style profiling means compiler-generated source instrumentation, and MPICH-style profiling means instrumented wrappers for MPI library routines. The -Mprof options are:
    • dwarf โ€” generate limited DWARF symbol information sufficient for most performance profilers ๐Ÿงš
    • func โ€” perform old-style function level profiling ๐ŸŽฏ
    • hwcts โ€” generate a profile using event-based sampling of hardware counters via the PAPI interface (PAPI must be installed) โš™๏ธ
    • lines โ€” perform old-style line level profiling ๐Ÿ“
    • time โ€” generate a profile using time-based instruction-level statistical sampling โฑ๏ธ this is equivalent to -pg, except the profile is saved in a file named pgprof.out instead of gmon.out. Small difference, big deal.
On Linux systems that have OProfile installed, PGPROF supports collection of performance data without recompilation ๐Ÿ’– use of -Mprof=dwarf is useful for this mode of profiling.
  • -Mpropcond (default), -Mnopropcond โ€” enable (or disable) propagation of constant values derived from conditional branches with equality tests ๐ŸŒธ
  • -Mquad โ€” align large objects on quad-word boundaries ๐Ÿ“
  • -Msafe_lastval โ€” okay so picture this: a scalar is used after a loop, but it's not defined on every iteration of the loop ๐Ÿ˜ฌ by default the compiler does not parallelize the loop. But this option tells the compiler it is safe to parallelize the loop ๐Ÿš€
  • -Msigned-zeroes (default), -Mno-signed-zeros โ€” toggles whether to honor (-Msigned-zeros) or ignore (-Mno-signed-zeros) issues associated with a signed 0.0 during optimization ๐Ÿ’… Yes, the flag list literally writes it two ways; yes, it's still the same vibe.
  • -Mstride0, -Mnostride0 (default) โ€” generate (or don't generate) alternate code for a loop that contains an induction variable whose increment may be zero ๐ŸŒ€
  • -Munroll[=option[,option...]], -Mnounroll (default) โ€” invoke (or don't invoke) the loop unroller ๐ŸŽ€ this also sets the optimization level to a minimum of 2; see -O. The option is one of the following:
    • c:m โ€” tells the compiler to completely unroll loops with a constant loop count less than or equal to m, a supplied constant ๐Ÿ“ if this value is not supplied, the m count is set to 1. And if m is set to 1, a compiler heuristic determines the maximum loop count at which such loops will be completely unrolled.
    • n:u โ€” tells the compiler to unroll a single-block loop u times, when the loop is not completely unrolled, or has a non-constant loop count ๐Ÿ” if u is not supplied, the unroller computes the number of times a candidate loop is unrolled.
    • m:u โ€” tells the compiler to unroll a multi-block loop u times, when it's not completely unrolled, or has a non-constant loop count ๐ŸŒˆ if u is not supplied, the unroller computes the number of times a candidate loop is unrolled.

And -Mnounroll tells the compiler not to unroll loops, periodt โœ‹

  • -Munsafe_par_align, -Mnounsafe_par_align โ€” use (or don't use) aligned moves for array loads in parallelized loops as long as the first element of the array is aligned ๐Ÿ’€ this is only effective with -Mvect=simd. And the reason it's literally called unsafe? There are situations where the array elements allocated to some processors are not aligned ๐Ÿ˜ญ so like, be careful bestie.
  • -Mvect [=option[,option...]], -Mnovect (default) โ€” pass options to the internal vectorizer ๐Ÿš€ this also sets the optimization level to a minimum of 2, the equivalent of -O; for more info see optimization levels under -O. If no option list is specified, then these vector optimizations are used: assoc,cachesize:c,simd:256, where c is the actual cache size of the machine โœจ The -Mvect options are:
    • altcode (default) / noaltcode โ€” enable (or disable) alternate code generation for vector loops, depending on such characteristics as array alignments and loop counts ๐ŸŽฏ
    • fuse / nofuse (default) โ€” enable (or disable) loop fusion to combine adjacent loops into a single loop ๐Ÿซถ two loops become one, we love a merge.
    • prefetch โ€” use prefetch instructions in loops where profitable ๐Ÿ‘€
  • simd[:{128|256|512}] (default), nosimd โ€” use vector SIMD instructions (AVX, AVX2, AVX512), bestie. The argument can limit usage to 128-bit SIMD instructions. Specifying 512-bit SIMD instructions is only possible for target processors that support AVX512. โœจ
  • uniform, nouniform (default) โ€” perform the same optimizations in the vectorized and residual loops. This may affect the performance of the residual loop. ๐Ÿ’…
๐Ÿซถ heads up: these next ones are also supported, but they're not recommended for new development โ€” except by experienced users โ€” and may be phased out in future releases. Not me warning you, just the manpage.
  • assoc (default), noassoc โ€” enable (disable) certain associativity conversions that can change the results of a computation due to floating-point roundoff error differences. A typical optimization is to change the order of additions, which is mathematically correct but can be computationally different due to roundoff error. ๐Ÿ˜ญ
  • cachesize:number (default=automatic) โ€” tells the vectorizer, when it's doing cache tiling optimizations, to assume a cache size of number. ๐ŸŽ€
  • gather (default), nogather โ€” enable (disable) vectorization of loops with indirect array references. ๐Ÿฆ‹
  • idiom (default), noidiom โ€” enable idiom recognition; this is the alternate form of -Midiom. ๐Ÿ”ฅ
  • levels:n โ€” set maximum nest level of loops to optimize. ๐ŸŒธ
  • partial โ€” enable partial loop vectorization via innermost loop distribution. ๐Ÿ’œ
  • short, noshort (default) โ€” enable (disable) recognition of short vector operations that arise from scalar code outside of loops or within the body of loops. ๐Ÿ‘‘
  • sizelimit[:number], nosizelimit (default) โ€” limit the size of loops that are vectorized; the default is to attempt to vectorize all loops. โญ
  • tile, notile (default) โ€” enable (disable) loop tiling to optimize for cache locality. ๐ŸŒˆ
  • -Mnovect โ€” disables the vectorizer, and it's the default at -O0 and -O1. ๐Ÿ’€
  • -Mzerotrip (default), -Mnozerotrip โ€” include (don't include) a zero-trip test for loops. Use -Mnozerotrip only when all loops are known to execute at least once. ๐Ÿ™ˆ
  • -mp[=option] โ€” enable OpenMP pragmas and directives to explicitly parallelize regions of code for execution by accelerator devices or a multi-processor system. The options allowed are:
    • gpu โ€” compile OpenMP directives for parallel execution on the GPU. ๐Ÿ”ฅ
    • multicore (default) โ€” compile OpenMP directives for parallel execution on the CPU. ๐Ÿ’ป
    • align, noalign (default) โ€” modify (don't modify) default loop iteration scheduling to align iterations with array references. The default is to use simple static scheduling. ๐ŸŽ€
    • autopar (default), noautopar โ€” enable loop autoparallelization of omp loop constructs. ๐ŸŒ€
    • ompt โ€” link against an OMPT-enabled OpenMP library. ๐Ÿงš
  • -nomp โ€” ignore OpenMP directives and do not link against OpenMP runtime libraries. ๐Ÿ’…
  • -O[level] โ€” set the optimization level. If -O is not specified, then the default level is 1 if -g is not specified, and 0 if -g is specified. If a number is not supplied with -O then the optimization level is set to 2. The optimization levels and their meanings are as follows:
    • -O0 โ€” sets the optimization level to 0. A basic block is generated for each statement. No scheduling is done between statements. No global optimizations are performed. ๐Ÿ˜ด
    • -O1 โ€” sets the optimization level to 1. Scheduling within extended basic blocks is performed. No global optimizations are performed. ๐ŸŒฑ
    • -O โ€” sets the optimization level to 2, with no SIMD vectorization enabled. All level 1 optimizations are performed. In addition, traditional scalar optimizations such as induction recognition and loop invariant motion are performed by the global optimizer. โœจ
    • -O2 โ€” all -O optimizations are performed. In addition, more advanced optimizations such as SIMD code generation, cache alignment and partial redundancy elimination are enabled. ๐Ÿ”ฅ
    • -O3 โ€” all -O1 and -O2 optimizations are performed. In addition, this level enables more aggressive code hoisting and scalar replacement optimizations that may or may not be profitable. ๐Ÿ’…
    • -Ofast โ€” enables -O3, -Mfprelaxed, -Mstack_arrays, -Mno-nan, Mno-inf, and -fcx-limited-range. Note -Mstack_array is disabled when both command line options -Ofast and -stdpar are enabled. ๐Ÿš€
    • -O4 โ€” all -O1, -O2, and -O3 optimizations are performed. In addition, hoisting of guarded invariant floating-point expressions is enabled. ๐Ÿ‘‘
  • -pg โ€” enable gprof-style sample-based profiling; implies -Mframe. ๐Ÿ“ˆ

๐Ÿž Debugging Options ๐Ÿž

  • -C โ€” add array bounds checking; the same as -Mbounds. ๐Ÿ›‘
  • -g โ€” generate symbolic debug information. This also sets the optimization level to zero, unless a -O switch is present on the command line. Symbolic debugging may give confusing results if an optimization level other than zero is selected. Using -O0 the generated code will be slower than code generated at other optimization levels. ๐Ÿ˜ญ
  • -gopt โ€” generate symbolic debug information, without affecting optimizations. This may give confusing results when debugging with optimizations; it is intended for use with other tools that use the debug information. ๐Ÿงš
  • -Mbounds, -Mnobounds (default) โ€” add (don't add) array bound checking. ๐Ÿ’–
  • -Mchkptr โ€” check for unintended de-referencing of NULL pointers. ๐Ÿ’€
  • -Mchkstk โ€” check the stack for available space upon entry to and before the start of a parallel region. Useful when many private variables are declared. ๐Ÿซถ
  • -Mcoff โ€” generate a COFF formatted object. ๐ŸŽ€
  • -Mdwarf2 โ€” generate DWARF2 debug information with -g. ๐ŸŒธ
  • -Mdwarf3 โ€” generate DWARF3 debug information with -g. ๐Ÿฆ‹
  • -Melf โ€” generate an ELF formatted object. ๐ŸŒˆ
  • -Mnodwarf โ€” don't add the default dwarf information. ๐Ÿ™ˆ
  • -traceback (default), -notraceback โ€” add debug information for runtime traceback. ๐Ÿ”

๐Ÿงš Preprocessor Options ๐Ÿงš

  • -Dname[=def] โ€” define name to be def in the preprocessor. If def is missing, it is assumed to be empty. If the = sign is missing, then name is defined to be the string 1. โœจ
  • -E โ€” preprocess each .c file and send the result to standard output. No compilation, assembly, or linking is performed. ๐Ÿ’…
  • -F โ€” stop after preprocessing. โœ‹
  • -Idirectory โ€” add directory to the compiler's search path for include files. For include files surrounded by < >, each -I directory is searched followed by the standard area. For include files surrounded by " ", the directory containing the file containing the #include directive is searched, followed by the -I directories, followed by the standard area. ๐ŸŽ€
  • -isystem directory โ€” same as -I, but mark the directory as a system directory. ๐ŸŒธ
  • -Mcpp=[[no]comment|m|md|mm|mmd|mq:target|mt:target|suffix:suff] โ€” only runs the preprocessor on the input file(s); by default, the output is written to file.i, unless renamed with the -o switch. The options are:
    • comment, nocomment โ€” keep (don't keep) C-style comments in the preprocessed output. ๐Ÿ’ฌ
    • include:file โ€” include this file before processing the source file. ๐Ÿ“ฅ
    • m โ€” print makefile dependencies to stdout, a la -M. ๐Ÿ–จ๏ธ
    • md โ€” print makefile dependencies to file.d, a la -MD. ๐Ÿ“„
    • mm โ€” print makefile dependencies to stdout, ignoring system includes (includes with angle braces), a la -MM. ๐Ÿšซ
    • mmd โ€” print makefile dependencies to file.d, ignoring system includes (includes with angle braces), a la -MMD. ๐Ÿ“
    • mq:'target' โ€” print makefile dependencies to stdout, a la -MQ. ๐ŸŽฏ
    • mt:target โ€” print makefile dependencies to stdout, a la -MT. ๐ŸŽฏ
    • line โ€” include line numbers into the preprocessed output. ๐Ÿ”ข
    • suffix:suff โ€” when generating makefile dependencies, name the dependent file file.suff; the default is to name the dependent file file.o. ๐Ÿท๏ธ
  • -Mnostddef โ€” do not predefine any macros to the preprocessor. ๐Ÿ™…
  • -Mnostdinc โ€” do not search in the standard location for include files when those files are not found elsewhere. ๐Ÿ”
  • -Mpreprocess โ€” run the preprocessor on Fortran or assembler source files. By default, the preprocessor is run when the source's suffix is .fpp, .F, .F90, .F95, or .HPF. ๐Ÿงš
  • -Uname โ€” remove the definition of the name macro in the preprocessor. โŒ
  • -YI,directory โ€” change the standard include directory to directory. ๐Ÿ“‚
  • -Yp,directory โ€” look in directory for the preprocessor executable. ๐Ÿ”Ž

๐Ÿ› ๏ธ Assembler Options ๐Ÿ› ๏ธ

  • -Wa,option[,option...] โ€” pass each comma-delimited option to the assembler. ๐Ÿ”ง
  • -Ya,directory โ€” look in directory for the assembler executable. ๐Ÿงฐ

๐Ÿ’… LINKER OPTIONS ๐Ÿ’…

okay so this is the part where we tell the linker what to do. the linker is the little guy who actually stitches all your object files together into something you can run, and bestie, it has opinions. these flags are how you pass your opinions to it. let's go ๐Ÿซถ


  • -acclibs โ€” link-time option that adds the accelerator libraries onto the link line โœจ
  • --as-needed, --no-as-needed โ€” these get passed straight to the linker. --as-needed tells it to only set the DT_NEEDED flag for the shared libraries that come after it โ€” meaning those libs are only required at run time if they're actually used to satisfy references. and --no-as-needed puts things back to the default behavior, no cap ๐ŸŽ€
  • -Bdynamic โ€” passed to the linker to say "dynamic binding please" ๐Ÿ’ซ
  • -Bstatic โ€” literally the same thing as -static. go peek at -static for the deets ๐Ÿ‘€
  • -Bstatic-nvidia โ€” also the same as -static-nvidia, so check that one out for the full story ๐Ÿ’œ
  • -c++libs โ€” link-time option that adds the C++ runtime libraries so you can do mixed-language programming. yes we're being multilingual, we contain multitudes ๐Ÿฆ‹
  • -cudaforlibs โ€” link-time option that adds the CUDA Fortran runtime libraries, also for mixed-language programming. and it implies '-fortranlibs', so you get that for free ๐Ÿ˜Œ
  • -cudalib[=libname[,libname...]] โ€” adds CUDA-optimized libraries to the link line. if you don't specify anything, the compiler links all the necessary CUDA-optimized libraries. -cudalib uses whichever version of the library matches the CUDA version you're on. the libraries it recognizes are:
    • cublas
    • cublasmp
    • cufft
    • cufftmp
    • cufftw
    • curand
    • cusolver
    • cusolvermp
    • cusparse
    • cutensor
    • nccl
    • nvblas
    • nvlamath
    • nvshmem
    • nvtx3

that's the whole lineup, no skips ๐Ÿ’…

  • -cudalibs โ€” โš ๏ธ deprecated, bestie, please use -cudalib instead. it's a link-time option that adds the CUDA runtime API library ๐Ÿ™ˆ
  • -fortranlibs โ€” link-time option that adds the Fortran runtime libraries, for when you're mixing languages like the main character you are ๐Ÿ‘‘
  • -g77libs โ€” link-time option that lets object files generated by GNU g77 (or gcc) get linked into nvfortran main programs. bridging the eras fr fr ๐ŸŒ‰
  • -Ldirectory โ€” passed to the linker; adds directory to the list of directories where the linker goes hunting for libraries ๐Ÿ”
  • -llibrary โ€” passed to the linker; loads the library liblibrary.a from the standard library directory. see also the -L option, they're besties ๐Ÿ’ž
  • -m โ€” makes the linker display a link map. a little map! of your links! cute ๐Ÿ—บ๏ธ
  • -Mcudalib[=libname[,libname...]] โ€” โš ๏ธ deprecated, please refer to -cudalib. adds CUDA-optimized libraries to the link line, and with no option specified the compiler links all the necessary CUDA-optimized libraries ๐Ÿ’€
  • -Meh_frame, -Mnoeh_frame โ€” adds (or doesn't add) arguments to the link line to preserve the stack frame information for zero-cost exception handling frames. the default is -Mnoeh_frame unless something in a site or user rcfile changes it. so like, check your rcfiles ๐Ÿงš
  • -Mnostartup โ€” do not link in the usual startup routine. and just so you know, that routine is the one holding the entry point for the program, so yeah, that's kind of a big deal ๐Ÿ˜ญ
  • -Mnostdlib โ€” do not link in the standard libraries when linking a program. bold move, but okay ๐Ÿซก
  • -Mrpath (default), -Mnorpath โ€” the default is to add -rpath to the link line, giving the directories that contain the required runtime shared objects. use -Mnorpath to tell the driver "nope, don't add any -rpath switches to the link line" ๐ŸŒธ
  • -Mmkl โ€” adds Intel's Math Kernel libraries to the link line. this one requires the environment variable MKLROOT to be set to the path of your local MKL installation โ€” specifically the part of the path that precedes 'lib/<arch>'. no MKLROOT, no MKL, that's the rule โญ
  • -nvmalloc โ€” uses a custom host memory allocator โœจ
  • -pthread โ€” adds support for multithreading with the pthreads library. this one sets flags for both the preprocessor and the linker, so it's doing double duty ๐Ÿ’ช
  • -Rdirectory โ€” passed to the linker; tells it to hard-code the pathname directory into the search path for generated shared object files. ๐Ÿ“Œ note: there cannot be a space between R and directory, so keep 'em glued together ๐ŸŽ€
  • -r โ€” passed to the linker; generates a re-linkable object file ๐Ÿ”
  • -rpath directory โ€” passed to the linker to add directory to the runtime shared library search path ๐Ÿ›ฃ๏ธ
  • -s โ€” passed to the linker; strips symbol table information. bye bye debug info ๐Ÿ‘‹
  • -shared โ€” passed to the linker; tells it to generate a shared object file (that's a dynamically linked library). implies -fpic, so you get position-independent code too ๐Ÿฆ‹
  • -soname name โ€” passed to the linker. when you're creating a shared object, this tells the linker to set the internal DT_SONAME field to the name you specified ๐Ÿท๏ธ
  • -static โ€” passed to the linker to specify static binding ๐Ÿ”’
  • -static-nvidia โ€” statically links in the NVIDIA runtime libraries while still using dynamic linking for the system libraries. implies -Mnorpath ๐Ÿ‘‘ (the best of both worlds, honestly)
  • -uname โ€” passed to the linker; generates an undefined reference. yes that's a thing, and yes it does what it says ๐Ÿ’ซ
  • --whole-archive, --no-whole-archive โ€” passed to the linker. --whole-archive tells it to include all objects in the archive files that follow, and --no-whole-archive restores the default behavior. like a light switch for archives ๐ŸŽš๏ธ
  • -Wl,option[,option]..., -Xlinker option[,option]... โ€” pass each comma-delimited option to the linker. two ways to do the same vibe, pick your fave ๐Ÿ’…
  • -YC,directory โ€” look in directory for the standard compiler library files ๐Ÿ“‚
  • -Yl,directory โ€” look in directory for the linker ๐Ÿ”Ž
  • -YL,directory โ€” change the standard library directory to directory ๐Ÿ—‚๏ธ
  • -YS,directory โ€” look in directory for the standard system startup object files ๐Ÿš€
  • -YU,directory โ€” passed to the linker; change library search path ๐ŸŒˆ

๐Ÿ’– Language Options ๐Ÿ’–

Okay bestie, this whole section is about telling nvfortran how to read your source files and what language semantics to use. It's giving "control freak but make it compiler" and honestly? Iconic. Let's go ๐Ÿ’…โœจ

  • -asmsuffix=suffix โ€” says "hey, a file with this suffix is an assembly language file" ๐Ÿ› ๏ธ
  • -byteswapio โ€” swaps bytes from big-endian to little-endian or vice versa on input/output of unformatted Fortran data. Use this to read/write Fortran unformatted data files that are compatible with ones produced on Sun or SGI systems ๐ŸŒˆ
  • -csuffix=suffix โ€” defines that a file with the given suffix is a C source file ๐Ÿ“
  • -fsuffix=suffix โ€” defines that a file with the given suffix is a Fortran source file ๐Ÿ’œ
  • -FSUFFIX=suffix โ€” also defines that a file with the given suffix is a Fortran source file (yes, uppercase bestie, it's a whole thing) ๐ŸŽ€
  • -cuda[=option[,option...] โ€” enables CUDA Fortran, adds CUDA include paths, and links with the CUDA runtime libraries. -cuda is required on the link line. If -cuda is used in compilation, it must also be used for linking. For target-specific options, pls refer to -gpu. For linking additional CUDA libraries (like math libraries), refer to -cudalib. Use these sub-options to tailor the compilation of CUDA Fortran accelerator regions:
    • charstring โ€” enables limited support for character strings in GPU kernels ๐Ÿ”ค
    • madconst โ€” puts Module Array Descriptors in CUDA Constant Memory ๐Ÿง 
  • -i2 โ€” treats INTEGER variables as two bytes.
  • -i4 โ€” treats INTEGER variables as four bytes.
  • -i8 โ€” treats default INTEGER and LOGICAL variables as eight bytes. For operations involving integers, use 64-bits for computations. ๐Ÿ”ข
  • -i8storage โ€” allocates 8 bytes for INTEGER and LOGICAL.
  • -Mallocatable[=95|03] โ€” selects whether to use Fortran 1995 or Fortran 2003 semantics for assignments to allocatable objects and allocatable components of derived types. Fortran 1995 semantics require the user to allocate the object or component and that an array object or component be conformant before the assignment. Fortran 2003 semantics require the compiler to add code to check whether the object or component is allocated and whether an array object is conformant before the assignment, and to allocate or reallocate if not. ๐Ÿค“
  • -Mbackslash, -Mnobackslash (default) โ€” treat (or don't treat) backslash as a normal (non-escape) character in strings. -Mnobackslash causes the standard C backslash escape sequences to be recognized in quoted strings; -Mbackslash causes the backslash to be treated like any other character. ๐ŸŽ€
  • -Mbyteswapio โ€” swaps bytes from big-endian to little-endian or vice versa on input/output of unformatted Fortran data. Use of this option enables reading/writing of Fortran unformatted data files compatible with those produced on Sun or SGI systems. ๐ŸŒˆ
  • -Mcray=pointer โ€” forces Cray Fortran (CF77) compatibility with respect to the listed options. Possible options include:
    • pointer โ€” for purposes of optimization, assume that pointer-based variables do not overlap the storage of any other variable. ๐Ÿง 
  • -Mcuda[=option[,option...] โ€” this option has been deprecated, please refer to -cuda. It enables CUDA (and CUDA Fortran), and links with the CUDA libraries. -Mcuda is required on the link line if there are no CUDA Fortran source files specified on the command line. If -Mcuda is used in compilation, it must also be used for linking. โš ๏ธ
  • -Mdalign (default), -Mnodalign โ€” align (don't align) doubles in structures on 8-byte boundaries. -Mnodalign may lead to data alignment exceptions. ๐Ÿ’€
  • -Mdclchk, -Mnodclchk (default) โ€” require (don't require) that all variables be declared.
  • -Mdefaultunit, -Mnodefaultunit (default) โ€” treat (don't treat) '*' as stdout/stdin regardless of the status of units 6/5. -Mnodefaultunit causes * to be a synonym for 5 on input and 6 on output; -Mdefaultunit causes * to be a synonym for stdin on input and stdout on output. ๐Ÿฆ‹
  • -Mdlines, -Mnodlines (default) โ€” treat (don't treat) lines beginning with D in column 1 as executable statements, ignoring the D.
  • -Mdollar=char โ€” sets the character used to replace dollar signs in names to be char. Default is an underscore (_). ๐Ÿ’ฒ
  • -Mextend โ€” allows 132-column source lines. ๐Ÿ“
  • -Mfixed โ€” processes Fortran source using fixed form specifications. The -Mfree options specify free form formatting. By default files with a .f or .F extension use fixed form formatting.
  • -Mfree, -Mfreeform, -Mnofree, -Mnofreeform โ€” process Fortran source using free form specifications. The -Mnofree and -Mfixed options specify fixed form formatting. By default files with a .f90, .F90, .f95 or .F95 extension use freeform formatting. ๐ŸŒธ
  • -Mi4 (default), -Mnoi4 โ€” treat (don't treat) INTEGER as INTEGER*4. -Mnoi4 treats INTEGER as INTEGER*2.
  • -Miomutex, -Mnoiomutex (default) โ€” generate (don't generate) critical section calls around Fortran I/O statements. ๐Ÿ”’
  • -Mlibsuffix=suffix โ€” defines that a file with the given suffix is an object library file. ๐Ÿ“š
  • -Mllalign (default), -Mnollalign โ€” align (don't align) long longs or INTEGER*8 in structures or common blocks on 8-byte boundaries. -Mllalign is the default.
  • -Mnomain โ€” when the link step is called, don't include the object file which calls the Fortran main program. Useful for using the nvfortran driver to link programs with the main program written in C or C++ and one or more subroutines written in Fortran. ๐Ÿซถ
  • -Mobjsuffix=suffix โ€” defines that a file with the given suffix is a binary object file.
  • -Monetrip, -Mnoonetrip (default) โ€” force (don't force) each DO loop to be iterated at least once. ๐Ÿ”
  • -Mr8, -Mnor8 (default) โ€” treat (don't treat) REAL as DOUBLE PRECISION and real constants as double precision constants.
  • -Mr8intrinsics [=float], -Mnor8intrinsics (default) โ€” treat (don't treat) the intrinsics CMPLX as DCMPLX and REAL as DBLE.
    • float โ€” also treat the FLOAT intrinsic as DBLE. ๐Ÿงš
  • -Mrecursive, -Mnorecursive (default) โ€” allocate (don't allocate) local variables on the stack, thus allowing recursion. SAVEd, data-initialized, or namelist members are always allocated statically, regardless of the setting of this switch. ๐ŸŒ€
  • -Mref_externals, -Mnoref_externals (default) โ€” force (don't force) references to names appearing in EXTERNAL statements.
  • -Msave, -Mnosave (default) โ€” assume (don't assume) that all local variables are subject to the SAVE statement. -Msave may allow many older Fortran programs to run but can greatly reduce performance. โš ๏ธ
  • -Msignextend (default), -Mnosignextend โ€” sign extend (don't sign extend) when a narrowing conversion overflows. For example, when -Msignextend is in effect and an integer containing the value 65535 is converted to a short, the value of the short will be -1. ANSI C specifies that the result of such conversions are undefined. ๐Ÿ˜ฌ
  • -Mstack_arrays, -Mnostack_arrays (default) โ€” allocate automatic arrays on the stack (on the heap). ๐Ÿ—‚๏ธ
  • -Mstandard โ€” flags non-ANSI-Fortran usage. ๐Ÿšฉ
  • -Msyntax-only โ€” performs only syntax checking, semantic checking, and Fortran module (.mod) file generation. โœ…
  • -Munixlogical, -Mnounixlogical (default) โ€” when -Munixlogical is in effect, a logical is considered to be .TRUE. if its value is non-zero and .FALSE. otherwise. When -Mnounixlogical is in effect (the default), a logical considered to be .TRUE. if its value is odd and .FALSE. if its value is even. ๐Ÿค”
  • -Mupcase, -Mnoupcase (default) โ€” preserve (don't preserve) case in names. -Mnoupcase causes all names to be converted to lower case. Note that, if -Mupcase is used, then variable name 'X' is different than variable name 'x', and keywords must be in lower case. ๐Ÿ” 
  • -module directory โ€” save/search for module files in directory. ๐Ÿ“
  • -Munlink_module โ€” instructs nvfortran to unlink a symlink to desired module file before writing out the module file. Without this option, nvfortran will follow the symlink and write the module file to the symlink's target, provided it has permission to write there. ๐Ÿ”—
  • -r4 โ€” interprets DOUBLE PRECISION variables as REAL.
  • -r8 โ€” interprets REAL variables as DOUBLE PRECISION. Equivalent to using the options -Mr8 and -Mr8intrinsics. โœจ
  • -Wh,option[,option...] โ€” passes each comma-delimited option to the Fortran 90/95 front end. ๐Ÿ“จ

๐Ÿš€ Target-specific Options ๐Ÿš€

Now we're talking accelerators, bestie. This is where you tell the compiler how to make your code go zoom on GPUs and other fancy hardware. Buckle up ๐ŸŽ๏ธ๐Ÿ’จ

  • -acc โ€” enables OpenACC pragmas and directives to explicitly parallelize regions of code for execution by accelerator devices. See the -gpu flag to select options specific to NVIDIA GPUs. The options are:
    • autopar (default), noautopar โ€” enable loop autoparallelization within parallel constructs. (autopar is the default; noautopar turns it off.) ๐Ÿ”
    • gpu (default) โ€” compile OpenACC directives for parallel execution on the GPU. ๐ŸŽฎ
    • host โ€” compile OpenACC directives for serial execution on the host CPU. ๐Ÿ–ฅ๏ธ
    • legacy โ€” suppress warnings about deprecated PGI accelerator directives. ๐Ÿ‘ต
    • multicore โ€” compile OpenACC directives for parallel execution on the host CPU. ๐Ÿงต
    • routineseq, noroutineseq (default) โ€” compile every routine for the device, as if it had a routine seq directive. ๐Ÿ“œ
    • strict โ€” issue warnings when accelerator directives are encountered which do not adhere to the OpenACC standard. โš ๏ธ
    • sync โ€” ignore async clauses, and run every data transfer and kernel launch on the default sync queue. ๐Ÿ”„
    • verystrict โ€” abort compilation with a fatal error when an accelerator directive is encountered which does not adhere to the OpenACC standard. ๐Ÿ’€
    • wait (default), nowait โ€” wait for each compute kernel to finish. (wait is the default; nowait doesn't wait.) โณ
  • -noacc โ€” disables OpenACC directives and does not link with OpenACC libraries. ๐Ÿšซ
  • -gpu=option โ€” use the following sub-options to tailor the compilation of target accelerator regions:

โ€ฆand that's exactly where this part ends, bestie โ€” the -gpu sub-options are coming at you in the next drop ๐Ÿ’…โœจ

okay so, weโ€™re still inside the -gpu suboption roster โ€” and every single little flag is getting its moment, bestie ๐Ÿ’…โœจ:

  • autocompare โ€” Automatically compare CPU/GPU results. Accelerated code sections will be run in redundant mode, and data will be compared whenever it would ordinarily be moved off the accelerator.
  • ccXY โ€” Generate code for a device with compute capability XY. Multiple compute capabilities can be specified, and one version will be generated for each. By default, the compiler will detect the compute capability for each installed GPU. Use -help -gpu to see the valid compute capabilities for your installation.
  • ccall โ€” Generate code for all compute capabilities supported for this target and by the selected CUDA Toolkit version.
  • ccnative โ€” Detects the visible GPUs on the system and generates codes for them. If no device is available the default compute capability will be used (cc50).
  • ccall-major โ€” Compile for all major supported compute capabilities (does not include PTX for the highest major virtual architecture, see -gpu=[no]rdc option for that support).
  • cudaX.Y โ€” Use CUDA X.Y Toolkit compatibility, where installed.
  • deepcopy โ€” Enable Full Deepcopy support in OpenACC Fortran.
  • fastmath โ€” Enable the fast math library, which includes faster, but lower precision, implementations of certain math and intrinsic functions.
  • flushz, noflushz (default) โ€” Enable (disable) flush-to-zero mode on the GPU.
  • fma, nofma โ€” Generate (do not) fused multiply-add operations on the GPU. This is enabled by default at optimization level -O1.
  • implicitsections, noimplicitsections (default) โ€” Change (do not change) array element references in OpenACC and OpenMP data clause to array sections references.
  • interceptdeallocations, nointerceptdeallocations โ€” Intercept (do not intercept) LIBC function calls (e.g. free) and call the corresponding CUDA memory deallocation version if address is in pinned or managed memory, regular version otherwise.
  • keepbin โ€” Keep the generated CUDA binary, with a .cubin suffix.
  • keepgpu โ€” Keep the generated CUDA GPU source files, with a .gpu suffix.
  • keepltoir โ€” Keep the generated GPU LTOIR files, with a .ltoir suffix. Works only when -gpu=lto is enabled.
  • keepptx โ€” Keep the generated portable assembly files, with a .ptx suffix.
  • lineinfo, nolineinfo (default) โ€” Generate debugging line information.
  • loadcache:[L1|L2] โ€” Generate code to cache global memory loads in the L1 or L2 hardware cache.
  • lto โ€” Enable Device Link Ltime Optimization (Device LTO).
  • maxregcount:n โ€” Set the maximum number of registers to use in the generated GPU code.
  • managed โ€” Allocate any dynamically allocated data in CUDA Managed memory. This option must appear in both the compile and link lines. This option may not be used with -gpu=pinned.
    • intercept โ€” Intercept LIBC function calls (e.g. free) and call their managed memory version if address is in managed memory, regular version otherwise.
  • nomanaged โ€” Do not allocate any dynamically allocated data in CUDA Managed memory. Use with -stdpar to prevent that flag's implicit use of -gpu=managed when CUDA Managed memory capability is detected.
  • nounified โ€” Do not compile for CUDA Unified memory capability. Use with -stdpar to prevent that flag's implicit use of -gpu=unified when CUDA Unified memory capability is detected.
  • pinned โ€” Allocate any dynamically allocated data in CUDA Pinned host memory. This option must appear in both the compile and link lines. This option may not be used with -gpu=managed|unified.
    • intercept โ€” Intercept LIBC function calls (e.g. free) and call their pinned memory version if address is in pinned memory, regular version otherwise.
  • mem:[mode] โ€” Select GPU memory mode from one of the following options: separate, managed, unified. This option cannot be combined with -gpu=pinned, gpu=managed or -gpu=unified.
    • mem:separate โ€” All data are in separate CPU and GPU memories. Explicit memory copies are performed when data are accessed from both CPU and GPU.
    • mem:managed โ€” Allocate any dynamically allocated data in CUDA Managed Memory. Data that are not allocated dynamically are in separate GPU memory and are copied explicitly between CPU and GPU memories. This option must appear in both the compile and link lines.
    • mem:unified โ€” Compile for full CUDA Unified Memory capability, where system memory is accessible from the GPU. All variables in the CPU code are accessible from the GPU without explicit directives or attributes. This mode utilizes system and managed memory for dynamically allocated data unless explicit behavior is set through -gpu=mem:unified:[no]managedalloc subflags. This option must appear in both the compile and link lines.
  • mem:unified:managedalloc, mem:unified:nomanagedalloc โ€” Allocate (do not allocate) any dynamically allocated data in CUDA Managed Memory.
  • mem:separate:pinnedalloc, mem:separate:nopinnedalloc โ€” Allocate (do not allocate) any dynamically allocated data in CUDA Pinned host memory.
  • ptxinfo โ€” Print ptxas information.
  • rdc (default), nordc โ€” Generate (do not generate) relocatable device code for separate compilation, and invoke the device linker before the host linker at the link step.
  • redundant โ€” Run accelerated code redundantly on CPU. Implied by autocompare.
  • safecache โ€” Allow variable-sized array sections in cache directives; compiler assumes they fit into CUDA shared memory.
  • sm_XY โ€” Generate code for a device with compute capability XY. Multiple compute capabilities can be specified, and one version will be generated for each. By default, the compiler will detect the compute capability for each installed GPU. Use -help -gpu to see the valid compute capabilities for your installation.
  • stacklimit:limit (default), nostacklimit โ€” ๐Ÿšจ This option has been deprecated and will be removed in a future release. Give an error if the total stack size of a kernel or procedure exceeds limit KBytes. The default is stacklimit:512.
  • tripcount:host โ€” Calculate loop trip counts on the host for some compute constructs. This is the default behavior when -gpu=tripcount is not specified. Note that this behavior is not compliant with the OpenACC specification. To ensure compliance with the specification, please use -gpu=tripcount:device.
  • tripcount:device โ€” Calculate loop trip counts on the device for some compute constructs. Note that this behavior is compliant with the OpenACC specification, though it is not the default behavior. To explicitly enable the default behavior, please use -gpu=tripcount:host.
  • tripcount:warn, tripcount:nowarn โ€” Enable (disable) compile-time warnings when loop trip counts are calculated on the host instead of on the device.
  • tripcount:check, tripcount:nocheck โ€” Insert (do not insert) runtime checks to ensure the trip count value calculated on the device matches the trip count value calculated on the host. To enable reporting of differences, set the environment variable NVCOMPILER_ACC_CHECK_TRIPCOUNT.
  • unified โ€” Compile for CUDA Unified memory capability, where system memory is accessible from the GPU. All variables in the CPU code are accessible from the GPU without explicit directives or attributes. This mode utilizes system and managed memory for dynamically allocated data unless explicit behavior is set through -gpu=[no]managed. This option must appear in both the compile and link lines. This option may not be used with -gpu=pinned.
    • intercept โ€” Intercept LIBC function calls (e.g. free) and call their unified version if address is in unified memory, regular version otherwise.
  • unroll, nounroll โ€” Automatically (do not) unroll inner loops. This is enabled by default at optimization level -O3.

and now the floating-point behavior tea, because precision is literally a whole personality ๐Ÿ’–:

  • -Kieee, -Knoieee (default) โ€” Perform floating-point operations in strict conformance with the IEEE 754 standard. Some optimizations are disabled with -Kieee, and a more accurate math library is used. The default -Knoieee uses faster but very slightly less accurate methods.
  • -Ktrap=option[,option]... โ€” Controls the behavior of the processor when floating-point exceptions occur during program execution. Possible options include:
    • denorm โ€” Trap on denormalized operands.
    • divz โ€” Trap on divide by zero.
    • fp โ€” Trap on floating-point exceptions.
    • inexact โ€” Trap on inexact result.
    • inv โ€” Trap on invalid operation.
    • none (default) โ€” Disable all traps. -Ktrap=inv,none,ovf implies -Ktrap=ovf.
    • ovf โ€” Trap on floating-point overflow.
    • unf โ€” Trap on floating-point underflow. -Ktrap is only meaningful when compiling a C/C++ main function or Fortran main program.

๐Ÿซถ also, -Ktrap=fp is shorthand for -Ktrap=divz,inv,ovf.

these options are literally the processor's floating-point exception mask bits, bestie ๐Ÿ’… normally those mask bits are enabled, which means floating-point exceptions get masked โ€” the processor recovers and keeps going like nothing happened. but if a mask bit is off (unmasked) and the matching exception pops off, execution terminates with a floating-point exception (Linux FPE signal). no cap, that's the vibe check ๐Ÿ˜ญ

  • -march=target โ€” literally the same as -tp, bestie. go read the -tp tea for details.
  • -m[no-]daz-ftz โ€” specifies how denormals are handled by the processor at runtime. -mno-daz-ftz means denormal operands and results are honored โ€” shorthand for -Mnodaz -Mnoflushz. -mdaz-ftz is the default setting and says denormal operands and results are treated as zero โ€” shorthand for -Mdaz -Mflushz.
  • -Mdaz, -Mnodaz โ€” enable [disable] mode to treat denormal (subnormal) floating-point operands as zero. -Mdaz is the default setting for x86_64 and aarch64 processors ๐Ÿซถ
  • -Mflushz, -Mnoflushz โ€” enable [disable] setting floating-point denormal (subnormal) results to zero. -Mflushz is the default setting for x86_64 and aarch64 processors.
  • -Mfpmisalign, -Mnofpmisalign โ€” allow (don't allow) vector arithmetic instructions with memory operands that are not aligned on 16-byte boundaries. alignment girlies stay stressed ๐Ÿ’€
  • -Mfprelaxed [=option[,option,...]], -Mnofprelaxed (default) โ€” perform (don't perform) certain floating-point operations using relaxed precision when it improves speed. the options are:
    • div โ€” perform divide using relaxed precision.
    • intrinsic โ€” perform certain intrinsic functions using relaxed precision.
    • order, noorder โ€” allow (don't allow) expression reordering, including factoring such as computing a*b+a*c as a*(b+c).
    • recip โ€” perform reciprocal operations using relaxed precision.
    • rsqrt โ€” perform reciprocal square root (1/sqrt) using relaxed precision.
    • sqrt โ€” perform square root using relaxed precision.

with no options, -Mfprelaxed will choose to generate relaxed precision code for those operations that generate a significant performance improvement, depending on the target processor โœจ

  • -Mfunc32 (default), -Mnofunc32 โ€” align (don't align) functions on 32 byte boundaries.
  • -Mlongbranch, -Mnolongbranch (default) โ€” enable (disable) long branches.
  • -Msecond_underscore, -Mnosecond_underscore (default) โ€” add (don't add) a second underscore to the name of a Fortran global if its name already contains an underscore. this option is useful for maintaining compatibility with g77, which adds a second underscore to such symbols by default. retro bestie behavior fr fr.
  • -Mvarargs, -Mnovarargs (default) โ€” generate code for calls made from Fortran to C routines to use varargs calling sequence.
  • -Mwritable-strings โ€” store string constants in the writable data segment.
  • -mcmodel=small|medium โ€” pick your memory model vibe:
    • small โ€” limits the combined area for a user's object or executable to 4GB. the maximum code size is 2GB.
    • medium โ€” allows unrestricted data size. the maximum code size is 2GB.
  • -stdpar=option โ€” enable (ISO Fortran 2018) DO-CONCURRENT. options are:
    • gpu โ€” (ISO Fortran 2018) DO-CONCURRENT is compiled for parallel execution on the GPU. this option implies -gpu=unified on targets with Unified memory capability and -gpu=managed otherwise. GPU main character energy ๐Ÿ‘‘
    • multicore โ€” (ISO Fortran 2018) DO-CONCURRENT is compiled for parallel execution on the CPU.
  • -nostdpar โ€” execute (ISO Fortran 2018) DO-CONCURRENT sequentially. sometimes we chill.
  • -ta=target โ€” this option has been deprecated, please refer to -acc. it's giving legacy era, bestie ๐Ÿ™ˆ
    • -ta=tesla โ€” this option has been deprecated, please refer to -acc=gpu and -gpu.
    • -ta=multicore โ€” this option has been deprecated, please refer to -acc=multicore.
    • -ta=host โ€” this option has been deprecated, please refer to -acc=host.
  • -target=option โ€” select the target for all parallel programming paradigms used (OpenACC, OpenMP, Standard Languages). possibilities are:
    • gpu โ€” globally set the target device to an NVIDIA GPU.
    • multicore โ€” globally set the target device to the host CPU.
  • -tp=target โ€” specify the type of the target processor. issue:
nvfortran -help -tp

to display the list of recognized target processors ๐Ÿ”


๐Ÿ“ FILES ๐Ÿ“

  • a.out โ€” executable output file
  • file.a โ€” library of object files
  • file.f โ€” fixed-format Fortran source file
  • file.F โ€” fixed-format Fortran source file that requires preprocessing
  • file.f90 โ€” free-format Fortran source file
  • file.F90 โ€” free-format Fortran source file that requires preprocessing
  • file.f95 โ€” free-format Fortran source file
  • file.F95 โ€” free-format Fortran source file that requires preprocessing
  • file.f03 โ€” free-format Fortran source file
  • file.F03 โ€” free-format Fortran source file that requires preprocessing
  • file.for โ€” fixed-format Fortran source file
  • file.fpp โ€” fixed-format Fortran source file that requires preprocessing
  • file.cuf โ€” free-format CUDA Fortran source file
  • file.CUF โ€” free-format CUDA Fortran source file that requires preprocessing
  • file.ipa โ€” InterProcedural Analyzer (IPA) file
  • file.ipo โ€” InterProcedural Analyzer (IPA) file
  • file.o โ€” object file
  • file.s โ€” assembler source file
  • .mynvfortranrc โ€” you may add custom switches or make other additions to nvfortran by creating a file named .mynvfortranrc in your home directory. customizing your compiler? obsessed ๐Ÿ’–

the installation of this version of the compiler resides in Basedir/Linux_x86_64/dev/; other versions may coexist in Basedir/Linux_x86_64/release/. Basedir is the root of the compiler installation directory, specified by the installer. the default is /opt/nvidia/hpc_sdk.

the compiler installation subdirectories are:

  • compilers/bin/ โ€” compiler and tool executables and configuration files (rcfiles).
  • compilers/include/ โ€” compiler include files.
  • compilers/lib/ โ€” runtime libraries and object files.
  • comm_libs/ โ€” communication libraries, including NCCL and NVSHMEM.
  • math_libs/ โ€” math libraries, including cuBLAS, cuTENSOR, cuSPARSE, cuFFT, cuSOLVER, and cuRAND.
  • profilers/ โ€” profilers, including Nsight Compute and Nsight Systems.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

nvc (1), nvc++ (1), and the NVIDIA User's Guide. go read the extended universe, bestie ๐Ÿ“šโœจ


๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

the compiler produces information and error messages as it translates the input program. the linker and assembler may issue their own error messages too, so don't blame the compiler for everything ๐Ÿ’€


okay that's the whole page, bestie โ€” nvfortran(1), September 2026, signing off ๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from