Strange behavior of libgmsh.so and fortran
I have created an API for calling libgmsh inside fortran program. Things work fine. However, I have noticed a strange behavior related to fortran REWIND and BACKSPACE function. The minimum program is given below.
PROGRAM main IMPLICIT NONE OPEN( Unit=10, File="dummy.txt", status="REPLACE", action="READWRITE" ) WRITE( 10, "(A)" ) "Hello world" BACKSPACE 10 WRITE( 10, "(A)" ) "How are you" BACKSPACE 10 END PROGRAM main
When I tried to compile this program using following command,
gfortran delme.f90 /home/vikassharma/.easifem/extpkgs/lib/libgmsh.so ./a.out
I received an ERROR. After debugging I can say that this is because BACKSPACE does not work at runtime (Unattached unit no) when linked with libgmsh.so. Can you try this on your system? Do you know how to resolve this issue?
The code work just fine when compiled using following.
gfortran delme.f90 ./a.out