/[escript]/trunk/finley/test/python/time_chunks.py
ViewVC logotype

Diff of /trunk/finley/test/python/time_chunks.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1564 by gross, Thu May 22 09:31:33 2008 UTC revision 1565 by gross, Thu May 22 10:19:47 2008 UTC
# Line 1  Line 1 
1  NUM_THREADS=4  NUM_THREADS=8
2  import os  import os
3  TEST_STR="timing: per iteration step:"  TEST_STR="timing: per iteration step:"
4  REPEAT=10  REPEAT=10
# Line 106  if error>REL_TOL*Lsup(u_ex): raise Runti Line 106  if error>REL_TOL*Lsup(u_ex): raise Runti
106  """  """
107    
108    
109  # for n in [1000, 10000, 50000, 100000]:  for n in [1000, 10000, 50000, 100000]:
110  for n in [1000, 10000]:  # for n in [1000, 10000]:
111   for prop in [ (1,2), (2,2), (1,3), (2,3) ]:   for prop in [ (1,2), (2,2), (1,3), (2,3) ]:
112     for tp in [ "s", "v" ]:     for tp in [ "s", "v" ]:
113        # create code:        # create code:
# Line 143  for n in [1000, 10000]: Line 143  for n in [1000, 10000]:
143        prog+=SOLVE_AND_TEST        prog+=SOLVE_AND_TEST
144        # run code:        # run code:
145        print >> file("__prog","w"), prog        print >> file("__prog","w"), prog
146        for CHUNK in [-1,10,100,1000,10000]:        for CHUNK in [-1,10,100,1000,10000, 100000]:
147            if CHUNK <= n:
148           time_per_iter=0           time_per_iter=0
149           for i in range(REPEAT):           for i in range(REPEAT):
150              os.system("export OMP_NUM_THREADS=%d;export PASO_CHUNK_SIZE_MVM=%d; python __prog > __out;"%(NUM_THREADS,CHUNK))              os.system("export OMP_NUM_THREADS=%d;export PASO_CHUNK_SIZE_MVM=%d; python __prog > __out;"%(NUM_THREADS,CHUNK))

Legend:
Removed from v.1564  
changed lines
  Added in v.1565

  ViewVC Help
Powered by ViewVC 1.1.26