<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I have a strange problem. When I compile this code:<br>
<br>
<div style="margin-left: 40px;"><span style="font-family: times new
roman,serif;">module user</span><br>
<span style="font-family: times new roman,serif;"> implicit none</span><br>
<span style="font-family: times new roman,serif;"> </span><br>
<span style="font-family: times new roman,serif;"> type user_type</span><br>
<span style="font-family: times new roman,serif;"> real ::
value</span><br>
<span style="font-family: times new roman,serif;"> integer,
dimension(30,30) :: array</span><br>
<span style="font-family: times new roman,serif;"> end type</span><br>
<span style="font-family: times new roman,serif;"></span><br>
<span style="font-family: times new roman,serif;">end module</span><br>
<span style="font-family: times new roman,serif;"></span><br>
<span style="font-family: times new roman,serif;">program test_mpi</span><br>
<span style="font-family: times new roman,serif;"> use user</span><br>
<span style="font-family: times new roman,serif;"> implicit none</span><br>
<span style="font-family: times new roman,serif;"> </span><br>
<span style="font-family: times new roman,serif;"> integer,
parameter :: num = 1e5</span><br>
<span style="font-family: times new roman,serif;"> type(user_type),
dimension(num) :: var</span><br>
<span style="font-family: times new roman,serif;"></span><br>
<span style="font-family: times new roman,serif;"> var(1)%value =
19.</span><br>
<span style="font-family: times new roman,serif;"> </span><br>
<span style="font-family: times new roman,serif;"> write(*,*)
var(1)%value</span><br>
<span style="font-family: times new roman,serif;"></span></div>
<span style="font-family: times new roman,serif;"><br>
end program</span><br>
<br>
with gfortran and run it there is no problem.<br>
Now If I compile this program with<br>
<br>
mpifort -fcoarray=lib -fopenmp testmod.f95 -lcaf_mpi<br>
<br>
and run it with <br>
<br>
mpirun -np 1 ./a.out<br>
<br>
I got an error Segmentation fault (signal 11)<br>
<br>
Now if if compile it with <br>
<br>
mpifort -fcoarray=lib testmod.f95 -lcaf_mpi<br>
<br>
everything is fine. <br>
Why is it a problem to add the option -fopenmp with this code?<br>
Doing some web searches suggests that using big static array <br>
will not work .<br>
<br>
Thanks<br>
Jan<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>