Skip to content

Commit

Permalink
Use a 64 bit int for the position to prevent an overflow with big meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevendargaville committed May 4, 2023
1 parent e6fb0d1 commit 139bf42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions femtools/GMSH_Common.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

module gmsh_common

use, intrinsic :: iso_fortran_env, only : int64

character(len=3), parameter :: GMSHVersionStr = "2.1"
integer, parameter :: asciiFormat = 0
integer, parameter :: binaryFormat = 1
Expand Down Expand Up @@ -69,7 +71,7 @@ subroutine ascii_formatting(fd, filename, readWriteStr)
integer fd
character(len=*) :: filename, readWriteStr

integer position
integer (int64) position


inquire(fd, POS=position)
Expand Down Expand Up @@ -100,7 +102,7 @@ subroutine binary_formatting(fd, filename, readWriteStr)
integer fd
character(len=*) filename, readWriteStr

integer position
integer (int64) position


inquire(fd, POS=position)
Expand Down

0 comments on commit 139bf42

Please sign in to comment.