haddocking / haddock3

Official repo of the modular BioExcel version of HADDOCK
https://www.bonvinlab.org/haddock3
Apache License 2.0
84 stars 28 forks source link

CNS compiling on mac silicone #891

Closed wifeofbrutus closed 1 month ago

wifeofbrutus commented 1 month ago

It appears that CNS does not work with the new mac architecture, only for mac with intel. When trying to instal haddock2.5 I could not even get past the step of compiling CNS. Is there an alternative to CNS that can work? or is there a work around, has anyone had success with installing this? Apologies if this is the wrong place to post this, I am new to github (and code in general)

amjjbonvin commented 1 month ago

The standard CNS package indeed does not recognise the new Mac arm processors. But this can be fixed. It requires editing the get_arch script in the bin directory to add the following lines:

    arm64:Darwin:*:*)
    echo mac-arm64-darwin
    exit 0 ;;

You can download a pre-compiled Mac arm executable from:

https://surfdrive.surf.nl/files/index.php/s/0ecLqStvWdsQzZB SURFdrive - A service by SURF surfdrive.surf.nl

wifeofbrutus commented 1 month ago

thank you for the help, but I still seem to be having some issues, it still says

the architecture of the machine is unknown - CNS_ARCH=unknown-arm64-Darwin aborting installation make: *** [install] Error 1

after make install

here is what I am doing:

downloading the mac-intel cns, and extracting this. I then edit the .cns_solve_env_sh and cns_solve_env to place the path: ~/software/cns_solve_1.3

if I just edit the .cns_solve_env_sh file then an error statying that cns_solve is undefined.

I then get the haddock files, I am using 2.5 (i assume this is the latest release that is supported? on the website it said its early and experimental) and i place these files into the source of the cns_solve_1.3

i then add

    arm64:Darwin:*:*)
    echo mac-arm64-darwin
    exit 0 ;;

to /cns_solve_1.3/bin/getarch

I just add these lines to the end of the script i assume?

then I compile via make isntall, where it returns the error. If i just source .env_xxx

it says: .cns_solve_env_sh:122: no matches found: ~/software/cns_solve_1.3/unknown-*

is there any advice for where I am going wrong? cheers

amjjbonvin commented 1 month ago

Not at the end of the file, rather within the case / esac loop

Did you simply try the pre compiled executable?

On 20 May 2024, at 20:31, wifeofbrutus @.***> wrote:

I just add these lines to the end of the script i assume?

wifeofbrutus commented 1 month ago

executing it through terminal just gave me a page of errors, and I wasnt sure if thats even what I am supposed to do. if you couldn't tell I am completely self taught >:)

amjjbonvin commented 1 month ago

Without more info we can’t help you…

Which processor do you have?

What are the errors?

wifeofbrutus commented 1 month ago

Apologies. Macbook pro m3 max macos sonoma version 14.1

when I try and execute the .exe file, it gives this:

cns_solve-1.31-UU-MacArm64-gfortran.exe:1: command not found: \M-O\M-z\M-m\M-~^L
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: command too long: ^@^@^@^@^@^E^@^@^@^E^@^@^@^H^@^@^@^@^@^@^@__text^@^@^@^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@\M-^@^Q^@^@^A^@^@^@P]3^@^@^@^@^@\M-^@^Q^@^@^D^@^@^@^@^@^@^@^@^@^@^@^@^D^@\M-^@^@^@^@^@^@^@^@^@^@^@^@^@__text_exit^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@\M-Pn3^@^A^@^@^@^T^@^@^@^@^@^@^@\M-Pn3^@^D^@^@^@^@^@^@^@^@^@^@^@^@^D^@\M-^@^@^@^@^@^@^@^@^@^@^@^@^@__text_startup^@^@__TEXT^@^@^@^@^@^@^@^@^@^@\M-pn3^@^A^@^@^@\M-^P^@^@^@^@^@^@^@\M-pn3^@^D^@^@^@^@^@^@^@^@^@^@^@^@^D^@\M-^@^@^@^@^@^@^@^@^@^@^@^@^@__stubs^@^@^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@\M-^@o3^@^A^@^@^@\M-\^E^@^@^@^@^@^@\M-^@o3^@^B^@^@^@^@^@^@^@^@^@^@^@^H^D^@\M-^@^@^@^@^@^L^@^@^@^@^@^@^@__init_offsets^@^@__TEXT^@^@^@^@^@^@^@^@^@^@u3^@^A^@^@^@^H^@^@^@^@^@^@^@u3^@^B^@^@^@^@^@^@^@^@^@^@^@^V^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@__const^@^@^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@pu3^@^A^@^@^@\M-^Q9^C^@^@^@^@^@pu3^@^D^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@__cstring^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@^H\M-/6^@^A^@^@^@^B^@^@^@^@^@^@^H\M-/6^@^C^@^@^@^@^@^@^@^@^@^@^@^B^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@__eh_frame^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@h\M-q6^@^A^@^@^@\M-^P^N^D^@^@^@^@^@h\M-q6^@^C^@^@^@^@^@^@^@^@^@^@^@^K^@^@h^@^@^@^@^@^@^@^@^@^@^@^@^Y^@^@^@\M-h^@^@^@__DATA_CONST^@^@^@^@^@^@
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
[2] 3164
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
[2]  + exit 126   ?
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: command not found: P4
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: permission denied: 
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: bad pattern: ^@^@^@^A^@^@^@^@^@^M^@^@^@^@^@^A^@^@^@^C^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^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@\M-}{\M-;\M-)\M-}^C^@\M-^Q\M-sS^A\M-)s\M-b^D\M-ps\M-B^\\M-^Q\M-u[^B\M-)\M-u#^A\M-^Q\M-v^C^A\M-^Q`jI\M-y\M-w^[^@\M-y\M-`^H^@\M-5s^B2\M-^Qw^B^Y\M-^Q^_ ^C\M-Up:C\M-y\M-`^C^U\M-*qZF\M-yt"^@\M-^Q^^~^Q\M-^[\M-~^@\M-y\M-L^C\M-^T\M-k^C^@\M-*\M-a^C^V\M-*\M-`^C^S\M-*\M-k#^@\M-yX\M-^P^C\M-^Tl
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: unmatched '
cns_solve-1.31-UU-MacArm64-gfortran.exe:1: parse error in command substitution
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: H\M-l
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: I\M-l
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: J\M-l
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: K\M-l
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: \M-^_^@^B\M-k
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: no such file or directory: ^@h\M-0
cns_solve-1.31-UU-MacArm64-gfortran.exe:6: command not found: \M-S^N^P^B\M-^KB
cns_solve-1.31-UU-MacArm64-gfortran.exe:25: parse error near `)'

I am an undergrad who is attempting to self teach myself protein modelling and also programming, so I have close to no idea what that means. I mean if I cant even install the precursory software for one other software....

amjjbonvin commented 1 month ago

How are you executing it?

Try downloading it again (I just updated it with the version from my Mac).

Try then first:

chmod +x ./cns_solve-1.31-UU-MacArm64-gfortran.exe

And then simply call CNS with:

./cns_solve-1.31-UU-MacArm64-gfortran.exe

What you should see is:

./cns_solve-1.31-UU-MacArm64-gfortran.exe

Crystallography & NMR System (CNS) CNSsolve

============================================================ Version: 1.3 at patch level U Status: Special UU release with Rg, paramagnetic and Z-restraints (A. Bonvin, UU 2013)

Written by: A.T.Brunger, P.D.Adams, G.M.Clore, W.L.DeLano, P.Gros, R.W.Grosse-Kunstleve,J.-S.Jiang,J.M.Krahn, J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read, L.M.Rice, G.F.Schroeder, T.Simonson, G.L.Warren. Copyright (c) 1997-2010 Yale University

Running on machine: Goodwine-6.local (x86_64/Linux,64-bit) Program started by: abonvin Program started at: 12:44:40 on 21-May-2024

FFT3C: Using FFTPACK4.1

CNSsolve>

You can exit by typing stop

wifeofbrutus commented 1 month ago

lets goooooooooooooo it worked, my dreams have returned, time to learn computational biology!!!

thank you