What are the must haves to select in compiler and linker options for distribution of a console fortran exe.
Preferred compiler/linker options for distribution
Fortran version for Abaqus 6.14
Dear Intel Developer,
can anybody tell me what Fortran (and Visual Studio) version is required for Abaqus 6.14 ?
Thank you,
Elisa
C interoperablilty and character strings
This is for the v16.0.3 compiler.
I could be wrong about this, but I have in mind that with the latest C interoperability features it is possible to pass a c-array of characters to a fortran procedure as a fortran string. Am I right about this? If so how do I do it? Thanks.
Call Error
Steve: I fixed the WULF program for the stack error. Thanks for the help. I tried to put a note of thanks and a picture on this forum but it got lost again. First call to PXFCDDIR fails. IFPOSIX - as use statement does not work either. John ! **************************************************************** ! subroutine chdirA(i) ! ! **************************************************************** use IFPORT implicit none CHARACTER(len=255) :: path integer i,ilen, ierror CALL PXFGETCWD (path,ilen,ierror) WRITE(*,*) TRIM(path) call PXFCHDIR("C:\",3,i) call PXFCHDIR("users\macne\documents\Visual Studio 2013\Projects\Program070 - Beams\Lothurr",76,i) write(*,*)i CALL PXFGETCWD (path,ilen,ierror) WRITE(*,*) TRIM(path) return end subroutine
msvs 2013 reset
Is there a way to get the free version of vs to reset all the IVF options for compilation?
Thanks,
Brooks
Problem installing Parallel Studio XE 2016
Hello everybody.
I've been trying to install Parallel Studio but the followed message appears few minutes after I began the installation.
When I tried to open installfnp.exe, appears a message saying that "Windows can't access the device, path or file specified. Maybe you not have the appropriate permissions"
I'm using Windows 10 Home 64 bits, Intel i5 4210U.
Could anyone help me, please?
.
Linking Parallel Studio XE 2013
Hi,
I’m trying to install Parallel Studio XE 2013 but it is not linking with Visual Studio. I tried VS2012.5 and VS2012_WDX_ENU but doesn’t work. Does anyone know what version supports Parallel Studio XE 2013?
Thanks
TYPE vars with ALLOCATABLE attribute
(1) My TYPE declaration:
TYPE :: eflow_data_type
INTEGER(ITYPE) :: SegID ! Boundary segment ID
INTEGER(ITYPE) :: Mel ! Solid element w/w segment is associated
INTEGER(ITYPE) :: Type ! Element_Type_XXXX, see shared_common_data.f
INTEGER(ITYPE) :: KNP ! Count of nodes in INP(1:MXEFN)
INTEGER(ITYPE), DIMENSION(:), ALLOCATABLE :: INP! El node subset, 1 .le. INP(*) .le. MXEFN
END TYPE
TYPE (eflow_data_type), DIMENSION(:), ALLOCATABLE, SAVE :: EFLOW_DATA
(2) IVF Manual:
ALLOCATE ([type:] object[(s-spec)] ...
(3) My ALLOCATE statement:
IF (NUMED .GT. 0) THEN
MXEFN = MAX(4,MXPGN)
ALLOCATE ( eflow_data_type::INP(MXEFN), STAT=IALLOC_FLAG )
CALL REPORT_ALLOCATION_EVENT (IALLOC_FLAG,'EFLOW_DATA:INP(1:MXEFN)',MXEFN)
ALLOCATE ( EFLOW_DATA(1:NUMED), STAT=IALLOC_FLAG )
CALL REPORT_ALLOCATION_EVENT (IALLOC_FLAG,'EFLOW_DATA(1:NUMED)',NUMED)
EFLOW_DATA(:) = eflow_data_type (0,0,0,0,(/(0,i=1,MXEFN)/))
ENDIF
(4) ifort error message:
error #8235: If type specification appears, the type and kind type parameters of each object being allocated must be the same the same as type and kind type of the type specification. [INP]
Question: What am I overlooking from the User and Reference Guide for the Fortran Compiler 14.0 specification???
Question: Do I have the ALLOCATE (...) commands in the wrong execution order???
Question: Should I stuff both the mother and the child into one ALLOCATE ( EFLOW_DATA(NUMED)%INP(MXEFN),
Support for F2003 allocatable components and structure constructors
In case this is an oversight, Fortran 2003's ability to use an unallocated entity for the component specification that corresponds to an allocatable component in a structure constructor does not appear to have been implemented in current compilers. If only I had of known this yesterday!
MODULE m PRIVATE TYPE, PUBLIC :: t INTEGER, ALLOCATABLE :: comp END TYPE t END MODULE m PROGRAM p USE m IMPLICIT NONE TYPE(t) :: x, y, z INTEGER, ALLOCATABLE :: not_allocated x = t(NULL()) ! ok. y = t(1) ! ok. z = t(not_allocated) ! explodes. PRINT *, ALLOCATED(x%comp), ALLOCATED(y%comp), ALLOCATED(z%comp) END PROGRAM p
F2003 4.5.9 para 6 or so - "If a component of a derived type is allocatable, the corresponding constructor expression shall either be ... an allocatable entity of the same rank ... If the expression is an allocatable entity, the corresponding component of the constructor has the same allocation status as that allocatable entity and, if it is allocated, the same dynamic type, bounds and value."
This missing feature has thwarted my evil plans to submit an ICE that occurs with some of the most horrible (but still F2003 conforming, bar 1.4(5)) source that your compiler support people will have ever seen. I am sure you are all very disappointed.
(Oops - forgot this bit...
>ifort /check:all /warn:all /standard-semantics /traceback "2016-06-05 allocatable-component.f90"&& "2016-06-05 allocatable-component.exe" Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.3.207 Build 20160415 Copyright (C) 1985-2016 Intel Corporation. All rights reserved. Microsoft (R) Incremental Linker Version 14.00.23918.0 Copyright (C) Microsoft Corporation. All rights reserved. "-out:2016-06-05 allocatable-component.exe" -subsystem:console -incremental:no"2016-06-05 allocatable-component.obj" forrtl: severe (157): Program Exception - access violation Image PC Routine Line Source 2016-06-05 alloca 000000013F071238 MAIN__ 16 2016-06-05 allocatable-component.f90 2016-06-05 alloca 000000013F0BD28E Unknown Unknown Unknown 2016-06-05 alloca 000000013F0BDB80 Unknown Unknown Unknown kernel32.dll 00000000776759BD Unknown Unknown Unknown ntdll.dll 00000000778AA2E1 Unknown Unknown Unknown
)
Linker Issues in VS2015
I have a codebase (primarily C++ with some C) I am attempting to compile, and I get the following error (end of post) when I attempt to build the solution.
My search has shown that this is likely due to an issue with the FORTRAN compiler (see linker error misery), but I don't have the options available in my project to perform the fix that is used in that thread. Additionally, I am a bit confused, as there do not seem to be any FORTRAN source files anywhere in the files I have, but everything is pointing to this being a FORTRAN error.
1>------ Build started: Project: bemsolver, Configuration: Debug Win32 ------ ... *deleted text* ... 1> Generating Code... 1>bem.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification 1> Creating library C:\ENT\BemSolver\Debug\bemsolver.lib and object C:\ENT\BemSolver\Debug\bemsolver.exp 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol _vsprintf referenced in function _for__io_return 1>libirc.lib(irc_msg_support.obj) : error LNK2001: unresolved external symbol _vsprintf 1>libifcoremt.lib(for_diags_intel.obj) : error LNK2019: unresolved external symbol ___iob_func referenced in function _for__io_return 1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol ___iob_func 1>libmmt.lib(libm_error.obj) : error LNK2001: unresolved external symbol ___iob_func 1>libifcoremt.lib(for_io_util.obj) : error LNK2019: unresolved external symbol _sscanf referenced in function _for_check_env_name 1>libifcoremt.lib(tbk_traceback.obj) : error LNK2001: unresolved external symbol _sscanf 1>libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol __snprintf referenced in function ___libm_error_support 1>libirc.lib(tbk_display.obj) : error LNK2001: unresolved external symbol __snprintf 1>libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol _vsnprintf referenced in function ___libm_error_support 1>LIBCMT.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol _vsnprintf 1>LIBCMT.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __vsnprintf 1>C:\ENT\BemSolver\Debug\bemsolver.exe : fatal error LNK1120: 6 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
error 0x8007007f when using debug version of fortran dll
While using c# (vs 2015) code to invoke a intel fortran 2016 dll in VS 2010 using dllimport, the 'release' version of fortran dll works fine whereas the debug version gives an error saying "0x8007007f - unable to load dll .... Cannot find dll procedure "
dumpbin for debug version of fortran dll:
File Type: DLL
Image has the following dependencies:
KERNEL32.dll
common32.dll
libifcoremd.dll
libmmd.dll
MSVCR100.dll
Summary
5747000 .data
2000 .idata
A7000 .rdata
4D000 .reloc
1000 .rsrc
18A000 .text
21000 .trace
1000 _RDATA
dumpbin for debug version of fortran dll:
File Type: DLL
Image has the following dependencies:
KERNEL32.dll
common32.dll
libifcoremd.dll
libmmd.dll
MSVCR100.dll
svml_dispmd.dll
Summary
5741000 .data
2000 .idata
10000 .rdata
4D000 .reloc
1000 .rsrc
FD000 .text
1000 _RDATA
too, here is the command line for fortran debug:
/nologo /debug:full /Od /fpp /assume:nosource_include /debug-parameters:all /warn:declarations /warn:unused /warn:uncalled /warn:interfaces /assume:byterecl /iface:cvf /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:uninit /libs:dll /threads /c
and for release:
/nologo /O3 /fpp /assume:nosource_include /assume:byterecl /iface:cvf /module:"Release\\" /object:"Release\\" /Fd"Release\vc100.pdb" /libs:dll /threads /c
for debig linker:
/OUT:"Debug\abc.dll" /NOLOGO /MANIFEST /MANIFESTFILE:"Debug\abc.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\foo\Debug\abc.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\foo\Debug\abc.lib" /DLL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
for release linker:
/OUT:"Release\abc.dll" /INCREMENTAL /NOLOGO /MANIFEST /MANIFESTFILE:"Release\abc.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /IMPLIB:"c:\foo\Release\abc.lib" /DLL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
nothing weird in the above , i guess? or should i be seeing a svml-* runtime for debug version as well?am trying to debug into the fortran code by using the debug version.
building win32 version of dll. as i said, release dll 'loads' fine and returns a result. it's the debug version of the dll that is causing this dll not found issue..
what could i be missing?
thanks!
Parallel Studio XE 2016 installed, Fotran compiler not working
I have downloaded MS Visual Studio 15 as required for Intel® Fortran Compiler 16.0 for Windows*, but I only see the following command prompt: IA-32 Visual Studio 2015. I would like to figure out out to download/troubleshoot the install process so I have access to the standard command prompt using the Windows 7 - 64 bit machine. When I tried to compile a program on the Intel Compiler 16.0 update 3 IA-32 Visual Studio 2015, I received the error: ERROR: Visual Studio 2015 is not found in the system. 'ifort' is not recognized as an internal or external command, operable program or batch file.
Any help/suggestions would be greatly appreciated.
Finalization: what is the status in Intel Fortran?
I was hoping to post a comment on topic #516177 (see link below) with the question on the subject line, but I see that topic is closed; hence this new thread:
https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo...
In that topic from June 2014, Steve mentions in post #4 the changes to finalization in Fortran 2008. It appears quite a few aspects have been updated/modified/deleted as part of combined corrigenda (1 thru' 3) for Fortran 2008. Is it possible to get a status summary on finalization in Intel Fortran, specifically with respect to "section 4.5.6.3 When finalization occurs" from Fortran 2008 standard? That is, what all changes which are part of the Fortran 2008 corrigenda have been implemented in Intel Fortran, if any?
Thanks,
Line Number Access
In my debug version or even release where I specify line numbers, can I access a specific line number during execution? + I want towrite a bit of debugging so I can tell what line number I'm on when an error occurs -- maybe not a bad error -- just some error. I've tried to put in line numbers using the editor but as I add or delete things the numbers are off. I remember in the old days, IBM's FORTRAN IV had something that got compiled into a statement that referred to the line number.
Thanks,
Brooks Van Horn
RECURSIVE and SAVE
I am beginning to review some core subroutines of my simulation applications with the aim to introduce some parallelization (now I use only PARDISO) which must be based on subroutine calls in parallel DO or parallel blocks.
In doing this I have added the RECURSIVE keyword to a SUBROUTINE containing a SAVE statement which is not coherent.
Surprisingly the compiler has generated no warning or error messages.
Can't see variables in debugger if in select type construct
When I break above the select type, I can see the variables in the debugger:
fvec = 0.0d0 select type(br) type is (t_fred) nseg = 10
ie
nseg 1680 INTEGER(4) - fvec {...} REAL(8) fvec(1) 0.000000000000000D+000 REAL(8) fvec(2) 0.000000000000000D+000 REAL(8) fvec(3) 0.000000000000000D+000 REAL(8) fvec(4) 0.000000000000000D+000 REAL(8) fvec(5) 0.000000000000000D+000 REAL(8) fvec(6) 0.000000000000000D+000 REAL(8) fvec(7) 0.000000000000000D+000 REAL(8) fvec(8) 0.000000000000000D+000 REAL(8)
Yet when I step into the select type construct and break at the nseg line, I get in the debugger:
nseg Undefined variable nseg fvec Undefined variable fvec
I suspect it may be a bug in the Windows Integration, I am using 11.1.065.
Is there a workaround I can use to see these variables in the debugger?
Intel Visual Fortran w/ Rogue Wave IMSL Codes
Hi,
I have an Intel Visual Fortran Compiler running on Visual Studio 2013 that supposedly has Rogue Wave IMSL installed as well. I was just wondering how I would go about pulling up the Library of IMSL source codes so I could move s=certain codes to necessary projects. The specific codes I am looking for were published in 1966 by Paul F Dienemann on Estimating Cost Uncertainty Using Monte Carlo techniques. Would these codes still exist in the IMSL library of today by any chance?
Thank you!
Sincerely,
Aravind R
CHARACTER(LEN=*) functions
I have been trying to get rid of the warnings from my mixed Fortran and C++ solution, and one of them looked to be a no-brainer: a warning on the use of functions which are defined as CHARACTER(LEN=*).
I was paying particular attention to the https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-fo... thread (now closed), and all the contributors were quite set against CHARACTER(LEN=*) - although the reasoning wasn't overly clear.
My problem is that it works, and the stated alternatives don't. The function is QUOTESTR (you can probably guess what it does), and it accepts the argument accString:
CHARACTER(LEN=*) - This is some of our oldest code, and has produced the right answer for (literally) decades.
CHARACTER(LEN=:), ALLOCATABLE :: QUOTESTR - this causes a memory exception.
CHARACTER(LEN=2+LEN(accString)) :: QUOTESTR - This garbles the string completely. It is difficult to see in the debugger, but it looks like QUOTESTR is 2 long, whereas accString is 57.
The debugger flicks inbetween the code and the string declarations as you step, and I don't know if that's significant.
Why *are* CHARACTER(LEN=*) and CHARACTER*(*) a problem, and what should it be replaced by?
Calls to fseek and ftell not working from C#
Hi all,
I'm writing some fortran code to read Nastran op2 files. I am using fseek and ftell to store the position of certain data blocks. This code is compiled to a DLL and called either from C++ code or C# code. When I call the function from c++ fseek/ftell works correctly, but when called from C# using PInvoke both return always -1. Am I missing something?
C# code:
[DllImport("mydll.dll", EntryPoint = "abcd", CallingConvention = CallingConvention.StdCall)] [return: MarshalAs(UnmanagedType.I4)] static extern int abcd([param: MarshalAs(UnmanagedType.I4)] Int32 dummyInt);
int d1=abcd(4);
Fortran DLL code:
function abcd(input) result(istat) !DEC$ ATTRIBUTES ALIAS:'abcd' :: abcd !DEC$ ATTRIBUTES DLLEXPORT :: abcd !DEC$ ATTRIBUTES VALUE :: input use ifport integer,intent(in) :: input integer(4) istat, offset, ipos, posactual, res integer :: f f=1 OPEN (UNIT=f, IOSTAT=ios, ERR=100, FILE='C:/test.op2', form='unformatted', STATUS='OLD', ACTION='READ') READ (f, END=100) res res=fseek(f, 10, 0) istat=ftell(f) 100 end function abcd
64 bit C to FORTRAN character interface issue.
I have a program which has a C routine calling a FORTRAN routine with
a string argument.
The C routine looks like this:
INTEGER str_len = 128;
CHARACTER qc_soln_name[128];
. . . .
. . . .
get_slc_status_item( &k_case, &k_soln, &k_converged,
qc_soln_name, str_len);
. . . .
. . . .
The called FORTRAN routine looks like this:
SUBROUTINE GET_SLC_STATUS_ITEM( K_CASE ,
+ K_SOLN ,
+ K_CONVERGED ,
+ QC_SOLN_NAME )
CHARACTER QC_SOLN_NAME * 31
CHARACTER QC_END * 1
QC_END = CHAR( 0 )
QC_SOLN_NAME = QC_END
. . . .
. . . .
When the C is compiled 32 bit and the FORTRAN is compiled 32 bit,
there is no problem.
When the C is compiled 64 bit and the FORTRAN is compiled 64 bit,
execution stops at the QC_SOLN_NAME assignment with the error message:
forrtl: severe (400): fort: (19) Dummy character variable
'QC_SOLN_NAME' has length 31 which is greater then actual variable
length -3689348818177884032
This is using the Intel FORTRAN 11.1.072 compiler.
Any ideas what the problem is and how to fix it?
Thanks for any help.