install opensees in MAC .

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
behrangv
Posts: 4
Joined: Tue Feb 26, 2013 5:21 am
Location: urmia university

install opensees in MAC .

Post by behrangv »

hi dear freinds

I have problem with running opensees in MAC . :(

what should i do to install opensees in mac ? which applications shuold i download beside opensees (mac version)? :?: :?:
Jeena
Posts: 50
Joined: Tue Mar 19, 2013 12:40 pm
Location: Virginia Tech

Re: install opensees in MAC .

Post by Jeena »

Hi,

I am also trying to work with OpenSees in Mac OS (OS X 10.8.2) ... I tried to work in the following way

Method 1 : Run .tcl files each time through the OpenSees binary

a. I downloaded OpenSees binary from OpenSees website (http://opensees.berkeley.edu/OpenSees/user/download.php) ... I downloaded the 'Mac version ' from the end of the download page

b. I copied the downloaded file to a current working folder (/Users/Jeena/Desktop/Work_Folder)

c. I have my .tcl file in this particular working folder (Example.tcl)

d. I opened the OpenSees binary application from my 'Work_Folder' and I changed the full path to the current working folder (which for my computer is 'cd Desktop/Work_Folder') .... By typing 'pwd', I can see my current directory as '/Users/Jeena/Desktop/Work_Folder' .... To run the Example.tcl I typed the following again '/Users/Jeena/Desktop/Work_Folder/OpenSees Example.tcl' ....

This successfully ran my 'Example.tcl' file and I am able to see my required results ..... But if I need to run my files in this format, I have to copy the 12Mb OpenSees binary application in each of the subfolder where I store my .tcl files.... Additionally each time I have to write all the above written commands to change the directories to reach my required folder .... So I wanted to set a permanent PATH variable in which I am not successful yet ....

Method 2 : Set a permanent PATH variable (expert users, please let me know what I am doing wrong in this procedure)

a. I opened my Mac terminal and typed the following command '$HOME/usr/bin' ... first time, it showed no such directory exit, so I created a folder 'usr' in '/User/Jeena' and a subfolder 'bin' under '/User/Jeena/usr' ...

b. I copied 'OpenSees binary ' application into the 'bin' subfolder ...and then moved back to $HOME (which for my computer is '/User/Jeena')...

c. I checked if a file '.bash_profile' exist in this home directory ...for the first time , it showed no such file exist....

d. I tried to create a new file '.bash_profile' in the '$Home' directory .... To do this , I wrote 'touch .bash_profile' in the terminal to create the new file ....

e. To open this file, I wrote 'open .bash_profile' and it opened a text editor ... To the text editor , I wrote

'PATH=./:$HOME/usr/bin:$PATH
export PATH'

f. I closed and opened my terminal window once again and I typed 'echo $PATH'....and it displayed

'/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin' ..... (not sure why its starting with '/usr' , I was expecting this to start as /Users/Jeena/usr/bin.... , don't know why this is not taking '$HOME' ) ......

Next , I navigated to my a folder where I have a .tcl file (Trial.tcl) and tried to call this .tcl file by typing 'OpenSees Trial.tcl' .... but it showed 'OpenSees is not a valid command ' ..... So I am not sure, if the PATH is set properly ....

Can someone please help me to find the error ...

Thanks in advance,
Jeena
Jeena
Posts: 50
Joined: Tue Mar 19, 2013 12:40 pm
Location: Virginia Tech

Re: install opensees in MAC .

Post by Jeena »

Hi,

Sorry for the long post, but seems like my OpenSees is working correctly now ... The only change I made is the following ....

I typed 'open -a Finder /usr/bin' and it opened the Finder /usr/bin (this is a hidden file and can't find this folder otherwise). ... I copied my 'OpenSees binary ' application to this /usr/bin ..... and then I tried to open a .tcl file from a random folder and it opened and run successfully and created outputs .....


Thanks,
Jeena
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: install opensees in MAC .

Post by fmk »

i have the following in the .profile file in my home directory:
export PATH=/Users/fmk/bin:/usr/local/bin:$PATH

in a NEW terminal (it does not work if you have just edited the file as the new .profile is not sourced by the current terminal windows)
when i type
env | grep PATH
i see
/Users/fmk/bin

i do not see the corresponding reference in your original post. what you have done is siply copy the OpenSees exe into a location that is on the PATH. personally i do not like putting other
exe with the system exe.
Jeena
Posts: 50
Joined: Tue Mar 19, 2013 12:40 pm
Location: Virginia Tech

Re: install opensees in MAC .

Post by Jeena »

Do you call '/User/fmk' as ur home directory or ''/usr/bin' as ur home directory ....

Also can you tell me how u created this '.profile' file and the location where u created it ?

And do u have ur 'OpenSees binary' application in /usr/local/bin or in /User/fmk/bin .....

I can see /usr/local/bin in my PATH, but I cannot see something like '/User/Jeena/bin' in my PATH (though I created a directory like this and tried to export the PATH)...So do u think , its good idea to copy 'OpenSees binary' application to /usr/local/bin ...will it affect other system files ?

Thanks,
Jeena
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: install opensees in MAC .

Post by fmk »

/Users/fmk is my home directory.
emacs .profile in my home directory
i keep all the applications i build in my bin
in /usr/local/bin i install all external packages that i download and need to build, e.g. gcc, gfortran, ..
the only problem with the /usr/bin is when you upgrade the operating system. you may looses whatever you put in there. it does not effect the files already there.
ibasiliof
Posts: 1
Joined: Tue Feb 25, 2014 3:59 am
Location: Aalborg university
Contact:

Re: install opensees in MAC .

Post by ibasiliof »

Dear Frank (fmk)
I want to install OpenSees in Mac OS X Version 10.7.5
I've been trying to install OpenSees following Jeena's instructions and your advises but, I only get a message saying "Illegal instruction: 4"
http://opensees.berkeley.edu/community/ ... =2&t=60571
Furthermore, I have followed other posts included this one but I'm not able to make it work.

I decided to compile OpenSees. Certainly takes time because some commands are not the same between Linux and Mac but, I'm very interested on make it running.
I just wonder if, does it pay out to built and compiling it instead of just installing the binary file as it seems very handy? in terms of performances, I believe might worth it to invest time compiling? or do you have another instructions particular for Mac systems?
http://opensees.berkeley.edu/wiki/index ... x_Machines
Thank you so much in advance for your time. You'll hear from me again in the near future.
Best regards, Ismael
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: install opensees in MAC .

Post by fmk »

there might be some advantages to building OpenSees on your local machine as you maybe able to set the optimization flags specifc to your machine or indeed use a compiler such as those provided by intel which have special flags for your cpu and may also come with what is known as the intel mkl math library.

building OpenSees on a linux machine is not for the faint of heart, it takes awhile even for prgrammers used to building libraries and applications. you will definitly struggle.
there is a makefile.def for the Mac's in the MAKES directory to help. even if you don't have the intel compilers, you will need a fortran compiler before you can build OpenSees as the Mac never came with one. this will probably require buildiing a version of gcc with fortran included.
Post Reply