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


5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

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.

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.

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.

Leave a Comment

Please sign in to add a comment. Not a member? Join today