Last change
on this file since 90 was
16,
checked in by rock, 17 years ago
|
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[16] | 1 | # Makefile for gpfsperf. Compiles one version of the source for both |
---|
| 2 | # combinations of with/without MPI. |
---|
| 3 | |
---|
| 4 | INCL = -I/usr/lpp/mmfs/include |
---|
| 5 | LIBS = -lpthread -lrt -lgpfs |
---|
| 6 | |
---|
| 7 | CFLAGS = -O -DGPFS_LINUX |
---|
| 8 | CC = cc |
---|
| 9 | MPCC = mpicc |
---|
| 10 | MPLIBS = -lmpich |
---|
| 11 | |
---|
| 12 | PROGS = gpfsperf |
---|
| 13 | OBJECTS = irreg.o gpfsperf.o |
---|
| 14 | |
---|
| 15 | all: $(PROGS) $(MPIPROGS) |
---|
| 16 | |
---|
| 17 | clean: |
---|
| 18 | rm -f $(PROGS) $(MPIPROGS) $(OBJECTS) $(MPIOBJECTS) |
---|
| 19 | |
---|
| 20 | irreg.o: irreg.h irreg.c |
---|
| 21 | $(CC) -c $(CFLAGS) $(OTHERINCL) $(INCL) irreg.c |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | # Single node versions of gpfsperf. |
---|
| 25 | gpfsperf.o: irreg.h gpfsperf.c |
---|
| 26 | $(CC) -c $(CFLAGS) $(OTHERINCL) $(INCL) gpfsperf.c -o $@ |
---|
| 27 | |
---|
| 28 | gpfsperf: irreg.o gpfsperf.o |
---|
| 29 | $(CC) $(CFLAGS) gpfsperf.o irreg.o $(OTHERLIB) $(LIBS) -o $@ |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | # Multi-node versions of gpfsperf. Requires MPI to build or run. |
---|
| 33 | gpfsperf-mpi.o: irreg.h gpfsperf.c |
---|
| 34 | @if which $(MPCC) > /dev/null 2>&1; then \ |
---|
| 35 | cmd="$(MPCC) -c $(CFLAGS) $(OTHERINCL) $(INCL) -DMULTI_NODE gpfsperf.c -o $@" ; \ |
---|
| 36 | echo "$$cmd" ; \ |
---|
| 37 | $$cmd ; \ |
---|
| 38 | else \ |
---|
| 39 | echo "MPI compiler ($(MPCC)) not found; cannot build $@"; \ |
---|
| 40 | fi |
---|
| 41 | |
---|
| 42 | gpfsperf-mpi: irreg.o gpfsperf-mpi.o |
---|
| 43 | @if which $(MPCC) > /dev/null 2>&1; then \ |
---|
| 44 | cmd="$(MPCC) gpfsperf-mpi.o irreg.o $(CFLAGS) $(OTHERPOELIB) $(MPLIBS) $(LIBS) -o $@" ; \ |
---|
| 45 | echo "$$cmd" ; \ |
---|
| 46 | $$cmd ; \ |
---|
| 47 | else \ |
---|
| 48 | echo "MPI compiler ($(MPCC)) not found; cannot build $@"; \ |
---|
| 49 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.