null character without reason in written files

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Oct 31 01:07:00 GMT 2013


On Wed, Oct 30, 2013 at 11:57:32PM +0100, unomas wrote:
> 
> > Without access to the source code and no information regarding
> > how you have investigated the issue, the reason can be the phase
> > of moon, heavy metal in the local ground water, or an evil
> > daemon.
> 
> I attached the source code. I don't know how to investigate the issue.
> 

Update to a newer compiler and compile the code with -fcheck=all.
I would also be a good idea to use -Wall and fix any warnings.


> PD: The code is under the GPLv3+ and written by me.

> ! Be aware of gfortran versions < 4.6.0 ------------
> #if __GFORTRAN__ == 1
> #define GCC_VERSION (__GNUC__ * 10000 \
> + __GNUC_MINOR__ * 100 \
> + __GNUC_PATCHLEVEL__)
> #if GCC_VERSION < 40600
> #define execute_command_line system
> #endif
> #endif
> !---------------------------------------------------
> 
> #define SUBDIR    "survival"
> #define FILE_UNIT 32
> 
> #define OTHER_SPECIE 0
> #define MAIN_SPECIE 2
> #define BOUNDARY 4
> #define LIMIT 5

This doesn't look like Fortran.  What is the exact command
line that you use to compile the code.

-- 
Steve



More information about the Fortran mailing list