- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could anybody tell me the meaning of IF(MSR) or IF (PAR) in a program?
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page