gehelem / als

Astro Live Stacker
GNU General Public License v3.0
59 stars 20 forks source link

Performance on macOS Catalina #89

Closed cliff-z closed 4 years ago

cliff-z commented 4 years ago

Might not be a big issue as ALS is designed more for live stacking but stacked three FITS images and will upload debug when Ifigure out how is it the log file ?

cliff-z commented 4 years ago

Nice to have it working on macOS even if not optimum. here is the log file if that is the same as the Debug which I enabled in ALS. als.log

deufrai commented 4 years ago

Hi and Thanks for the logs Aligning is done in 2 phases :

  1. computing how each new image must be transformed (shift, rotate and scale) to match the existing stack
  2. applying the transformation

the logs tell us a few things :

Found transformation for alignment of FILE : /Users/cliffs/alspics/scan/frame_0.fits in 1598.947 ms your machine looks a bit slow, even in phase 1

Applied transformation for alignment of FILE : /Users/cliffs/alspics/scan/frame_0.fits in 10110.392 ms your machine spends a lot of time in phase 2, considering that your frames are not that large (dimensions : Width=3096, Height=2080)

ALS uses multiprocessing (when computer permits it) while applying transformations on color images : 1 process for each of the RGB layers, but the logs don't allow us to tell for sure if mutliprocessing is actually used in phase 2

Do you have a mean to monitor your CPUs' cores activity ? If so, could you check and report if you see 3 heavily used cores during alignment ?

Thanks in advance

cliff-z commented 4 years ago

Hi again,

There is a basic core usage display this is only a two core i7 3.1ghz but has hyper threading making it seem like 4. Stacking 30 of my images it peaks out on the two cores about 75%., As mentioned perhaps the Alt/Az mount is making it work harder than if I used an Equatorial mount.

I will try it with the same images on my Linux system but it is a quad core 2.4ghz i7 .

Look forward to following the development of ALS.

cliff-z commented 4 years ago

Wanted to send my debug log from my Linux Mint system? Seems about the same may be my computers are getting OLD! its a 2012 Mac mini Quadcore i7 at 2.4ghz On linux no debug log file ? tried using als > debug but didn't work properly

deufrai commented 4 years ago

Hi again

  1. What version are you using on this Linux install ? Logging to file has been added very recently on the develop branch : from commit 98f8476
  2. please define "didn't work properly" :)
deufrai commented 4 years ago

And please, as a help for potential OSX users, would you mind describing what you had to do, besides what already is in our install guide, in order to have ALS working on your Mac ?

Thanks in advance

cliff-z commented 4 years ago

Hi again

  1. What version are you using on this Linux install ? Logging to file has been added very recently on the develop branch : from commit 98f8476
  2. please define "didn't work properly" :)

I thought I had the latest version , I believe using 'git pull' command will update it ? Is this correct?

I tried generating my own log file just using a > to write a file but als only processed one image then seemed to just stop not crash but stop.

deufrai commented 4 years ago

yes, git pull is the right way to update your current branch

and indeed, launching ALS in a terminal and redirecting the output to a file like you did seems to randomly renders ALS unusable. That's why we ended up adding the 'log to file' feature, now available on the 'develop' branch

cliff-z commented 4 years ago

And please, as a help for potential OSX users, would you mind describing what you had to do, besides what already is in our install guide, in order to have ALS working on your Mac ?

Thanks in advance

Best I can remember as I have had home-brew installed for a while. I installed home-brew and Xcode command line utilities Installed pip with 'brew install pip' Then followed https://cloud.google.com/python/setup which is similar to your setup description Then pretty much just followed the install you have.

Hope that is of some use , I should document things but I don't

Note: I also have SIP (System Integrity Protection) and Gatekeeper disabled on my macOS Catalina Not sure if thats necessary to install als but I needed to to it for other non-developer approved software. Apples attempt at stopping the average user installing stuff they shouldn't :)

cliff-z commented 4 years ago

yes, git pull is the right way to update your current branch

and indeed, launching ALS in a terminal and redirecting the output to a file like you did seems to randomly renders ALS unusable. That's why we ended up adding the 'log to file' feature, now available on the 'develop' branch

Ok will try an update today and see what happens so if I am in the als local directory do I need the venv or not? then just 'git pull' and it should update I hope. Then I have to rebuild ? As I said I am no programmer !

mworion commented 4 years ago

Hi cliff-z,

that is an really old version of how to install python on mac. There is a package out on python.org, which is also running on catalina. Once installed you get direct from terminal python3 --version the python version you installed. In addition I would recommend to use an virtuelenv for the install. If so do from command line virtualenv venv -p python3.7 to install python in a virtual environment in a subfolder . to activate it: source venv/bin/activate this leads to a changed prompt than you could do pip install or run programs. Catalina does not like homebrew or other old frameworks Hope this helps. Michel

deufrai commented 4 years ago

Ok will try an update today and see what happens so if I am in the als local directory do I need the venv or not? then just 'git pull' and it should update I hope. Then I have to rebuild ? As I said I am no programmer !

from ALS root directory :

  1. make sure your venv is active : you should see (venv) at the beginning of your command prompt if it is not, activate it with : $ source ./venv/bin/activate
  2. update your sources with : $ git pull
  3. recompile UI and RC files : $ python setup.py develop

then you're good to go

cliff-z commented 4 years ago

Will try it today forgot the $ python setup.py develop

cliff-z commented 4 years ago

Hi cliff-z,

that is an really old version of how to install python on mac. There is a package out on python.org, which is also running on catalina. Once installed you get direct from terminal python3 --version the python version you installed. In addition I would recommend to use an virtuelenv for the install. If so do from command line virtualenv venv -p python3.7 to install python in a virtual environment in a subfolder . to activate it: source venv/bin/activate this leads to a changed prompt than you could do pip install or run programs. Catalina does not like homebrew or other old frameworks Hope this helps. Michel

Thanks Michel, I got it working perhaps not the best way as you say homebrew is an old system and yes I am using a venv . May be I should try again using the method you describe. Appreciate your help Cliff

cliff-z commented 4 years ago

updated perfectly on Linux Mint Bionic but now my macOS version is not running at all. fault-log-macos-catalina.txt

cliff-z commented 4 years ago

Using the master branch instead of the develop it works again on Macos Catalina

cliff-z commented 4 years ago

Michel,

I did install python 3.75 from python.org as you suggested

virtualenv venv -p python3.7 didn't work for me

I used python3 -m venv venv

For some reason the develop branch of als didn't work but master did.

cliff-z commented 4 years ago

Further to my macOS Catalina findings the .sh scripts don't work so I had to manually use pip etc.

deufrai commented 4 years ago

updated perfectly on Linux Mint Bionic but now my macOS version is not running at all. fault-log-macos-catalina.txt

Hi Could you create a new issue for this specific problem ?

deufrai commented 4 years ago

Further to my macOS Catalina findings the .sh scripts don't work so I had to manually use pip etc.

Please define 'findings the .sh scripts don't work' 😀

cliff-z commented 4 years ago

Ok after updating my Linux version to latest developer branch here is my log file processing a few images as comparison in speed to the macOS one. als.log

Further to my macOS Catalina findings the .sh scripts don't work so I had to manually use pip etc.

Please define 'findings the .sh scripts don't work' 😀

for example : (venv) MacBook-Pro:als cliffs$ ./ci/full_build.sh readlink: illegal option -- f usage: readlink [-n] [file ...] usage: dirname path readlink: illegal option -- f usage: readlink [-n] [file ...] ./ci/full_build.sh: line 9: /pylint.sh: No such file or directory

Seems macOS handles it differently ran it on Linux works perfect.

cliff-z commented 4 years ago

updated perfectly on Linux Mint Bionic but now my macOS version is not running at all. fault-log-macos-catalina.txt

Hi Could you create a new issue for this specific problem ?

Do you mean that the macOS version it has stopped running on the develop branch ?

deufrai commented 4 years ago

Ok after updating my Linux version to latest developer branch here is my log file processing a few images as comparison in speed to the macOS one. als.log

Yay, much faster !

Further to my macOS Catalina findings the .sh scripts don't work so I had to manually use pip etc.

Please define 'findings the .sh scripts don't work' 😀

for example : (venv) MacBook-Pro:als cliffs$ ./ci/full_build.sh readlink: illegal option -- f usage: readlink [-n] [file ...] usage: dirname path readlink: illegal option -- f usage: readlink [-n] [file ...] ./ci/full_build.sh: line 9: /pylint.sh: No such file or directory

Seems macOS handles it differently ran it on Linux works perfect.

Ok, the readlink command on your system does not know about this 'f' option. Thanks for reporting this

deufrai commented 4 years ago

updated perfectly on Linux Mint Bionic but now my macOS version is not running at all. fault-log-macos-catalina.txt

Hi Could you create a new issue for this specific problem ?

Do you mean that the macOS version it has stopped running on the develop branch ?

It is not OSX specific. On 'develop' there is a check for remaining Stacker processes from a previous ALS crash, and we forgot to check a specific case : zombie processes cannnot be killed.

Don't bother I'll create the issue for this and a fix will come in a matter of minutes

(Edit : Issue #92 created)

deufrai commented 4 years ago

Issue #93 created for the readlink issue

Can we close current issue on OSX perfs ?

cliff-z commented 4 years ago

Yes I will close it thanks