| 11 | There are some platform-specific concerns with MPI programs under BOINC: |
| 12 | |
| 13 | Linux: It is suggested to build mpich2 using the simple ''gforker'' process manager. This can be done by using this configure command: ./configure --with-pm=gforker |
| 14 | For your application you will want to access the mpich2 libraries & include files, with a command similar to this: |
| 15 | |
| 16 | {{{ |
| 17 | ./configure \ |
| 18 | MPIFC=~/mpich2-1.3.2p1/bin/mpif90 \ |
| 19 | MPICC=~/mpich2-1.3.2p1/bin/mpicc \ |
| 20 | MPILIBS="-static-libgfortran -L ~/mpich2-1.3.2p1/lib -lfmpich -lmpichf90 -lmpl -lopa" |
| 21 | |
| 22 | }}} |
| 23 | |
| 24 | Mac: Similar to Linux, but you will probably want to specify the Mac architecture you are building (i.e. i386, ppc, x86_64): ./configure --with-pm=gforker CC='gcc -arch i386' |
| 25 | Note that if you are using gfortran, you may be limited to i386 unless you compile gfortran versions for the other platforms. You will then possibly want to make a universal binary version of mipexec and your MPI applications. You will probably need to use a configure command for your application using the above references to mpich2 libraries & include files & execs |
| 26 | |
| 27 | Windows: It is simplest to download the 32 and/or 64-bit (depending on your application needs) install package from the mpich2 website given above. You will want to distribute mpiexec.exe, smpd.exe, mpich2mpi.dll, and mpich2nemesis.dll with your app. |
| 28 | |
| 29 | Note that Windows Firewall will block these programs (as well as your MPI app) upon first launch. This is path-dependent, so if you change these filenames it will "count" as a new program for Windows to block. Hence it is probably more sensible to make a zip-file bundle of your programs, and track changes by the wrapper and job.xml file. Otherwise every new application version you make, Windows Firewall will see it as a new potentially threatening program, and your users will have to allow this newly named program through. |
| 30 | |
| 31 | Here is an example wrapper job.xml file for a Windows MPI app. I assume you will zip the above files and put them in a subdirectory "bin" of your boinc project dir (using a small program called "movefiles"): |
| 32 | |
| 33 | {{{ |
| 34 | <job_desc> |
| 35 | <task> |
| 36 | <application>movefiles</application> |
| 37 | <stdin_filename></stdin_filename> |
| 38 | <stdout_filename>stdout.txt</stdout_filename> |
| 39 | <command_line>wu_win.zip</command_line> |
| 40 | </task> |
| 41 | <task> |
| 42 | <application>bin/smpd.exe</application> |
| 43 | <exec_dir>$PROJECT_DIR</exec_dir> |
| 44 | <stdin_filename></stdin_filename> |
| 45 | <stdout_filename>stdout_smpd.txt</stdout_filename> |
| 46 | <command_line>-d 0</command_line> |
| 47 | </task> |
| 48 | <task> |
| 49 | <application>bin/mpiexec.exe</application> |
| 50 | <exec_dir>$PROJECT_DIR</exec_dir> |
| 51 | <stdin_filename></stdin_filename> |
| 52 | <stdout_filename>stdout.txt</stdout_filename> |
| 53 | <command_line>-wdir $PROJECT_DIR/bin -n 4 ./cpi.exe 1000000000</command_line> |
| 54 | </task> |
| 55 | </job_desc> |
| 56 | }}} |
| 57 | |