Skip to content

Commit df683e4

Browse files
committed
Merge pull request #621 from hashdist/johannr/superlu_dist
Add superlu_dist
2 parents 7da7a0f + dc46f37 commit df683e4

5 files changed

Lines changed: 101 additions & 1 deletion

File tree

pkgs/lapack.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ build_stages:
3333
- name: setup_builddir
3434
mode: override
3535
bash: |
36+
37+
when_build_dependency:
38+
- {set: 'LAPACK_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -llapack'}
39+
- {set: 'BLAS_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -lblas'}

pkgs/openblas.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ build_stages:
1313
make {{extra_flags}} PREFIX=${ARTIFACT} install
1414
1515
when_build_dependency:
16-
- {set: 'BLAS_LDFLAGS', value: '-L${ARTIFACT}/lib -lopenblas'}
16+
- {set: 'BLAS_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -lopenblas'}
17+
- {set: 'LAPACK_LDFLAGS', value: '-Wl,-rpath,${ARTIFACT}/lib -L${ARTIFACT}/lib -lopenblas'}

pkgs/superlu_dist/make.inc.darwin

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
PLAT = _mac_x
2+
DSuperLUroot = $(BUILD)
3+
DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a
4+
BLASDEF = -DUSE_VENDOR_BLAS
5+
BLASLIB = $(BLAS_LDFLAGS) $(LAPACK_LDFLAGS)
6+
METISLIB = -Wl,-rpath,$(PARMETIS_DIR)/lib -L$(PARMETIS_DIR)/lib -lmetis
7+
PARMETISLIB = -Wl,-rpath,$(PARMETIS_DIR)/lib -L$(PARMETIS_DIR)/lib -lparmetis
8+
LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)
9+
ARCH = ar
10+
ARCHFLAGS = cr
11+
RANLIB = true
12+
CC = $(MPICC)
13+
CFLAGS = -O2
14+
NOOPTS =
15+
LOADER = $(MPICC)
16+
LOADOPTS =
17+
CDEFS = -DAdd_

pkgs/superlu_dist/make.inc.linux

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
PLAT = _linux
2+
DSuperLUroot = $(BUILD)
3+
DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a
4+
BLASDEF = -DUSE_VENDOR_BLAS
5+
BLASLIB = $(BLAS_LDFLAGS) $(LAPACK_LDFLAGS)
6+
METISLIB = -Wl,-rpath,$(PARMETIS_DIR)/lib -L$(PARMETIS_DIR)/lib -lmetis
7+
PARMETISLIB = -Wl,-rpath,$(PARMETIS_DIR)/lib -L$(PARMETIS_DIR)/lib -lparmetis
8+
LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)
9+
ARCH = ar
10+
ARCHFLAGS = cr
11+
RANLIB = ranlib
12+
CC = $(MPICC)
13+
CFLAGS = -O2 -fPIC
14+
NOOPTS = -fPIC
15+
LOADER = $(MPICC)
16+
LOADOPTS =
17+
CDEFS = -DAdd_
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
extends: [autotools_package]
2+
3+
dependencies:
4+
build: [blas, lapack, mpi, parmetis]
5+
6+
defaults:
7+
# Skip build-time tests (not recommended)
8+
without_check: false
9+
10+
sources:
11+
- key: git:749f33d8104157767d443ff1a1d151642751486d
12+
url: https://bitbucket.org/petsc/pkg-superlu_dist.git
13+
14+
build_stages:
15+
- when: platform == 'Darwin'
16+
name: configure
17+
mode: replace
18+
files: [make.inc.darwin]
19+
handler: bash
20+
bash: |
21+
cp _hashdist/make.inc.darwin make.inc
22+
23+
- when: platform == 'linux' or platform == 'Cygwin'
24+
name: configure
25+
mode: replace
26+
files: [make.inc.linux]
27+
handler: bash
28+
bash: |
29+
cp _hashdist/make.inc.linux make.inc
30+
31+
- name: make
32+
mode: replace
33+
handler: bash
34+
after: configure
35+
bash: |
36+
mkdir -p lib
37+
make -j ${HASHDIST_CPU_COUNT} lib LAAUX=""
38+
39+
- name: install
40+
mode: replace
41+
handler: bash
42+
after: make
43+
bash: |
44+
mkdir -p ${ARTIFACT}/lib/
45+
mkdir -p ${ARTIFACT}/include/superlu_dist
46+
cp -f lib/libsuperlu_dist.a ${ARTIFACT}/lib/
47+
ln -s ./libsuperlu_dist.a ${ARTIFACT}/lib/libsuperlu_dist_3.3.a
48+
cp -f SRC/*.h ${ARTIFACT}/include/superlu_dist/
49+
cp -f SRC/*.h ${ARTIFACT}/include/
50+
51+
- when: not without_check
52+
name: check
53+
after: install
54+
handler: bash
55+
bash: |
56+
cd EXAMPLE
57+
make -j ${HASHDIST_CPU_COUNT}
58+
${MPIEXEC} -np 4 ./pddrive -r 2 -c 2 g20.rua
59+
${MPIEXEC} -np 10 ./pddrive4 g20.rua
60+
${MPIEXEC} -np 4 ./pzdrive -r 2 -c 2 cg20.cua
61+
${MPIEXEC} -np 10 ./pzdrive4 cg20.cua

0 commit comments

Comments
 (0)