Error: Could not find the compiler "ifort"

Hi Everyone;

I’m working on Fast in simulink workspace;
I want to make FAST to work in simulink (exactly by make_FAST_SFunc.m file)
whenever I want to run the program I face this error?

Error: Could not find the compiler “ifort” on the DOS path.
Use mex -setup to configure your environment properly.
G:\MATLAB\R2011A\BIN\MEX.PL: Error: Unable to locate compiler.

I already installed Intel Fortran Compiler to solve this problem but it doesn’t work! :question:
Also I checked the System Environment Variables to make sure that I have the FORTRAN_COMPILER, with the specified path, there!

Is there any hint which can help?
Best

Hi, Hamid.

Have you followed the guide at the top of the make_FAST_SFunc.m file? The make_FAST_SFunc.m file tells you how to modify the environment variables and compile settings to use ifort inside the Matlab environment.

Typically, when you install the Intel Fortran Compiler, it does not actually change the PATH, INCLUDE, and LIBRARY environment variables to point to all the files needed for compiling and linking. This is why the compiler has some shortcuts under “Intel Compiler/command prompt” on the Start Menu (see figure 2 in wind.nrel.gov/public/bjonkman/De … ctions.pdf). The Intel Command Prompt shortcuts run some batch scripts to modify the environment variables for that command prompt session. If you try to run ifort in a “normal” command prompt window (i.e., not using the Intel shortcut), it won’t recognized ifort.

Note that make_FAST_SFunc.m is used only to compile new FAST_SFunc.mexw32 or FAST_SFunc.mexw64 files. You shouldn’t need to run it if you haven’t changed any source code. Also, you may find this thread useful if you are a beginner to FAST for Simulink: Beginner Guide for MATLAB Simulink and FAST

Dear Bonnie;

I’ve followed the guide at top of the make_FAST_SFunc.m file. Done properly.
After installing the Intel Fortran Compiler; I tried to use the “Visual Fortran Build Environment for Applications running on IA-32” file (enviroment2.jpg in attachment), but I face the error (enviroment.jpg in the attachment);
I’ve installed visual C++ 2010 but the error is the same!

Any Clue?
enviroment.jpg
enviroment2.jpg

Hi, Hamid.

It looks like there is something wrong with your installation of Fortran. I think the folks at Intel would be better at answering the question for you.

Sorry I can’t help.