Skip to content

Commit f247d56

Browse files
committed
v2.3 update
1 parent 2fdd118 commit f247d56

File tree

10 files changed

+59
-45
lines changed

10 files changed

+59
-45
lines changed

.idea/.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

.idea/gradle.xml

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ NEWS
44
====
55
* Upcoming CK presentation at [ARM TechCon'16 (Oct. 27)](http://schedule.armtechcon.com/session/know-your-workloads-design-more-efficient-systems);
66
* ARM uses CK as a front-end for systematic and reproducible benchmarking and tuning of real workloads: [link](https://github.com/ctuning/ck-wa);
7+
* Open challenges in computer engineering have been updated: [link](https://github.com/ctuning/ck/wiki/Research-and-development-challenges);
8+
* General Motors and dividiti shared CK workflow to crowdsource benchmarking and optimization of CAFFE (DNN framework) [here](https://github.com/dividiti/ck-caffe);
79
* We have moved related Open Science resources [here](http://github.com/ctuning/ck/wiki/Enabling-Open-Science);
810

911
Introduction

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "openscience.crowdsource.experiments"
99
minSdkVersion 10
1010
targetSdkVersion 22
11-
versionCode 9
12-
versionName "2.2"
11+
versionCode 10
12+
versionName "2.3"
1313
}
1414
buildTypes {
1515
release {

app/src/main/java/openscience/crowdsource/experiments/MainActivity.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public class MainActivity extends AppCompatActivity {
8888
" and helping us optimize computer systems to accelerate knowledge discovery," +
8989
" boost innovation in science and technology, and make our planet greener!\n\n";
9090

91-
String problem="maybe it is overloaded or down! We hope to get some sponsorship soon to move our old CK server to the cloud! In the mean time, please contact the author (Grigori.Fursin@cTuning.org) about this problem!";
91+
String problem="maybe it is overloaded or down - please report this problem via collective-knowledge@googlegroups.com !";
9292

9393
String path_opencl="/system/vendor/lib/libOpenCL.so";
9494

@@ -1750,7 +1750,7 @@ protected String doInBackground(String... arg0) {
17501750
String[] ret=openme.openme_run_program(chmod744+" ./"+fn, null, path);
17511751
if (ret[0]!="")
17521752
{
1753-
publishProgress("\nError: failed to set permissions to library "+px+"\n(\n"+ret[0]+"\n)\nPlease, report above error to authors!\n");
1753+
publishProgress("\nError: failed to set permissions to library "+px+"\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
17541754
return null;
17551755
}
17561756
}
@@ -1869,7 +1869,7 @@ protected String doInBackground(String... arg0) {
18691869
ret=openme.openme_run_program(chmod744+" ./"+bin_file0, null, path);
18701870
if (ret[0]!="")
18711871
{
1872-
publishProgress("\nError: failed to set 744 permissions to binary file "+bin_file0+"\n("+ret[0]+"\n)\nPlease, report above error to authors!\n");
1872+
publishProgress("\nError: failed to set 744 permissions to binary file "+bin_file0+"\n("+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
18731873
return null;
18741874
}
18751875

@@ -1899,7 +1899,7 @@ protected String doInBackground(String... arg0) {
18991899
if (ret[0]!="")
19001900
{
19011901
publishProgress("\n");
1902-
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n)\nPlease, report above error to authors!\n");
1902+
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
19031903
return null;
19041904
}
19051905

@@ -1952,7 +1952,7 @@ else if (0.2<(ct/ft0) && (ct/ft0)<1.4)
19521952
if (ret[0]!="")
19531953
{
19541954
publishProgress("\n");
1955-
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n)\nPlease, report above error to authors!\n");
1955+
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
19561956
return null;
19571957
}
19581958

@@ -2000,7 +2000,7 @@ else if (0.2<(ct/ft0) && (ct/ft0)<1.4)
20002000
totalTime=System.currentTimeMillis()-startTime;
20012001

20022002
if (ret[0] != "") {
2003-
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n)\nPlease, report above error to authors!\n");
2003+
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
20042004
return null;
20052005
}
20062006

@@ -2089,7 +2089,7 @@ else if (0.2<(ct/ft0) && (ct/ft0)<1.4)
20892089

20902090
ret = openme.openme_run_program(chmod744 + " ./" + bin_file1, null, path);
20912091
if (ret[0] != "") {
2092-
publishProgress("\nError: failed to set 744 permissions to binary file " + bin_file1 + "\n(\n"+ret[0]+")\nPlease, report above error to authors!\n");
2092+
publishProgress("\nError: failed to set 744 permissions to binary file " + bin_file1 + "\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+")\nPlease, report above error to authors!\n");
20932093
return null;
20942094
}
20952095

@@ -2109,7 +2109,7 @@ else if (0.2<(ct/ft0) && (ct/ft0)<1.4)
21092109
totalTime = System.currentTimeMillis() - startTime;
21102110

21112111
if (ret[0] != "") {
2112-
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n)\nPlease, report above error to authors!\n");
2112+
publishProgress("Error: execution failure!\n(\n"+ret[0]+"\n"+ret[1]+"\n"+ret[2]+"\n)\nPlease, report above error to authors!\n");
21132113
return null;
21142114
}
21152115

app/src/main/java/org/ctuning/openme/openme.java

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,50 +114,54 @@ public static String[] openme_run_program(String cmd, String[] env, String path)
114114
115115
Output: string list:
116116
[0] - error text
117-
[1] - command output
117+
[1] - stdout output
118+
[2] - stderr output
118119
*/
119120

120121
File dir=null;
121122
if (path!=null) dir=new File(path); //getCacheDir();
122123

123124
Process p=null;
124125
String output="";
126+
String eoutput="";
125127
String err="";
126128

127-
try
128-
{
129+
try {
129130
p=Runtime.getRuntime().exec(cmd,env,dir);
130131

131132
BufferedReader reader=new BufferedReader(
132133
new InputStreamReader(p.getInputStream()));
133134

135+
BufferedReader stderr = new BufferedReader(
136+
new InputStreamReader(p.getErrorStream()));
137+
138+
134139
String line=null;
135140
while ((line = reader.readLine())!=null)
136141
output+=line+'\n';
137142

143+
while ((line = stderr.readLine())!=null)
144+
eoutput+=line+'\n';
145+
138146
reader.close();
147+
stderr.close();
139148
p.waitFor();
140-
}
141-
catch(Exception e)
142-
{
149+
} catch(Exception e) {
143150
err=e.toString();
144151
}
145152

146-
if (p!=null)
147-
{
148-
try
149-
{
153+
if (p!=null) {
154+
try {
150155
p.getOutputStream().close();
151156
p.getInputStream().close();
152157
p.getErrorStream().close();
153158
}
154-
catch (IOException e)
155-
{
159+
catch (IOException e) {
156160
err=e.toString();
157161
}
158162
}
159163

160-
return new String[] {err, output};
164+
return new String[] {err, output, eoutput};
161165
}
162166

163167
// *******************************************************************

app/src/main/res/layout/activity_main.xml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
android:id="@+id/t_email"
1212
android:layout_width="wrap_content"
1313
android:layout_height="wrap_content"
14-
android:hint="optional email to acknowledge your contributions!"
14+
android:hint="acknowledge your contributions!"
1515
android:inputType="textNoSuggestions|text"
1616
android:minHeight="12dp"
1717
android:textSize="14dp"
1818
android:layout_above="@+id/b_about"
19-
android:layout_alignParentLeft="true"
20-
android:layout_alignParentStart="true"
2119
android:layout_alignRight="@+id/b_about"
22-
android:layout_alignEnd="@+id/b_about">
20+
android:layout_alignEnd="@+id/b_about"
21+
android:layout_toEndOf="@+id/textView"
22+
android:layout_toRightOf="@+id/textView">
2323
</EditText>
2424

2525
<Button
@@ -39,7 +39,7 @@
3939
android:layout_width="wrap_content"
4040
android:minHeight="12dp"
4141
android:layout_height="wrap_content"
42-
android:text="Get free SDK"
42+
android:text="Get open-source SDK"
4343
android:layout_alignTop="@+id/b_about"
4444
android:layout_toLeftOf="@+id/b_about"
4545
android:layout_toStartOf="@+id/b_about" />
@@ -69,12 +69,14 @@
6969
<CheckBox
7070
android:layout_width="wrap_content"
7171
android:layout_height="wrap_content"
72-
android:text="run crowd-tuning continuously - requires unlimited internet!"
72+
android:text="run continuously - requires unlimited internet!"
7373
android:id="@+id/c_continuous"
7474
android:checked="false"
7575
android:layout_below="@+id/b_stats"
7676
android:layout_alignParentLeft="true"
77-
android:layout_alignParentStart="true" />
77+
android:layout_alignParentStart="true"
78+
android:layout_alignParentRight="true"
79+
android:layout_alignParentEnd="true" />
7880

7981
<EditText
8082
android:layout_width="wrap_content"
@@ -102,7 +104,7 @@
102104
android:layout_width="wrap_content"
103105
android:layout_height="wrap_content"
104106
android:minHeight="12dp"
105-
android:text="Clean log/tmp"
107+
android:text="Clean log"
106108
android:id="@+id/b_clean"
107109
style="?android:attr/buttonStyleSmall"
108110
android:layout_alignParentBottom="true"
@@ -120,4 +122,18 @@
120122
android:layout_toStartOf="@+id/b_stats"
121123
android:layout_alignBottom="@+id/b_stats" />
122124

125+
<TextView
126+
android:text="Optional email/ID: "
127+
android:layout_width="wrap_content"
128+
android:layout_height="wrap_content"
129+
android:textColor="#7f0000"
130+
android:gravity="center"
131+
android:id="@+id/textView"
132+
android:minHeight="12dp"
133+
android:textSize="14dp"
134+
android:layout_alignParentLeft="true"
135+
android:layout_alignParentStart="true"
136+
android:layout_above="@+id/b_clean"
137+
android:layout_below="@+id/log" />
138+
123139
</RelativeLayout>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.1.2'
8+
classpath 'com.android.tools.build:gradle:2.2.2'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon May 16 21:31:13 CEST 2016
1+
#Fri Oct 21 16:18:39 CEST 2016
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

0 commit comments

Comments
 (0)