Silverfrost Forums

Welcome to our forums

64 bit ClearWin+

18 Dec 2013 9:01 #13489

Quoted from GEWV The function winio$('%im[image_name]') doesn't work on Windows 8

The main:

programm win_LadeBMP

        use     mswin$
        implicit none

        integer         win
        win=winio$('%im[StartBild]')
end

and the resource

StartBild IMAGE TN_Startbild2.bmp 
20 Dec 2013 5:27 #13517

I have fixed this bug but you can avoid it by using %bm and BITMAP for bitmaps.

21 Jan 2014 7:17 #13581

For our application (we try from 32 to 64 bit) we also need the following functions

  • ATTACH$
  • SET_PIXEL$
  • MKDIR$

Or is it possible to use other functions for it.

21 Jan 2014 9:26 #13583

SET_PIXEL$ is available as DRAW_POINT$.

I will make a note to add the other two.

21 Jan 2014 4:31 #13593

I have uploaded a new DLL to http://www.silverfrost.com/beta/clearwin64.exe.

This includes the two missing routines ATTACH$ and MKDIR$.

22 Jan 2014 7:35 #13595

Many Thanks!!!

29 Jan 2014 10:55 #13640

A Fortran test application making use of ClearWin64.dll has been successfully compiled using Intel's fortran build environment (64 bit), especially using ifort for compilation and xilink for linking.

We used the Intel Fortran Compiler ifort, version 11.1, for compilation. The application (named test1.exe) creates a simple window using winio$ and generates some output logged into a file before and after the winio$ call. It works as expected when executed.

Now, we want to use a newer version of Intel's fortran build environment (64 bit), namely version 14.0.

We successfully created the test application from Fortran source file test1.for for Intel's build environment version 14.0, as well.

However, when starting test1.exe created with version 14.0, the following error occurred:

Unreasonable graphics dimensions - 1718157512 x 1718157512

Both applications make use of module files and object files (here for clrwin$) which have been created version specific, as well, for both compiler versions in question.

We checked that both apps call into the same dll ClearWin64.dll.

Is there any comment on that? Could I bypass the problem by means of an appropriate call using clearwin64.dll?

I would appreciate any advice.

Dietmar

      PROGRAM TEST1
C      USE MSWIN$
      USE IFWIN
      USE CLRWIN$
      IMPLICIT NONE
      INTEGER I
C
      OPEN(42,FILE='test1.log')
      WRITE(42,'(A)') 'Start test1.exe'
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',200,200)
      WRITE(42,'(A,I8)') 'i=',I
      WRITE(42,'(A)') 'End test1.exe'
      CLOSE(42)
C
      END PROGRAM TEST1
29 Jan 2014 12:24 #13641

Are the values of 200,200 in the right size. Try defining these as INTEGER4 or INTEGER8 i.e.

      PROGRAM TEST1 
C      USE MSWIN$ 
      USE IFWIN 
      USE CLRWIN$ 
      IMPLICIT NONE 
      INTEGER I 
      INTEGER*8 IW,IH
      IW = 200
      IH = 200
C 
      OPEN(42,FILE='test1.log') 
      WRITE(42,'(A)') 'Start test1.exe' 
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',IW,IH) 
      WRITE(42,'(A,I8)') 'i=',I 
      WRITE(42,'(A)') 'End test1.exe' 
      CLOSE(42) 
C 
      END PROGRAM TEST1
29 Jan 2014 4:17 #13645

You may need to use %za and %zz in this context. These are described in the ClearWin64 readme.

30 Jan 2014 4:31 #13647

Dietmar, When you declare inside your Intel Fortran program some array around 100MB, 200MB or even 1 GB are created EXE files have similar sizes up to 1 GB too? What are standard stack sizes for single array there? Can you allocate say few 20 GB arrays in 64bit Fortran with the RAM less then that amount?

30 Jan 2014 10:33 #13649

If I use another gFortran so I rebuild the .mod-files. This is o.K. But then I want to build the .exe-file I get an error: clearwin64.dll file not recognizes: File format not recognized If I want to build the .exe-file with the 'Salford'-gfortran I get the following logical error (because the .mod-files were not compiled with the same gFortran): Wrong module version '10' (expected '8') for file 'mswin$.mod' opened at (1) How can I solve this problem?

30 Jan 2014 11:22 #13650

Thanks to all who helped, especially to Ian: the values 200 in the winio$ call weren't in the right size. The integer size depends on the compiler options which I choose making 200 a 2 byte constant. If I substitute all occurrences of 200 with 200_8 or 200_4 (8 byte constant or 4 byte constant), then the winio$ call works successfully and as expected.

However, I am a little confused about the following: if I introduce variables IW and IH like Ian suggested then the winio$ call works for **all **types of integer for IW and IH (8, 4 **and **2 byte constants).

And I am wondering why the behaviour changed when changing the versions of the intel compile environment.

Thanks, Dietmar

      PROGRAM TEST1
C      USE MSWIN$
      USE IFWIN
      USE CLRWIN$
      IMPLICIT NONE
      INTEGER I
      INTEGER*8 IW8,IH8
      INTEGER*4 IW4,IH4
      INTEGER*4 IW2,IH2
      IW8 = 200
      IH8 = 200
      
      IW4 = 200
      IH4 = 200
      
      IW2 = 200_2
      IH2 = 200_2
C
      OPEN(42,FILE='test1.log')
      WRITE(42,'(A)') 'Start test1.exe'
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',IW8,IH8) ! ok
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',IW4,IH4) ! ok
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',IW2,IH2) ! ok
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',200_8,200_8) ! ok
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',200_4,200_4) ! ok
      I = WINIO$('%gr[black,metafile_resize,rgb_colours]',200_2,200_2) ! not ok for ifort version 14.1
      WRITE(42,'(A,I8)') 'i=',I
      WRITE(42,'(A)') 'End test1.exe'
      CLOSE(42)
C
      END PROGRAM TEST1 
30 Jan 2014 12:01 #13651

Sorry, in my last post the term in brackets should read (8, 4 **and **2 byte types) instead of (8, 4 **and **2 byte constants).

Regards, Dietmar

30 Jan 2014 12:19 #13652

The FTN95 default is 4 byte integers. Two byte integers are really a waste of time in this day and age and should only be used if there is a specific reason for that size.

I would advise a default of 4 byte integers and 8 byte reals in everyday use. Ian

30 Jan 2014 12:52 #13653

Maybe you intended

INTEGER*2 IW2,IH2

In 64 bit Fortran, winio$ passes 64 bit integer addresses even for the constant values. What ClearWin+ receives depends on the positioning of the 32 bit integer with respect to the address that is passed.

30 Jan 2014 5:53 #13654

Yes, Paul, I intended

INTEGER*2 IW2,IH2

and yes, Ian, I agree with you concerning the default for integer size.

Thanks for your help and explanations, Dietmar

30 Jan 2014 11:50 #13655

Can anyone with relatively latest 64bit Intel Fortran compiler check if it still creates huge EXE files if you declare huge arrays? This is an example which produces 10K EXE file in FTN95 and is compiled in nanoseconds. What IFORT gives?

   parameter (idim1=700)
   real a1(idim1,idim1,idim1)

   a1(1,1,1) = 1	

   print*, 'size, MB=', idim1*idim1*idim1*4/10.**6
   print*, a1(1,1,1)
   end	
31 Jan 2014 12:08 #13657

Dan,

Not latest, sorry! It would depend on the compile options you use. I selected /O2 and the exe is 500k, which is the minimum for any exe I produce with ifort. FTN95 benefits from salflibc.dll I didn't use the equivalent of /DEBUG, which might change things a bit.

   parameter (idim1=700) 
   real a1(idim1,idim1,idim1) 

   a1(1,1,1) = 1    

   print*, 'size, MB=', idim1*idim1*idim1*4/10.**6 
   print*, 'size, MB=', sizeof (a1)/2.**20 
   print*, a1(1,1,1) 
   end    

ifort /Tf exe_size_test.f90 /free /O2 /QxHost   
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.5.344 Build 20120612

 Directory of c:\\TEMP\\Fortran\\kind

31/01/2014  11:04 AM           535,552 exe_size_test.exe
31/01/2014  11:03 AM               217 exe_size_test.f90
31/01/2014  11:04 AM               485 exe_size_test.log
31/01/2014  11:04 AM             1,969 exe_size_test.obj
               4 File(s)        538,223 bytes

 size, MB=   1372.000    
 size, MB=   1308.441    
   1.000000    
31 Jan 2014 1:39 #13658

Dan,

To show the effect of larger size:

   parameter (idim1=1500) 
   real, allocatable, dimension(:,:,:) :: a1

   allocate ( a1(idim1,idim1,idim1) )

   a1(1,1,1) = 1    

   print*, 'size, MB=', int8(idim1)**3*4_8/10.**6 
   print*, 'size, MB=', sizeof (a1)/2.**20 
   print*, a1(1,1,1) 
   end    

ifort /Tf exe_size_test2.f90 /free /O2 /QxHost   
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.5.344 Build 20120612

 Directory of c:\\TEMP\\Fortran\\kind

31/01/2014  12:37 PM           479,232 exe_size_test2.exe
31/01/2014  12:37 PM               273 exe_size_test2.f90
31/01/2014  12:37 PM             1,647 exe_size_test2.log
31/01/2014  12:37 PM             2,664 exe_size_test2.obj
               4 File(s)        483,816 bytes

 size, MB=   13500.00    
 size, MB=   12874.60    
   1.000000    
31 Jan 2014 9:01 #13660

Dan,

I used ifort Version 14.0.1 to compile

ifort /Tf exe_size_test2.f90 /free /O2 /QxHost Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008 Copyright (C) 1985-2013 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.

-out:exe_size_test2.exe -subsystem:console exe_size_test2.obj

Dirctory C:\ds\intel, Files exe* :

31.01.2014 09:41 541.696 exe_size_test2.exe 31.01.2014 09:22 206 exe_size_test2.f90 31.01.2014 09:41 2.036 exe_size_test2.obj 3 File(s), 543.938 Bytes

C:\ds\intel>exe_size_test2.exe size, MB= 1372.000 size, MB= 1308.441 1.000000

Moreover I used your code

   parameter (idim1=700)
   real a1(idim1,idim1,idim1)

   a1(1,1,1) = 1

   print*, 'size, MB=', idim1*idim1*idim1*4/10.**6
   print*, a1(1,1,1)
   end

saved as file exe_size_test3.f90 and compiled:

ifort /Tf exe_size_test3.f90 /free /O2 /QxHost Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008 Copyright (C) 1985-2013 Intel Corporation. All rights reserved.

Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.

-out:exe_size_test3.exe -subsystem:console exe_size_test3.obj

C:\ds\intel>dir exe_size_test3* Volume in Laufwerk C: hat keine Bezeichnung. Volumeseriennummer: A018-14FA

Directory C:\ds\intel

31.01.2014 09:56 541.184 exe_size_test3.exe 31.01.2014 09:49 166 exe_size_test3.f90 31.01.2014 09:56 1.694 exe_size_test3.obj 3 File(s), 543.044 Bytes

C:\ds\intel>exe_size_test3.exe size, MB= 1372.000 1.000000

Regards, Dietmar

Please login to reply.