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

Compile problems using tty in the source

Brian_Allison
Beginner
1,132 Views
If I compile my code (creating a dll) with Compaq's Compiler, there are no problems. If I try doing it with INTEL Fortran Compiler 10.1.021, I am getting complaints about the" write (tty,"(2a)") mssg,'failure.' "Statements.

Any Ideas? Does tty not work in a dll for the INTEL Fortan compiler?
0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,132 Views
Example? I don't recognize the issue based on your description.
0 Kudos
Brian_Allison
Beginner
1,132 Views
Example? I don't recognize the issue based on your description.
Something about the tty. The Compaq compiler likes it just fine the dll. The INTEL Fortran compiler seems to be having problems with "tty". If I create an EXE it is just fine.
0 Kudos
Steven_L_Intel1
Employee
1,132 Views

Sorry, I still don't understand. Please post example source, or perhaps attach a ZIP of the project. If nothing else, attach the buildlog.htm that shows the build errors.
0 Kudos
Brian_Allison
Beginner
1,132 Views

Sorry, I still don't understand. Please post example source, or perhaps attach a ZIP of the project. If nothing else, attach the buildlog.htm that shows the build errors.
Here is one of the many lines that I had to comment out in order for the DLL to work.

$if def,visa
case (9)
write (output,"('0',2a)") mssg,'VISA signal.'
! write (tty,"(2a)") mssg,'VISA signal.'
$endif

The write (output.... Line is just fine, but in order for the dll to run, I had to comment out all of the tty lines in 7 files.
0 Kudos
DavidWhite
Valued Contributor II
1,132 Views
Quoting - Brian Allison
Here is one of the many lines that I had to comment out in order for the DLL to work.

$if def,visa
case (9)
write (output,"('0',2a)") mssg,'VISA signal.'
! write (tty,"(2a)") mssg,'VISA signal.'
$endif

The write (output.... Line is just fine, but in order for the dll to run, I had to comment out all of the tty lines in 7 files.
Can you show thedefinition for TTY?


David
0 Kudos
Brian_Allison
Beginner
1,132 Views

Here is where tty is defined.

! tty Online screen file.
!if -def,hp,1
integer, parameter :: tty=6

0 Kudos
Steven_L_Intel1
Employee
1,132 Views

What are these lines "$if def and $end? They are not supported Fortran syntax,

Please show a small (if possible) but complete source - the actual source, not your paraphrase of it - that shows the problem, and also show the exact and complete set of error messages the compiler gives you. The problem is very likely to be different from what you think it is.

0 Kudos
Brian_Allison
Beginner
1,132 Views
Not sure why there was dollar signs in front of the if and end. They were supposed to be !.
The problem is not in the compiling. When I am running the program that calls the DLL, it halts in the debugger at every single "tty" statement. The CVF dll works just fine. It is something with the way the IVF compiles the code.
Here is a sample of the first problem I am running into.
! Set program title.
! write (tty,"(a)") ptitle(1:24)
write (output,"('1',3x,a)") ptitle
If I leave the write statement for tty un-commented, then the program halts with this message in the debugger.
Unhandled exception at 0x00bf451a (relap5d.dll) in relap5cmd.exe: 0xC0000005: Access violation reading location 0x00000000.
It halts on the line with the tty in it.
0 Kudos
Steven_L_Intel1
Employee
1,132 Views

Ok, more information is helpful. What is the program that calls this DLL? Does it open a console window? One change you may be running into is that in earlier versions, if you tried to do console output when there was no console, the error was ignored, but now you'll get "error 38". That is likely to change in a future update so that it is ignored again. But the access violation is not normal.

It is not "tty" that is the issue but the write to unit 6.

0 Kudos
Reply