https://bugs.kde.org/show_bug.cgi?id=367718

            Bug ID: 367718
           Summary: a part of the code causes a segfault in fortran 90
                    gfortran
           Product: valgrind
           Version: 3.8.0
          Platform: RedHat RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: be...@subatech.in2p3.fr

In a big iterative program, a segfault happens at a precise iteration (not the
first and not the last) with the addition of a subroutine (which also calls
several subroutines). The debugger points to the declarations of variables of
my subroutines and not to a calculation line or another.
I have had this error (in other conditions) by turning only those subroutines.
So the problem seems localized in there.
I debugged the program on a single iteration with valgrind and gdb and no
problem is appeared. The trouble happens on the run of the calculation.

Reproducible: Always


Actual Results:  
nansl2.in2p3.fr>./dyn
==============================

Looking for an available compiler:
gfortran is available

Compilation in progress using gfortran
with the options -std=legacy -ffixed-line-length-none -O0 -funroll-loops
-Wuninitialized -O -g -fbacktrace
source_dywan1.21/utilities/f06pfft.f: In function ‘master.0.f06pff’:
source_dywan1.21/utilities/f06pfft.f:111: attention : ‘kx’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06pfft.f:111: note: ‘kx’ was declared here
source_dywan1.21/utilities/f06pfft.f:111: attention : ‘ind1’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06pfft.f:111: note: ‘ind1’ was declared here
source_dywan1.21/utilities/f06pfft.f:111: attention : ‘ind2’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06pfft.f:111: note: ‘ind2’ was declared here
source_dywan1.21/utilities/f06prft.f: In function ‘master.0.f06prf’:
source_dywan1.21/utilities/f06prft.f:105: attention : ‘jx’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06prft.f:105: note: ‘jx’ was declared here
source_dywan1.21/utilities/f06prft.f:105: attention : ‘jy’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06prft.f:105: note: ‘jy’ was declared here
source_dywan1.21/utilities/f06prft.f:105: attention : ‘kx’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06prft.f:105: note: ‘kx’ was declared here
source_dywan1.21/utilities/f06prft.f:105: attention : ‘ky’ may be used
uninitialized in this function
source_dywan1.21/utilities/f06prft.f:105: note: ‘ky’ was declared here
source_dywan1.21/utilities/f08afft.f: In function ‘master.0.f08aff’:
source_dywan1.21/utilities/f08afft.f:71: attention : ‘ki’ may be used
uninitialized in this function
source_dywan1.21/utilities/f08afft.f:71: note: ‘ki’ was declared here
source_dywan1.21/utilities/g03ecwt.f: In function ‘g03ecw’:
source_dywan1.21/utilities/g03ecwt.f:1: attention : ‘__result_g03ecw’ may be
used uninitialized in this function
source_dywan1.21/utilities/g03ecxt.f: In function ‘g03ecx’:
source_dywan1.21/utilities/g03ecxt.f:15: attention : ‘l’ may be used
uninitialized in this function
source_dywan1.21/utilities/g03ehft.f: In function ‘g03ehf’:
source_dywan1.21/utilities/g03ehft.f:20: attention : ‘iend’ may be used
uninitialized in this function
------------------------------
COMPILATION ENDED SUCCESSFULLY
------------------------------

ATTENTION (this is a reminder, not a warning): 
A file from nuclei_temp/*.edp should have been copied into nuclei

Removing old files
Saving previous output
Activating animation scripts
Execution of run

==8141== Memcheck, a memory error detector
==8141== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==8141== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==8141== Command: ./run
==8141== 
 Identificateur Donnees/Resultats : out/Ar36Ni58E25B2S015_t.edp                 

 Reaction:
 ( 18, 18)+( 30, 28) at  95.00AMeV, b= 0.10fm

--- INPUT parameters from input file

    number of nuclei......................................[INT]           2
    N,Z projectile........................................[INT]          18, 
18
    N Z target............................................[INT]          30, 
28
    incident energy per nucleon (MeV)....................[REAL]       95.00
    b impact.parameter(fm) fixed to......................[REAL]        0.10
    initial distance between ions (fm)...................[REAL]       35.00
    option rotation of initial states.....................[INT]           3
    Skyrme coefficient t0..................................[REAL]    -3273.56
    Skyrme coefficient t3..................................[REAL]    21289.94
    Skyrme coefficient x0..................................[REAL]       -0.50
    Skyrme coefficient x3..................................[REAL]       -0.50
    Skyrme coefficient sigma...............................[REAL]        0.17
    option residual interaction .........................[REAL]        0.50
    random seed initialisation............................[INT]        7613
    Initial time for the calculation (fm/c)..............[REAL]        0.00
    Stopping time for the calculation (fm/c).............[REAL]      130.00
    Time interval between 2 integration iterations (fm/c)[REAL]        1.00
    Time interval between 2 collision calculations (fm/c).[INT]           1
    Time interval between 2 printouts (fm/c)..............[INT]           5
    - comment1:                                                                 
    - comment2:                                                                 
    - comment3:                                                                 
    - comment4:                                                                 
    - comment5:                                                                 
    - comment6:                                                                 
    - comment7:                                                                 
    - comment8:                                                                 
    - comment9:                                                                 
    - comment10:                                                                

--- INPUT files

    input projectile
file..............................[STRING]nuclei/nucleus_Z18_N18.edp            
    input target
file..................................[STRING]nuclei/nucleus_Z28_N30.edp        

--- Initialization of RANDOM numbers

    e.g.: RNDM() =  0.3535

--- Initial configuration

    Impact parameter fixed, b =    0.10[fm]
    Rotation (deg. around z,y) applied to the PROJECTILE initial state :     
0.000     0.000
    Rotation (deg. around z,y) applied to the TARGET     initial state :     
0.000     0.000
    Initial configuration dumped in file out/Ar36Ni58E25B2S015_t.init           

        t Natt Neff      Zcm1      Xcm1      Zcm2     Xcm12
 ----------------------------------------------------------
      1.0     0     0     0.062   -21.041    -0.038    13.060
      2.0     0     0     0.062   -20.764    -0.039    12.888
      3.0     0     0     0.062   -20.486    -0.039    12.716
      4.0     0     0     0.062   -20.209    -0.039    12.544
      5.0     0     0     0.062   -19.932    -0.039    12.371
      6.0     0     0     0.062   -19.654    -0.039    12.199
      7.0     0     0     0.062   -19.377    -0.039    12.027
      8.0     0     0     0.063   -19.100    -0.039    11.855
      9.0     0     0     0.063   -18.823    -0.039    11.683
     10.0     0     0     0.063   -18.545    -0.039    11.511
     11.0     0     0     0.063   -18.268    -0.040    11.339
     12.0     0     0     0.063   -17.991    -0.040    11.167
     13.0     0     0     0.063   -17.714    -0.040    10.995
     14.0     0     0     0.064   -17.436    -0.040    10.823
     15.0     0     0     0.064   -17.159    -0.040    10.651
     16.0     0     0     0.064   -16.882    -0.040    10.479
     17.0     0     0     0.064   -16.604    -0.040    10.307
     18.0     0     0     0.064   -16.327    -0.041    10.135
     19.0     0     0     0.064   -16.050    -0.041     9.963
     20.0     0     0     0.064   -15.773    -0.041     9.791
     21.0     0     0     0.064   -15.496    -0.040     9.619
     22.0     0     0     0.064   -15.218    -0.040     9.446
     23.0     0     0     0.064   -14.941    -0.040     9.274
     24.0     0     0     0.064   -14.664    -0.040     9.102
     25.0     0     0     0.065   -14.387    -0.040     8.930
     26.0     0     0     0.065   -14.109    -0.040     8.758
     27.0     0     0     0.065   -13.832    -0.040     8.586
     28.0     0     0     0.065   -13.555    -0.041     8.414
     29.0     0     0     0.065   -13.278    -0.041     8.242
     30.0     0     0     0.065   -13.000    -0.041     8.070
     31.0     0     0     0.065   -12.723    -0.041     7.898
     32.0     0     0     0.066   -12.446    -0.041     7.726
     33.0     0     0     0.066   -12.169    -0.042     7.554
     34.0     0     0     0.066   -11.892    -0.042     7.382
     35.0     0     0     0.067   -11.615    -0.043     7.210
     36.0     0     0     0.067   -11.337    -0.043     7.038
     37.0     0     0     0.068   -11.060    -0.044     6.866
     38.0     0     0     0.068   -10.783    -0.044     6.694
     39.0     0     0     0.069   -10.506    -0.045     6.522
     40.0     0     0     0.070   -10.229    -0.045     6.350
     41.0     0     0     0.070    -9.951    -0.046     6.178
     42.0     0     0     0.071    -9.674    -0.047     6.005
     43.0     0     0     0.071    -9.397    -0.047     5.833
     44.0     0     0     0.072    -9.119    -0.048     5.661
     45.0     0     0     0.073    -8.842    -0.049     5.489
     46.0     0     0     0.073    -8.564    -0.049     5.316
     47.0     0     0     0.074    -8.286    -0.050     5.144
     48.0     0     0     0.074    -8.007    -0.050     4.971
     49.0     0     0     0.075    -7.729    -0.051     4.798
     50.0     0     0     0.075    -7.450    -0.052     4.625
     51.0     0     0     0.076    -7.170    -0.052     4.451
     52.0     0     0     0.076    -6.890    -0.053     4.277
     53.0     0     0     0.076    -6.609    -0.053     4.103
     54.0     0     0     0.077    -6.327    -0.053     3.928
     55.0     0     0     0.077    -6.043    -0.054     3.753
     56.0     0     0     0.077    -5.759    -0.054     3.577
     57.0    31    11     0.077    -5.473    -0.054     3.400
     58.0    30    10     0.077    -5.186    -0.054     3.222
     59.0    23     4     0.075    -4.897    -0.054     3.043
     60.0    72     7     0.072    -4.607    -0.054     2.863
     61.0    60     9     0.067    -4.318    -0.054     2.683
     62.0    48     7     0.060    -4.031    -0.053     2.505
     63.0    85    12     0.051    -3.746    -0.052     2.326
     64.0    35    13     0.045    -3.464    -0.050     2.146
     65.0    33    13     0.042    -3.186    -0.049     1.967
     66.0    49    19     0.038    -2.911    -0.049     1.790
     67.0    67    30     0.029    -2.643    -0.047     1.615
     68.0    65    32     0.017    -2.391    -0.044     1.445
     69.0    46    30     0.012    -2.153    -0.043     1.281
     70.0    73    40     0.012    -1.921    -0.044     1.120
     71.0   108    43     0.007    -1.700    -0.043     0.967
     72.0    95    45    -0.003    -1.491    -0.041     0.825
     73.0    85    49    -0.012    -1.290    -0.040     0.690
     74.0    86    47    -0.018    -1.100    -0.042     0.565
     75.0   107    56    -0.023    -0.920    -0.045     0.447
     76.0   107    61    -0.028    -0.749    -0.051     0.330
     77.0   106    67    -0.033    -0.590    -0.057     0.213
     78.0   120    75    -0.035    -0.445    -0.062     0.102
     79.0   122    71    -0.037    -0.317    -0.065     0.001
     80.0   104    76    -0.034    -0.210    -0.067    -0.096
     81.0   112    75    -0.027    -0.122    -0.070    -0.188
     82.0   109    73    -0.019    -0.047    -0.075    -0.278
     83.0   119    75    -0.014     0.019    -0.081    -0.358
     84.0   110    65    -0.012     0.080    -0.086    -0.430
     85.0    87    56    -0.007     0.138    -0.094    -0.500
     86.0    92    62     0.002     0.189    -0.108    -0.566
     87.0    76    58     0.010     0.240    -0.122    -0.628
     88.0    54    48     0.012     0.293    -0.133    -0.688
     89.0    46    34     0.012     0.345    -0.142    -0.745
     90.0    47    37     0.010     0.396    -0.147    -0.798
     91.0    40    35     0.008     0.448    -0.149    -0.848
     92.0    39    29     0.006     0.495    -0.149    -0.895
     93.0    38    35     0.005     0.540    -0.152    -0.938
     94.0    31    25     0.010     0.585    -0.157    -0.984
     95.0    38    26     0.017     0.630    -0.161    -1.029
     96.0    32    22     0.022     0.671    -0.166    -1.071
     97.0    27    22     0.022     0.708    -0.170    -1.111
     98.0    20    13     0.021     0.744    -0.173    -1.148
     99.0    20    14     0.019     0.783    -0.175    -1.186
    100.0    15     9     0.019     0.821    -0.179    -1.225
    101.0     8     8     0.019     0.858    -0.182    -1.262
    102.0    14    11     0.019     0.895    -0.184    -1.297
    103.0    13     9     0.018     0.931    -0.186    -1.331
    104.0     7     7     0.018     0.967    -0.187    -1.365
==8141== Invalid read of size 8
==8141==    at 0x4661DB: select_ (select.f:548)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9e43d78 is 648 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x455DC0: percolationalpha_ (percolationalpha.f:7)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x4661F0: select_ (select.f:548)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9e43d78 is 648 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x455DC0: percolationalpha_ (percolationalpha.f:7)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x46620D: select_ (select.f:549)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x98088a8 is 200 bytes inside a block of size 380 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457EDD: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x466222: select_ (select.f:549)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x98088a8 is 200 bytes inside a block of size 380 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457EDD: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x46623F: select_ (select.f:550)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x999cee8 is 232 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457E65: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x466254: select_ (select.f:550)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x999cee8 is 232 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457E65: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x466271: select_ (select.f:551)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x961d248 is 488 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457EC5: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x466286: select_ (select.f:551)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x961d248 is 488 bytes inside a block of size 760 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x457EC5: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x4662A3: select_ (select.f:552)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9ad2318 is not stack'd, malloc'd or (recently) free'd
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x4662B8: select_ (select.f:552)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9ad2318 is not stack'd, malloc'd or (recently) free'd
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x4662D5: select_ (select.f:553)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9ca1ed8 is 8 bytes before a block of size 380 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x455E68: percolationalpha_ (percolationalpha.f:7)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x4662E9: select_ (select.f:553)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x9ca1ed8 is 8 bytes before a block of size 380 free'd
==8141==    at 0x4A063F0: free (vg_replace_malloc.c:446)
==8141==    by 0x455E68: percolationalpha_ (percolationalpha.f:7)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141== 
==8141== Invalid read of size 8
==8141==    at 0x466312: select_ (select.f:554)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x4d182e8 is not stack'd, malloc'd or (recently) free'd
==8141== 
==8141== Invalid write of size 8
==8141==    at 0x466318: select_ (select.f:554)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)
==8141==  Address 0x4d182e8 is not stack'd, malloc'd or (recently) free'd
==8141== 
--8141-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) -
exiting
--8141-- si_code=80;  Faulting address: 0x0;  sp: 0x4088a1d60

valgrind: the 'impossible' happened:
   Killed by fatal signal
==8141==    at 0x3803DF50: unlinkBlock (m_mallocfree.c:291)
==8141==    by 0x3803E9A3: vgPlain_arena_free (m_mallocfree.c:1841)
==8141==    by 0x38003667: create_MC_Chunk (mc_malloc_wrappers.c:165)
==8141==    by 0x38003BE0: vgMemCheck_new_block (mc_malloc_wrappers.c:283)
==8141==    by 0x3800409A: vgMemCheck_malloc (mc_malloc_wrappers.c:301)
==8141==    by 0x3807A58A: vgPlain_scheduler (scheduler.c:1665)
==8141==    by 0x380A5A19: run_a_thread_NORETURN (syswrap-linux.c:103)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==8141==    at 0x4A069EE: malloc (vg_replace_malloc.c:270)
==8141==    by 0x4560DE: percolationleger_ (percolationleger.f:8)
==8141==    by 0x455D60: percolationalpha_ (percolationalpha.f:401)
==8141==    by 0x4598DB: percolation_ (percolation.f:302)
==8141==    by 0x404A08: cluster1_ (cluster1.f:84)
==8141==    by 0x4660B7: select_ (select.f:478)
==8141==    by 0x403746: analyse_ (analyse.f:344)
==8141==    by 0x44A17C: integration1_ (integration1.f:1157)
==8141==    by 0x40F87C: dyngcs_ (dyngcs.f:318)
==8141==    by 0x410CA3: MAIN__ (dywan.f:108)
==8141==    by 0x401209: main (in
/scratch/theoric/besse/SIMULATIONS_EN_COURS/QLOB/run)


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

Expected Results:  
300 iterations done

Compile with gfortran
gcc 4.4.7
Error happend on my computer AND on the calculation farm of my laboratory.
valgrind only available on the calculation farm
The calculation is very long and heavy. It is a physical simulation program as
part of my PhD-thesis.
Normal compilation option : 
-std=legacy  -ffixed-line-length-none -O2 -funroll-loops -lgfortran -lm -O2

Debug compilation option : 
-std=legacy  -ffixed-line-length-none -O0 -funroll-loops -Wuninitialized -O -g
-fbacktrace -lgfortran -fbounds-check -lm -O0 -g

Valgrind option : 
--tool=memcheck --track-origins=yes

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to