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

flag for mixing integer and logical variables? Is it -qintlog

moghaddam
Beginner
1,080 Views
I use -qintlog as one of my flags when compiling my code in Linux using ifort and still get an error (6341) of:

"A logical data type is required in this context"

I was wondering if I am using the correct flag?

Thanks,
Sarvin
0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,080 Views
There's no such option. What statement is giving you this error and what other options are you using? In most cases, Intel Fortran provides free mixing of integer and logical, which usually is NOT what users want. The compiler will warn about this if you ask for standards checking.
0 Kudos
moghaddam
Beginner
1,080 Views
There's no such option. What statement is giving you this error and what other options are you using? In most cases, Intel Fortran provides free mixing of integer and logical, which usually is NOT what users want. The compiler will warn about this if you ask for standards checking.

In the code, I have:

if ((dstep).and.(mod(nsteps,dstpat).eq.0)) then

when I try to compile it using "ifort" in Linux OS, I get:

error# 6341: A logical data type is required in this context.

As I mentioned earlier, I can easily compile the code using Intel Visual Fortran in Windows OS.

Thanks,
Sarvin
0 Kudos
Steven_L_Intel1
Employee
1,080 Views
You have not shown all the code necessary to see the problem, nor the compile command. Let's continue this in your other thread over in the Windows forum.
0 Kudos
Reply