Add OpenMP parallelization for computeForce.
This commit is contained in:
parent
a0acce6cb3
commit
0fd51e8a9c
@ -7,11 +7,11 @@ ANSI_CFLAGS += -std=c99
|
||||
ANSI_CFLAGS += -pedantic
|
||||
ANSI_CFLAGS += -Wextra
|
||||
|
||||
CFLAGS = -Ofast $(ANSI_CFLAGS) #-g
|
||||
CFLAGS = -Ofast $(ANSI_CFLAGS) -Xpreprocessor -fopenmp #-g
|
||||
ASFLAGS = -masm=intel
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
FCFLAGS =
|
||||
LFLAGS =
|
||||
DEFINES = -D_GNU_SOURCE -DALIGNMENT=64
|
||||
INCLUDES =
|
||||
LIBS =
|
||||
LIBS = -lomp
|
||||
|
@ -156,6 +156,7 @@ double computeForce(Parameter *param, Atom *atom, Neighbor *neighbor)
|
||||
fz[i] = 0.0;
|
||||
}
|
||||
|
||||
#pragma omp parallel for
|
||||
for(int i = 0; i < Nlocal; i++) {
|
||||
neighs = &neighbor->neighbors[i * neighbor->maxneighs];
|
||||
int numneighs = neighbor->numneigh[i];
|
||||
|
Loading…
Reference in New Issue
Block a user