From 3428974730981e5dc0fbb5568724db73344987c5 Mon Sep 17 00:00:00 2001 From: Maximilian Gaul Date: Thu, 11 Nov 2021 08:03:56 +0100 Subject: [PATCH] getTimeStamp() couldn't get linked --- Makefile | 2 +- src/force.cu | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 739c1eb..5a268c7 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ ASM = $(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.s,$(wildcard $(SRC_DIR)/*. OVERWRITE:= $(patsubst $(ASM_DIR)/%-new.s, $(BUILD_DIR)/%.o,$(wildcard $(ASM_DIR)/*-new.s)) OBJ = $(filter-out $(BUILD_DIR)/main% $(OVERWRITE),$(patsubst $(SRC_DIR)/%.c, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.c))) OBJ += $(patsubst $(ASM_DIR)/%.s, $(BUILD_DIR)/%.o,$(wildcard $(ASM_DIR)/*.s)) -OBJ += $(patsubst $(SRC_DIR)/%.cu, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.cu)) +OBJ += $(patsubst $(SRC_DIR)/%.cu, $(BUILD_DIR)/%.o,$(wildcard $(SRC_DIR)/*.cu)) CPPFLAGS := $(CPPFLAGS) $(DEFINES) $(OPTIONS) $(INCLUDES) diff --git a/src/force.cu b/src/force.cu index ca7ec3d..ecc78ff 100644 --- a/src/force.cu +++ b/src/force.cu @@ -90,10 +90,9 @@ double computeForce( fz[i] = 0.0; } - double S = getTimeStamp(); + // double S = getTimeStamp(); LIKWID_MARKER_START("force"); - #pragma omp parallel for for(int i = 0; i < Nlocal; i++) { neighs = &neighbor->neighbors[i * neighbor->maxneighs]; @@ -106,15 +105,6 @@ double computeForce( const int type_i = atom->type[i]; #endif - /* - atom->x = (MD_FLOAT*) reallocate(atom->x, ALIGNMENT, atom->Nmax * sizeof(MD_FLOAT) * 3, nold * sizeof(MD_FLOAT) * 3); - atom->epsilon = allocate(ALIGNMENT, atom->ntypes * atom->ntypes * sizeof(MD_FLOAT)); - atom->sigma6 = allocate(ALIGNMENT, atom->ntypes * atom->ntypes * sizeof(MD_FLOAT)); - atom->cutforcesq = allocate(ALIGNMENT, atom->ntypes * atom->ntypes * sizeof(MD_FLOAT)); - atom->cutneighsq = allocate(ALIGNMENT, atom->ntypes * atom->ntypes * sizeof(MD_FLOAT)); - atom->type = (int *) reallocate(atom->type, ALIGNMENT, atom->Nmax * sizeof(int), nold * sizeof(int)); - */ - Atom *c_atom; cudaMalloc((void**)&c_atom, sizeof(Atom)); cudaMemcpy(c_atom, atom, sizeof(Atom), cudaMemcpyHostToDevice); @@ -177,7 +167,8 @@ double computeForce( } LIKWID_MARKER_STOP("force"); - double E = getTimeStamp(); + // double E = getTimeStamp(); - return E-S; + // return E-S; + return 0; }