Zoltan-main\example\C 的makefile

##
## a basic makefile to build examples 
##

##
## The default type for a Zoltan global ID is "int".  This can be changed
## with compile-time flags like:
##
##   -DZOLTAN_ID_TYPE_LONG_LONG
##
## See src/include/zoltan_types.h for the valid id type macros.  If Zoltan was compiled
## with one of these flags, then these examples need to be compiled with the same flag.
##
ID_TYPE_FLAG=-DZOLTAN_ID_TYPE_LONG_LONG
##


## Location of zoltan library, also location of Zoltan_config.h if
## using the autoconf build

BLD=../../build/src

##
## Location of zoltan "src" directory (for header files)
##

SRC=../../src

# Location of zoltan header files

ZOLTAN_INCLUDE=-I$(SRC)/include

##
## For an autoconf build, the location of Zoltan_config.h
##
ZOLTAN_CONFIG_INCLUDE=-I$(BLD)/include

##
## Headers for zoltan utilities, not often used by applications
## Needed for use of Zoltan_Hash in simpleGRAPH.c
##

ZOLTAN_UTIL_INCLUDE=-I$(SRC)/zz  \
                    -I$(SRC)/par \
                    -I$(SRC)/order \
                    -I$(SRC)/tpls \
                    -I$(SRC)/lb \
                    -I$(SRC)/params \
                    -I$(SRC)/Utilities/shared

##
## If Zoltan was built with a third party library, provide the information required
## to link with that library.
##

SCOTCH=/home/lriesen/system/scotch_5.1.10a-32
PARMETIS=/home/lafisk/system/parmetis/ParMetis-3.1

TPL_LIB_DIR=
TPL_INCLUDE=
TPL_LIBS=

CC=mpicc

CFLAGS =$(ID_TYPE_FLAG)

EXAMPLE_NAMES= simpleBLOCK  simpleRCB simpleGRAPH simplePHG migrateGRAPH simpleHIER problemGRAPH

all:   $(EXAMPLE_NAMES)

%: %.c
	$(CC) $(CFLAGS) $(TPL_LIB_DIR)  \
        -I$(BLD)/include $(TPL_INCLUDE) $(ZOLTAN_INCLUDE) $(ZOLTAN_UTIL_INCLUDE) \
        -o $@ $< $(BLD)/libzoltan.a $(TPL_LIBS) -lm

clean:
	@rm -rf  $(EXAMPLE_NAMES)

其实把下面几个置为空就行:


TPL_LIB_DIR=
TPL_INCLUDE=
TPL_LIBS=

2)运行结果

 mpirun -np 5 ./simpleRCB

Mesh partition assignments before calling Zoltan
2-----3-----3-----4-----4
|     |     |     |     |
1-----1-----1-----2-----2
|     |     |     |     |
0-----0-----1-----1-----1
|     |     |     |     |
0-----0-----0-----0-----0
|     |     |     |     |
0-----0-----0-----0-----0

Mesh partition assignments after calling Zoltan
1-----1-----1-----2-----2
|     |     |     |     |
1-----1-----1-----2-----2
|     |     |     |     |
4-----4-----4-----2-----2
|     |     |     |     |
4-----4-----4-----3-----3
|     |     |     |     |
0-----0-----0-----3-----3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值