Commit 337f5478 authored by AKASH ROY's avatar AKASH ROY
Browse files

Update README.md

parent 89710779
......@@ -54,22 +54,55 @@ How to define your own autotuning problem
=========================================
This will be illustrated with the example in /benchmarks/prob directory.
In this example, we want to tune the executable.py that gets four command line parameters and returns the output value
In this example, we want to tune the executable.py that gets two command line parameters and returns the output value
```
python executable.py --help
usage: executable.py [-h] [--p1 [P1]] [--p2 [P2]] [--p3 [P3]] [--p4 [P4]]
usage: executable.py [-h] [--nthreads [number of threads]] [--nprocesses [mpi ranks]]
optional arguments:
-h, --help show this help message and exit
--p1 [P1] parameter p1 value
--p2 [P2] parameter p2 value
--p3 [P3] parameter p3 value
--p4 [P4] parameter p4 value
--nthreads [number of threads] parameter nthreads value
--nprocesses [mpi ranks] parameter mpiranks value
```
For example,
```
python executable.py --p1=2 --p2=2 --p3=4 --p4=a
OUTPUT:16.000
python executable.py --nthreads=4 --nprocesses=2
OUTPUT:
{'nthreads': 4, 'nprocesses': 2}
OMP_NUM_THREADS=4 /homes/roya/tmp/miniqmc/build/bin/miniqmc -g "1 1 1" -n 10
miniqmc git branch: develop
miniqmc git commit: 3eca809fd005c99aa3d6e94b86306be1aacea898
Number of orbitals/splines = 192
Tile size = 192
Number of tiles = 1
Number of electrons = 384
Rmax = 1.7
Iterations = 10
OpenMP threads = 4
SPO coefficients size = 98304000 bytes (93.75 MB)
Using SoA distance table, Jastrow + einspline,
and determinant update.
==================================
Stack timer profile
Timer Inclusive_time Exclusive_time Calls Time_per_call
Total 0.6372 0.1490 1 0.637199908
Diffusion 0.2796 0.0018 10 0.027964130
Current Gradient 0.0006 0.0003 3840 0.000000149
Wavefunction 0.0003 0.0003 3840 0.000000069
Distance Tables 0.0820 0.0820 9623 0.000008524
New Gradient 0.1340 0.0006 3840 0.000034894
Single-Particle Orbitals 0.1005 0.1005 3840 0.000026167
Wavefunction 0.0329 0.0329 3840 0.000008567
Update 0.0612 0.0612 1933 0.000031654
Wavefuntion GL 0.0000 0.0000 10 0.000003492
Pseudopotential 0.2085 0.0012 10 0.020852326
Distance Tables 0.1179 0.1179 11172 0.000010556
Value 0.0894 0.0015 11172 0.000007998
Single-Particle Orbitals 0.0290 0.0290 11172 0.000002599
Wavefunction 0.0588 0.0588 11172 0.000005265
```
The search space and a default starting point is defined in problem.py
......@@ -80,13 +113,14 @@ class Problem():
def __init__(self):
space = OrderedDict()
#problem specific parameters
space['p1'] = (2, 10)
space['p2'] = (8, 1024)
space['p3'] = [2 , 4, 8, 16, 32, 64, 128]
space['p4'] = ['a', 'b', 'c']
space['nthreads'] = [2,4,6,8,10,12,14,16,18,20]
space['nprocesses'] = [1,2,3,4]
#space['a'] = [8,16,32,64,128,256,512,1024,1536]
#space['a'] = [8,16,32,64]
#space['w'] = (8,41)
self.space = space
self.params = self.space.keys()
self.starting_point = [2, 8, 2, 'c']
self.starting_point = [8, 1]
```
In evalaute.py, you have to define three functions.
......
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