Skip to content

Commit

Permalink
Merge pull request #8 from Nek5000/polishing
Browse files Browse the repository at this point in the history
Polish parRSB code
  • Loading branch information
thilinarmtb authored Feb 10, 2019
2 parents f2b20c4 + 4878ba1 commit 6454010
Show file tree
Hide file tree
Showing 20 changed files with 1,127 additions and 44,063 deletions.
34 changes: 13 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,35 @@ FC?=mpif77
PAUL?=1

SRCROOT=.

GSLIBDIR=$(GSLIBPATH)

SRCDIR =$(SRCROOT)/src
INCDIR =$(SRCDIR)
BUILDDIR=$(SRCROOT)/build
TESTDIR =$(SRCROOT)/tests

TARGET=parRSB
TESTS=$(TESTDIR)/gmsh/gmsh-test $(TESTDIR)/con/con-test
LIB=src/lib$(TARGET).a
TESTS=$(TESTDIR)/con/con-test
LIB=src/lib$(TARGET).so

INCFLAGS=-I$(SRCDIR) -I$(GSLIBDIR)/include

INCFLAGS=-I$(INCDIR) -I$(GSLIBDIR)/include
TESTLDFLAGS:=-L$(SRCDIR) -l$(TARGET) -L $(GSLIBDIR)/lib -lgs -lm $(LDFLAGS)

ifneq (,$(strip $(DESTDIR)))
INSTALL_ROOT = $(DESTDIR)
else
INSTALL_ROOT = $(SRCROOT)/build
endif

TESTLDFLAGS:=-L$(SRCDIR) -l$(TARGET) -L $(GSLIBDIR)/lib -lgs -lm $(LDFLAGS)

# Main source
CSRCS:= $(SRCDIR)/genmap-vector.c $(SRCDIR)/genmap-algo.c \
$(SRCDIR)/genmap-io.c $(SRCDIR)/genmap-comm.c $(SRCDIR)/genmap.c \
$(SRCDIR)/parRSB.c $(SRCDIR)/genmap-quality.c \
$(SRCDIR)/genmap-chelpers.c $(SRCDIR)/genmap-gmsh.c

CSRCS:= $(SRCDIR)/genmap.c \
$(SRCDIR)/genmap-vector.c $(SRCDIR)/genmap-handle.c $(SRCDIR)/genmap-comm.c \
$(SRCDIR)/genmap-eigen.c $(SRCDIR)/genmap-laplacian.c $(SRCDIR)/genmap-lanczos.c \
$(SRCDIR)/genmap-rsb.c \
$(SRCDIR)/genmap-quality.c $(SRCDIR)/genmap-io.c $(SRCDIR)/genmap-chelpers.c \
$(SRCDIR)/parRSB.c
COBJS:=$(CSRCS:.c=.o)

FSRCS:=
FOBJS:=$(FSRCS:.f=.o)

SRCOBJS :=$(COBJS) $(FOBJS)
SRCOBJS:=$(COBJS)

PP= -DGENMAP_LONG_LONG
ifneq ($(MPI),0)
Expand Down Expand Up @@ -87,9 +82,6 @@ endif
$(COBJS): %.o: %.c
$(CC) $(CFLAGS) $(PP) $(INCFLAGS) -c $< -o $@

$(FOBJS): %.o: %.f
$(FC) $(FFLAGS) $(PP) $(INCFLAGS) -c $< -o $@

.PHONY: tests
tests: $(TESTS)

Expand All @@ -102,7 +94,7 @@ clean:

.PHONY: astyle
astyle:
astyle --style=google --indent=spaces=2 --max-code-length=72 \
astyle --style=google --indent=spaces=2 --max-code-length=80 \
--keep-one-line-statements --keep-one-line-blocks --lineend=linux \
--suffix=none --preserve-date --formatted --pad-oper \
--unpad-paren tests/*/*.[ch] src/*.[ch]
Expand Down
Loading

0 comments on commit 6454010

Please sign in to comment.