Fortran Module Naming Conventions

Fortran module entities (data and procedures) have external names that differ from other external entities. Module names use the convention:

modulename_mp_entity_(Linux* OS and macOS*)
_MODULENAME_mp_ENTITY(Windows* OS)

modulename is the name of the module. For Windows* operating systems, the name is uppercase by default.

entity is the name of the module procedure or module data contained within MODULENAME. For Windows* operating systems, ENTITY is uppercase by default.

_mp_ is the separator between the module and entity names and is always lowercase (except when the assume std_mod_proc_name compiler option or standard-semantics compiler option is used).

For example:

    MODULE mymod
      INTEGER a
   CONTAINS
      SUBROUTINE b (j)
         INTEGER j
      END SUBROUTINE
   END MODULE

This results in the following symbols being defined in the compiled object file on Linux* operating systems. (On macOS* operating systems, the symbols would begin with an underscore.)

mymod_mp_a_
mymod_mp_b_

The following symbols are defined in the compiled object file on Windows* operating systems based on IA-32 architecture:

_MYMOD_mp_A
_MYMOD_mp_B

On Windows* operating systems based on Intel® 64 architecture, there is no beginning underscore.