Page 3 of 5

Port Client to Android

Posted: Thu May 29, 2014 1:58 pm
by poppakap
I love this FAH software. I run it on my powerbook. But for every PC or Mac in the home, there are another 3-4 Android devices.

I have 3 androids in my drawer at home with broken screens or something. I have another 2-3 android tablets laying around. I also have 3 other members of my family with androids, and I use an android phone. I just took a stroll around my office and I can see tablets and phones lying around as far as the eye can see. These devices are doing nothing but wasting space.

Every single one of these devices can connect to my wifi and could be solving folding operations, but there is no apk to download.

Why can't you port this to android, and/or even javascript? Is there any way to conceal your proprietary code to the server, and allow the actual processing take place using js?

I'm a veteran java programmer, and would LOVE to help out in any way possible. Please, let me know what I can do for you
Thanks

Re: Port Client to Android

Posted: Thu May 29, 2014 3:04 pm
by P5-133XL
This idea has been mentioned previously. The main reasons given have been that phones, and the like, have a very limited calculation capability. Folding needs its answers quickly, and phones just couldn't compete with PC's.

That being said, it is much more likely in the future with the advent of the NaCl client. It can be easily ported to pNaCl and then compiled for an arm processor. It seems that PG is heading in that direction and the phones are getting more and more powerful so the possibility exists...

Re: Port Client to Android

Posted: Thu May 29, 2014 4:48 pm
by SodaAnt
P5-133XL wrote:This idea has been mentioned previously. The main reasons given have been that phones, and the like, have a very limited calculation capability. Folding needs its answers quickly, and phones just couldn't compete with PC's.

That being said, it is much more likely in the future with the advent of the NaCl client. It can be easily ported to pNaCl and then compiled for an arm processor. It seems that PG is heading in that direction and the phones are getting more and more powerful so the possibility exists...
I've seen a different issue for phones and other portable devices: batteries. Phones these days are incredibly efficient, but that's partly because they use the CPU so little. Yes, we have phones with 4+ 2.5GHz cores, but if you're running at 100%, it will get thermal throttled quite quickly. It also means that you often have phones which would only get 1 hour of battery life. Further, you can't quite run it while you're charging either, since most phones will barely charge at all if you're running the CPU at full tilt, so you can really only run F@H when the phone is plugged in AND at 100% battery life, which for me is maybe 3-4 hours of the day when I'm asleep. Sure, its something, but compared to a desktop or even a laptop that can fold a lot more of the day and a lot faster, I'm not sure anything other than the pNaCl client will be worth it.

Re: Folding on Android

Posted: Thu May 29, 2014 6:02 pm
by poppakap
Well, firstly, I didn't see this topic before, so sorry for the post

But, as I said, I can think of 3 or 4 phones/tablets in my drawers at home that I would leave plugged in, if such an app were available. Maybe not my carry-on cellphone. But these devices are super-cheap, free even.

Re: Folding on Android

Posted: Thu May 29, 2014 6:11 pm
by bruce
poppakap wrote:But, as I said, I can think of 3 or 4 phones/tablets in my drawers at home that I would leave plugged in, if such an app were available. Maybe not my carry-on cellphone. But these devices are super-cheap, free even.
They would use an infinitesimal amount of electricity (which is not free) and has been said earlier, would accomplish an infinitesimal amount of FAH's science. Since a NaCl client has been developed, there's always a possibility that the Pande Group will decide to invest in a pNaCl client but (as has already been said) it's not clear if that investment would be the best use of their (limited) development funds.

Re: Folding on Android

Posted: Fri May 30, 2014 1:02 am
by poppakap
I appreciate your reply, and I can totally understand the reasoning that a lot of people have mentioned.
If I could just play devil's advocate for a moment though, my powerbook is only churning out 2K wu's a day, and it isn't running all of the time of course.

I sort of raise an eyebrow at that estimate of 20 wu's a day that was posted before, even though I understand it was really just an exaggeration to make a point. I gotcha, but I want to explore a different perspective for a moment, the idea that distributed computing should be more distributed. Instead of thinking of things as either/or, such as "either android produces 20/day OR a pc can do X", maybe think of it as, "pc is doing X anyway, so why not add in millions more 20/days?" It wouldn't replace any numbers, only contribute more. And besides, what self-respecting geek would not would to download their own protein folding app from the App Store?

In fact, I would like to propose a challenge. As a programmer, give me some benchmark code that I can use to compare. It doesn't have to do any actual work units, but perform various calculations in order to simulate the functionality. Let's do the actual comparison to give to Pande.

Re: Folding on Android

Posted: Fri May 30, 2014 4:11 am
by PantherX
Welcome to the F@H Forum poppakap,
poppakap wrote:...As a programmer, give me some benchmark code that I can use to compare. It doesn't have to do any actual work units, but perform various calculations in order to simulate the functionality. Let's do the actual comparison to give to Pande.
FAHBench uses OpenCL to run on GPUs and CPUs. You can see how it performs in this thread (viewtopic.php?f=38&t=24225) and you can get further details including link to the source code here (http://fahbench.com/).

While your perspective about distributed computing is an interesting one, the issue lies in the fact that PG has very limited developer resources so they usually tend to go for the most "bang for bucks" when it comes to developments (viewtopic.php?f=24&t=25609). Support for AVX is planned but hasn't yet arrived. As a developer, I am sure that you do know the speed boost that AVX can provide. Thus, you can understand why developing a mobile app may not be so high on their list. Moreover, you also have to consider maintenance which also takes up resources so any bugs/issues discovered in the current applications would have to be fixed in a future one. Preferably, the update happens sooner rather than later.

Re: Folding on Android

Posted: Fri May 30, 2014 4:23 am
by P5-133XL
Do note, the NaCl client is open source. I do not know if you can make the Arm core but you can make your own NaCl/PNaCl client ...

Re: Folding on Android

Posted: Fri May 30, 2014 6:09 am
by bruce
It should also be noted that the open source for the NaCl client doesn't do any actual science. [It's s a necessary step, but not a sufficient one. A FahCore.is also required which contains both open and closed source so I'm not sure that getting the client to run will provide the information that you're actually looking for. Porting Gromacs (from gromacs.org) or FahBench (from simtk.org) would provide an opportunity to benchmark how much or how little various Android platforms can actually accomplish within realistic deadlines.

Re: Folding on Android

Posted: Fri May 30, 2014 2:00 pm
by poppakap
Awesome, thanks you guys. This is an area in which I am an obvious noob, so anything that points me in the right direction is a big bonus.
I'll do some more research and get back to you. I have this gut instinct that tells me that by chopping the work up more, and increasing the saturation of devices capable of contributing anything, it could have a huge impact on ROI. And perhaps the software as it exists would not be the answer. Maybe another design would be better. Maybe the current app can also be used as a 'server', if you will, delegating work to armies of androids. Just throwing it all out there. Don't beat me up too much! :-D

Re: Folding on Android

Posted: Fri May 30, 2014 3:39 pm
by 7im
What donor has an army of 'droids?

Also consider diminishing returns as the data gets sliced smaller, and the exponential increase in data overhead. Soon the transmission packet holding the data is larger than the actual science data. The extra bandwidth and connection socket demands get expensive for very little return of data.

You also increase the overhead to reassemble the many more and smaller pieces of data.

Sorry, people complain about battery drain as it is. Add an app like fah, and we'll brick your phone in the time it takes to finish your latte.

Re: Folding on Android

Posted: Fri May 30, 2014 5:10 pm
by poppakap
Actually, I beg to differ on a few of the assumptions.
A donor wouldn't have to own an army of drones. A donor app client could queue a piece of work to the next available droid.

Also, transmitting data is not that big of a deal, really. 5MB work units would be lickity-split on most modern devices. And with unlimited data plans, and wi-fi, I think you're missing out.

As for raw computing power, ignoring these devices is a huge mistake, imho. Especially when considering Moore's law. You mean to say that we can play Halo on a phone, pull down 250Mb apps from Google Play, but we can't fold a .5 mb protein?

Re: Folding on Android

Posted: Fri May 30, 2014 5:28 pm
by 7im
Your assumption that we are ignoring this is patently wrong. Did you read the whole thread? Did you see the post by the head of the FAH project saying they are watching developments closely? Did you see the NaCl folding app linked above as a step towards folding apps for many platforms? Have you heard of the ocore development where you can use a client to fold 1 data packet or 1 million?

Also, gaming is not folding. Good video does not guarantee good folding. On board GPU chips from AMD and NV all but choke on folding, and that's a fully powered PC. But they run Halo just fine.

A droid donor app? Who runs this donor app? On what device? And when you say next available droid, is that your device? Do people have a dozen of these things laying around? If not, how do you get permission to send it to someone else? And why would they accept data from you instead of just getting it directly from F@h?

There is no need for the donor to make their own distributed network when FAH is quite capable of doing that, for the last 10+ years.

Re: Folding on Android

Posted: Fri May 30, 2014 6:59 pm
by poppakap
I'm certainly sorry to have upset you, I'm sure you are dealing with your own list of problems right now, but I'm just a bit confused. I'm thinking you may have perhaps not understood what I was trying to say.

I'm glad to hear that the head of FAH said they are watching developments closely. It sounds like they actually have some vision, and are entertaining the idea that these smaller devices are getting more powerful faster than anticipated. I'm sure he's probably thinking about the time it would take to develop the app and get it GA, before the next big wave of super-devices hits market.

And I honestly hope that his decision making isn't influenced by the rantings of naysayers somewhere on a forum.

Re: Folding on Android

Posted: Fri May 30, 2014 7:29 pm
by 7im
You didn't upset me at all. I'm just asking if you are up to speed on the topic you are commenting on.

And yes, I did not understand the reference to a folding app that creates a miniature network of android devices. If each device is so powerful, there is no reason you would need to join them together through a central "folding app." Each device would run its own app with it's own data.