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

How to specify run-time options?

Intel_C_Intel
Employee
973 Views

Hello,

I'm using IVF 9.1.034 with VS2005.

I have a program which I run from the command line like:

myprog out_file

Reading from unit 5 and writing to unit 6.

Where can I specify the in_file and out_file names when debugging via the IDE (without changing the source)?

thanks,

Yair

0 Kudos
8 Replies
jimdempseyatthecove
Honored Contributor III
973 Views

Yair,

Look in the documentation under

units
preconnected to external files

Look about half way down to find

Implied Intel Fortran Logical Unit Numbers

Jim Dempsey

0 Kudos
Intel_C_Intel
Employee
973 Views

Thank you Jim, but I still cannot find where exactly in the IDE I can set for example the file name connected to unit 5 per the specific project.

I'd appreciate further help.

Yair

0 Kudos
Steven_L_Intel1
Employee
973 Views
Debug property page, command arguments. I'll caution that in some editions of Visual Studio you have to specify full paths to the files - I'm not sure why.
0 Kudos
Intel_C_Intel
Employee
973 Views

That's the one. It works.

Thanks a lot.

Yair

0 Kudos
jimdempseyatthecove
Honored Contributor III
973 Views

The redirection operators "<", ">" and pipe"|"on the command line are not arguments. They are directives. I am surprised if this works. Last time I tried (VS2003)redirecting input or output this way it didn't work.

On that same property page though, is the property Environment. In there he can set temporary environment variables to be merged with existing environment variables.

In that property he can set the appropriate environment variable (FOR_READ, FOR_WRITE, FOR_ACCEPT, FOR_PRINT, FOR_TYPE, FORT0, FORT5 and FORT6) to the file of his choice.

FORT5=INPUT.TXT
FORT6=OUTPUT.TXT

There may be an issue if his program contains a blend of READ(*..., ACCEPT..., READ(5,... and a blend of WRITE(*,... PRINT..., TYPE..., WRITE(0,... and WRITE(6,...

When mapping files to the appropriate unit each will have a seperate file position pointer. The results you get might not be what you expect. e.g. READ(*,... followed by READ(5,... might read the same data, IOW won't necessarily read the expected next data in the file. Experimentation might be in order.

Jim Dempsey

0 Kudos
Steven_L_Intel1
Employee
973 Views
Redirection does work in VS2003, but you need to specify full file paths. For some odd reason, they default to some weird folder inside the VS install. This seems to be fixed in VS2005.
0 Kudos
Intel_C_Intel
Employee
973 Views
JimDempseyAtTheCove:

On that same property page though, is the property Environment. In there he can set temporary environment variables to be merged with existing environment variables.

Jim,

I found only the following three properties Ican set on the 'Debugging' property page:

- Command

- Command Arguments

- Working Directory

Where did you find the property Environment?

Yair

0 Kudos
jimdempseyatthecove
Honored Contributor III
973 Views

Hmm, very interesting.

When using VS2005 w/IVF 9.032

Configuration Properties | Debugging

Configuration: Active(Debug)Platform: Active(x64)

MS C++ project property page shows a different property page than IVF 9.032???

The C++ permits choice of debugger (I can accept IVF not providing choice of debugger)

But in addition to this you get several other fields including Environment.

This should be a feature request to add to IVF.

Jim Dempsey

0 Kudos
Reply