[CIG-SEISMO] SPECFEM2D multicore output questions

Steve Smith stesmith at mines.edu
Thu Apr 2 23:22:32 PDT 2009


Hello,

I've been using SPECFEM2D as a "primer" for SPECFEM3D.

I have three questions about multicore MPICH2 use/output.



---- COMPUTER / MPICH / SPECFEM SPECIFICS ------

I am trying to verify the functionality of the default SPECFEM2D model  
M2_UPPA on both cores of a dual core CPU.

The machine is an intel dual core Macbook Pro used for code  
development and data analysis.

I run MPICH2 available from http://www.mcs.anl.gov/research/projects/mpich2/

I use gfortran and gcc for MPICH2 and SPECFEM2D/3D

For SPECFEM2D, I start my MPI deamon, I set "nproc=2" in the Par_file,  
and call SPECFEM2D with the following syntax:

wl-dhcp142-62:SPECFEM2D-5.2.2 smithsh$ rm -rf ./OUTPUT_FILES/*;./ 
xmeshfem2D; mpirun -machinefile hosts -n 2 ./xspecfem2D

where the host file ("hosts") is one line with the name shown at the  
prompt, followed by ":2" to indicate the number of cores. This was  
recommended by Scott Atchley from the MPICH mailing list :

wl-dhcp142-62.Mines.EDU:2

If using a dynamic IP I always check the host name and adjust the host  
file accordingly. When offline it is simply "Macintosh-3."

Although the syntax shown seems okay on my Linux MPICH2 multicore  
desktop, it fails on the Mac in question. I have tried variations of  
this file on the Mac, using the hostname twice for two processes -  
like I would for individual nodes on my Linux cluster. I've also tried  
a single line host name *without* the  ":2" nodes designator. Both of  
these solutions allow MPICH2 to run two processes on the Mac.



Getting to the problem: I think both MPI processes - when they run -  
are operating on the same part of the model.

	---QUESTIONS---


QUESTION 1: Has anyone else had a problem with multicore host files?  
Can anyone comment on mine, or the changes I've made?



QUESTION 2: On my dual-core Mac (intel) MPICH2 and SPECFEM2D only run  
part of the total M2_UPPA demonstration mesh when both cores are used  
(bottom half). When one core is used (mpirun -n=1 OR serial) the full  
model is run.

This does not happen on my other machines - but I cannot identify the  
problem. I am concerned that this problem may yet occur on my other  
machines for other models.

When I execute a 2 process MPI run of SPECFEM2D, the output graphics  
(PS and GIF) show that only the lower half of the MP2_UPPA model has  
been run. The receivers are suspended in air, and halfway up the model  
there is a free surface boundary condition. When the program is run in  
serial the full model is there.

I've included two GIF files  from the SPECFEM2D output using 1 and 2  
MPICH processes to demonstrate this. Vector postscripts are too large  
to send.

  Do you think both cores are running the same part of the model?

Has anyone had experience with this? Can anyone speculate about the  
cause? Does anyone have any recommendations?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image0000500-1process.gif
Type: image/gif
Size: 39516 bytes
Desc: not available
Url : http://geodynamics.org/pipermail/cig-seismo/attachments/20090403/0f04b8c8/attachment-0002.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image0000500_2processes.gif
Type: image/gif
Size: 12511 bytes
Desc: not available
Url : http://geodynamics.org/pipermail/cig-seismo/attachments/20090403/0f04b8c8/attachment-0003.gif 
-------------- next part --------------



QUESTION 3: SPECFEM2D outputs GIF files of the waves. From what I  
gather these are built by using the "Imagemagik" CONVERT program on  
the output PNM files. I have this program on all my machines (in the  
path). GIFs are generated on the Mac, but not Linux x86 and  
x86_platforms. All machines generate PNM files (~3.3 MB each).

Linux builds use GCC and Intel FORTRAN

Linux command line use of CONVERT generates errors reading "convert:  
Negative or zero image size 'image000000N.pnm'" <newline> convert:  
missing an image filename 'image000000N.gif'"

Has anyone else had a similar problem generating GIF output on a Linux  
machine?



I apologize if these are stupid or easy questions. I have not been  
able to find solutions, and am concerned these issues may crop up on  
other builds, or when I use SPECFEM3D. I appreciate any assistance or  
suggestions.

Sincerely,

-Steve Smith
Geophysics Grad Student
Colorado School of Mines



More information about the CIG-SEISMO mailing list