Intel® Fortran Compiler

Linker Conflict libmmt and libcpmtd

Hello,

I recently migrated to the latest VS and Intel fortran compiler.  I am getting the following errors:

Severity    Code    Description    Project    File    Line    Suppression State
Error        error LNK2005: _powf already defined in libmmt.lib(powf_iface_c99.obj)        libcpmtd.lib(locale.obj)        

Any advice on overcoming this would be greatly appreciated.

Many thanks,

ACAR

 

RENAME function returns 13?

Calling RENAME returns a value of 13 in my code (the from name is a directory and it exists, the to name doesn't exist) , and this error code isn't listed in the run-time error list. Is there a definition for this value? 

The documentation says it returns an Integer 4 and lists choices of ENOENT, EACCES, and EXDEV, but there is not a link to these names and no value is provided in the documentation.  How do you figure out if you have gotten those return values?

DTIO bug?

Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.2.187 Build 20170213

A code that includes the following works:

        PRINT 222,  B(1.1), B(2.2)
222        FORMAT(DT'Z##.##',DT'Z##.##')
!222        FORMAT(2DT'Z##.##')

B is a. function that returns a structure with one component

Running produces (you can guess what the formatting does):

01.10 02.20

If the commented FORMAT statement is used instead, it bombs

forrtl: severe (62): syntax error in format, unit -1, file CONOUT$

protected variables

This might be a stupid question, but does it make sense for a variable to be both PROTECTED and PRIVATE ?  I would have thought that PROTECTED variables are already PUBLIC.  For example, the following program would not compile unless the PROTECTED variable is explicitly made PUBLIC.

module mymod
   integer,protected:: a = 1
   private
   !public a
end module mymod   
   
!------------------------------------------   
   
program test_public
   use mymod, only: a
   implicit none
   write(*,*) a
   stop
end program test_public

 

Unneeded recompiles

While doing test runs inside the IDE (to allow use of the debugger), several (but not all) of my modules are recompiled, in spite of lack of changes.  I remember seeing a post on this topic recently, but failed to bookmark it.  Can you point me in the right direction?

Mahalo, Mike

question about Modules and COMMON blocks

I am a novice in the use of Modules, and I've got a question. 

I have a very old code that uses dozens of named common blocks.  I am considering replacing each with a Module of the same name.  Is that a wise thing to do?  I think I will end up with a single .f90 file containing all the named Modules, and replacing all the named COMMON statements and associated variable declarations appearing throughout the code with USE statements with the same names.

Every routine throughout the code has IMPLICIT NONE in it, and I think that will help me along the way.

How best to handle integer overflow situations ?

Hello -

as far as I know, in the current version of Fortran, we dont have a way to AUTOMATICALLY detect an integer overflow.

Of course, one can try to mitigate that by making integers 8 bytes long.

when I have short integers, I have to test to see (for example) if the sum of two positive integers is still positive.

But I don't think the CPU can detect a situation where the answer is wrong.

I was wondering if anything is being done to improve this situation.

Subscribe to Intel® Fortran Compiler