Commit 4a471a89 authored by lvs's avatar lvs
Browse files

corrected synch b4 and after energy and grad

parent f62ae0c7
......@@ -206,7 +206,7 @@ NRUN := 100
POPSIZE := 150
TESTNAME := test
TESTLS := sd
NUM_LSIT := 10
NUM_LSIT := 30
test: odock
$(BIN_DIR)/$(TARGET) -ffile ./input/$(PDB)/derived/$(PDB)_protein.maps.fld -lfile ./input/$(PDB)/derived/$(PDB)_ligand.pdbqt -nrun $(NRUN) -psize $(POPSIZE) -resnam $(TESTNAME) -gfpop 1 -lsmet $(TESTLS) -lsit $(NUM_LSIT) -smooth 0.5
......
......@@ -551,9 +551,9 @@ void gpu_calc_energy(
}
}
#if defined (DEBUG_ENERGY_KERNEL1) || defined (DEBUG_ENERGY_KERNEL4) || defined (DEBUG_ENERGY_KERNEL3)
barrier(CLK_LOCAL_MEM_FENCE);
#if defined (DEBUG_ENERGY_KERNEL1) || defined (DEBUG_ENERGY_KERNEL4) || defined (DEBUG_ENERGY_KERNEL3)
if (get_local_id(0) == 0)
{
float energy_intraE = partial_intraE[0];
......
......@@ -1138,4 +1138,6 @@ void gpu_calc_gradient(
}
*/
//----------------------------------
barrier(CLK_LOCAL_MEM_FENCE);
}
......@@ -88,8 +88,10 @@ gpu_calc_initpop(
run_id = get_group_id(0) / dockpars_pop_size;
}
// Evaluating initial genotypes
barrier(CLK_LOCAL_MEM_FENCE);
// =============================================================
// WARNING: only energy of work-item=0 will be valid
gpu_calc_energy(dockpars_rotbondlist_length,
dockpars_num_of_atoms,
dockpars_gridsize_x,
......
......@@ -296,7 +296,7 @@ perform_LS(
}
}
//evaluating candidate
// Evaluating candidate
barrier(CLK_LOCAL_MEM_FENCE);
// =================================================================
......
......@@ -373,9 +373,9 @@ gradient_minimizer(
#endif
}
// Calculating gradient
barrier(CLK_LOCAL_MEM_FENCE);
// Calculating gradient
// =============================================================
gpu_calc_gradient(
dockpars_rotbondlist_length,
......@@ -443,7 +443,7 @@ gradient_minimizer(
);
// =============================================================
barrier(CLK_LOCAL_MEM_FENCE);
/*barrier(CLK_LOCAL_MEM_FENCE);*/
//----------------------------------
// fastergrad
......@@ -472,7 +472,7 @@ gradient_minimizer(
candidate_genotype[i] = fmax/*max*/(candidate_genotype[i], lower_bounds_genotype[i]);
}
// Evaluating candidate
barrier(CLK_LOCAL_MEM_FENCE);
// =============================================================
......@@ -533,7 +533,7 @@ gradient_minimizer(
evaluation_cnt = evaluation_cnt + 1;
}
*/
barrier(CLK_LOCAL_MEM_FENCE);
/*barrier(CLK_LOCAL_MEM_FENCE);*/
// Checking if E(candidate_genotype) < E(genotype)
if (candidate_energy < energy){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment