Batch Mode Execution Error

Akash Gupta
Akash Gupta New Altair Community Member
edited September 2022 in Community Q&A

Hello Everyone,

While trying to execute the Activate model file from Terminal always results in error, I have tried the same with different Model Files (.scm extension)

"The Modelica compiler requires Visual C++ compiler version >= 10. in call to function vssGenerateSimInterpResult at line number 139 in file vssDoCompile.oml
Error: Error: The Modelica compiler requires Visual C++ compiler version >= 10. in call to function errormsgonly at line number 11 in file vssGenereateUserResultCollectGarbage.oml in call to function errormsgonly at line number 98 in file vssDoCompile.oml in call to function errormsgonly at line number 232 in file vssRunSimulation.oml in call to function errormsgonly at line number 13 in file vssExecuteBatchFiles.oml"

image

I have Visual C++ Compiler Installed in the system

image

How can i resolve this error

 

Best Answer

  • Alexandru-Ionel Constantin
    Alexandru-Ionel Constantin Altair Community Member
    edited September 2022 Answer ✓

    Hi Akash Gupta,

     

    Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:

    1. Go to the download page: https://visualstudio.microsoft.com/downloads/
    2. Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
    3. Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.

    Note: Depending on VS version downloaded, the above return may vary slightly.

    oml > vssGetCompilerName() ans = vc16_community_x64 >

     

    Best regards,

    Alexandru

Answers

  • Alexandru-Ionel Constantin
    Alexandru-Ionel Constantin Altair Community Member
    edited September 2022 Answer ✓

    Hi Akash Gupta,

     

    Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:

    1. Go to the download page: https://visualstudio.microsoft.com/downloads/
    2. Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
    3. Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.

    Note: Depending on VS version downloaded, the above return may vary slightly.

    oml > vssGetCompilerName() ans = vc16_community_x64 >

     

    Best regards,

    Alexandru

  • RoKet
    RoKet
    Altair Employee
    edited September 2022

    Hi Akash Gupta,

    The steps recommended by Alexandru-Ionel Constantin are definitely correct. Please consider that Activate 2022 supports vc15 max (VS 2019), Activate 2022.1 supports vc16 max (VS 2022).

    Redistributables are not a compiler!

    But with Activate 2022 it should also be possible to run Modelica models with the preinstalled compiler 'tcc'. It may be necessary to set the compiler once with vssSetCompiler('tcc').

    Do the models run in GUI?

     

  • Akash Gupta
    Akash Gupta New Altair Community Member
    edited September 2022

    Hi Akash Gupta,

     

    Follow these steps to download and install the (free) recommended Microsoft Visual Studio C++ compiler:

    1. Go to the download page: https://visualstudio.microsoft.com/downloads/
    2. Download the Community version. During installation, make sure to include the installation of the Desktop Development with C++, which is the package that contains the C++. compiler that Activate will access. Once installed, Activate will automatically recognize the new compiler. A device restart may be required following Visual Studio installation.
    3. Verify that it is working: Within Activate, in the Compose command window, run the command vssGetCompilerName(). The return should read: “ans = vc15_community_x64”.

    Note: Depending on VS version downloaded, the above return may vary slightly.

    oml > vssGetCompilerName() ans = vc16_community_x64 >

     

    Best regards,

    Alexandru

    Thanks Alexandru,

     

    After installing the Desktop Development with C++, I am able to access the Activate Models via Command Line.

     

  • Akash Gupta
    Akash Gupta New Altair Community Member
    edited September 2022

    Hi Akash Gupta,

    The steps recommended by Alexandru-Ionel Constantin are definitely correct. Please consider that Activate 2022 supports vc15 max (VS 2019), Activate 2022.1 supports vc16 max (VS 2022).

    Redistributables are not a compiler!

    But with Activate 2022 it should also be possible to run Modelica models with the preinstalled compiler 'tcc'. It may be necessary to set the compiler once with vssSetCompiler('tcc').

    Do the models run in GUI?

     

    Hello RoKet,

     

    The compiler was already set to 'tcc' but the problem has been resolved after installing the Desktop Development with C++

  • Alexandru-Ionel Constantin
    Alexandru-Ionel Constantin Altair Community Member
    edited September 2022

    Thanks Alexandru,

     

    After installing the Desktop Development with C++, I am able to access the Activate Models via Command Line.

     

    Hi Akash Gupta,

     

    You’re welcome!

     

    Best regards,

    Alexandru