ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Jun 2018 06:47:04 -0500@parallel Parallel Pollard-Rhohttp://ask.sagemath.org/question/42582/parallel-parallel-pollard-rho/I am currently working on the implementation of a parallelized Pollard-Rho algorithm.
I want to use the @parallel command to
D = {}
@parallel(4)
def dist_points(P,Q,dist_prop,r):
ord = P.order()
seed = randint(1,ord)
X = [seed*P,seed, 0]
counter = 0
counter4 = 0
m = [randrange(0,ord) for i in range(r)]
n = [randrange(0,ord) for k in range(r)]
T = [(m[j]*P + n[j]*Q) for j in range(r)]
while(True):
#step function (linear walk)
X = step_linear(T,m,n,ord,X,r)
counter += 1
counter4 += 1
(Pi, ai, bi) = X
x_coord = Pi[0]
global D
if ZZ(x_coord)%dist_prop==0:
if Pi in D:
(a,b) = D[Pi]
if gcd((b-bi),ord)==1:
log = ((ai-a)/(b-bi))%ord
return log, counter4
else:
D[Pi] = (ai,bi)
seed = randint(1,P.order())
X = [seed*P, seed, 0]
counter = 0
elif counter > 100*dist_prop:
seed = randint(1,P.order())
X = [seed*P,seed, 0]
counter = 0
The result of the function works. But I have the feeling that the parallelization does not work.
I want my 4 CPU's to work parallel on a same list D looking for points until they find a match.
But when I change the 6th line to
X = [P,1,0]
so that all the CPU's do the same walk (since my step_linear function is deterministic), I get the same timing.
So it seems that the parallization does not work...
Also this program should work faster for a dist_prop>1. Since we put otherwise all points in the list, and then there is no need for a parallelization right? But my program gets slower the bigger the 'dist_prop' is.
So I thought that might be due to a wrong use of the @parallel command.
I hope someone can help me with the parallel problem!SoftyWed, 13 Jun 2018 06:47:04 -0500http://ask.sagemath.org/question/42582/@Parallel - how to use all CPUshttp://ask.sagemath.org/question/42439/parallel-how-to-use-all-cpus/ I am currently working on a parallelised implementation of Pollard-Rho.
For the parallelization of the program I want to use @parallel.
But how can I allow Sage to use all the CPUs I have? When I put what they propose in ''doc.sagemath.org/html/en/reference/parallel/sage/parallel/parallelism.html'' :
> Using all the cores available on the computer to parallelize tensor computations:
>sage: Parallelism().set('tensor')<br/>
>sage: Parallelism() # random (depends on the computer)
I get back:
> Number of processes for parallelization:<br/>
> - tensor computations: 1
But my computer has more. (Windows tells me: Processor: Intel(R) Core(TM)i5CPU M560 @2.67GHz 2.67 GHz).
How do I activate these? SoftyFri, 25 May 2018 18:39:46 -0500http://ask.sagemath.org/question/42439/Is it possible to download Sage on my PC to work privately (not on the cloud)?http://ask.sagemath.org/question/39872/is-it-possible-to-download-sage-on-my-pc-to-work-privately-not-on-the-cloud/If yes, does that uses a lot of CPU resources? And how can I easily download my Sage Projects (in full) and worksheets, which are on my cloud-Sagemath?logomathFri, 01 Dec 2017 05:38:04 -0600http://ask.sagemath.org/question/39872/Is it possible to verify if cloud sagemath is using any CPU resources, burning resources on my PC?http://ask.sagemath.org/question/39871/is-it-possible-to-verify-if-cloud-sagemath-is-using-any-cpu-resources-burning-resources-on-my-pc/ Or it always runs only on the cloud servers?
logomathFri, 01 Dec 2017 05:29:49 -0600http://ask.sagemath.org/question/39871/Difference of performance bewteen a core i5 and core i7?http://ask.sagemath.org/question/7913/difference-of-performance-bewteen-a-core-i5-and-core-i7/We are planning to use sage for a calculus course,and got some money to buy a dedicated computer. There will be around 20 students using it simultaneously, doing mostly simple computations on it.
We have offers for an intel core i5 (4 threads) and a core i7 (8 threads), both with 16 gigs of RAM).
Would the difference in performance be worth the 100 euros of difference in the price?. Or stated in another form: how important is the number of threads of the processor for the performance of a sage server?mmarcoSun, 30 Jan 2011 00:09:37 -0600http://ask.sagemath.org/question/7913/Dock high CPU usage after sage upgradehttp://ask.sagemath.org/question/26479/dock-high-cpu-usage-after-sage-upgrade/ Hello all,
I wanted to upgrade my sage installation on my mac book pro (running OSX 10.7.5) from the command line.
After running "sage -upgrade" all the downloads and compilations went fine, but then the CPU usage of the Dock.app on my MBP starts to run very high. At least 100%.
At first, I could not figure out what was the source of the problem. I tried many different things related to VMWare, Shared Folders, I even started creating a new user, until I figures out that the newly installed version of sage was causing this.
After I removed the sage/ folder from my /Applications folder and rebooted, everything went back to normal.
Then, I wanted to try a fresh installation from the non-app sage 6.5 package, but the same problem occured.
ATM, I don't have sage installed, and my mac works normally.
Have you already encountered this issue? Is there a know fix?
Thanks!
JJeremyFri, 10 Apr 2015 02:29:14 -0500http://ask.sagemath.org/question/26479/Sage Cloud - RAM and CPUhttp://ask.sagemath.org/question/10576/sage-cloud-ram-and-cpu/Hi experts!!
When I run a script on SAGE Cloud. Where does it execute? Consume my PC RAM memory and CPU or use a Server RAM and CPU?
Thans a lot!!mresimulatorSat, 28 Sep 2013 03:48:29 -0500http://ask.sagemath.org/question/10576/Criteria new computerhttp://ask.sagemath.org/question/8130/criteria-new-computer/Hi, technology changes rapidly, and after a few years everyone has to make a choice about new hardware. Now it is my turn...
I could not find many guidance via Google besides some very specific questions and answers on ASKBOT, Sage-support or Sage-devel. Most related are
ask.sagemath.org/question/546/good-computer-for-fast-computation and (ask.sagemath.org/question/352/difference-of-performance-bewteen-a-core-i5-and)
What are reasonable standards today? What is nice, but not overdone? What is student level, semi-serious, and top-of-the-bill? What are criteria to buy now, or to wait for say 3-6-9 months? Is the Windows experience tool handy? Many related questions.
Based on the above suggestions:
1) Sage is single core: duo core or 4 core seems also good, isn't it?
2) 16G. Does Windows 7 + VMWARE (32bit) or Ubuntu (64bit) need it?
3) SSD is still. But does it increase speed? Value for money?
4) Are there different requirements for integer MIPS, floating point MIPS, specific applications?
5) Any other considerations, as internet speed?
The same questions, but asked differently. What is nice, but not overdone, for:
a) Some integer, floating point or symbolic computations (calculation up to 15 minutes, memory usage < 30Mb)?
b) Same as a), but calculations of 8 hours (mainly Cython) and a lot to save?
A third approach is budget related. If your budget is $300,400,500,750,1000,... What are the main issues to consider? (N.B.: Europe is more expensive). Is it just mainly Sage or it is a multipurpose machine.
Last: simple PC will do, and heavy stuff possible via sagenb / KAIST (and maybe cloud)? Or should I wait for (multi-core) Cygwin?
Many different questions, but some guidance would be appreciated. For me heavy tasks as gaming, video , photo and music are not relevant. Up till now it seems that Intel Core i7-200k 3,4Gzh 8Mb, 16 G memory with 120SSD+60SSD will do. I can use two OS. But makes it sense? Thanks in advance for your support!
(It may be an idea to have a sage page for it, because it seems to me that it is a general question relevant over time for many).
rolandWed, 25 May 2011 10:07:41 -0500http://ask.sagemath.org/question/8130/