0

I previously had a laptop doing all my work -i7 3537u- but the battery suddenly died and can't run on AC for more than some minutes.

In order to being able to work, I installed Ubuntu -same version 18.04- on my Desktop -Ryzen 2600x- and installed Anaconda3 and the same library I used (for completeness, called GraviPy)

Thing is, I expected the script to run in the same or better time (same since I've heard Python is more optimized on Intel) but to the contrary the first "part" of the scrip runs in about 4x time than it did in Laptop, AND the second part pops an Error executing some simple numerical things (something about floats but its LITERALLY the same script).

I tried it to 2 different machines, BOTH marginally worse than my Desktop.

On one it worked fully and MUCH faster than in desktop (measuring only the working part) and on the second, it took way too much time, while giving the same error on the second part.

So the Question is, is there a way I can copy the Python environment to run that scrip? (The laptop still running for an hour or so and then shuts down)

I tried to check conda list but the length was insane in both desktop and environment. (I saw the the laptop had previous Anaconda version)

PS: Error message:

TypeError: can't convert expression to float
...
...
error: Result from function call is not a proper array of floats. 
Billy Matlock
  • 340
  • 2
  • 14
  • It would be very useful to know what the error message is. We recently encountered cases that caused problems in numerical stuff, because some Ryzen FPU-s implement a slightly different handling in some cases, which is still sandard compliant. – g_bor Oct 03 '20 at 18:23
  • The error is the same on an i7-8700 Desktop, which also run about 3 times slower compared to the i7 3537u. (Error posted in Question) – Billy Matlock Oct 03 '20 at 18:25
  • Do you use wildcard imports in your script? – g_bor Oct 03 '20 at 18:33
  • I know where this is going, but Yeah, I use *. Although, keep in mind, that the same script works on different computers, and run_time is also an issue. But yeah, i'm using – Billy Matlock Oct 03 '20 at 18:36
  • I believe one approch to cloning the enviromnet like you want is using venvs: https://docs.python.org/3/library/venv.html If you can make the script woking in a venv, you have a fairly good chance that it will also work with the same setup on another machine. – g_bor Oct 03 '20 at 18:41
  • @g_bor Uhm, I'm literally clueless about this. Pretty sure I didn't install this, but is tehre a quick way to install this. Also, would it be helpful if I posted the `conda list` results from a working and a non-working machine? – Billy Matlock Oct 03 '20 at 18:53
  • @g_bor Just installed venv with conda install. WIll tle u the results in some minutes. – Billy Matlock Oct 03 '20 at 18:59
  • @g_bor Just installed and run. Same time and same error :( – Billy Matlock Oct 03 '20 at 19:05
  • I have no idea what the actual problem is with the setup, most probably something in the environment. What I would try is to create a venv on the machine that can run the script, and set up the same on the other one. https://stackoverflow.com/questions/34993200/copy-complete-virtualenv-to-another-pc/34993306 – g_bor Oct 03 '20 at 19:11
  • @g_bor gonna try it :( Thanks for spending your time on this :) – Billy Matlock Oct 03 '20 at 19:20

0 Answers0