Tech Articles

Choosing the appropriate compiler for use with EASY5 on Windows.

Tech Articles ID    KB8021977
Status:    Published
Published date:    02/24/2015
Updated:    01/08/2020
Reported In:   Easy5 - EASY5
Environment:   x86-64 (AMD64 and EM_64T)
  Intel IA-32 (32-bit compat)
Created with Version:   Easy5 (2018 (11.0))

Abstract (Question)

This KB article details the relationship between EASY5 and the Fortran and C compilers and how to choose between the various compiler options.

Description (Answer)

EASY5 (under almost all circumstances) requires a Fortran compiler to be installed on the same machine as EASY5.  This is because EASY5 always builds models from Fortran code (and sometimes C code) and then executes that code during an analysis.  EASY5 ships with the MinGW/GNU compiler included but you can also use Intel Visual Fortran (IVF) for more features (like interfacing with Adams or running models through a visual debugger). We do not include Intel Fortran with EASY5 and so it is up to the customer to source that compiler on their own.

Adams is not compatible with the GNU Fortran compiler so you will need to be using the Intel Fortran compiler if you are going to be interfacing EASY5 and Adams using the traditional proiprietary cosim apporach (i.e., discrete cosim, GSE or Functioan Evaluation). The FMI method can use GNU however, so if you cannot get the Intel compiler, the FMI interface is your only option.

If you are going to be interfacing EASY5 with Matlab using the traditional s-function approach, or exporting your EASY5 model as a generic DLL, then you will also need a C compiler. This is because the Matlab and DLL export interfaces utilize C code. (If you use the FMI approach to interfacing with Matlab, a C compiler is not required as a Fortran-only option for FMU export exists beginning with EASY5 2018.) The GNU C compiler supplied with EASY5 will not work for the s-function Matlab interface as it is not supported by Matlab. You will need to obtain Microsoft C (or Visual Studio with an included C compiler). This also means that you will need to go to the Intel Visual Fortran compiler as well. The GNU C compiler will work for the exporting of the model as a generic DLL and for the FMI method. Also, if you are going to be including C code in your EASY5 model (but not interfacing with Matlab), you can use either the supplied GNU compiler or you can use the Microsoft C compiler.

You cannot mix the Fortran compiler from one with the C compiler from another. That is, you must use either the GNU Fortran/C combination or the Microsoft C/Intel Fortran combination.

The MingGW/GNU Fortran and C compilers should have been installed by the EASY5 installer when you installed EASY5.  Therefore, a separate installation of these GNU compilers should not be required.

When using Intel Fortran, it should be installed first before EASY5 is installed if possible. During the installation for EASY5, the installer will tell you if either the GNU or the Intel Fortran compiler is installed by showing the word 'Installed' after the compiler options on the 'Select Compiler' screen. (See attached screenshot.) If it does not report that a compiler is installed, and you know for a fact that it is installed, then contact MSC Technical Support to help with troubleshooting this.

If you are interfacing EASY5 with Adams or Matlab, it is important to make sure that the compiler configuration is the same as the program you are interfacing with.  For example, if you are interfacing with Adams 64-bit or Matlab 64-bit, then you need to make sure that EASY5 is configured to produce 64-bit executables. Likewise everything must be 32-bit if you are using the 32-bit versions of those programs. You cannot mix 32-bit and 64-bit code. When installing EASY5 and selecting the proper Intel Fortran compiler from the compiler list, you would select 'Intel Fortran for EM64t' for 64-bit and 'Intel Visual Fortran' for 32-bit. (See the previous attached screenshot.) For more information on EASY5 with respect to 32 and 64-bit, please see this KB article:
KB8019189: EASY5 64-bit version: Availability and Advantages

If EASY5 is already installed, you can determine which configuration you are using by either looking in the 'Background Shell' window that launches when the main EASY5 window launches, or go to the main window and select Help > About. In either location, look for the words "Platform:PC-Win32 (lib=xxxx)". (See attached screenshot.)
If the xxxx is 'IF91', that is 32-bit Intel Fortran.
If the xxxx is 'EM64t_IF91' or 'em64t_IFORT', that is 64-bit Intel Fortran.
If the xxxx is 'GNU' or 'mingw32', that is 32-bit GNU.
If the xxxx is 'mingw64', that is 64-bit GNU.

Please see this KB article for more information on the variations of the GNU compiler supplied with EASY5:
KB8021410: Upgrading of the GNU Fortran compiler included with EASY5

If EASY5 is already installed and you need to change which compiler configuration it is using, please see the instructions in this KB article:
KB8018543: Is there a way to tell EASY5 to use to a certain compiler?

Depending upon which edition of Intel Fortran is being used, the 64-bit components of the Intel Fortran compiler may not be installed by default--sometimes it is an option under a custom install. Therefore, make sure the 64-bit components of the compiler are there before trying to configure EASY5 to make 64-bit models. To verify if the 64-bit components of the Intel Fortran compiler are installed, look for the program called "Fortran Build Environment for applications running on Intel(R) 64" which would be located in the Windows Start menu under "Start\All Programs\Intel(R) Software Development Tools\Intel(R) Visual Fortran Compiler Professional 11.1.054" or something similar depending upon the version of the compiler being used.

Also be aware that Intel Fortran is a plug-in to the Microsoft Visual Studio (VS) development environment. This means that Microsoft Visual Studio needs to be installed as well. Some variants of Intel Fortran include a stripped down ("integrated") version of VS so that customers don't need to purchase VS separately. This is probably ok to use unless you need a C compiler which the "integrated" version usually doesn't have.  In that case you would want the stand alone professional version of VS or Visual C. If using a separate version of VS (i.e., sourced apart from Intel Fortran), then it is important to have VS installed first before installing IVF. This is so that the IVF installer can configure IVF to be a plug-in into VS. There are free ("express") versions of VS available for download from Microsoft's website but we do not recommend that those be used as we have not had good results in getting those to work.

You should always check the Release Notes and well as the documentation for EASY5 (as well as Adams and Matlab if applicable) to determine which specific versions of the compilers are supported by your particular versions of software.  Documentation for MSC products can be found here:
Product Information and Documentation
Also be sure to check the documentation for the Intel Compiler to see which version(s) of Visual Studio it is compatible with.

Rate this Page
Rate the quality of this article from 5 (high) to 1 (low):
How can we improve this?