* boolean waitfordone=true; while(waitfordone) { if (mybarr.done)
* waitfordone=false; }
*/
-
+ long start=System.currentTimeMillis();
for (int i = 0; i < numthreads; i++) {
// thobjects[i].md.start(mid[i]);
thobjects[i].md.run();
}
+ long end=System.currentTimeMillis();
+// System.out.println("Total="+(end-start));
}
public void JGFvalidate() {
/* MD simulation */
+ JGFMolDynBench l_mymd=mymd;
+
int numP= (mdsize / workload)+1;
double scratchpad[][][];
scratchpad=new double[numP][3][mdsize];
+
+ long par_time=0;
for (int move = 0; move < movemx; move++) {
/* move the particles and update velocities */
int lworkload = workload;
// for (int i=0+id;i<mdsize;i+=numThread) {
int scratch_idx=0;
+
+ double l_epot=0.0;
+ double l_vir=0.0;
+ int l_interacts=0;
+
for (int i = 0 ; i < mdsize; i += lworkload) {
int ilow = i;
int l_size = iupper - ilow;
double workingpad[][]=scratchpad[scratch_idx++];
+ long par_start=System.currentTimeMillis();
sese parallel{
for(int j=0;j<3;j++){
for(int l=0;l<mdsize;l++){
one[idx].force(side, rcoff, mdsize, idx, xx, yy, zz, mymd, store,workingpad);
}
}
+ long par_end=System.currentTimeMillis();
+ par_time+=(par_end-par_start);
sese serial{
for (int k = 0; k < 3; k++) {
sh_force[k][j] += workingpad[k][j];
}
}
- mymd.epot[0] += store.epot;
- mymd.vir[0] += store.vir;
- mymd.interactions += store.interacts;
+ l_epot+=store.epot;
+ l_vir+=store.vir;
+ l_interacts+=store.interacts;
+// mymd.epot[0] += store.epot;
+// mymd.vir[0] += store.vir;
+// mymd.interactions += store.interacts;
}
}
+ mymd.epot[0] =l_epot;
+ mymd.vir[0] = l_vir;
+ mymd.interactions = l_interacts;
+
for (int k = 0; k < 3; k++) {
for (int j = 0; j < mdsize; j++) {
sh_force[k][j] = sh_force[k][j] * hsq2;
// if (id == 0) JGFInstrumentor.stopTimer("Section3:MolDyn:Run",
// instr.timers);
}
+// System.out.println("par time="+par_time);
}
}
--- /dev/null
+rm parallel.log
+echo ============================================================
+echo Running Parallel Moldyn
+for i in 1 2 3 4 5 6 7 8 9 10
+do
+echo Trial $i
+(time ./JGFMolDynBenchSizeBp.bin 1 150) 2>&1 | cat >> parallel.log
+done
+rm serial.log
+echo ============================================================
+echo Running Serial Moldyn
+for i in 1 2 3 4 5 6 7 8 9 10
+do
+echo Trial $i
+(time ./JGFMolDynBenchSizeBs.bin 1 150) 2>&1 | cat >> serial.log
+done
+
COREPROFOVERFLOW= #-coreprof-checkoverflow
-USECOREPROF= -coreprof $(COREPROFOVERFLOW) \
+USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \
-coreprof-eventwords 1024*1024*128 \
-coreprof-enable cpe_main \
-coreprof-enable cpe_taskdispatch
USEOOO= -ooojava 24 2 -ooodebug -ooodebug-disable-task-mem-pool
-BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 5024 -garbagestats -joptimize -noloop -optimize #-debug
+BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 5024 -garbagestats -joptimize -noloop -optimize -debug
DRELEASEMODE=-disjoint-release-mode -disjoint-alias-file aliases.txt tabbed
DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism