forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Latest Builds Availability?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Oct 20, 2017 11:21 am    Post subject: Latest Builds Availability? Reply with quote

Any new builds of 64 bit FTN95 any time soon?
Getting access violation crash compiling code

"The instruction at address 100644d9 attempted to write to location 00000000".

Noticed location 00000000 ? Scary.
A lot of such errors were in earliest versions.
Still happens.

What a true devilry situation:
1) when compiling code in 32bits, the modules, the main and graphics subroutines compile OK but when run the code the OpenGL graphics does not work complaining about some buffers which by unknown reason are not open. Since OpenGL is not a Fortran, though it is adopted by FTN95 to use with Fortran, how to proceed to find the error? No solution /check /debug do not give a clue.Total stop.

2) Compiling the same code with /check in 64bit mode crashes the compilation with the Access Violation at the beginning of the main module somewhere on lines ~3000. In older FTN77 i'd cut the file into smaller files with smaller amount of subroutines but here is a module which works like a black hole sucking with time each and every subroutine and function. How to cut the module into small modules and compile them separately? Will be a total mess. Total stop too.

3) Little bit older versions of the same fortran sources work OK. But what the differences are - the new stuff - was added and placed at the far end of the module at the lines 12000. How come this causes 64bit FTN95 compiler to crash too early?

4) 64bit compilation with /nocheck also works (32bit one still fails at OpenGL) but allows to debug only gradfather's way, 100x slower, via Print*


Last edited by DanRRight on Fri Oct 20, 2017 8:22 pm; edited 5 times in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Fri Oct 20, 2017 11:27 am    Post subject: Reply with quote

It won't be long now before the next release. Hopefully things will be better for you but porting to 64 bits normally raises issues in your code of one kind or another.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sat Oct 21, 2017 11:15 am    Post subject: Reply with quote

Woke today up and found that OpenGL does not work now with any of my programs and any FTN95 latest versions, 32 or 64. Usual simulations also give me strange results last days.

Can anyone confirm that nothing happened during these two days with their OpenGL? Microsoft automatic updates for example may change something. I did not change anything in my computer but i rebooted it these days (and possibly all my PCs were infected couple times this summer and behaved very irrationally. I cleaned them but who now can guarantee anything when using JavaScript became unavoidable norm).
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Oct 22, 2017 1:53 am    Post subject: Reply with quote

Here on two pages is the OpenGL test. Compile as usual: FTN95 Progr.f95 /link. Also could be a splash screen
Code:
       program Splash
      include <clearwin.ins>,nolist
      include <opengl.ins>,nolist

      double precision spin
      integer i,window
      integer opengl_proc
      external opengl_proc
      i=winio@('%es%ca[Rotating Slab]&')
      i=winio@('%fn[Arial]%ts&',3.0d0)
      i=winio@('%bf&')
      i=winio@('%sp%ww[no_border]%pv%^og[double,depth16]%lw',0,0,1050,750,opengl_proc,window)

      spin=270. ! 0d0
      while(window .LT. 0)do
        call spinDisplay(spin)
   if(spin.ge.360.d0) goto 1000
      endwhile
1000   continue
      end program
!.......................................................

      subroutine spinDisplay(spin)
      include <opengl.ins>,nolist
      include <clearwin.ins>,nolist

      double precision spin
      logical do_draw
      common /animate_com/ do_draw

      if (do_draw)then
        call glClear (OR(GL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT))
        call glMatrixMode (GL_MODELVIEW)
        call glLoadIdentity()
        call glTranslated(0d0,0d0,-10d0)
        call glRotated(spin,1d0,0d0,0d0)
        call glCallList(101)
        call swap_opengl_buffers()
        spin=spin+3d0
!   if(spin.ge.360.d0) goto 1000
!      call sleep@(0.5)

      endif
1000      call temporary_yield@()
      end
!.......................................................
      subroutine spinSlab()
      logical do_draw
      common /animate_com/ do_draw
      data do_draw/.TRUE./
      do_draw=.TRUE.
      end
!.......................................................
      subroutine stopSlab()
      logical do_draw
      common /animate_com/ do_draw
      do_draw=.FALSE.
      end
!.......................................................
      subroutine assemble_list
      include <clearwin.ins>,nolist
      include <opengl.ins>,nolist


      real*4 white_colour(4), grey_colour(4), dark_grey_colour(4)
      real*4 red_colour(4), yellow_colour(4), green_colour(4)
      real*4 blue_colour(4), purple_colour(4), cyan_colour(4)
      real*8 dimension,scale,d,fd,front,back
      integer flags,k
      integer hdc
      logical ok
      external opengl_proc
      data white_colour/1.0,1.0,1.0,1.0/
      data grey_colour/0.5,0.5,0.5,1.0/
      data dark_grey_colour/0.3,0.3,0.3,1.0/
      data red_colour/1.0,0.0,0.0,1.0/
      data yellow_colour/1.0,1.0,0.0,1.0/
      data green_colour/0.0,1.0,0.0,1.0/
      data blue_colour/0.0,0.0,1.0,1.0/
      data purple_colour/1.0,0.0,1.0,1.0/
      data cyan_colour/0.0,1.0,1.0,1.0/
      data front,back/-0.01d0,-0.5d0/


      call glEnable(GL_DEPTH_TEST)
      hDC=clearwin_info@('OPENGL_DEVICE_CONTEXT')
      call glColor3f(1.0,1.0,0.0)
   ibase = glGenLists(96)   

! Storage For 96 Characters
!   ifont =CreateFont (-122,            ! Height Of Font
!     *            0,               ! Width Of Font
!     *            0,               ! Angle Of Escapement
!     *            0,               ! Orientation Angle
!     *            FW_BOLD,            ! Font Weight
!     *            .TRUE.,            ! Italic
!     *            .FALSE.,            ! Underline
!     *            .FALSE.,            ! Strikeout
!     *            ANSI_CHARSET,         ! Character Set Identifier
!     *            OUT_TT_PRECIS,         ! Output Precision
!     *            CLIP_DEFAULT_PRECIS,         ! Clipping Precision
!     *            ANTIALIASED_QUALITY,          ! Output Quality
!     *            or(FF_DONTCARE,DEFAULT_PITCH),   ! Family And Pitch
!     *            'Comic Sans MS' )   
!     &            ior(FF_DONTCARE,DEFAULT_PITCH),   ! Family And Pitch
!


Last edited by DanRRight on Sun Oct 22, 2017 5:59 am; edited 4 times in total
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Sun Oct 22, 2017 1:56 am    Post subject: Reply with quote

Code:
!   ignor = SelectObject(hDC, ifont)                  ! Selects The Font We Want
!        call glColor3f(1.0,1.0,0.0)

        ok=wglUseFontOutlines(hDC, 0, 255, 1000, 0.0, 0.1, WGL_FONT_POLYGONS,core4(0))
     


      call glMatrixMode (GL_MODELVIEW)
      call glLoadIdentity()
      call glTranslated(0d0,0d0,-10d0)

!...  Clear the color and depth buffers.

      call glClear (OR(GL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT))
      dimension=2.2d0
      scale=dimension*0.9d0
      call glDisable(GL_LIGHTING)

      call glNewList(101,GL_COMPILE)
 
      call glColor3fv(red_colour)
      call glListBase (1000)
      call glTranslated(-3.d0,scale*0.0,0.2d0)
      call glScaled(1.5d0,1.5d0,1.5d0)
      call glCallLists (9, GL_UNSIGNED_BYTE, 'Clearwin+')
      call glEndList()


      END
!.......................................................
      subroutine myinit()
      call assemble_list()
      end
!.......................................................
      subroutine myreshape(w,h)
      include <opengl.ins>,nolist
      integer w
      integer h
      double precision aspect_ratio
                     
      if(h.NE.0)then
        aspect_ratio=dble(w)/h

        call glMatrixMode (GL_PROJECTION)
        call glLoadIdentity ()
        call gluPerspective (30.0d0,aspect_ratio,1d0,15d0)
        call glViewport(0,0,w,h)
      endif

      end
!.......................................................
      integer function opengl_proc()
      include <clearwin.ins>,nolist
      include <opengl.ins>,nolist
      integer w,h
      character*256 reason
      reason=clearwin_string@('CALL_BACK_REASON')
     
      if(reason.EQ.'SETUP')then
        call myinit()
      else if(reason.EQ.'RESIZE')then
        w=clearwin_info@('OPENGL_WIDTH')
        h=clearwin_info@('OPENGL_DEPTH')
        call myreshape(w,h)
      else if(reason.EQ.'MOUSE_LEFT_CLICK')then
        call spinSlab()
      else if(reason.EQ.'MOUSE_RIGHT_CLICK')then
        call stopSlab()
      endif
      opengl_proc=2
      end
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2551
Location: Sydney

PostPosted: Mon Oct 23, 2017 12:08 am    Post subject: Reply with quote

Hi Dan,

The program ran for me. Check your path ?

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Mon Oct 23, 2017 12:04 pm    Post subject: Reply with quote

Thanks, John,
All paths are OK, codes compiled with FTN95 now work (one letter was deleted somehow which caused other problems. Found it by painful comparison with older versions. Side-by-side comparison is very good at Total Commander. Which comparison tool do you use?) except OpenGL.

I remember some strange NVIDIA Registry keys were quarantined by Antivirus software recently claiming they are not safe. Hell knows how to turn such stuff back besides reinstallation of NVIDIA drivers.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Oct 24, 2017 6:35 am    Post subject: Reply with quote

All fixed by itself.
Devilry.

UPDATE
Damn, no it didn't fully fixed. Lost two weeks by missing one single character in large code I do not know how. And losing now more time on some drivers conflicts. Anyone had any problems with OpenGL before? I did not in 20 years.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2551
Location: Sydney

PostPosted: Tue Oct 24, 2017 8:43 am    Post subject: Reply with quote

Dan wrote:
one letter was deleted somehow which caused other problems
This is the perfect job for /Implicit_None !!
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Oct 24, 2017 9:01 am    Post subject: Reply with quote

You probably remember that Paul implemented last year this functionality in compiler switches. If some variable is used but not defined this becomes an error even before the run at compilation time (kind of like an /undef but even better). The devils surprise to me was that it somehow did not work in my case. Trying to get why.

We already discussed few times that implicit none may lead to the errors you will not find in 1000 years when you think the variable looks like integer with its starting ijklmn (many are already indoctrinated with this forever) but it is actually real.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Oct 24, 2017 10:52 am    Post subject: Reply with quote

Dan,

Is that '... lead {you} to {find} errors you will not find {otherwise} ...' - which is the meaning that devotees of IMPLICIT NONE would say, or is it exactly as written? (in which case I would agree).

Incidentally, I just got a black window when I ran your code, but not a problem as I haven't ever used OpenGL. I've got an nVidia card.

Eddie
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Tue Oct 24, 2017 8:28 pm    Post subject: Reply with quote

Eddie, I decided not to use implicit none after several tries over few decades thanks to the new compilation option now available.

This decision has to be made ones and never change the mind. Otherwise there will be a mess if you gather two approaches in one large code. The compiler switch I was talking about worked fine before by doing the job of implicit none for catching static bugs but not making complete freedom and anarchy inside the Fortran sources so i'm using it now with all my codes. How it missed my error I still did not investigate, because run out of time.

As to opengl test, have you ran it before and it worked ok and only today failed?
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Oct 25, 2017 9:24 am    Post subject: Reply with quote

Hi Dan,

No, only ran it when I saw your post.

Regards

Eddie
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Oct 26, 2017 6:58 am    Post subject: Reply with quote

Eddie,
Hopefully the problem is solved after getting from the NVIDIA site its latest driver.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group