![]() |
![]() |
#1 |
"Bob Silverman"
Nov 2003
North of Boston
2·3,779 Posts |
![]()
I am setting up to run ECM in a distributed environment.
I am creating a parent process that gets the hostname, creates checkpoint and output file names from the hostname, then makes a call to system() with an appropriately constructed command string to invoke GMP-ECM. I would also like to have separate output files for each core when running on a multi-core system. Otherwise, if I name e.g. my output files as "hostname.chk" I will get collisions. Does anyone know of a Windows system call that will return the processor ID during run-time? I could then incorporate the processor ID in the output file names. I tried Google, of course, but can't seem to find/use the right keywords. |
![]() |
![]() |
![]() |
#2 |
Mar 2006
23·3·23 Posts |
![]()
Why not use your "parent process" to pick a unique id and then append that to the chk file?
You could use uid's like {1,2,3,4} and give the checkfile name to gmp-ecm like -chkpnt hostname-1.chk, -chkpnt hostname-2.chk, etc. |
![]() |
![]() |
![]() |
#3 |
P90 years forever!
Aug 2002
Yeehaw, FL
22·5·7·59 Posts |
![]()
GetAffinityMask tells you which processors your program is allowed to run on. It does not tell you which processor you are currently assigned to. Thus it always returns -1, unless you or someone else has called SetAffinityMask.
GetSystemInfo will return the number of logical processors on the machine. |
![]() |
![]() |
![]() |
#4 | |
"Forget I exist"
Jul 2009
Dartmouth NS
2×52×132 Posts |
![]() Quote:
http://www.computerhope.com/msdos.htm for windows system commands but I'm not sure how in date these are. wonder if PARI can generate a list of valid commands it allows system calls. |
|
![]() |
![]() |
![]() |
#5 |
Einyen
Dec 2003
Denmark
2·3·52·23 Posts |
![]()
You can have one copy of gmp-ecm for each core. Use imagecfg.exe to setup each gmp-ecm to run on a specific core:
http://www.robpol86.com/index.php/ImageCFG imagecfg.exe -a 0x1 ecm.exe imagecfg.exe -a 0x2 ecm.exe imagecfg.exe -a 0x4 ecm.exe imagecfg.exe -a 0x8 ecm.exe this setting remains with the ecm.exe until changed with imagecfg or until ecm.exe overwritten by a recompile. |
![]() |
![]() |
![]() |
#6 | ||
"Bob Silverman"
Nov 2003
North of Boston
2·3,779 Posts |
![]() Quote:
Reasonable. If you can tell me how a process can pick a unique ID. One has (say) two processes running. Suppose I generate a PRN based on (say) microseconds after midnight and use it as an ID. There is no guarantee that it will be unique. Highly probable, yes. But no guarantee. Alternately, I could set up an external file: ID1 flag ID2 flag ID3 flag Where flag = 0 for "ID available". It then gets set to 1 when used. However, there is no guarantee that two processes won't both read the same line at the same time. Quote:
Windows system level coding as I do Unix. |
||
![]() |
![]() |
![]() |
#7 | |
"Bob Silverman"
Nov 2003
North of Boston
2×3,779 Posts |
![]() Quote:
onto any office machines. |
|
![]() |
![]() |
![]() |
#8 | |
"Bob Silverman"
Nov 2003
North of Boston
2×3,779 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
"William"
May 2003
Near Grandkid
53×19 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
2DFB16 Posts |
![]() |
![]() |
![]() |
![]() |
#11 |
"Bob Silverman"
Nov 2003
North of Boston
2·3,779 Posts |
![]()
I would have to designate a machine to be the server.
I have no way to assure that said machine will be up at any given time. I am using public machines which are subject to being disconnected (so others can plug in their laptop), turned off at the whim of the last one to log in, etc. etc. Sometimes people disconnect a machine to plug in their laptop only to fail to restore the connection later. The only machanism that I have for starting distributed processes is the Windows task scheduler (equivalent to Unix cron jobs). Availability of machines is very unreliable. I can't use my laptop as the server since I often take it home. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Set affinity does not work | g33py | Software | 3 | 2016-07-27 05:26 |
Core affinity question | philmoore | Information & Answers | 2 | 2013-06-16 05:44 |
(windows) How to launch mfaktO/C with processor affinity | swl551 | Software | 1 | 2012-09-24 23:29 |
Helper Thread Affinity | TObject | Software | 3 | 2012-07-20 19:21 |
Affinity on Linux | bmg9611 | Software | 5 | 2002-11-04 21:26 |