123 | | Note especially the differences in the Windows mpiexec call versus the Linux/Mac - this is required due to the Windows CreateProcess calling directory feature not working for MPI (fortunately mpiexec allows a working directory flag as shown). |
| 123 | Note especially the differences in the Windows mpiexec call versus the Linux/Mac. This is required due to the Windows CreateProcess calling directory feature not working for MPI (fortunately mpiexec allows a working directory flag as shown). |
| 124 | |
| 125 | == Example MPI Application - SPECFEM3D == |
| 126 | |
| 127 | As a test application, the seismic wave propagation software SPECFEM3D (http://www.geodynamics.org/cig/software/specfem3d) has been compiled to work with BOINC as an MPI wrapper application. There is a demonstration BOINC project at http://qcn.stanford.edu/mpitest with applications for the Linux and the Mac. The applications are a 5 part job (you can inspect the workunit after attaching to the project) consisting of generating a mesh, database, and running the simulation. |
| 128 | |
| 129 | You can build mpich2 and SPECFEM3D using the basic GNU tools such as gcc and gfortran and reference the 'gforker' mpich2 you have built above: |
| 130 | |
| 131 | Linux configure |
| 132 | {{{ |
| 133 | ./configure \ |
| 134 | MPIFC=/home/carlgt1/projects/mpich2-1.3.2p1/bin/mpif90 \ |
| 135 | MPICC=/home/carlgt1/projects/mpich2-1.3.2p1/bin/mpicc \ |
| 136 | MPILIBS="-static-libgfortran -L /home/carlgt1/projects/mpich2-1.3.2p1/lib -lfmpich -lmpichf90 -lmpl -lopa" |
| 137 | }}} |
| 138 | |
| 139 | Mac configure |
| 140 | {{{ |
| 141 | ./configure \ |
| 142 | CC='gcc -arch i386' \ |
| 143 | MPIFC=/Users/carlgt1/projects/mpich2-1.3.2p1/bin/mpif90 \ |
| 144 | MPICC=/Users/carlgt1/projects/mpich2-1.3.2p1/bin/mpicc \ |
| 145 | MPILIBS="-static-libgfortran -L/Users/carlgt1/projects/mpich2-1.3.2p1/lib -lfmpich -lmpichf90 -lmpl -lopa" |
| 146 | }}} |