Commit ec44d6c7 authored by lvs's avatar lvs
Browse files

removed codexl warning: unnecessary sync in block write

parent f74dcfce
...@@ -206,7 +206,7 @@ NRUN := 100 ...@@ -206,7 +206,7 @@ NRUN := 100
POPSIZE := 150 POPSIZE := 150
TESTNAME := test TESTNAME := test
TESTLS := sw TESTLS := sw
NUM_LSIT := 10 NUM_LSIT := 300
test: odock 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) $(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)
......
...@@ -321,25 +321,25 @@ filled with clock() */ ...@@ -321,25 +321,25 @@ filled with clock() */
mallocBufferObject(context,CL_MEM_READ_ONLY,MAX_NUM_OF_ATOMS*MAX_NUM_OF_ROTBONDS*sizeof(int), &mem_rotbonds_atoms_const); mallocBufferObject(context,CL_MEM_READ_ONLY,MAX_NUM_OF_ATOMS*MAX_NUM_OF_ROTBONDS*sizeof(int), &mem_rotbonds_atoms_const);
mallocBufferObject(context,CL_MEM_READ_ONLY,MAX_NUM_OF_ROTBONDS*sizeof(int), &mem_num_rotating_atoms_per_rotbond_const); mallocBufferObject(context,CL_MEM_READ_ONLY,MAX_NUM_OF_ROTBONDS*sizeof(int), &mem_num_rotating_atoms_per_rotbond_const);
memcopyBufferObjectToDevice(command_queue,mem_atom_charges_const, &KerConst.atom_charges_const, MAX_NUM_OF_ATOMS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_atom_charges_const, false, &KerConst.atom_charges_const, MAX_NUM_OF_ATOMS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_atom_types_const, &KerConst.atom_types_const, MAX_NUM_OF_ATOMS*sizeof(char)); memcopyBufferObjectToDevice(command_queue,mem_atom_types_const, false, &KerConst.atom_types_const, MAX_NUM_OF_ATOMS*sizeof(char));
memcopyBufferObjectToDevice(command_queue,mem_intraE_contributors_const, &KerConst.intraE_contributors_const, 3*MAX_INTRAE_CONTRIBUTORS*sizeof(char)); memcopyBufferObjectToDevice(command_queue,mem_intraE_contributors_const, false, &KerConst.intraE_contributors_const, 3*MAX_INTRAE_CONTRIBUTORS*sizeof(char));
memcopyBufferObjectToDevice(command_queue,mem_reqm_const, &KerConst.reqm_const, ATYPE_NUM*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_reqm_const, false, &KerConst.reqm_const, ATYPE_NUM*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_reqm_hbond_const, &KerConst.reqm_hbond_const, ATYPE_NUM*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_reqm_hbond_const, false, &KerConst.reqm_hbond_const, ATYPE_NUM*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_VWpars_AC_const, &KerConst.VWpars_AC_const, MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_VWpars_AC_const, false, &KerConst.VWpars_AC_const, MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_VWpars_BD_const, &KerConst.VWpars_BD_const, MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_VWpars_BD_const, false, &KerConst.VWpars_BD_const, MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_dspars_S_const, &KerConst.dspars_S_const, MAX_NUM_OF_ATYPES*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_dspars_S_const, false, &KerConst.dspars_S_const, MAX_NUM_OF_ATYPES*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_dspars_V_const, &KerConst.dspars_V_const, MAX_NUM_OF_ATYPES*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_dspars_V_const, false, &KerConst.dspars_V_const, MAX_NUM_OF_ATYPES*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_rotlist_const, &KerConst.rotlist_const, MAX_NUM_OF_ROTATIONS*sizeof(int)); memcopyBufferObjectToDevice(command_queue,mem_rotlist_const, false, &KerConst.rotlist_const, MAX_NUM_OF_ROTATIONS*sizeof(int));
memcopyBufferObjectToDevice(command_queue,mem_ref_coords_x_const, &KerConst.ref_coords_x_const, MAX_NUM_OF_ATOMS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_ref_coords_x_const, false, &KerConst.ref_coords_x_const, MAX_NUM_OF_ATOMS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_ref_coords_y_const, &KerConst.ref_coords_y_const, MAX_NUM_OF_ATOMS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_ref_coords_y_const, false, &KerConst.ref_coords_y_const, MAX_NUM_OF_ATOMS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_ref_coords_z_const, &KerConst.ref_coords_z_const, MAX_NUM_OF_ATOMS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_ref_coords_z_const, false, &KerConst.ref_coords_z_const, MAX_NUM_OF_ATOMS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_rotbonds_moving_vectors_const,&KerConst.rotbonds_moving_vectors_const,3*MAX_NUM_OF_ROTBONDS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_rotbonds_moving_vectors_const, false, &KerConst.rotbonds_moving_vectors_const,3*MAX_NUM_OF_ROTBONDS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_rotbonds_unit_vectors_const, &KerConst.rotbonds_unit_vectors_const, 3*MAX_NUM_OF_ROTBONDS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_rotbonds_unit_vectors_const, false, &KerConst.rotbonds_unit_vectors_const, 3*MAX_NUM_OF_ROTBONDS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_ref_orientation_quats_const, &KerConst.ref_orientation_quats_const, 4*MAX_NUM_OF_RUNS*sizeof(float)); memcopyBufferObjectToDevice(command_queue,mem_ref_orientation_quats_const, false, &KerConst.ref_orientation_quats_const, 4*MAX_NUM_OF_RUNS*sizeof(float));
memcopyBufferObjectToDevice(command_queue,mem_rotbonds_const, &KerConst.rotbonds, 2*MAX_NUM_OF_ROTBONDS*sizeof(int)); memcopyBufferObjectToDevice(command_queue,mem_rotbonds_const, false, &KerConst.rotbonds, 2*MAX_NUM_OF_ROTBONDS*sizeof(int));
memcopyBufferObjectToDevice(command_queue,mem_rotbonds_atoms_const, &KerConst.rotbonds_atoms, MAX_NUM_OF_ATOMS*MAX_NUM_OF_ROTBONDS*sizeof(int)); memcopyBufferObjectToDevice(command_queue,mem_rotbonds_atoms_const, false, &KerConst.rotbonds_atoms, MAX_NUM_OF_ATOMS*MAX_NUM_OF_ROTBONDS*sizeof(int));
memcopyBufferObjectToDevice(command_queue,mem_num_rotating_atoms_per_rotbond_const, &KerConst.num_rotating_atoms_per_rotbond, MAX_NUM_OF_ROTBONDS*sizeof(int)); memcopyBufferObjectToDevice(command_queue,mem_num_rotating_atoms_per_rotbond_const, false, &KerConst.num_rotating_atoms_per_rotbond, MAX_NUM_OF_ROTBONDS*sizeof(int));
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
//allocating GPU memory for populations, floatgirds, //allocating GPU memory for populations, floatgirds,
...@@ -372,10 +372,10 @@ filled with clock() */ ...@@ -372,10 +372,10 @@ filled with clock() */
mallocBufferObject(context,CL_MEM_READ_WRITE,size_prng_seeds, &mem_dockpars_prng_states); mallocBufferObject(context,CL_MEM_READ_WRITE,size_prng_seeds, &mem_dockpars_prng_states);
memcopyBufferObjectToDevice(command_queue,mem_dockpars_fgrids, /*(void *)*/ cpu_floatgrids, size_floatgrids); memcopyBufferObjectToDevice(command_queue,mem_dockpars_fgrids, false, cpu_floatgrids, size_floatgrids);
memcopyBufferObjectToDevice(command_queue,mem_dockpars_conformations_current, cpu_init_populations, size_populations); memcopyBufferObjectToDevice(command_queue,mem_dockpars_conformations_current, false, cpu_init_populations, size_populations);
memcopyBufferObjectToDevice(command_queue,mem_gpu_evals_of_runs, cpu_evals_of_runs, size_evals_of_runs); memcopyBufferObjectToDevice(command_queue,mem_gpu_evals_of_runs, false, cpu_evals_of_runs, size_evals_of_runs);
memcopyBufferObjectToDevice(command_queue,mem_dockpars_prng_states, cpu_prng_seeds, size_prng_seeds); memcopyBufferObjectToDevice(command_queue,mem_dockpars_prng_states, false, cpu_prng_seeds, size_prng_seeds);
//preparing parameter struct //preparing parameter struct
dockpars.num_of_atoms = ((char) myligand_reference.num_of_atoms); dockpars.num_of_atoms = ((char) myligand_reference.num_of_atoms);
......
...@@ -53,6 +53,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ...@@ -53,6 +53,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
int memcopyBufferObjectToDevice(cl_command_queue cmd_queue, int memcopyBufferObjectToDevice(cl_command_queue cmd_queue,
cl_mem dest, cl_mem dest,
bool blocking,
void* src, void* src,
size_t size); size_t size);
......
...@@ -215,10 +215,11 @@ int getBufferObjectInfo(cl_mem object){ ...@@ -215,10 +215,11 @@ int getBufferObjectInfo(cl_mem object){
int memcopyBufferObjectToDevice(cl_command_queue cmd_queue, int memcopyBufferObjectToDevice(cl_command_queue cmd_queue,
cl_mem dest, cl_mem dest,
bool blocking,
void* src, void* src,
size_t size){ size_t size){
cl_int err; cl_int err;
err = clEnqueueWriteBuffer(cmd_queue,dest,CL_TRUE,0,size,src,0,NULL,NULL); err = clEnqueueWriteBuffer(cmd_queue,dest,blocking,0,size,src,0,NULL,NULL);
if (err != CL_SUCCESS){ if (err != CL_SUCCESS){
printf("Error: clEnqueueWriteBuffer() %d\n", err); printf("Error: clEnqueueWriteBuffer() %d\n", err);
fflush(stdout); fflush(stdout);
......
Supports Markdown
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