Skip to content

Commit

Permalink
[iss-262]
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit ab7950d
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Aug 29 11:47:28 2024 -0300

    Added rules to build KaHIP.

commit eecaa0f
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Thu Aug 29 11:47:12 2024 -0300

    Move KaHIP source files to partitioners folder.

commit 4a7868b
Author: joaquin.f.fernandez <joaquin.f.fernandez@gmail.com>
Date:   Wed Aug 28 10:34:12 2024 -0300

    Added KaHIP lib source.
  • Loading branch information
joaquinffernandez committed Aug 29, 2024
1 parent 7b480b2 commit 29a4fad
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,17 @@ install:
@echo "Installing user libraries."
ln -s $(ROOT)/src/usr/lib/* $(ROOT)/lib/
@install $(ROOT)/deploy/linux/qss-solver.ini.in $(ROOT)/bin/qss-solver.ini
@echo "Installing partitioners."
@install $(ROOT)/src/engine/3rd-party/partitioners/hmetis/khmetis $(ROOT)/bin/
@install $(ROOT)/src/engine/3rd-party/partitioners/patoh/Linux-x86_64/libpatoh.a $(ROOT)/lib/
@install $(ROOT)/src/engine/3rd-party/partitioners/metis/Linux-x86_64/libmetis.a $(ROOT)/lib/
@mkdir -p $(ROOT)/lib/KaHIP
@mkdir -p $(ROOT)/lib/KaHIP/parallel
@mkdir -p $(ROOT)/bin/KaHIP
@install $(ROOT)/src/engine/usr/lib/KaHIP/*.a $(ROOT)/lib/KaHIP/
@install $(ROOT)/src/engine/usr/lib/KaHIP/*.so $(ROOT)/lib/KaHIP/
@install $(ROOT)/src/engine/usr/lib/KaHIP/parallel/* $(ROOT)/lib/KaHIP/parallel/
@install $(ROOT)/src/engine/usr/bin/KaHIP/* $(ROOT)/bin/KaHIP/
@echo "Installing GTEST libraries."
ln -s $(ROOT)/src/3rd-party/gtest/usr/lib/*.a $(ROOT)/lib/

Expand Down
16 changes: 13 additions & 3 deletions src/engine/3rd-party/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ KLU_INCLUDE_DIR := /usr/include/suitesparse/
LIB_CVODE := $(LIB_DIR)/libsundials_cvode.a
LIB_IDA := $(LIB_DIR)/libsundials_ida.a
LIB_GSL := $(LIB_DIR)/libgsl.a
LIB_KAHIP := $(LIB_DIR)/KaHIP/libkahip.so

$(LIB_CVODE): | create-folders
tar xvzf $(3RD_PARTY_DIR)/cvode/cvode-2.9.0.tar.gz
Expand All @@ -29,10 +30,19 @@ $(LIB_IDA): | create-folders
rm -rf ./ida-2.9.0
rm -rf ./examples

$(LIB_KAHIP): | create-folders
tar xvzf $(3RD_PARTY_DIR)/partitioners/KaHIP/KaHIP-3.16.tar.gz
cd ./KaHIP-3.16; ./compile_withcmake.sh
mkdir -p $(BIN_DIR)/KaHIP/
mkdir -p $(LIB_DIR)/KaHIP/
mv ./KaHIP-3.16/deploy/*.a $(LIB_DIR)/KaHIP/
mv ./KaHIP-3.16/deploy/*.so $(LIB_DIR)/KaHIP/
mv ./KaHIP-3.16/deploy/parallel $(LIB_DIR)/KaHIP/
mv ./KaHIP-3.16/deploy/* $(BIN_DIR)/KaHIP/
rm -rf ./KaHIP-3.16

# Rules

cvode: $(LIB_CVODE)

ida: $(LIB_IDA)

gsl: $(LIB_GSL)
kahip: $(LIB_KAHIP)
Binary file not shown.
4 changes: 3 additions & 1 deletion src/engine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BUILD_DIR := $(USR_DIR)/obj/release
ifeq ($(MODE),Debug)
BUILD_DIR := $(USR_DIR)/obj/debug
endif
BIN_DIR := $(USR_DIR)/bin
LIB_DIR := $(USR_DIR)/lib
INCLUDE_DIR := $(USR_DIR)/include

Expand All @@ -31,7 +32,7 @@ endif
vpath %.c $(SRC_DIR)
.SUFFIXES: .c

all: cvode ida gsl qss time-step
all: kahip cvode ida gsl qss time-step

include 3rd-party/Makefile.include
include common/Makefile.include
Expand Down Expand Up @@ -77,6 +78,7 @@ $(LIB_QSS): $(QSS_OBJS)

create-folders::
@mkdir -p $(BUILD_DIR)
@mkdir -p $(BIN_DIR)
@mkdir -p $(LIB_DIR)

# Rules
Expand Down

0 comments on commit 29a4fad

Please sign in to comment.