Installation on mac OS

Moderators: cyao, soliday

Post Reply
Aamna_Khan
Posts: 49
Joined: 13 Oct 2016, 09:17

Installation on mac OS

Post by Aamna_Khan » 07 Jan 2021, 16:13

Hello,

I’m trying to install elegant on macbook pro (macOS BIg Sur ver. 11.1). I downloaded the files at home/sdds dir. and followed all the installation instructions, but still I can execute elegant using ./elegant in the sdds folder only. Elegant was working fine on my old system, and I checked most of the suggestions on the forum. I suspect like most of the cases there is something wrong with the path. I would really appreciate any help. Thanks!

Aamna

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: Installation on mac OS

Post by soliday » 07 Jan 2021, 18:31

I don't have access to MacOS 11.1 yet. I am building and testing on MacOS 10.14.6.
It is unclear if you built it yourself or downloaded the pre-built version. Here is what I would try:
1. Download from https://ops.aps.anl.gov/downloads/darwi ... ant.tar.gz
2. Unpack using the command "tar -xvf darwin-x86_elegant.tar.gz"
3. cd into darwin-x86 directory
4. Try running "./elegant" to see the usage message.
5. If this fails, then run "otool -L elegant"
This will let you know if it is looking for a shared library that doesn't exist on your system. The results I get are:

Code: Select all

$ otool -L elegant
elegant:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
6. Send me the results of steps #4 and #5

Aamna_Khan
Posts: 49
Joined: 13 Oct 2016, 09:17

Re: Installation on mac OS

Post by Aamna_Khan » 08 Jan 2021, 09:28

I downloaded the pre-built version.
Here is the usual output from step 4:

Code: Select all

aamnakhan@10-4-6-241 darwin-x86 % ./elegant
Running elegant at Fri Jan  8 09:10:37 2021

This is elegant 2020.5, Dec 10 2020, by M. Borland, J. Calvey, M. Carla', N. Carmignani, M. Ehrlichman, L. Emery, W. Guo, R. Lindberg, V. Sajaev, R. Soliday, Y.-P. Sun, C.-X. Wang, Y. Wang, Y. Wu, and A. Xiao.
usage: elegant {<inputfile>|-pipe=in} [-macro=<tag>=<value>,[...]] [-rpnDefns=<filename>] [-configuration=<filename>]
=====================================================================================
Thanks for using elegant.  Please cite the following reference in your publications:
  M. Borland, "elegant: A Flexible SDDS-Compliant Code for Accelerator Simulation,"
  Advanced Photon Source LS-287, September 2000.
If you use a modified version, please indicate this in all publications.
=====================================================================================
Link date: Dec 10 2020 17:14:34, SVN revision: 27562M
Step 5 also has the same output as yours:

Code: Select all

aamnakhan@10-4-6-241 darwin-x86 % otool -L elegant
elegant:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: Installation on mac OS

Post by soliday » 08 Jan 2021, 10:16

Okay, I think I misunderstood the problem you are having. I thought you couldn't get elegant to run. You will have to set your path to include the full directory where the elegant program is at. On macOS you can do this in the .profile file in your home directory. Add the lines:

export PATH="/Users/aamnakhan/darwin-x86:$PATH"
export RPN_DEFNS=/Users/aamnakhan/defns.rpn

Change the lines above to use the actual path for elegant and the defns.rpn file.
Next time you open a new terminal, it should read this file and set the path correctly.

Aamna_Khan
Posts: 49
Joined: 13 Oct 2016, 09:17

Re: Installation on mac OS

Post by Aamna_Khan » 08 Jan 2021, 10:44

I've already setup environment variables in ~/.profile still it shows command not found.
Attachments
Screen Shot 2021-01-08 at 10.43.31 AM.png

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: Installation on mac OS

Post by soliday » 08 Jan 2021, 10:58

You are in a zsh shell environment. So you would probably have to edit your .zshrc file and put the path commands in there.

Aamna_Khan
Posts: 49
Joined: 13 Oct 2016, 09:17

Re: Installation on mac OS

Post by Aamna_Khan » 08 Jan 2021, 11:04

Thank you my bad. Unconsciously I tried to edit the bashrc file instead of zashrc :oops:

Post Reply