Adding the setvars-ifort.bat File

This article provides information on and setup instructions for a new file, setvars-ifort.bat.

Overview

Intel announced plans to discontinue support for the Intel Fortran "Classic" "ifort" compiler, v19.2 (2021 to 2024). The replacement product, the Intel Fortran "ifx" compiler, was initially released around 2022, and has been regularly updated since.

At the end of 2024, the Intel Fortran ifx 2025 compiler was released. When this particular product is installed, it breaks the use of the Intel Fortran "ifort" compiler (2021 to 2024). Essentially, the "setvars.bat" that is released with ifx 2025 is not compatible with the ifort 2021-2024 product.

To restore the use of ifort 2021-2024 on a machine in which ifx 2025 has been installed, a new batch file is used instead, called setvars-ifort.bat

To set up this batch file, there are two changes to perform:

  • Install the setvars-ifort.bat. The instructions for this are below.

  • Update the compiler configuration file to call the setvars-ifort.bat file instead of the setvars.bat during a simulation. The instructions for this step are in this article.

Conditions

This file is required when the following conditions are met:

  • If the Intel Fortran ifx 2025 product has been installed,
    AND
  • If any of the following versions of PSCAD will be used: v4.6.3, v5.0.0, v5.0.1, v5.0.2,
    AND

  • If the Intel Fortran Classic Compiler v19.2 (ifort) (2021-2024) will be used to build your projects.

1. Automatic Addition of this File - Using the Fortran Compiler (released circa January 15, 2025, or newer)

Notes

(i) This is the preferred method for updating this file.

(ii) Windows Administrator privileges are required for this procedure.

Method 1 - Add the file during the Fortran Compiler Configuration file update

Refer to Step 1 of this article for instructions.

Method 2 - Use the Fortran Medic Utility to explicitely add the setvars-ifort.bat file

- Download the Fortran Medic Utility from the following link:
https://ptcstoragegroup.blob.core.windows.net/utilities/FortranMedic.zip


-Unzip/extract the files.


-Launch the Fortran Medic Utility with Windows Administrator privileges, as shown:

FM - Launch with Windows Admin Priv.png (138 KB)

- Select “Yes” when prompted by the Windows User Account Control, to elevate the Utility.


- When the Fortran Medic Utility displays, select "Start" from the Actions menu.


- Wait for the results to finish displaying (can take up to a minute or two).


- When the results finish displaying, scroll down to the PSCAD installation heading, right-click on the conflict if present (see sample image below).

A dialog will display, prompting whether to proceed with this fix. Select the option to proceed to update the PSCAD configuration File.

FM - Adding setvars-ifort.bat file.jpg (95 KB)

- Perform this procedure for every applicable version of PSCAD (v4.6.3, v5.0.0, v5.0.1, v5.0.2).

- Ensure that your compiler configuration file supports this new setvars-ifort.bat file. The instructions for verifying and fixing this are in this article.

2. Manual Addition of the File

Notes

(i) The preferred method for updating this file is as per Step 1, above.

(ii) Windows Administrator privileges are required for this procedure.

Procedure

- Download the attached setvars-ifort.bat file from below.

- Unzip the file.

- Save the unzipped file to this location:

C:\Program Files (x86)\Intel\oneAPI\

- Ensure that your compiler configuration file supports this new setvars-ifort.bat file.
  The instructions for verifying and fixing this are in this article.

3. Further Help

Contact the MHI support desk if you require further assistance on this matter. Ensure to provide your PSCAD license number to expedite assistance.

Examples

Back