Open rashidfatah opened 12 years ago
Thanks for reporting the error. On what platform are you running the tests? I just checked and the test suite succeeds on my 64-bit Ubuntu 10.10.
Tests also seem to pass on Mac OS X Lion.
Thanks for your quick reply. I am running the tests on ubuntu 11.04 virtual machine.
Ok, is the a 32-bit version? This seems like a bit fiddling bug related to 32 vs 64 bit systems. I have only used SmartDiet on 64bit environments.
My guess is that the reading of Monsoon PowerMonitor PT4 binary files is broken on 32bit systems. I can take a look at fixing that later this week, but for now there are two things you can try if you want:
1) just create the jar while skipping tests, in case you don't need the Monsoon PowerMonitor related features of SmartDiet. My guess is that all other features work just fine. You can do this by adding the following to build.sbt:
test in assembly := {}
2) install 64-bit version of Ubuntu to your virtual machine, it probably works.
If you are already running a 64-bit system then I am a bit baffled what is causing this. In any case, I can check this later this week.
I have tried with Ubuntu 64-bit and i get that same Monsoon PowerMonitor PT4 error. I tried skipping the tests and creating the jar. The jar was created successfully. But I faced an error : "Error: Unable to access jarfile smartdiet-0.1.jar" while running the command : "java -jar smartdiet-0.1.jar --java-all"
Did you run that command in the right directory where the jar was created? It should appear under the target directory. That error looks like java did not find the file (smartdiet-0.1.jar).
By the way, what features of SmartDiet are you planning to use and for what purpose? Just asking out of curiosity.
Yes, I was in the wrong directory. Now, after running the command i get the following error:
$ java -jar smartdiet-0.1.jar --java-all --ppcsv /home/raashid/Downloads/akisaarinen-smartdiet-5473ba3/sources.json
id,path,packet_count,packet_bytes,packet_timespan_ms,est_wlan_mj,est_umts_mj,pt_count,pt_timespan_ms,pt_mj
java.io.FileNotFoundException: /home/raashid/Downloads/akisaarinen-smartdiet-5473ba3/sources.json/dmesg.out (Not a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.
I have compiled a sample Chess application in eclipse and i have set all the paths in the sources.json file. I unable to figure out the cause of the error.
I would like to use all features of Smart-Diet as I am a research student working in the area of "Mobile Cloud computing". I would also like to know if there is any possibility of doing energy analysis of the application in the Android emulator without using a Nexus phone? Thank you.
The issues are solved now. We are able to compile the application and get the constraint analysis output. I would also like to know if there is any possibility of doing energy analysis of the application in the Android emulator without using a Nexus phone? Thanks.
Hi,
great to hear that you are progressing!
I am afraid that realistic energy analysis in the Android emulator might be impossible. In theory you can probably make the energy analysis software run, but at least when I last tried (Android 2.x series), the emulator was way too slow to perform any realistic measurements. In other words, you can get some numbers, but they do not tell much about the energy consumption because the program is running so slowly.
I think the performance of the emulator has been improved (maybe even significantly) since I last attempted using it for energy analysis, but I am very sceptical whether it is still fast enough for getting meaningful results.
By the way, you can also reach me through email if you want. You can find my address from http://akisaarinen.fi.
I get the following message at the end after running assembly:assembly at the sbt console
[error] Failed: : Total 27, Failed 2, Errors 0, Passed 25, Skipped 0 [error] Failed tests: [error] fi.akisaarinen.smartdiet.measurement.pt4.Pt4FileReaderSpec [error] {file:/home/raashid/Downloads/akisaarinen-smartdiet-5473ba3/}default-6798b7/assembly:test: Tests unsuccessful [error] Total time: 3 s, completed 10 Apr, 2012 5:37:34 PM