| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| |
| <head> |
| <link rel="stylesheet" type="text/css" href="help.css"> |
| <title>Makefile Support</title> |
| </head> |
| |
| <body> |
| <a name="top"></a> |
| <table cellspacing="5"> |
| <tr> |
| <td> |
| <img src="images/trident_transparent.png"> |
| </td> |
| <td> |
| <h1>Makefile Support</h1> |
| </td> |
| </tr> |
| </table> |
| |
| <hr> |
| |
| <p> |
| GEM supports CDT C and C++ Makefile projects with a minimum effort required on the part of the programmer. |
| With some minor modifications to your MPI project's Makefiles, you'll be able to use GEM with your Makefile |
| Projects as well as your Managed Build Projects. |
| </p> |
| |
| <h2>Makefile Modification Steps</h2> |
| |
| <p> |
| The following are the necessary steps to modify your CDT MPI Makefile Project so that it can be formally |
| verified by GEM. If you are creating a project from scratch, make sure to start with a new <b>Makefile Project</b> |
| and not a <b>Managed-Build Project</b>! |
| </p> |
| |
| <ul> |
| <li> |
| Change the compiler to <tt><b>ispcc</b></tt> for C or <tt><b>ispCC</b></tt> for C++. These are wrappers for |
| <tt><b>mpicc</b></tt> and <tt><b>mpicxx</b></tt> that allow GEM to intercept MPI calls at runtime with an |
| interposition layer (the PMPI mechanism). |
| <pre> |
| # Which compiler to use |
| # CC = mpicc <-- comment this out |
| |
| # For MPI C applications |
| CC = ispcc <-- add this for C compilation (ispcc is a wrapper for mpicc) |
| |
| # For MPI C++ applications |
| CXX = ispCC <-- add this for C++ compilation (ispCC is a wrapper for mpicxx) |
| </pre> |
| </li> |
| <li> |
| GEM requires the fully qualified path to all source code files in order to know how to locate errors |
| and problems in your code. ISP itself uses the <tt><b>__FILE__</b></tt> and <tt><b>__LINE__</b></tt> |
| macros in generating a runtime log. The modification below facilitates this by giving this information |
| to ispcc/ispCC (gcc/g++) at compile time in order to get that back in the same form. |
| <pre> |
| SOURCEPATH = $(shell pwd) # defining this will give the compiler the fully qualified path to each file encountered |
| $(CC) $(CFLAGS) -c $(SOURCEPATH)/$*.c # add this to your build rules |
| </pre> |
| </li> |
| <li> |
| <b>Change the extension of the generated executables to <i>".gem"</i></b> |
| <pre> |
| $(BINDIR)/mtest.gem$(VERNUM): $(MESHTESTOBJS) $(ISPOBJS) |
| </pre> |
| </li> |
| </ul> |
| |
| |
| <h2>Setting Your Projects up to Build</h2> |
| <ul> |
| <li> |
| Create make targets for your Makefile Project |
| <br/><br/> |
| <img src="images/makeTargets.png"> |
| <br/><br/> |
| </li> |
| <li> |
| Now simply double click the make target you need.<br> |
| <i>You may have to do a little debugging to get everything just right</i> |
| <br/><br/> |
| </li> |
| </ul> |
| |
| <h2>Running GEM on the Generated Executables</h2> |
| <ul> |
| <li> |
| Locate the executable(s) with ".gem" extension in the Project Explorer |
| <br/><br/> |
| <img src="images/gemExtension.png"> |
| <br/><br/> |
| </li> |
| <li> |
| <a href=setNumProcs.html>Set the number of processes</a> for the next run of GEM. |
| </li> |
| <li> |
| Right click on the previously located executable with <b>".gem"</b> extension in the Project Explorer |
| <br/><br/> |
| <img src="images/executablePopUp.png"> |
| <br/><br/> |
| </li> |
| <li> |
| This should bring up the GEM views (if they aren't already open) with post verification results.<br/> |
| <ul> |
| <li> |
| <a href="analyzerView.html">Analyzer View Help page</a> |
| </li> |
| <li> |
| <a href="browserView.html">Browser View Help page</a> |
| </li> |
| <li> |
| <a href="consoleView.html">Console View Help page</a> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| |
| <h4>That's it!</h4> |
| |
| <br/><br/> |
| <p><a href="#top">Back to Top</a> | <a href="toc.html">Back to Table of Contents</a></p> |
| <br/><br/> |
| |
| <hr> |
| <center> |
| <p> |
| School of Computing * 50 S. Central Campus Dr. Rm. 3190 * Salt Lake City, UT |
| 84112 * <A href="mailto:isp-dev@cs.utah.edu">isp-dev@cs.utah.edu</a><br> |
| <a href="http://www.eclipse.org/org/documents/epl-v10.php">License</a> |
| </p> |
| </center> |
| |
| </body> |
| |
| </html> |