I am trying to run a Fortran program that exercises some of my computational
kernels.  The program does not use MPI, just OpenMP.  I have compiled
it for a small case and that runs fine and gives the correct results.
However when I recompile it for a realistic cases (the same source
is used, only a bunch of parameter statements are different), it
segfaults at line 13 of the main program:

[knl00 tests] ../mc/x.testwf.12c-11_states-pn  c12_11states-pn.in
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source            
libintlc.so.5      00007F569D060C05  Unknown               Unknown  Unknown
libintlc.so.5      00007F569D05E827  Unknown               Unknown  Unknown
libifcoremt.so.5   00007F569DEE1962  Unknown               Unknown  Unknown
libifcoremt.so.5   00007F569DEE17B6  Unknown               Unknown  Unknown
libifcoremt.so.5   00007F569DE36CAD  Unknown               Unknown  Unknown
libifcoremt.so.5   00007F569DE48FAD  Unknown               Unknown  Unknown
libpthread.so.0    00007F569F2D7100  Unknown               Unknown  Unknown
x.testwf.12c-11_s  00000000004030F0  MAIN__                     13  testwf.f
x.testwf.12c-11_s  0000000000402C0E  Unknown               Unknown  Unknown
libc.so.6          00007F569CAA3B15  Unknown               Unknown  Unknown
x.testwf.12c-11_s  0000000000402B19  Unknown               Unknown  Unknown
Aborted (core dumped)
[knl00 tests]


Line 13 is the very beginning of declarations, not an executable statement.
It is the first non-comment line and is:

      use random2

random2 is a module that defines some subroutines.  It is not changed
by the parameter statements that are different for the working and failing
cases.

Here are the working and failing executable sizes:

   text       data        bss        dec        hex    filename
2459352     124772    24979752    27563876    1a49764    x.testwf.4he-pn
2192689      92004    623277384    625562077    254951dd    x.testwf.12c-11_states-pn

Here is how the main program is compiled and module linked:

ifort -Imods.libgen -FR -g -O0 -qopenmp -lpthread -qopenmp-report -r8  -WB -traceback -fpe3 -I../common/ -I../mc/ -fpp  -DSPIN_SUF= -DPARAMNUC=nclude/paramnuc.12c-11_states-pn -DM0_DIV=1 -DDOCASE=0 -DPARAMCASE=nclude/paramcase.12c-11_states-pn -c -g testwf.f

ifort -g -mcmodel=medium -traceback  -fpe3  -qopenmp -lpthread -qopenmp-report   -o x.testwf.12c-11_states-pn testwf.o do_adlb_no.o dmem_fake.o adlb_fake.o \
         ../common/wall_second-nompi.o ../common/stopnompi.o ../common/mpi_wtime_fake.o  -L . -l12c-11_states-pn -lgen -l12c-11_states-pn -L ../common/ -lcomgen  enable_abort_fake.o   -lsvml

[knl00 mc] which ifort
/soft/compilers/intel/bin/ifort


This is in ~b21541/gfmc/mc  .

This test case runs fine on blues.

Any suggestions will be gratefully received.

Steve
-- 
Steven C. Pieper, Senior Physicist SO:  spieper@anl.gov 
Argonne National Laboratory, Physics Division, Bldg. 203, Argonne, IL 60439
Phone:  630-252-4232         Fax -6008
Secretary, Debra Beres, -4100