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

IF(MSR) IF(PAR)

Meng_X_
Beginner
886 Views

Hello,

Could anybody tell me the meaning of IF(MSR) or IF (PAR) in a program?

Thanks.

0 Kudos
4 Replies
mecej4
Honored Contributor III
886 Views

The condition inside IF() in a Fortran statement has to be logical variable or a logical expression. Therefore, look at the subprogram beginning to see if MSR and/or PAR is/are declared to be type LOGICAL. If not, there is a bug asking you to fix it.

0 Kudos
TimP
Honored Contributor III
886 Views

I don't see how the response from mecej4 necessarily relates to the original post.  An actual example would help.

As to checking for logical data types where the Fortran standard requires them (the subject which mecej4 appears to have raised), you must set the -stand option in order for ifort to flag violations.  Treatment of integer values where the standard requires logical is highly non-portable.  if(intval) could be a shortcut for

if( iand( intval, 1) == 1) (in which case the more verbose correct syntax would generate the same code)

or if(intval<0)

or maybe just a plain bug.

ifort predecessor platforms actually checked either the 1 bit (odd/even) or the sign bit in an if() test.  I think this went back to extended f66.

0 Kudos
Meng_X_
Beginner
886 Views

I only know  they are for parallel calculation and MSR/PAR are logical parameters.

I want to know their exact meaning in a parallel calculation process.

0 Kudos
mecej4
Honored Contributor III
886 Views

You will probably have to seek that information from the author(s) of the code in question. There is nothing that one can say about those logical variables from the viewpoint of standard Fortran.

0 Kudos
Reply