Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-01468// Views: AA-01468// Created: 2018-04-18 21:59:14// Last Updated: 2024-04-23 21:13:07 RT-LAB RT-LAB and HYPERSIM : How to know which Compiler to use ? Intel or GCC ? DISCLAIMER This KB is only valid for Redhat OS For OPAL-RT Linux OS the default compiler will be GCC In both RT-LAB and HYPERSIM, the Default Compiler is Intel, if you have bought a license as a client. 1 - Compiler DifferencesUsing the GCC Compiler (gcc for RT-LAB and opgcc for HYPERSIM), there are less Optimizations being done. The Intel Compiler (opicc both for RT-LAB and HYPERSIM), which makes more Optimizations, can offer a more performing Compiled Code reducing the Timestep in your model by up to 30% compared to GCC, according to Intel. The drawback is that the Intel Compiler takes longer to Compile than GCC which can sometimes lead to a TimeOut error in HYPERSIM (/usr/bin/gmake -j10 makefile.out error). The Memory Limit might be reached during the Compilation Task when using the Intel Compiler. This error can be fixed by switching to the GCC Compiler which is faster and uses less resources but more time will be necessary during the Real-Time Simulation to complete the same processes than when using the Intel Compiler. 2 - How to change Compiler in RT-LAB or HYPERSIMFor RT-LAB, please consult this KB article. For HYPERSIM, please consult this KB article. 3 - Optimization Flags (or cflags) The Compilers have Optimization levels known as cflags. For Intel and GCC, the basic flags are -O0, -O1 and -O2 where -O0 = No Optimization -O1 = A bit of Optimization and -O2 = Maximum Optimization. -O2 is the value by default for Intel and GCC compilers. You can find more details about Optimization here for each Compiler here: 4 - How to change Optmization flags manually in RT-LAB or HYPERSIMRT-LAB Double-click your model and go to Development -> Compiler -> Compiler Options and set the desired Optimization Flags. Then compile your code (Build the Model). As mentioned above, the value by default is -O2. Note that this tool works for both Intel and GCC compilers. HYPERSIM - HYPERSIM versions 2019.3+ 1. Open the desired model. 2. Open Settings from HYPERSIM ribbon and go to Target tab. 3. Set the desired values for C flags. Same as for RT-LAB, the value used by default is -O2 (when the C flags option is not set explicitly) and this works for both Intel and GCC compilers. - HYPERSIM versions 6.2 to 2019.2 1. Open the desired model. 2. Open Settings from HYPERSIM ribbon and go to Advanced Target Settings tab. 3. Set the desired values for C flags. - HYPERSIM versions 6.0 and 6.1 1. Open the desired model. 2. Go to the Options tab in HYPERSIM>Simulation>Options 3. Select your target and set the Architecture to Real-Time. Click on the Options tab. 4. Set desired values for C flags. - Versions prior to HYPERSIM 6.0 1. Go to the File Path of the .ecf HYPERSIM Model (where you saved you Model). 2. Open the modelname_hyp folder and locate the preferences.txt file. 3. Open it and add the following line: architecture.linux-rhel5-32-opalrt-rt.cflags={Desired Optimization Flag here} Note that this is the same preferences.txt file that we would modify to change to the GCC compiler in HYPERSIM. |