PDA

View Full Version : Folding on a MacBook Pro


Bluefalcon13
11-29-09, 09:40 PM
Hey everyone,

I've just started to fold on my MacBook Pro 2.4ghz C2D with the SMP client (mostly to cut down on the time it takes for me to climb the milestones :P ). I've noticed something funky. Whenever I plug in the battery, and unplug the laptop to go outside to smoke a cig, the temps shoot way up. Ambient is about the same, if not less outside, and I have a program that bumps my fan speed to max when I want it to (when folding). When its sitting on my lap running off the battery, its riding the 70C mark. When its chilling on my desk, battery removed, and plugged into the wall, its ~50C with same fan speeds. Anyone else seen this kinda action before?

Also, I would love to ditch the SMP client, and use the 8600GT 256meg card this thing has, but there is no GPU2 OS-X clients. Are there any known work-arounds for OS-X to make the GPU2 client run? I'd love to get some real use outta this hardware, rather than just slow ticks on the SMP client...

sneakysnowman
11-29-09, 10:04 PM
You can fold on the GPUs under OSX using this (http://gpu2.twomurs.com/index.php?title=Main_Page)

As for the temps, I don't know. Maybe better airflow when it's sitting on the desk?

ChasR
11-29-09, 10:07 PM
I'd bet on a blocked intake. However you have it set on your lap, you're blocking the cpu intake with your leg?
Happens all the time when people put the laptop on a bed.
You can set FAH to pause on battery in the configuration.

Bluefalcon13
11-29-09, 10:12 PM
intake/exhaust is located in the long hinge on the MacBook Pro, as well as I kept the screen in the same position (tilt) as MacBooks have an L shaped hinge..

ChasR
11-29-09, 10:19 PM
I don't have a Macbook so all I can do is go by the laptops I have, all of which have the main intake on the bottom. THey have smal intakes on the top to keep you from burning it up when you block the lower intake. I assumed wrongly that Macs were similar. It either has to be the intake being blocked or the fan running slower.

daunsociable
11-30-09, 01:28 AM
the Macbook Pro has no vents on the bottom, it sucks in air from the speaker vents on the top. i have the upgraded version (2.5 and 512 on the GFX card) and im running 60-70s all day with the fans cranked depending on if the laptop is on my bed or not


and good to see that they got GPU folding up and running, i tried to get it to work with people on this boards knowledge and i couldnt do it, i may have to retry now

Bluefalcon13
11-30-09, 05:01 AM
Well, I appreciate the help everyone, I think when I get home from work I'll be trying to get that GPU client running on the Mac. Additionally, ChasR, I hope you don't think I was getting an attitude with ya about the vents and stuff, I was actually trying to inform you how its setup, as I figured you hadn't messed with one... either way, thanks for the help... seems its almost related the the battery being installed and drawn from as I ensured fan speeds are the same (4000 rpm) with a software program I have running.

GPU client after work here I come :P

Surferseth
11-30-09, 11:39 AM
I used to fold on a macbook pro 2.6 and was in the high 70s low 80s more times than not. They have very poor cooling. The ventilation comes from the KB, speakers, and screen hinge. The battery also runs very hot. There was a recall on the batteries for the older units (and if you have a 8600GT its probably an older unit) because there was risk of starting a fire. Might want to look in to that recall.

I have a newer Unibody now and that runs even hotter. I have not installed SMCFanControl to up fan speeds, but I see 90C+ when folding on the 3.06 Unibody MacBookPro. This may have something to do with the 9400GT and 9600GT heat output though. Idle it's at 50C.

Bluefalcon13
11-30-09, 05:27 PM
Well, I followed the steps up until the whole wrapper thing (says file not available) and I figured I'd continue on. I'm currently on 'linking the toolkit' and I seem to be stuck... I am a bit of an OS-X noob, but I'd really love to get this thing folding for our team!

daunsociable
11-30-09, 07:57 PM
one thing i HIGHLY recommend doing if your up to it, replace the thermal paste...apple just loves to throw on A LOT of paste and it acts as more of a blanket then it does to help transfer heat, i replaced mine with IC diamond compound and thats why my temps are 10+ degrees cooler

Bobnova
11-30-09, 08:52 PM
Are the fan speeds the same % plugged in vs unplugged, or the same RPM?

Some laptops that work on % fan speed have different %/RPM tables between plugged in and unplugged.
So 50% plugged in is 2000rpm and 50% unplugged is 1500.

Bluefalcon13
11-30-09, 09:35 PM
yes they are, running a program that allows me to set em at 4k rpm, vs the default 2k

ihrsetrdr
12-01-09, 12:08 AM
Well, I followed the steps up until the whole wrapper thing (says file not available) and I figured I'd continue on. I'm currently on 'linking the toolkit' and I seem to be stuck... I am a bit of an OS-X noob, but I'd really love to get this thing folding for our team!

Because of the differences between Linux and OS X, the wrapper guide for GPU folding in Linux does not currently work with OS X. It was said in Stanford's FAQ (http://folding.stanford.edu/English/FAQ-ATI#ntoc19)(3/4 down the page) that:

Macintosh OSX support is much further out, as the compilers and drivers we need are not supported in OSX, and thus we cannot port our code until that has been resolved.

CUDA (http://www.apple.com/downloads/macosx/development_tools/nvidiacuda.html)is available for OS X, so eventually people with the right skill set will probably make progress that should enable GPU folding in OS X, time will tell.

Bluefalcon13
12-01-09, 07:06 AM
Because of the differences between Linux and OS X, the wrapper guide for GPU folding in Linux does not currently work with OS X. It was said in Stanford's FAQ (http://folding.stanford.edu/English/FAQ-ATI#ntoc19)(3/4 down the page) that:



CUDA (http://www.apple.com/downloads/macosx/development_tools/nvidiacuda.html)is available for OS X, so eventually people with the right skill set will probably make progress that should enable GPU folding in OS X, time will tell.

Thanks for the response, kinda verifies what I could find yesterday. I'll post a question about it in the Alt. OS forums to see if anyone with more experence with Macs can get the folding client running...

Google searches yielded little to nothing as far as relevent info is concerned, and I really do not know how all that works. Additionally, I've never been particularly good with WINE, so thats yet another handicap against me O.o

ihrsetrdr
12-01-09, 01:37 PM
There is some hope on the horizon- GPU3(aka core 0x15) is in internal testing at the moment, nothing concrete but rumors of support for OS X GPU folding are floating around...:shrug:

Bobnova
12-01-09, 02:06 PM
If OSX supports OpenCL GPU3 should run on OSX, that's part of the reason for switching to OpenCL as i understand it, along with much better ATI GPU utilization.

ChasR
12-01-09, 02:20 PM
GPU3 will be introduced next year based OpenMM, which is based on current code, without OpenCL support. It will take some time to switch over to OpenCL, so don't hold your breath.

Shelnutt2
12-01-09, 09:00 PM
http://gpu2.twomurs.com/index.php?title=OSX

;)

Bluefalcon13
12-01-09, 09:38 PM
I see the guide, I was hoping there was someone out there that would know HOW to make this work, and not just copy and paste the linux method (as OS-X does not have a /etc/ld.so.conf file to edit...) as I have little experence with OS-X and WINE, so we can iron out the guide so it actually works. I feel wrong knowing that I've got hardware that can fold and bring in some points, but maybe I'm poking around in the wrong place...


Additionally, I have checked out the link, followed the steps, but it is not possible to complete with OS-X.

From the guide itself:
MacOS support is unknown. This is more or less a copy of the Linux wiki to be used as a guide. If you need assistance with any compatibility issues found then please post a question on the ocforums Folding@Home[1] section.

The major issue stems from after the CUDA installs, and linking those libraries to the WINE APIs in order to make the program work, as well as no wrapper of any kind for it...

Shelnutt2
12-01-09, 11:07 PM
The linux wrapper will work for OSX, OSX can execute linux code, or if you prefer you can compile your own wrapper, I can give ya the source code, but it should be published somewhere, it's licensed under the lgpl.

I will admit I have zero experience with OSX beyond just using a friends macbook once or twice. If the problem is simply getting everything linked right, I'm sure with a little guess and check we can fix that.


Fyi I was the one who made that OSX guide, and I've been waiting for ages for someone to try it! It will work on OSX, but it's be just like on FreeBSD or anything else. It's the same basic steps but some of the commands might be a little different. We just need to iron that out.


For right now you can install CUDA and assume it linked correctly. In the initial testing on linux no one ever had a problem, then some people do, but your shouldn't have any linking issues. So install CUDA, copy the wrapper to the correct place for where wine dll.so are located, in linux I'd run "locate *dll.so*" idk if you have the locate command in OSX. (I'm guessing wine installs to a different location on OSX then on Linux)

From there try and run the gpu2 client and see. :)

Bluefalcon13
12-02-09, 05:10 AM
Ok.. Well, I admit I'm a OS-X noob, so maybe I'm not the best person to work with to iron this out. I was hoping for a more experienced user of OS-X to post in the alt OS folder post I made. I will try to help you through this. It probably doesn't help that I'm not well versed in WINE use, but maybe we can make some headway into this after all.

As for the wrapper, you may want to check the download repository, as I get 404 errors for both the second and first gen wrappers. I attempted to run the GPU client with just installing all the packages, but I did not see anything happen, other than WINE was using 100 cpu resources with 2+ threads. So maybe all I really need is the wrapper after all (and some guidance on WINE stuff too). If needed, we can always transfer the wrapper via email, if that is the way you want to go, shoot me a PM, and I'll get you my email addy.

I think you may be correct about the library and CUDA, as when I goto Apple menu>About this mac> more info> extensions it lists CUDA as being there. I app-zapped (uninstall program for OS-X) all of the Wine stuff in order to clean the slate for further testing after getting some assistance. Tonight after I return home from work, I'll be bashing my head against the wall again to try and get this running. I'd still like some assistance from an experienced Mac-user, as they would understand any problems better than I would, and at the same time, they would be able to provide better insight into our current issues.

Shelnutt2
12-02-09, 10:36 PM
Here is the wrapper, http://www.gpu2.twomurs.com/wrapper2ndgen/2.1/cudart.dll.so . Sorry I never updated the OSX guide, we had to make a few small adjustments to the v2 wrapper when a new core came out, took the old one down so someone didn't accidentally get it.

As for Mac users, you might want to try the folding forums. We have a few mac guys here, but no one has ever posted about the gpu2 folding (I assume most have ati cards?).

Bluefalcon13
12-03-09, 09:13 AM
Here is the wrapper, http://www.gpu2.twomurs.com/wrapper2ndgen/2.1/cudart.dll.so . Sorry I never updated the OSX guide, we had to make a few small adjustments to the v2 wrapper when a new core came out, took the old one down so someone didn't accidentally get it.

As for Mac users, you might want to try the folding forums. We have a few mac guys here, but no one has ever posted about the gpu2 folding (I assume most have ati cards?).

Alright, sounds good. I will play with that and WINE when I get home from work.

If anyone else is interested in this thread, shoot me a PM, and I'll add you to my yahoo IM list, particularly, anyone with more extensive WINE knowledge. Hopefully, we can find a way forward for Mac users in general, which would allow Shelnutt to edit his guide. After discussing longevity on another thread regarding laptop GPU life vs folding, I will not be running this 24/7 but I'm willing to use my laptop to get this operational, and get Shelnutt the needed info so Mac users wont be required to VM/Boot Camp to run the GPU client.

Bluefalcon13
12-03-09, 07:35 PM
well, I have all the stuff installed, but I cannot locate where to drop the .dll.so file as I cannot find any other .dll.so files. I found the folder labeled 'Wine Files' which contains the windows .dll files Wine uses to make normal programs work... I'm fairly lost atm..

Bluefalcon13
12-03-09, 07:45 PM
nm... just found it, you have to expand the wine.app file by right clicking and selecting view contents

Bluefalcon13
12-03-09, 08:26 PM
it runs, but there are some issues...

I do not think the wrapper is working, as 2 threads of Wine eat up 100% of CPU usage, so I guess I need to figure out how to make wine use a custom wrapper...

Bobnova
12-03-09, 10:17 PM
GPU folding eats CPU pretty solidly.
In windows the CPU core that feeds my GPU is used 100%.

Bluefalcon13
12-04-09, 04:54 AM
yes, but it doesnt eat 2 cores 100% even without setting core affinity... I run the windows GPU folder

Shelnutt2
12-04-09, 10:34 AM
I could be wrong, but I remember originally due to a bug in the nvidia driver/way to worked with X11, it would cause one core to do 100% for X11, it's possible you are encountering something similar. However we built in a delay in the wrapper to eliminate this issue.

Is it running at all? Is it completing frames?

Bluefalcon13
12-04-09, 10:47 AM
I could be wrong, but I remember originally due to a bug in the nvidia driver/way to worked with X11, it would cause one core to do 100% for X11, it's possible you are encountering something similar. However we built in a delay in the wrapper to eliminate this issue.

Is it running at all? Is it completing frames?

it was running, atleast for a min, I shut it down as it was using both cores 100%

As far as how much it runs, I still have yet to figure out how to make a script/shortcut to make it run via wine, and in a terminal. I dont remember if I successfully ran it with the built in wine 'dospromt' but I think I did (was really tired). I'll continue testing, but there was a post I stumbled across on some forums saying the wrapper needed to be linked properly to the cuda libraries on OS-X (I think the install locations are different).

So far, only concrete thing is, you install the .dll.so in the Wine.app (expand in finder) directly. I'll check the folder names when I get home tonight, but that should be able to be updated for the guide. I'll dig around and find out what that post said, and where it was, as that may help in any wrapper issues.

Bluefalcon13
12-04-09, 04:53 PM
This is what I get when I attempt to run it in MSDOS (via WINE)

Launch directory: H:\Folding@home-Win32-GPU_XP-623
Executable: Folding@home-Win32-GPU.exe
Arguments: -forcegpu nvidia_g80

[22:48:36] - Ask before connecting: No
[22:48:36] - User name: JLF12345 (Team 32)
[22:48:36] - User ID: 2E51F4CB2F4CFE1F
[22:48:36] - Machine ID: 2
[22:48:36]
[22:48:36] Loaded queue successfully.
[22:48:36]
[22:48:36] + Processing work unit
[22:48:36] Core required: FahCore_11.exe
[22:48:36] Core found.
[22:48:36] Working on queue slot 01 [December 4 22:48:36 UTC]
[22:48:36] + Working ...
[22:48:40] CoreStatus = C0000135 (-1073741515)
[22:48:40] Client-core communications error: ERROR 0xc0000135
[22:48:40] This is a sign of more serious problems, shutting down.

guessing either I did a bad shutdown, or it doesnt like running a second time. will clear out my work folder, and my config to try it again.

Bluefalcon13
12-04-09, 05:22 PM
yeah, I keep getting the same thing... I'm not sure WINE knows where the CUDA libraries are... and I've got no clue how to 'show' it.

Shelnutt2
12-04-09, 07:02 PM
yeah, I keep getting the same thing... I'm not sure WINE knows where the CUDA libraries are... and I've got no clue how to 'show' it.

You are right, I'm thinking we need a separate OSX wrapper. During compile time is when all the links are made, and the files are in different spots. I can explain to you how everything is done in linux but I simply do not know enough about OSX to give you much advice on how to compile it there. If you want to try, I can tell you the steps in linux, then maybe you can guess/figure out the equivalent in OSX or just wait for someone more experienced in OSX..

Surferseth
12-04-09, 07:26 PM
If you can show us how it is done in Linux, I may be able to help figure out how to get it working in OSX. No promises though :)

Bluefalcon13
12-04-09, 08:20 PM
ill defer to surferseth, im a mac noob... hell, I dont even know how to make a shortcut which opens terminal then runs a script :P

Shelnutt2
12-04-09, 09:25 PM
1) Download the source, http://shelnutt.twomurs.com/patches/new/ . You need the makefile, cudart.c and cudart.h

2) Run make

I know this is very very short, but that is what you do. However what we need to edit is the makefile, I believe that is our issue. The include path and the library path need to be edited to fit for OSX.

Actually it might be best to run "winemaker --dll /source/folder" then edit the libraries and include paths. I'm not sure if anything else would need to be changed or not, but winemaker should setup a file which we can compare to our linux one here.

#*This is a wrapper for cudart.dll and libdudart.so.2.0
# Copyrighted by Actong of the foldingforms under the LGPL v2.1 or later



### Generated by Winemaker


SRCDIR = .
SUBDIRS =
DLLS = cudart.dll
EXES =



### Common settings

CEXTRA = -mno-cygwin
CXXEXTRA = -mno-cygwin
RCEXTRA =
INCLUDE_PATH = -I/usr/local/cuda/include
DLL_PATH =
LIBRARY_PATH = -L/usr/local/cuda/lib
LIBRARIES = -lcudart


### cudartrt.dll sources and settings

cudart_dll_MODULE = cudart.dll
cudart_dll_C_SRCS = cudart.c
cudart_dll_CXX_SRCS =
cudart_dll_RC_SRCS =
cudart_dll_LDFLAGS = -shared \
$(cudart_dll_MODULE:%=%.spec) \
-mno-cygwin
cudart_dll_DLL_PATH =
cudart_dll_DLLS = odbc32 \
ole32 \
oleaut32 \
winspool
cudart_dll_LIBRARY_PATH =
cudart_dll_LIBRARIES = uuid

cudart_dll_OBJS = $(cudart_dll_C_SRCS:.c=.o) \
$(cudart_dll_CXX_SRCS:.cpp=.o) \
$(cudart_dll_RC_SRCS:.rc=.res)



### Global source lists

C_SRCS = $(cudart_dll_C_SRCS)
CXX_SRCS = $(cudart_dll_CXX_SRCS)
RC_SRCS = $(cudart_dll_RC_SRCS)


### Tools

CC = winegcc
CXX = wineg++
RC = wrc


### Generic targets

all: $(SUBDIRS) $(DLLS:%=%.so) $(EXES:%=%.so)

### Build rules

.PHONY: all clean dummy

$(SUBDIRS): dummy
@cd $@ && $(MAKE)

# Implicit rules

.SUFFIXES: .cpp .rc .res
DEFINCL = $(INCLUDE_PATH) $(DEFINES) $(OPTIONS)

.c.o:
$(CC) -c $(CFLAGS) $(CEXTRA) $(DEFINCL) -o $@ $<

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(CXXEXTRA) $(DEFINCL) -o $@ $<

.rc.res:
$(RC) $(RCFLAGS) $(RCEXTRA) $(DEFINCL) -fo$@ $<

# Rules for cleaning

CLEAN_FILES = y.tab.c y.tab.h lex.yy.c core *.orig *.rej \
\\\#*\\\# *~ *% .\\\#*

clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
$(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o)
$(RM) $(DLLS:%=%.so) $(EXES:%=%.so) $(EXES:%.exe=%)

$(SUBDIRS:%=%/__clean__): dummy
cd `dirname $@` && $(MAKE) clean

$(EXTRASUBDIRS:%=%/__clean__): dummy
-cd `dirname $@` && $(RM) $(CLEAN_FILES)

### Target specific build rules
DEFLIB = $(LIBRARY_PATH) $(LIBRARIES) $(DLL_PATH)

$(cudart_dll_MODULE).so: $(cudart_dll_OBJS)
$(CC) $(cudart_dll_LDFLAGS) -o $@ $(cudart_dll_OBJS) $(cudart_dll_LIBRARY_PATH) $(DEFLIB) $(cudart_dll_DLLS:%=-l%) $(cudart_dll_LIBRARIES:%=-l%)

Surferseth
12-16-09, 06:16 PM
Shuttlenut2,
I assume I will need to download the CUDA toolkit for OSX and wine or crossover as well as the 3 files mentioned above?

Bluefalcon13
12-16-09, 06:24 PM
I used the wine bottler download, installed both CUDA kits and got it to run to the point where it would crash as soon as the folding client tried to start (aka after config). I dont know enough about the wrapper to help on this part.