[mpich-discuss] mpi/openmp hybrid seg fault

Jeff Hammond jhammond at alcf.anl.gov
Thu Dec 22 07:26:26 CST 2011


The portable equivalent of KMP_STACKSIZE is OMP_STACKSIZE.  We have
found on Blue Gene/P that when values of this parameter are too small,
segfaults occur without an obvious indication that this is the
problem.  I assume this is not a platform-specific problem.

The Intel Fortran compiler puts all static arrays on the stack by
default.  You can change this.  See
http://software.intel.com/en-us/articles/intel-fortran-compiler-increased-stack-usage-of-80-or-higher-compilers-causes-segmentation-fault/
for details, but I recommend you use "-heap-arrays".  GNU Fortran
(gfortran) does not have this problem, so recompiling with it is a
fast way to determine if stack allocation - independent of OpenMP - is
the problem.

Jeff

On Thu, Dec 22, 2011 at 1:22 AM, Anthony Chan <chan at mcs.anl.gov> wrote:
>
>
> ----- Original Message -----
>
>> The fact that I need this to work for the much larger problem is why
>> simply
>> changing static arrays to dynamic equivalents is not a viable solution
>> unfortunately.
>
> I didn't check your program, but based on your description of problem,
> you may want to increase the stack size of your threaded program.
> Try setting "ulimit -s" and "KMP_STACKSIZE" to what your program's
> need.  See ifort's manpage on KMP_STACKSIZE's definition.
>
> A.Chan
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki-old.alcf.anl.gov/index.php/User:Jhammond


More information about the mpich-discuss mailing list