Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all 5691 articles
Browse latest View live

Mixed language dll - c files are ignored.

$
0
0

Hi,

I'm using Composer XE 2018 with VS 2015 to create a Fortran DLL. I've added to the project a C source file but in the build process it is simply being ignored. My workaround was to create a C static library project and add the lib file to the Fortran DLL project but I prefer to have them all in one project. Have I missed something?

Thank you

Baruch


Integrating intel fortran compiler 2018 with visual studio 2017

$
0
0

Sir,

 I had installed the visual studio 2017 with desktop development package. I had installed the Intel parallel studio XE 2018 composer edition for Fortran offline. I tried creating a new project under Fortran in visual studio but when I debug the program it shows an error saying "win32" support not found and project can't be built. Sir, I want to know how to integrate Fortran with visual studio and get out the errors and run the program successfully

please help.

Unresolved external references with v18.0

$
0
0

Dear All

I have encountered an alarming problem with v18, not present on v17, please have a look at the code and comments below

module MOD_A
    implicit none; private
    type, public :: MOD_A_data
        real :: x
    contains
        procedure, pass :: new => MOD_A_new
    end type

    public MOD_A_new

    interface
        module subroutine MOD_A_new(d)
            class(MOD_A_data) :: d
        end subroutine MOD_A_new
    end interface
end module MOD_A

submodule (MOD_A) MOD_A_subm
    implicit none
    contains
    module subroutine MOD_A_new(d)
        class(MOD_A_data) :: d
        d%x = 10.
    end subroutine MOD_A_new
end submodule MOD_A_subm

program TEST_CON_SUB
use, non_intrinsic :: MOD_A
implicit none
type(MOD_A_data) :: d
call d%new                  !This line causes message A below
!call MOD_A_new(d)          !But this line is absolutely fine (and works)
write(*,*) 'd%x = ', d%x
end program TEST_CON_SUB

!Message A from v18.0.1...
!1>------ Build started: Project: Test_cont_sub, Configuration: Debug x64 ------
!1>Compiling with Intel(R) Visual Fortran Compiler 18.0.1.156 [Intel(R) 64]...
!1>Test_cont_sub.f90
!1>Linking...
!1>Test_cont_sub.obj : error LNK2019: unresolved external symbol MOD_A_mp_NEW referenced in function MAIN__
!1>x64\Debug\Test_cont_sub.exe : fatal error LNK1120: 1 unresolved externals
!1>
!1>Build log written to  "blah"
!1>Test_cont_sub - 2 error(s), 0 warning(s)
!========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

! but from v17.0.6...

!1>------ Build started: Project: Test_cont_sub, Configuration: Debug x64 ------
!1>Compiling with Intel(R) Visual Fortran Compiler 17.0.6.270 [Intel(R) 64]...
!1>Test_cont_sub.f90
!1>Linking...
!1>Embedding manifest...
!1>
!1>Build log written to  "blah"
!1>Test_cont_sub - 0 error(s), 0 warning(s)
!========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Law of conservation of bugs?

Thanks

N

Visual studio 2015 integration

$
0
0

I am trying to get Intel Visual Fortran 2016 Update 1 to work with Visual Studio 2015 Update 3.

I have already followed the instructions at https://software.intel.com/en-us/articles/troubleshooting-fortran-integration-issues-with-visual-studio

The compiler is working fine, and Fortran projects within visual studio exist, however the debugger does not seem to be working and the text editor does not apply any formatting of Fortran files.

Anything else that can be done to repair the installation?  I've already tried uninstalling and reinstalling.

 

Floating license - debugging code without compilation.

$
0
0

Hi,

I manage a large group of engineers maintaining C code that is relying on my Fortran core dll.

During debug session they need to inspect the values in the Fortran code but they seldom change and recompile it.

Can this be done while not holding the Fortran floating license token?

Thank you.

Character substring dimension error

$
0
0

In a program I declare:

CHARACTER*4   PREVFILE   

CHARACTER*60  PRINTFILE

In the program the following is checked:

 IF(Printfile(1:4).NE.PREVFILE)LOWPAGE=0   

During execution, the program fails with the message:

forrtl: severe (408): fort: (18) Dummy character variable ‘PRINTFILE has

length 60 which is greater than actual variable length 4.

The program is about to be migrated from CVF to IVF, I do not understand what is wrong.

Can anyone give me a tip ?

 

License Problem

$
0
0

I got a single user Fortran XE Composer Edition license this fall (2017) using VS 2015 Shell.

Yesterday when I opened VS, edited a file and tried to compile I got the two line error:

Error A license for Comp-FW is not available (-9,57)

error #10052: could not checkout FLEXlm license

 

My license looks ok in the Intel Software Manager.

 

How can I get the compiler working again?

 

Thanks

requesting a license file for XE 2018 Update 1 Cluster Edition for Windows 10


Write to screen in the same line - Debug vs Release Mode

$
0
0

I am trying Fortran to output to screen without making paragraphs - i.e. output several times but in a row. The code below outputs correctly to screen if I compile the program and run it from the command line. However, it does not output to screen if I am using the debug feature of Visual Studio. Is there any work around or a better solution to this?

program test
   implicit none
   integer :: ind
   do ind = 1,20
      write(*,'(1x,i0)',advance='no') ind
      !Some other stuff here
   end do
end program

question about IMSL IVPAG integrator

$
0
0

I am using the IMSL DIVPAG routine for numerical integration of an initial value problem (Gear option for stiff equations).  I've hit a bit of a snag.  I want to integrate for, say, 100 steps, and save the final system state vector.  Then run the code again, read the system state vector from the first run to use as initial conditions,and integrate another 100 steps.  I've done this and it seems to work, but results do not match a run of 200 steps in one go.  The first 100 match, but not the second 100 (close, but not close enough).  I'm guessing DIVPAG uses internally stored values that make the 1st step of the second 100 step run get calculated differently than the 101st step of the 200 step run.  Unless I missed it, the IMSL documentation says nothing about how to smoothly restart an integration with a saved system state vector.  Has this issue ever come up before?

Direct Access file record length anomaly

$
0
0

I (lately) have a problem occurring when writing to direct-access files. Attached is the smallest code that reproduces the problem on my Win10 system. 

In the 'Debug' mode for x64 the code runs as expected: data is written to the direct-access file. In the 'Release' mode for x64 the following error message is produced:

forrtl: severe (66): output statement overflows record, unit 12, file C:\arne\Visual Studio 2015\Projects\test_direct_access\test_da.dat
Image              PC                Routine            Line        Source
test_direct_acces  00007FF6624C7E07  Unknown               Unknown  Unknown
test_direct_acces  00007FF6624BB9C2  Unknown               Unknown  Unknown
test_direct_acces  00007FF6624B8AB8  Unknown               Unknown  Unknown
test_direct_acces  00007FF6624B12F5  Unknown               Unknown  Unknown
test_direct_acces  00007FF662511532  Unknown               Unknown  Unknown
test_direct_acces  00007FF6625118D5  Unknown               Unknown  Unknown
KERNEL32.DLL       00007FFF870B1FE4  Unknown               Unknown  Unknown
ntdll.dll          00007FFF89B1EFB1  Unknown               Unknown  Unknown
Press any key to continue . . . 

The ‘Release’ code seems to assume that the record length is specified in ‘bytes’ and not in ‘4 byte units’ as specified in the project. Changing ‘LEN_R64 = 2’ to ‘LEN_R64 = 8’ makes that the ‘Release’ version runs without error.

Any idea about what causes this strange behavior?

 

 

Floating Point Consistency

$
0
0

Hi

I'm upgrading a CVF application that relies heavily on single precision floating point calculations.

I'm using the "Enable Floating Point Consistency" and "Extend Precision of Single Precision Constants".

Currently I create IA-32 Fortran DLL on XE.

 

From comparing the results of the CVF and XE versions I see that the CVF application is more precise.

It looks like in CVF there are more significant digits (or half digits).

I've read previous posts regarding Floating Point Consistency, including referred documents and presentations.

I've tried all possible combinations of the Fortran Floating Point Settings and still can not recreate precisely CVF results.

Will be grateful for any insight on this.

Baruch

 

how to install intel debugger?

$
0
0

hello

some day ago, i wrote a question about fortran

https://software.intel.com/en-us/comment/1918428#comment-1918428

 

so, i decide install intel parallel studio xe 2018 update 1 composer edition for fortran windows.

 

but, i have a problem.

 

Warning are detected. <The intel(r) extension for intel(r) MIC architecture cannot be installed.

 

so, i read the message

 

Installation can continue; however, Intel® Debugger Extension for Intel® MIC Architecture will not be installed because it requires that Microsoft Visual Studio* 2013, 2015 or 2017 be installed. Refer to the Release Notes for more details.

 

when i install the visual studio community 2017, what should I install from the list?

 

i attached the capture screenshot. thank you.

 

 

 

 

Unable to validate trial version parallel_studio_xe_2018_update1_cluster_edition

$
0
0

Hello,

I have downloaded parallel_studio_xe_2018_update1_cluster_edition, and got licence number but i am unable to use it because i am operating through a corporate proxy.

May I have a try-out licence file ?

 

Best regards,

 

Jean-Pierre

need help with compile error

$
0
0

The attached fortran source file is from the NIST.  I get the following compile error, and I can't figure out why.

Error 5  error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.   [F] F12854_stpv2a.for 2166 

It appears that array F is dimensioned F(20) and passed to a routine where it is declared F(*).  It that supposed to trigger this compile error?  I wanted to ask about this before turning off /warn:interfaces which gets rid of the error.

AttachmentSize
Downloadapplication/zipF12854_stpv2a.zip22.4 KB

question about versions of LIBIOMP5MD.DLL

$
0
0

I have several LIBIOMP5MD.DLL files whose file properties say:

Product Version 5.0, File Version 5.0.2013.227, Date modified 9/19/2013, Copyright (C) 2012
Product Version 5.0, File Version 5.0.2013.507, Date modified 6/8/2013, Copyright (C) 2013
Product Version 5.0, File Version 5.0.2011.606, Date modified 9/5/2014, Copyright (C) 2011

Is it just me, or is there something goofy about the numbering and dating?

catching error due to larger adjustable array at run-time

$
0
0

Hi

The test-case below captures the gist of an error; where is the cause that the adjustable array is bigger than what has been passed in. It cannot be caught by the compiler; I understand. I am wondering is there a way (as in a flag) to catch it at run-time. Compiling with ifort /check:all Test.f90 won't do.

As you can imagine this is extracted from rather deep inside a combination of legacy and new program. In one of the test-cases of that program, it revealed itself as "access violation" but that was at a different location. 

Abhi

---

      Module OM
         Implicit None
         Integer :: M, N
         Integer :: L
      Contains
      
         Subroutine Set()
            M = 3; N = 5
         End Subroutine Set
         
         Subroutine Tech(K)
            Integer :: K(N) ! Size is larger than what's passed; its incorrect.
            Integer :: L
            K = -1 ! any way to catch this error at run-time?
            L = K(N) - 1 ! or here?
            Write(*,"(2(A,X,I0,X))") "in Tech: K(N) =", K(N), " and L =", L
         End Subroutine Tech
         
      End Module OM
       
      Program Test
         Use OM
         Implicit None
         Integer, Allocatable :: I(:)
         
         Call Set()

         Allocate(I(M))
         I = 0
         Call Tech(I)
          Write(*,"(A,X,I0,X)") "after the call L =", L
         
      End Program Test      

 

Is it safe to associate a global pointer to a local variable?

$
0
0

If I define a local target variable inside a subroutine, then associate a global pointer to that value, is it safe to use the pointer to access that value outside of subroutine or the data can be overwritten and changed unexpectedly?

 

allocate array of abstract class objects

$
0
0

I want to allocate an allocatable array of abstract class objects in a subroutine.

Subroutine adds a new object to the existing array of abstract objects by resizing the array:

      subroutine apmArrayAddNewMember(array, member)
          use class_absMaterial !! abstract class
          use class_mat02       !! child class
          implicit none

          ! class mat02 extends abstract class absMaterial
          class(absMaterial), allocatable, dimension(:), &
                   intent(inout)  :: array                       !! existing array
          type(mat02), target, intent(in) :: member              !! new object
          class(absMaterial), allocatable, dimension(:) :: temp
          integer intSize
          type(mat02), pointer, dimension(:) :: molder

          if (allocated(array)) then
              intSize = size(array)
              allocate(molder(intSize+1))
              allocate(temp, mold=molder)
              deallocate(molder)
              temp(1:intSize) = array
              temp(intSize+1) = member
              deallocate(array)
              call move_alloc(temp, array)
          else
              allocate(molder(1))
              allocate(array(1), mold=molder)
              deallocate(molder)
              array(1) = member
          end if
      end subroutine apmArrayAddNewMember

I am not sure if this works correctly. As you can see I have to allocate molder so that I can specify 'mold ='

I could not find any other way, also I don't know what if all the objects are not mat02 class and be another objects that extends absMaterial.

Will this code steel works if the other objects need same or less memory as mat02?

Problem with LNBLNK and len_trim

$
0
0

I have a small subroutine transferring text from keyboard entries, etc from lower to uppercase letters. I used this routine for CVF and the version shown below I also apply for IVF Win32 applications. What happens is that the program crashes with the error message:Unhandled exception at 0x7790DF7C (ntdll.dll) in CaFeMS1-IVF.exe: 0xC0000005: Access violation writing location 0x002A0FFC... before the line ILENGTH = len_trim(STRING) - 1 where a breakpoint is set.

The subroutine is linked from  a library file.

Can anyone give me a tip?

Program listing follows here:

! IF(I.GT.IEND)GOTO 2000 ! 25/5-2000

! ICOM is character*2

READ(IDEDIT,202)ICOM

CALL TRANS_TO_UPPERCASE(ICOM,2)

SUBROUTINE TRANS_TO_UPPERCASE(STRING,LENGTH)

use IFPORT

INTEGER*4 KAR,ILENGTH,LENGTH

CHARACTER*(LENGTH)STRING

c CHARACTER*(40)STRING

! ILENGTH = LNBLNK(STRING)

ILENGTH = len_trim(STRING) - 1

C....Transfer STRING to uppercase letters....................

DO 1000 I=1,ILENGTH

KAR=0

KAR=ICHAR(STRING(I:I))

IF(KAR.GE.97)STRING(I:I)=CHAR(KAR-32)

1000 CONTINUE

RETURN

END

 

Viewing all 5691 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>