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

LOGICAL kind

dan0112
Beginner
328 Views
Hi

the compiler manual for the Composer XE 2011 says that one should use the standard logical kind, which is 4 bytes, for performance issues (see the online User and Reference Guide -> Building Applications -> Data I/O -> Data Representation -> Logical Data Representation). I have some pretty big logical arrays and so wanted to ask what the drawback of using LOGICAL(1), i.e. 1 byte, would be.

Thanks

Daniel
0 Kudos
1 Reply
Ron_Green
Moderator
328 Views
performance is the only drawback of using LOGICAL(1). But like you said, if you have such large data that you have to use LOGICAL(1) then there is no alternative.

You might try 2 runs: one with a large dataset at LOGICAL(4) and another at LOGICAL(1). The performance penalty will depend on use of the data and the expressions they are used within. This will vary by application so I can't even begin to give you a rule of thumb for how much performance you'll lose switching to LOGICAL(1).

ron
0 Kudos
Reply