Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28636 Discussions

Use of intel visual fortan compiler with IDE PSPAD

don_camillo
Beginner
1,824 Views

Hi All,

In the past we used to compile fortran source code directly out of the IDE 'PSPAD' based on Compaq Visual Fortran. That worked great and was more comfortable than working in the Visual Fortran environment. Now we have switched to intel visual fortran (Vers. 11) with Microsoft Visual Studio 2008. Similarly to our older Compaq Fortran evironment I have adapted the older entries in the Highlighter Settings to the new Intel Visual Fortran environment. However, with the following entries in the PSPAD Highlighter Settings for Fortran I always get a link error (ifort: error #10037: could not find 'link').

The Highlighter Settings defined in PSPAD are as follows:

Compiler: C:\\Program Files (x86)\\Intel\\Compiler\\11.1\\051\\bin\\ia32\\ifort.exe

Parameter: %Name%%Ext%

Default Directory: Empty

Log-File: %Name%.Log

Run after Compilation: %Name%.exe

Save all files before compilation: yes
Capture Program output window: yes
Hide output window: no
Log-Window type: list
Log-Parser:%F(%L)

I really don't want to write my code in the Visual Studio environment. It's too uncomfortable. However, compiling via cmd line from windows with 'Fortran Build Environment for applications running on IA-32' works...but this is again not that what I want. I really like the PSPAD environment where by using one button, the source code is compiled and the exe-file is started automatically. I really searched in the forums for this issue, but I really wonder, if we are really the only ones working with 3rd party IDE editors (as eg. PSPAD, ULTRAEDIT, NOTEPAD++, Crimson Editor etc...).


Could you please help me? THX

PS: OS is WIN 7 Prof. 64 Bit

0 Kudos
15 Replies
Steven_L_Intel1
Employee
1,824 Views
"could not find LINK" means that the "ifort" driver could not locate the Microsoft linker, which is usually in a "VC\BIN" folder. In Visual Studio, the path to that is set under Tools > Options > Intel Visual Fortran > Executables. I don't know how you would set up paths in this PSPAD environment, with which I am unfamiliar.
0 Kudos
don_camillo
Beginner
1,824 Views
Thank you for the fast answer. I can't remember that this was required during the use of Compaqs Visual Fortran. Therefore I am a bit irritated, but will try to find an answer in the pspad forum. Nevertheless, to all the fortran coders out there: Is no one of you using PSPAD? Or at least users of other different editors (Ultraedit etc.) must have experienced this issue...
0 Kudos
Steven_L_Intel1
Employee
1,824 Views
It isn't required when using Intel Visual Fortran in Visual Studio, either. I don't know how PSPAD invokes the compiler.
0 Kudos
mecej4
Honored Contributor III
1,824 Views
Never heard of PSPAD before.

I do not use IDEs much; have used a number of editors, including ed, edlin, vi, see, med, cedt, notepad (blush), notepads++, etc., but only for editing, not as a development environment.

Linkers have rarely come from compiler vendors except in the early days of MSDOS 2.1. Most compilers nowadays pack in the Microsoft linker, which itself depends on some DLLs that are not included in a standard Windows installation.

Anyone opting to use a fourth party development environment (such as PSPAD appears to be) has to turn to the vendor of that environment or be prepared to do some install-time set-up when a new compiler (or, sometimes, a new version of a compiler) is installed.

If a large number of users use one of these environments, the compiler vendor may provide some support (e.g., VStudio+Ifort; the Plato IDE that may be used with Salford's FTN95). Otherwise, the situation is similar to solving the problem of having a quilt with one square torn or faded...
0 Kudos
don_camillo
Beginner
1,824 Views
Thank you for the background information. Although I have not understood everything, however, the PSPAD forum admin has given the following answer concerning that issue:

"Set default directory to binnaries of your compiler and linker or set system Path variable to this folder"

So when he is talking about the binnary folder of the compiler AND linker, am I right to suppose that this folder is found under the following path: C:\Program Files (x86)\Intel\Compiler\11.1\051\bin
Or should I take the path directly to ia32, i.e. C:\Program Files (x86)\Intel\Compiler\11.1\051\bin\ia32
As first step, it is intended to compile 32Bit source code for 32bit environment only. I feel that the solution becomes nearer and nearer. I really much appreciate your support. Thank you.
0 Kudos
Steven_L_Intel1
Employee
1,824 Views
Here's what I recommend. Open a "Fortran Build Environment" window from Start > All Programs > Intel Visual Fortran 11.1.xxx > Build Environment for IA-32 Applications, and run PSPAD from there. All the necessary environment variables will be set. The problem with the admin's advice is that you need more than one folder in PATH to resolve the tools - and you also need LIB and INCLUDE defined appropriately.

You could also write a short .bat file that does a "call" of the ifortvars.bat script (with ia32 as an argument) and then runs PSPAD. Use that .bat file to start PSPAD.
0 Kudos
don_camillo
Beginner
1,824 Views
This has worked indeed. Starting the 32Bit Fortran Build environment at first and then starting pspad out of the dos box which has appeared. These are good news. Thanks for your help. Now as final step I will try to create the .bat file to start at first the ifortvars.bat and after that to start PSPAD. The final structure of the bat file (in my words) will look like this:

Open ifortvars.bat ia32
Open Pspad.exe
Close Dos Box (which appeared after opening ifortvars.bat)
And start coding ;-). Thank you for your help....
0 Kudos
don_camillo
Beginner
1,824 Views
Hi Steve,

it's me again. I have created a batch file as follows:

@echo off

start "" "C:\Program Files (x86)\Intel\Compiler\11.1\051\bin\ifortvars.bat" ia32
start "" "C:\Program Files (x86)\PSPad editor\PSPad.exe"
:end

The Problem is, this file is independently starting the ifortvars.bat and the pspad.exe. But this has not the same effect as I would startd manually the ifortvars.bat and then starting from the appearing dos box the pspad.exe. So, how do I let ifortvars.bat make call pspad.exe via my batch file?

Thank you...
0 Kudos
IanH
Honored Contributor II
1,824 Views
In your batch file, get rid of the first "start". Otherwise that "starts" the ifortvars batch file in a new and separate command prompt session, which is not what you want (you want the changes that ifortvars makes to be in the same session as the one that starts pspad).

@echo off
"C:\Program Files (x86)\Intel\Compiler\11.1\051\bin\ifortvars.bat" ia32
start "" "C:\Program Files (x86)\PSPad editor\PSPad.exe"
:end
0 Kudos
Steven_L_Intel1
Employee
1,824 Views
I suggest using "call" rather than "start" for the invocation of ifortvars.bat. Leave the "start" off the second line.
0 Kudos
don_camillo
Beginner
1,824 Views
Thank you for your answers,

this has worked for me:

@echo off
call "C:\Program Files (x86)\Intel\Compiler\11.1\051\bin\ifortvars.bat" ia32
"C:\Program Files (x86)\PSPad editor\PSPad.exe"
:end

Thats great!! Only for cosmetics, how can I make the DOS Box automatically getting closed again...exit will not work in this case I think
0 Kudos
Steven_L_Intel1
Employee
1,824 Views
Try this.

Make your .bat file look like this:

@echo off
call "C:\Program Files (x86)\Intel\Compiler\11.1\051\bin\ifortvars.bat" ia32
start "C:\Program Files (x86)\PSPad editor\PSPad.exe"
0 Kudos
don_camillo
Beginner
1,824 Views
Yeah thanks,

with additional quotation marks (i.e. start "" "C:\Program Files (x86)\PSPad editor\PSPad.exe") it works now how i want it to work. THAAAANK you very much.
0 Kudos
don_camillo
Beginner
1,824 Views
Just out of curiosity,

I found in the ifortvars.bat file a set of variables which is used for running on 32 bit applications (see down below)

SET IFORT_COMPILER11=C:\Program Files (x86)\Intel\Compiler\11.1\051

SET INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses;%INTEL_LICENSE_FILE%

SET PATH=%IFORT_COMPILER11%\Bin\ia32;%PATH%

SET LIB=%IFORT_COMPILER11%\Lib\ia32;%LIB%

SET INCLUDE=%IFORT_COMPILER11%\Include;%IFORT_COMPILER11%\Include\ia32;%INCLUDE%

Am I right by saying that setting these parameters in the windows variable environment can be considered as further solution? I mean has it the same effect as starting ifortvars.bat ia32, but with the difference that the variables are set permantly?

Thanks
0 Kudos
Steven_L_Intel1
Employee
1,824 Views
You would also need to add the PATH, LIB and INCLUDE variables added by the vcvars.bat file that ifortvars.bat invokes. I don't recommend making these system environment variables.
0 Kudos
Reply