null character without reason in written files

unomas unomas@correo.ugr.es
Thu Oct 31 14:49:00 GMT 2013


>>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.

Ok, thanks.

>> 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.

It is the language of the C preprocessor, and I think it is always 
available in a fortran compiler.

> What is the exact command
> line that you use to compile the code.

I use a Makefile. However, for compiling it is used the code of a RNG 
in fortran 70, which was given to me by a teacher, but this hasn't any 
note about a license (I suppose that it was copied from some text book). 
Maybe the rules of the mailing lists don't allow me to post that code. I 
didn't find any well-known RNG written in fortran with a clear license 
browsing the internet.

(By the way, I had an idea. The code is implementing a look-up table of 
10000*10000 for a matrix, accessed by an integer index. Normally, only 
indexes between 1 and a not so big number are used. But occasionally 
they could be bigger. Maybe there is some kind of overflow. However, I 
would not understand why a bunch of null's appear when writting float 
values.)



More information about the Fortran mailing list