mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2007-04-21, 21:05   #1
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

29×277 Posts
Default Mac OS X programmers?

Any out there?

I'm somewhat lazy. Does anyone know the Mac OS X C code to:

1) Get amount of physical memory installed
2) Get thread ID
3) Set thread affinity
4) Set thread priority
5) Find battery vs. AC power state
Prime95 is offline   Reply With Quote
Old 2007-04-21, 23:22   #2
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

151208 Posts
Default

nice() should be able to set the priority.
rogue is offline   Reply With Quote
Old 2007-04-26, 12:38   #3
Andreas.Jantos
 

155028 Posts
Exclamation

Since I'm also lazy and not a Mac OS X programmer, I will just give you some hints and pointers to the appropriate documentation:

1) sysctl(3) is your friend (HW_PHYSMEM): http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/sysctl.3.html

2) pthread_self(3) might help: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/pthread_self.3.html

3) sorry, no clue (and couldn't find anything on apple's site using a quick search)

4) I don't know nice() as a C routine, but just as a command line tool which sets the priority of a process, better suited might be a sequence of pthread_getschedparam(3) and pthread_setschedparam(3): http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/pthread_setschedparam.3.html
or perhaps even simpler pthread_attr_getschedparam(3) and pthread_attr_setschedparam(3): http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/pthread_attr_setschedparam.3.html
also helpful might be the man page for setpriority(2): http://developer.apple.com/documenta...riority.2.html

5) no clue.

An index of man pages can be found there: http://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html
Sections 2 and 3 are the most relevant to C programming.

I will continue to search for solutions to questions 3) and 5) - as I'm waiting since January for a Mac OS X GIMPS client. But I hope this might help at least a bit...
  Reply With Quote
Old 2007-04-26, 21:47   #4
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

29·277 Posts
Default

Quote:
Originally Posted by Andreas.Jantos View Post
as I'm waiting since January for a Mac OS X GIMPS client. But I hope this might help at least a bit...
A completely untested v25 client is at ftp://mersenne.org/gimps/mprime252osXalpha.tgz

Do not use it to contact the server. If you are real lucky, it might can do some manual tests.
Prime95 is offline   Reply With Quote
Old 2007-04-30, 15:36   #5
Ethan (EO)
 
Ethan (EO)'s Avatar
 
"Ethan O'Connor"
Oct 2002
GIMPS since Jan 1996

2×72 Posts
Default

Quote:
Originally Posted by Prime95 View Post
A completely untested v25 client is at ftp://mersenne.org/gimps/mprime252osXalpha.tgz

Do not use it to contact the server. If you are real lucky, it might can do some manual tests.

George --

It seems to work fine! I haven't done exhaustive testing, but the menu works as expected, benchmarks and torture test work fine, and cpu detection seems to be accurate. All noted on a very early MacBook Pro running 10.4.9.


Thanks!

Ethan O'Connor (Primenet EO)
Ethan (EO) is offline   Reply With Quote
Old 2007-05-01, 02:19   #6
Ethan (EO)
 
Ethan (EO)'s Avatar
 
"Ethan O'Connor"
Oct 2002
GIMPS since Jan 1996

2×72 Posts
Thumbs up

Quote:
Originally Posted by Ethan (EO) View Post
George --

It seems to work fine! I haven't done exhaustive testing, but the menu works as expected, benchmarks and torture test work fine, and cpu detection seems to be accurate. All noted on a very early MacBook Pro running 10.4.9.
Well --
Code:
[Apr 30 22:17] Torture Test ran 10 hours, 42 minutes - 0 errors, 0 warnings.
[Apr 30 22:17] Work thread stopped.
[Apr 30 22:17] Execution halted.


Again, this is on a 1.83GHz Core Duo MacBook Pro running 10.4.9.
Ethan (EO) is offline   Reply With Quote
Old 2007-05-01, 03:33   #7
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

29·277 Posts
Default

You may not care but multi-threaded FFTs don't work. I'm trying to figure out why.
Prime95 is offline   Reply With Quote
Old 2007-05-02, 15:16   #8
Ethan (EO)
 
Ethan (EO)'s Avatar
 
"Ethan O'Connor"
Oct 2002
GIMPS since Jan 1996

11000102 Posts
Default

Quote:
Originally Posted by Prime95 View Post
You may not care but multi-threaded FFTs don't work. I'm trying to figure out why.
I haven't had time to dig in at all, but there are a few other behavioral oddities going on -- occasionally the program will get into a state where selecting a menu item that should start a test or benchmark results in an immediate "all worker threads stopped; hit enter to continue" (paraphrased).

When the program is in this state (and sometimes when it is not) there appears to be stack corruption in the main thread, at least according to the activity monitor's sampling profiler. I've been too busy to verify if that's actually true or is an artifact of something else. Let me know if I can be of any assistance -- can you build a debug version and put it on the ftp site?

Ethan
Ethan (EO) is offline   Reply With Quote
Old 2007-05-23, 06:17   #9
crash893
 
crash893's Avatar
 
Sep 2002

23×37 Posts
Default

Quote:
Originally Posted by Prime95 View Post
A completely untested v25 client is at ftp://mersenne.org/gimps/mprime252osXalpha.tgz

Do not use it to contact the server. If you are real lucky, it might can do some manual tests.

this is for intel based macs right?
crash893 is offline   Reply With Quote
Old 2007-05-23, 13:16   #10
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

29×277 Posts
Default

Quote:
Originally Posted by crash893 View Post
this is for intel based macs right?
Correct.
Prime95 is offline   Reply With Quote
Old 2007-05-25, 05:44   #11
crash893
 
crash893's Avatar
 
Sep 2002

23·37 Posts
Default

is there any feed back you need specifically?
crash893 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for MAC GPU programmers ET_ GPU Computing 16 2013-11-10 19:45
Advice for programmers davieddy Software 43 2011-03-29 08:46
PS3 programmers(program conversion for pay?) jasong Programming 5 2007-12-16 00:10
request for script(programmers please read) jasong Sierpinski/Riesel Base 5 6 2005-05-11 20:09

All times are UTC. The time now is 18:46.


Fri Sep 30 18:46:38 UTC 2022 up 43 days, 16:15, 0 users, load averages: 1.43, 1.36, 1.24

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔