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

Out of Memory error when running GetfileInfoqq in 32 bit but works in 64 bit

sumitm1
Beginner
800 Views

Hi,
I recently upgraded to IVF12 from IVF10 and on running a 32 bit and 64bit version of the same application, get an out of memory error when running the show permission subroutine below. The 64bit version runs fine. I have browsed other reports on this forum on GetfileInfoqq and similar errors and set my linker to be not set to any machine.

The error window is also attached. Can someone explain what can be happening or if there is a different set of code to make the same thing happen (browse and select file(s) from a directory)

Thanks for any help

Sumit

[bash]!*****************************************************
 SUBROUTINE SHOWPERMISSION(files)
 use inputinfo
 use ifport
 CHARACTER(256)    files

 INTEGER(4)        length 
 INTEGER(KIND=INT_PTR_KIND( )) handle 
 CHARACTER(5)     permit
 TYPE (FILE$INFO) info
 

num_of_files=0
 length = len(files) !GETSTRQQ(files)
 handle = FILE$FIRST
 DO WHILE (.TRUE.)
   length = GETFILEINFOQQ(files, info, handle)
   IF ((handle .EQ. FILE$LAST) .OR. (handle .EQ. FILE$ERROR)) THEN
    SELECT CASE (GETLASTERRORQQ( ))
        CASE (ERR$NOMEM)
        WRITE (*,*) 'Out of memory'
        CASE (ERR$NOENT)
        EXIT
        CASE DEFAULT
        WRITE (*,*) 'Invalid file or path name'
    END SELECT
   END IF
  
  num_of_files=num_of_files+1
 flnm(num_of_files)=info%name

 END DO
 RETURN
 END SUBROUTINE[/bash]


Intel Visual Fortran Composer XE 2011 Update 7 Integration for Microsoft Visual Studio* 2010, 12.1.3518.2010

0 Kudos
3 Replies
Steven_L_Intel1
Employee
800 Views
Are you sure the error occurs in this routine? I ask because the screenshot suggests it is coming from a call to a file browsing dialog routine such as GetOpenFileName.
0 Kudos
sumitm1
Beginner
800 Views
[bash]Steve,
It indeed does stall at the GetOpenFileName call. Attached is the routine that calls that. Do you see any issues there.
I had a second question on how do I view the dialog box controls previously made on IVF10. The .rc file does not pull up the dialog box control. I dont want to buy Visual Studio. What are my options



Thanks
Sumit










SUBROUTINE INPFILEDXF(DLG, ID, CALLBACKTYPE) USE ifport USE INPUTINFO Use IFQWIN USE IFWINTY USE IFWIN use iflogm IMPLICIT NONE INCLUDE 'RESOURCE.FD' TYPE(DIALOG)DLG INTEGER(KIND=4)ID, CALLBACKTYPE TYPE (T_OPENFILENAME)FRED LOGICAL(KIND=4)RET INTEGER(KIND=4)IERROR,LENGTH Integer i CHARACTER(LEN=26*7)ALLFILTERS CHARACTER(LEN=60)DLGTITLE LOGICAL(KIND=4)CHECKED logical retlog character(256) checkstring character(10) text ! CALL UNUSEDQQ(ID,CALLBACKTYPE) CALL ZeroMemory(LOC(FRED), SIZEOF(FRED)) ALLFILTERS = 'DXF CAD FILES(*.dxf)' // char(0) // & '*.dxf' // char(0) // & 'All files(*.*)' // char(0) // & '*.*' // char(0) // char(0) DLGTITLE = 'Choose DXF File'C FRED%LSTRUCTSIZE = sizeof(FRED) !+12 DXF_INP=trim(DXF_INP)//char(0) FRED%HWNDOWNER = NULL FRED%HINSTANCE = NULL FRED%LPSTRFILTER = LOC(ALLFILTERS) FRED%LPSTRCUSTOMFILTER = NULL FRED%NMAXCUSTFILTER = NULL FRED%NFILTERINDEX = 1 FRED%LPSTRFILE = LOC(DXF_INP) FRED%NMAXFILE = LEN(DXF_INP) FRED%LPSTRFILETITLE = NULL FRED%NMAXFILETITLE = NULL FRED%LPSTRINITIALDIR = NULL FRED%LPSTRTITLE = LOC(DLGTITLE) FRED%FLAGS = OFN_FILEMUSTEXIST + OFN_PATHMUSTEXIST + OFN_EXPLORER !NULL FRED%NFILEOFFSET = NULL FRED%NFILEEXTENSION = NULL FRED%LPSTRDEFEXT = NULL FRED%LCUSTDATA = NULL FRED%LPFNHOOK = NULL FRED%LPTEMPLATENAME = NULL RET = GETOPENFILENAME(FRED) CALL COMDLGER(IERROR) DXF_FILE_INP = .FALSE. IF(RET .AND. (IERROR == 0))THEN CALL READ_DXF write (text,'(I5)') Num_pts_Vert retlog =DlgSet (dlg, IDC_Num_pts,text) DXF_FILE_INP = .TRUE. ENDIF length = SPLITPATHQQ(dxf_INP, drive, dir, flname, ext) checkstring= trim(drive)//trim(dir)//'*.dxf' call SHOWPERMISSION(checkstring) retlog = DlgSet( dlg,IDC_DXF_LIST, num_of_files ) Do i=1,num_of_files retlog = DlgSet( dlg,IDC_DXF_LIST, flnm(i), i ) end do RETURN END SUBROUTINE INPFILEDXF[/bash]
0 Kudos
Steven_L_Intel1
Employee
800 Views
I won't be able to look at this until next week. As for the dialog box, you need a resource editor. Since you don't have the retail Visual Studio, you can use the freeware ResEdit. You will need to run this outside of Visual Studio.
0 Kudos
Reply