Skip to content

Commit

Permalink
Changed LR and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
leon committed Nov 30, 2023
1 parent 8c20b18 commit d913108
Show file tree
Hide file tree
Showing 17 changed files with 225 additions and 408 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
CC = g++

# Compiler flags
CFLAGS = -Wall -std=c++17 -pthread -Ofast -s
CFLAGS = -Wall -std=c++17 -Ofast -s -march=native -funroll-loops -ftree-vectorize -ffast-math -fomit-frame-pointer -fexpensive-optimizations
CFLAGS_DEBUG = -Wall -Wextra -std=c++17 -O0 -g

# INCLUDES = -I ~/mambaforge/include
LIBS = -lyaml-cpp
# LIBS = -L ~/mambaforge/lib -Wl,--disable-new-dtags,-rpath,~/mambaforge/lib -llapack -lblas -larmadillo -lyaml-cpp
Expand All @@ -24,14 +26,24 @@ OBJS := $(SRCS:$(SRCDIR)/%.cpp=$(BUILDDIR)/%.o)
# Build both Release and Debug by default
all: $(TARGET)

debug: $(TARGET)

$(TARGET): $(OBJS)
$(CC) -o $(TARGETDIR)/$@ $^ $(CFLAGS) $(INCLUDES) $(LIBS)

# Create a special rule for the debug build
$(TARGET)_debug: $(OBJS)
$(CC) -o $(TARGETDIR)/$@ $^ $(CFLAGS_DEBUG) $(INCLUDES) $(LIBS)

$(BUILDDIR)/%.o: $(SRCDIR)/%.cpp
ifndef DEBUG
$(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -c $< -o $@
else
$(CC) $(CFLAGS_DEBUG) $(INCLUDES) $(LIBS) -c $< -o $@
endif

clean:
rm -rf $(BUILDDIR)/*.o $(TARGETDIR)/$(TARGET)

# Recompile if any headers change
.PHONY: clean
.PHONY: clean debug
Binary file modified bin/LifNet
Binary file not shown.
1 change: 0 additions & 1 deletion conf/config_EI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ LR_STD: [1.0, 1.0, 1.0]
# xy, xz, yz
LR_RHO: [0.0, 0.0, 0.0]
LR_FF_RHO: [0.0, 0.0, 0.0]
COV_SD: 0.0

##############
# STP
Expand Down
13 changes: 6 additions & 7 deletions conf/config_LR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ verbose: 1
# Time step in ms
DT: 0.05
# total simulation time in ms
DURATION: 15000.0
DURATION: 8000.0
# time to start showing simulation result ms
T_STEADY: 0.0
# Saving to files every T_WINDOW in ms
Expand All @@ -30,7 +30,7 @@ N: 40000
# Number of populations
N_POP: 2
# Average number of presynaptic inputs
K: 2000.0
K: 4000.0
# Fraction of neurons in each population
FRAC: [0.8, 0.2]

Expand All @@ -45,7 +45,7 @@ A_STIM: [0.1, 0.0]
# std of the stimulus
STD_STIM: [0.0, 0.0]
# Phase of the 1st stimulus
PHI_STIM: [180.0, 0.0]
PHI_STIM: [0.0, 0.0]
# Tuning of the stimulus
KAPPA_STIM: [0.0, 0.0]

Expand Down Expand Up @@ -120,15 +120,14 @@ KAPPA: [3.5, 0.0, 0.0, 0.0]

# Low rank
LR_SEED: 3
LR_LOAD: 1
LR_LOAD: 0

LR_RANK: 3
LR_MEAN: [0.0, 0.0, 0.0]
LR_STD: [1.0, 1.0, 1.0]
# xy, xz, yz
LR_RHO: [0.5, 0.5, 0.5]

COV_SD: 0.5
# LR_RHO: [0.05, 0.8, 0.2]
LR_RHO: [0.0, 1.0, 0.0]

##############
# STP
Expand Down
17 changes: 8 additions & 9 deletions conf/config_LR.yml.bak
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ verbose: 1
# Time step in ms
DT: 0.05
# total simulation time in ms
DURATION: 15000.0
DURATION: 8000.0
# time to start showing simulation result ms
T_STEADY: 0.0
# Saving to files every T_WINDOW in ms
Expand All @@ -30,7 +30,7 @@ N: 40000
# Number of populations
N_POP: 2
# Average number of presynaptic inputs
K: 2000.0
K: 4000.0
# Fraction of neurons in each population
FRAC: [0.8, 0.2]

Expand Down Expand Up @@ -120,15 +120,14 @@ KAPPA: [3.5, 0.0, 0.0, 0.0]

# Low rank
LR_SEED: 3
LR_LOAD: 1
LR_LOAD: 0

LR_RANK: 2
LR_MEAN: [0.0, 0.0]
LR_STD: [1.0, 1.0]
LR_RANK: 3
LR_MEAN: [0.0, 0.0, 0.0]
LR_STD: [1.0, 1.0, 1.0]
# xy, xz, yz
LR_RHO: [0.0, 0.0]

COV_SD: 0.0
# LR_RHO: [0.05, 0.8, 0.2]
LR_RHO: [0.0, 1.0, 0.0]

##############
# STP
Expand Down
Binary file modified obj/globals.o
Binary file not shown.
Binary file modified obj/lif_network.o
Binary file not shown.
Binary file modified obj/main.o
Binary file not shown.
Binary file modified obj/sparse_mat.o
Binary file not shown.
Loading

0 comments on commit d913108

Please sign in to comment.