Selecting your Compiler When Calling Pre-Compiled Objects and Libraries

When PSCAD projects will be calling any pre-compiled objects or libraries, a compatible compiler must be selected for running your project.

1. Background

When a PSCAD model is simulated, object files, executable files, and library files are generated as follows:

  • A Fortran compiler converts Fortran code files (*.f) to object files (*.obj).
  • A C compiler converts C-code files (*.c) to object files (*.obj).
  • Linker combines *.obj/*.lib files with the main entry point of the program to make an executable file (*.exe)
  • The “create compiled library” in Library projects uses Library tools to combine several object files (*.obj) to a single library (*.lib).

The generated files may be called into a PSCAD project, but the PSCAD project may then only be compiled using a compatible compiler. See Step 2 below for details on compatibility.

2. Compiler Compatibility

A compatible compiler must be used with a PSCAD project that calls any pre-compiled files (*.obj, *.lib, *.exe) (see Step 1 above). The following may be considered for your selection:

  • If the file was pre-compiled with third-party Intel® compiler - Only an Intel compiler may be used:

    Normally, it is expected that the same or newer version of Intel used to create the file can be used (backwards compatible).

    However, it may be possible that an older version of Intel could be used.

    Refer to this article for information on obtaining and setting up this compiler.

    Note that an additional third-party software is also required alongside the Intel compiler, Microsoft® Visual Studio. Refer to Step 3 below for further information.

  • If the file was pre-compiled with third-party GFortran - The same version of GFortran must be used:
    • A file pre-compiled using GFortran 4.2 must be run using GFortran 4.2.
    • A file pre-compiled using GFortran 4.6 must be run using GFortran 4.6.
    • A file pre-compiled using GFortran 8.1 must be run using GFortran 8.1.

  Refer to this article for information on obtaining and setting up this compiler.

  • If the file was pre-compiled with third-party Compaq Visual Fortran 6 - Only Compaq Visual Fortran 6 may be used:

    This compiler is supported with PSCAD v4.5.5 and older, and is no longer maintained.

The above compatibility information is documented in Chart 3.a of the Compatibilities Charts document, posted here.

3. Microsoft® Visual Studio

If a PSCAD project is calling a file that was pre-compiled using the Intel compiler (Step 2 above), then both the Intel compiler and Microsoft Visual Studio software (both third-party software) are required.

Please note the following compatibility information:

  • If the pre-compiled file contains only Fortran code (and no C-code):
    It is normally expected that the same or newer version of Visual Studio used to generate the file can be used (backwards compatible). However, it may be possible that an older version of Visual Studio could be used.

  • Due to some changes to Visual Studio libraries at v2015, if the pre-compiled file contains any C-code:
    • Files pre-compiled with Visual Studio 2013 and older are only compatible with Visual Studio 2013 and older, and
    • Files pre-compiled with Visual Studio 2015 and newer are only compatible with Visual Studio 2015 and newer.

For information on obtaining and setting up the Visual Studio software, please refer to this article.

Back