[petsc-dev] sowing memory error

Barry Smith bsmith at mcs.anl.gov
Fri Jun 19 17:14:59 CDT 2015


   Satish,

   Thanks. I'm forwarding to Bill also so he can fix in the master copy.

   Barry

> On Jun 19, 2015, at 3:48 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> Ok - valgrind gives the following message:
> 
>>>>>>>>> 
> Testing path as file /home/balay/petsc/lib/petsc/conf
> Testing file /home/balay/petsc/lib/petsc/conf/bfort-mpi.txt
> Generating F90 interface for /home/balay/petsc/src/tao/unconstrained/impls/cg/f90module.f90
> Testing path as file /home/balay/petsc/lib/petsc/conf
> Testing file /home/balay/petsc/lib/petsc/conf/bfort-base.txt
> ==13863== Syscall param stat(file_name) points to uninitialised byte(s)
> ==13863==    at 0x4F25C65: _xstat (in /usr/lib64/libc-2.21.so)
> ==13863==    by 0x408360: SYiFileExists (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x409FE4: SYReadConfigFile (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x401AAA: main (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==  Address 0x51f68f0 is 48 bytes inside a block of size 64 alloc'd
> ==13863==    at 0x4C28C10: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==13863==    by 0x409F06: SYReadConfigFile (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x401AAA: main (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863== 
> ==13863== Syscall param open(filename) points to uninitialised byte(s)
> ==13863==    at 0x4F260C0: __open_nocancel (in /usr/lib64/libc-2.21.so)
> ==13863==    by 0x4EAE264: _IO_file_fopen@@GLIBC_2.2.5 (in /usr/lib64/libc-2.21.so)
> ==13863==    by 0x4EA2603: __fopen_internal (in /usr/lib64/libc-2.21.so)
> ==13863==    by 0x409B1D: SYReadConfigFile (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x40A00C: SYReadConfigFile (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x401AAA: main (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==  Address 0x51f68f0 is 48 bytes inside a block of size 64 alloc'd
> ==13863==    at 0x4C28C10: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==13863==    by 0x409F06: SYReadConfigFile (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863==    by 0x401AAA: main (in /home/balay/soft/build/sowing-1.1.17-p1/src/bfort/bfort)
> ==13863== 
> Testing path as file /home/balay/petsc/lib/petsc/conf
> Testing file /home/balay/petsc/lib/petsc/conf/bfort-mpi.txt
> <<<<<<<
> 
> I think the following might be the fix. [bfort is valgrind clean after this change]
> 
>>>>>>>>>>>>>> 
> diff --git a/src/sys/rdconfig.c b/src/sys/rdconfig.c
> index 0763c84..3606060 100644
> --- a/src/sys/rdconfig.c
> +++ b/src/sys/rdconfig.c
> @@ -110,6 +110,7 @@ int SYReadConfigFile(const char filename[], const char sepChar,
> 		    while (*pin) {
> 			*pout++ = *pin++;
> 		    }
> +		    *pout = 0;
> 		    if (SYiFileExists(fname,'r')) {
> 			err = SYReadConfigFile(fname, sepChar, commentChar,
> 					       cmds, ncmds);
> <<<<<<<<<<<<<<
> 
> Satish
> 
> On Fri, 19 Jun 2015, Barry Smith wrote:
> 
>> 
>>  Satish,
>> 
>>   Hmm, this could be a bug in sowing, could you run a full build of PETSc fortranstubs using bfort but run bfort under valgrind?
>> 
>>   Thanks
>> 
>>   Barry
>> 
>> We had another report of the same type with a mysterious misunderstanding of a filename.
>> 
>> 
>>> On Jun 19, 2015, at 10:42 AM, Satish Balay <balay at mcs.anl.gov> wrote:
>>> 
>>> include config file /Users/markadams/Codes/petsc_fresh/lib/petsc/conf/bfort-petsc.txt^DP`¨^? missing
>>> Unable to read configure file bfort-base.txt*******
>>> 
>>> 
>>> Do you have this file? I don't know where the funny chars at the end of the filename are coming from..
>>> 
>>> Satish
>>> 
>>> On Fri, 19 Jun 2015, Mark Adams wrote:
>>> 
>>>> 
>>>> 
>> 




More information about the petsc-dev mailing list