Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speeding up BigClam implementation #210

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d46f491
Bigclam speedup: initial commit
liuchbryan Mar 31, 2016
e461eca
Directory setup + .gitignore file
liuchbryan Apr 2, 2016
c144e77
Modified BigClam example, OpenMP treated agmfast file, and placeholde…
liuchbryan Jun 7, 2016
4783b31
Changed main file to record runtime in unsigned integer (seconds)
liuchbryan Jun 7, 2016
d96372a
Sample network graph data and README for data directory
liuchbryan Jun 7, 2016
acd1630
README file for the project
liuchbryan Jun 7, 2016
991091a
Moved source file for better file organisation
liuchbryan Dec 18, 2016
845d6f3
Improved output text, removed user flags to focus on time profiling
liuchbryan Dec 19, 2016
0f64f7c
Utility for comparing communities in text dump - draft
liuchbryan Dec 20, 2016
a95ab9f
Swapped the location of parallelised/unparallelised files, updated RE…
liuchbryan Jan 1, 2017
e4af6cc
New copy/sort community function, fast comparison, half-completed det…
liuchbryan Jan 4, 2017
f2cd93d
Incomplete version of detailed comparison between community sets, awa…
liuchbryan Jan 8, 2017
622ed2b
Fixed bug by using Jaccard index, to write unit tests
liuchbryan Jan 8, 2017
4d6b1e4
Update indentation of code to match general style
liuchbryan Nov 14, 2017
71f02c7
Script for loading sample graph data
liuchbryan Nov 14, 2017
8871ed9
Updated load data script and README
liuchbryan Dec 1, 2017
2dc3926
Uploading experiment data + plot-generating scripts
liuchbryan Dec 4, 2017
775a3ab
Fixed errornous commands on README + load all community files
liuchbryan Dec 4, 2017
97ff695
Updated README files
liuchbryan Dec 4, 2017
e6f4f11
Updated README with dependencies
liuchbryan Dec 4, 2017
ea0bc80
Updated README to fix title headings
liuchbryan Dec 4, 2017
9dc1fae
Update README with more comprehensive instructions
liuchbryan Dec 4, 2017
a16e524
Updated figure name and generating code
liuchbryan Apr 18, 2018
ee4fc61
Merge SNAP's master branch to catch up with latest developments
liuchbryan Dec 10, 2020
1a91979
Updated README with references, output edits in load script & cpp pro…
liuchbryan Dec 10, 2020
0dc89b9
Disable cURL SSL checks while downloading graph/community data
liuchbryan Dec 10, 2020
2f3d63d
Updated makefile flags to match main snap project, updated README war…
liuchbryan Dec 11, 2020
b3e519e
More README update
liuchbryan Dec 11, 2020
b00a274
Revisiting experiment analysis scripts
liuchbryan Dec 11, 2020
ba345d8
More README files
liuchbryan Dec 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions contrib/ICL-bigclam_speedup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Temp files
*~

# C++ object files
*.o

# R command cache
*.Rhistory

# iPython notebook checkpoints
*.ipynb_checkpoint

# Data files
data/*.txt

# Plots
*.pdf
56 changes: 56 additions & 0 deletions contrib/ICL-bigclam_speedup/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
include ./Makefile.config

.SECONDARY:

all: bigclam bigclam_old cmtycompare

bigclam_old: src/bigclam.cpp $(BIGCLAM_OLD_DEP_O) $(SNAPLIB)
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
$(BIGCLAM_OLD_DEP_O) $(SNAPLIB) \
$< \
-o $@

bigclam: src/bigclam.cpp $(BIGCLAM_DEP_O) $(SNAPLIB)
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
$(BIGCLAM_DEP_O) $(SNAPLIB) \
$< \
-o $@

cmtycompare: src/cmtycompare.cpp $(SNAPLIB)
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
$(SNAPLIB) \
$< \
-o $@

$(SNAPLIB):
$(MAKE) -C $(SNAPDIR)

$(BINDIR)/agmfast_old.o: src/agmfast_old.cpp
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
-c $< -o $@

$(BINDIR)/ag%.o: $(AGMDIR)/ag%.cpp
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
-c $< -o $@

$(BINDIR)/%.o: %.cpp
$(CC) $(CXXFLAGS) $(CXXOPENMP) $(LDFLAGS) $(LIBS) \
$(BIGCLAM_HEADERFLAGS) \
-c $< -o $@

clean:
rm -rf bin/*.*
rm bigclam
rm bigclam_old
rm cmtycompare

deepclean: clean
$(MAKE) clean -C $(SNAPDIR)

.PHONY: all clean deepclean

86 changes: 86 additions & 0 deletions contrib/ICL-bigclam_speedup/Makefile.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

# Compiler settings

UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
# Linux flags
CC = g++
CXXFLAGS += -std=c++98 -Wall
CXXFLAGS += -O3 -DNDEBUG -fopenmp
# turn on for crash debugging, get symbols with <prog> 2>&1 | c++filt
#CXXFLAGS += -g -rdynamic
#CXXFLAGS += -ggdb
# turn on for OpenMP
CXXOPENMP =
LDFLAGS +=
LIBS += -lrt

else ifeq ($(UNAME), Darwin)
# OS X flags
CC = g++
CXXFLAGS += -std=c++98 -Wall -Wno-unknown-pragmas
CXXFLAGS += -O3 -DNDEBUG
CLANG := $(shell g++ -v 2>&1 | grep clang | cut -d " " -f 2)
ifeq ($(CLANG), LLVM)
CXXFLAGS += -DNOMP
CXXOPENMP =
else ifeq ($(CLANG), clang)
CXXFLAGS += -DNOMP
CXXOPENMP =
else
CXXFLAGS += -fopenmp
#CXXOPENMP += -fopenmp
endif
LDFLAGS +=
LIBS +=

# If a dynamic library, i.e. gtest, is installed in some local directory,
# for example by Anaconda, the program might fail with 'image not found'.
# Use one of the solutions below.
# 1. set the path to the lib directory in the executable at linking time
#LDFLAGS += -Wl,-rpath,$(HOME)/miniconda3/lib
# 2. set one of the following environment variables from your shell at run time
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/miniconda3/lib
#export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$HOME/miniconda3/lib
#export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:$HOME/miniconda3/lib

else ifeq ($(shell uname -o), Cygwin)
# Cygwin flags
CC = g++
CXXFLAGS += -Wall -D__STDC_LIMIT_MACROS
CXXFLAGS += -O3 -DNDEBUG
CXXOPENMP = -fopenmp
LDFLAGS += -fopenmp
LIBS +=

endif


# Directories ---

SNAPDIR = ../../snap-core
GLIBDIR = ../../glib-core
AGMDIR = ../../snap-adv

BINDIR = bin

# Compiled Libraries ---

SNAPLIB = $(SNAPDIR)/Snap.o


# BigClam-related ---

BIGCLAM_CORE_O = $(BINDIR)/agm.o \
$(BINDIR)/agmfit.o

BIGCLAM_DEP_O = $(BIGCLAM_CORE_O) \
$(BINDIR)/agmfast.o
BIGCLAM_OLD_DEP_O = $(BIGCLAM_CORE_O) \
$(BINDIR)/agmfast_old.o

BIGCLAM_HEADERFLAGS = -I. \
-I$(SNAPDIR) \
-I$(GLIBDIR) \
-I$(AGMDIR)
16 changes: 16 additions & 0 deletions contrib/ICL-bigclam_speedup/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
numpy = "*"
pandas = "*"
matplotlib = "*"
scipy = "*"
jupyter = "*"

[requires]
python_version = "3.7"
Loading