- Welcome to Simply Fortran
- Purchasing and Activating Simply Fortran
- Using Simply Fortran
- The Simply Fortran Interface
- Editing in Simply Fortran
- Projects in Simply Fortran
- Building Projects
- Launching Projects
- Debugging Programs
- External Tools
- Options and Configuration
The Project Options window configures most aspects of a given project with the exception of the files to be included. This window is project-specific, meaning different values will be present for different projects. Each panel in the project options dialog is described below:
This first panel allows users to change common project options.
The target options specify the project’s final build product. Simply Fortran supports three basic target types: executables, shared libraries, and static libraries. Each is explained below.
The target name specifies the final product of the build process. The target name is generated within the project’s base directory unless a relative path is specified.
Selecting this option instructs the compiler to create an executable as its product.
Building a shared library will generate a shared object from the project sources.
A static library, which often ends in the suffixes lib or a, can be compiled into another library or executable.
The launch panel allows the configuration of how the project will be executed from within Simply Fortran.
The executable field specifies the command to execute when launching the project. For executable projects, the command is fixed to the project’s target name, as explained above. However, if developing a shared library, the user may wish to launch an executable using this shared library while working within Simply Fortran. Specifying an executable manually allows for this use case.
Command Line Arguments
This box provides the user a way to specify arguments that should be passed to the executable when launched. These arguments may be commmand line arguments that the program will process internally. Alternatively, redirection operators can be used. If the user wishes to capture all program output to a text file, for example, the arguments:
could be added to this box.
By default, Simply Fortran will launch the executable using the project directory (defined as the directory containing the project file) as the working directory. Users can specify alternate working directories using either absolute or relative (to the project directory) paths.
If enabled this checkbox causes the exectable to be launched in a window external to Simply Fortran. This option may not be available on certain systems.
Build Before Launch
When checked, this option causes Simply Fortran to run “Build Project” before launching the executable. This process assures the developer that the project is up to date prior to launching.
Launch Using Message Passing Interface
This option uses the MPI driver executable to launch the named executable. The most common use case for launching with MPI in Fortran is to use coarrays via Message Passing Interface. Debugging will not work properly if checked. This checkbox may be checked and disabled if the Enable Coarrays via Message Passing Interface is checked on the Fortran panel of this window.
The code generation panel allows control over optimization and debugging settings.
This dropdown provides four different optimization options. The available modes are:* None – No optimizations will be performed * Size – Generates the smallest possible target * Common – Allows for a number of common optimizations, equivalent to GNU Fortran’s “-02” * Extreme – Allows for additional optimization, equivalent to GNU Fortran’s “-03”
Aggressive Loop Optimizations
Enabling the option allows the compiler to perform a number of optimizations related to loops, including reordering nested loops and attempting to parallelize loops where possible.
When enabled, debugging information is generated during compilation, allowing the program to be debugged when requested.
A target compiled with profiling enabled will generate data concerning the frequency and duration of function calls within the compiled target when the target is launched. This data can then be used to generate a profile analysis.
The dropdown offers a list of central processing units for which the compiled code can be tuned. If the resultant target is going to be distributed to others on different machines, generic is suggested as the best option. If the target will solely be used on the user’s machine, the native option will tune the target to make use of any features available on the user’s machine. Alternatively, a model may be selected from the dropdown.
When the Compile Strictly for Selection option is enabled, the resultant target will not run on CPUs that do not possess the features specified in the Target CPU’s dropdown box. Enabling this option can provide speed benefits at the cost of compatibility.
The Fortran panel offers options related specifically to the Fortran compiler.
Use Double Precision for all Reals
Enabling this option promotes all variables and functions declared as Fortran REAL to double precision. Double precision can improve mathematic precision at the expense of memory consumed. Enabling this option does not affect variables explicitly declared as double precision.
Enable Cray Pointers
By default, GNU Fortran assumes that keywords associated with pointers are referring to Fortran 90 pointers. Enabling this option allows the compiler to accept Cray pointer syntax as well.
Enable Runtime Diagnostics
Enabling this option causes certain runtime checks to be performed while your target program runs. Specifically, warnings will be generated for:
- Indexing array elements outside known bounds
- Modifying the value of loop iteration variables
- Invalid memory states for pointers and allocatables
- Recursive calls to subroutines/functions that are not marked as recursive
- Generation of temporary arrays for the purposes of passing between subprograms
This feature can be helpful when debugging troublesome targets.
Enable C Preprocessor
When enabled, any Fortran source files are first fed into the C preprocessor. This option is useful if the source code uses preprocessor directives such as “#include” or “#ifdef.”
Enabling this option allows the compiler to understand OpenMP directives while compiling code.
Enable Coarrays via Message Passing Interface
Checking this options enables coarrays in the compiler and links against the proper libraries. This option may be disabled on some GNU/Linux systems. Checking this box automatically enables launching the project’s executable via the Message Passing Interface driver program. The number of images used by coarrays can be specified in the Message Passing Interface panel of the Compiler Options window if necessary.
Non-standard Line Length
When enabled, the specified line length will be used as the maximum allowable line length for both free- and fixed-format Fortran source files.
If this option is enabled, the compiler will enforce the specified Fortran standard for all source files during compilation, disabling any compiler extensions or features unavailable in the chosen standard. If strict FORTRAN 77 compliance is necessary, legacy should be chosen.
This panel provides the user with some basic parameters for the linking step of the build process.
The first group of buttons controls whether the C, C++, and Fortran runtime libraries should be statically linked to the project. It is generally suggested that users select All Static because it eliminates dependencies on DLLs that may or may not be present on the path of the system where the project’s target will be used.
Build Import Library
This option is only enabled when constructing a shared library. When enabled, an import library will be generated along with the target DLL, which can ease linking the target DLL with other projects. This option is not available on macOS.
Link BLAS and LAPACK Libraries
Enabling this options links the OpenBLAS library included with Simply Fortran with your library or executable. The OpenBLAS library includes optimized versions of Basic Linear Algebra Subprograms (BLAS) and Linear Algebra Package (LAPACK) routines commonly used in Fortran software.
The compiler flags panel allows the user to manually enter additional flags to be used by the compilers and linker.
The file locations panel provides control over where certain paths needed by the compiler are located.
The build directory specifies the location for storing compiled files relative to the project’s home directory. By default Simply Fortran will create a directory at compile time and direct all compiler output to said directory. This directory is also deleted during the clean process.
The module directory is the location relative to the project’s home directory where modules are stored. At compile time, Simply Fortran will create this directory if necessary, and the module directory will be deleted during the clean process.
Users should not place files in the module directory as they will be deleted during the build process. To include external modules, users should specify a directory via the Search Directories option.
The Search Directories box lists the directories where the compilers search for libraries, headers, and Fortran modules.
The box contains two tabs corresponding to include search directories and library search directories. The include search directories corresponds not only to C compiler headers, but also to Fortran module files. The dialog is used only to specify the directories to search as opposed to actual libraries to incorporate during linking.
The Add… button opens a directory search dialog for the user to specify a directory. Similarly, the Remove button will remove any selection from the current search list. Default directories which are present in new projects can be removed using the Remove button, but are added back in simply by pressing the Add Defaults button.
The final panel provides control over the project’s Makefile.
This text box specifies the name of the Makefile to be created and used by Simply Fortran during the build process. This file will be created in the project’s directory.
Always Regenerate Makefile
By enabling this option, Simply Fortran will regenerate the makefile associated with the current project every time the user initiates the build process . Any user-created changes to a makefile will be destroyed if this option is selected. All dependencies will be updated during every build cycle, however, which is often useful for development projects and eliminates the generate makefile step.