CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Installing as root in opt

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2008, 15:56
Default Hi all, I tried installing
  #1
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Hi all,

I tried installing OF1.5 as root into /opt. I still have some trouble and problems. What I did:

1. compiling OF in /home/$MYUSER
2. moving it to /opt as root
3.try to source /opt/OF/etc/bashrc
This leads to some errors. I changed the right of some of the enviroment files but I still have errors from mkdir about being unable to create directories in ThirdParty/openmpi/.../bin and lib. These directorys however exist. Maybe there are other rights issues up to me. I do not know yet. What is your way to do it?
I am also interested in installing OF on Myrinet 10G clusters.

Regards.
bastil is offline   Reply With Quote

Old   October 19, 2008, 17:09
Default Hi BastiL, I have usually u
  #2
Member
 
Ville Tossavainen
Join Date: Mar 2009
Posts: 60
Rep Power: 17
villet is on a distinguished road
Hi BastiL,

I have usually unpacked the distribution package in "/opt/OpenFOAM". It shouldn't make any difference if you have recompiled it first somewhere else, or does it? Anyway, then you need to change just line in "/opt/OpenFOAM/OpenFOAM-1.5/etc/bashrc". Uncomment "foamInstall=/opt/$WM_PROJECT" and comment "foamInstall=$HOME/$WM_PROJECT".

Then I have sourced the "/etc/bashrc" file and recompiled OpenFOAM or just OpenMPI if necessary. By disabling the write priviledges on all files for all users (including me) and I tried to keep the main code untouched. I have done all the running and development stuff under my home directory. The directory structure is created automatically for each user when they source the "/etc/bashrc" file.

I think it's easier to maintain different versions if you place OpenFOAM 1.5 to "/opt/OpenFOAM/OpenFOAM-1.5" instead of "/opt/OF/". But if you like to do it, you may need to do some other changes in the "/etc/bashrc" file.

I hope this helps
villet is offline   Reply With Quote

Old   October 20, 2008, 02:40
Default Uncomment "foamInstall=/opt/$W
  #3
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Uncomment "foamInstall=/opt/$WM_PROJECT" and comment "foamInstall=$HOME/$WM_PROJECT

Forget to mention that I have done this.

/opt/OpenFOAM/OpenFOAM-1.5

I have it there, too. Sorry for my unclear posting.

I currently get the following when sourcing etc/bashrc:
mkdir: `/opt/OpenFOAM/OpenFOAM-1.5/ThirdParty/openmpi-1.2.6/platforms/linux64GccSPOpt/l ib': Permission denied
mkdir: `/opt/OpenFOAM/OpenFOAM-1.5/ThirdParty/openmpi-1.2.6/platforms/linux64GccSPOpt/b in': Permission denied

However, both of the directories exist... I also had to give execution righs to some scripts - maybe there are some more changes needed?

Any experiences with Myrinet 10G?
bastil is offline   Reply With Quote

Old   October 20, 2008, 03:43
Default There's something slightly fis
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
There's something slightly fishy about your configuration. If it is installed with "foamInstall=/opt/OpenFOAM", then you should have the following directory structure (a partial listing):

/opt/OpenFOAM
/opt/OpenFOAM/OpenFOAM-1.5.x
/opt/OpenFOAM/OpenFOAM-1.5.x/application/
/opt/OpenFOAM/OpenFOAM-1.5.x/etc/
/opt/OpenFOAM/OpenFOAM-1.5.x/src/OpenFOAM
...

and

/opt/OpenFOAM/ThirdParty/gcc-4.3.2/platforms
/opt/OpenFOAM/ThirdParty/openmpi-1.2.8/platforms
/opt/OpenFOAM/ThirdParty/ParaView3.3-cvs/
...

Notice that 'ThirdParty' is at the same level as 'OpenFOAM-1.5' and 'OpenFOAM-1.5.x'


BTW: if you've installed everything as root.root, you may also need to adjust the read-permissions:

chmod -R a+r /opt/OpenFOAM


But since you have root permissions anyhow, I find it much nicer to install it under a different user. In our case we have admin users for each of the main user groups (eg, cadadmin, cfdadmin, feaadmin) with the same group, but who is responsible solely for software and configuration issues. Any site-wide changes to OpenFOAM are done by the admin user, which protects the 'normal' users accidentally wrecking things and without running as root for even a single second. The admin user also isn't affected by NFS root squashing, which is really handy if you decided to install OpenFOAM on an NFS share.
olesen is offline   Reply With Quote

Old   October 20, 2008, 04:20
Default "Notice that 'ThirdParty' is a
  #5
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
"Notice that 'ThirdParty' is at the same level as 'OpenFOAM-1.5' and 'OpenFOAM-1.5.x'"

Not for me. Because of the fact that a certain ThirdParty-Package only fits to a certain OF-Version I changed that... I modified etc/bashrc to do that. Using the installation im my home everything works fine. For installation in /opt the directories also exist... However, any of the scripts try to create it and I get this error.

Yes I did is as root.root, that is how our system has been set-up by the administration so far. I will consider switching.
bastil is offline   Reply With Quote

Old   October 20, 2008, 04:52
Default Hi,BastiL For me ,I do not
  #6
lin
Senior Member
 
Hua Zen
Join Date: Mar 2009
Posts: 138
Rep Power: 17
lin is on a distinguished road
Hi,BastiL

For me ,I do not like to change the /etc/bashrc file.

I first compile it in my home directory,then moving it to /opt ,later I use a softlink to my home directory. Just for your reference if you like.
lin is offline   Reply With Quote

Old   October 20, 2008, 06:27
Default BastiL: The problem is in "
  #7
Member
 
Ville Tossavainen
Join Date: Mar 2009
Posts: 60
Rep Power: 17
villet is on a distinguished road
BastiL:

The problem is in "/etc/settings.sh" file. There you can see that it creates the system and user library/exec directories each time "/etc/bashrc" is called. The error messages are harmful as long as PATH and LD_LIBRARY_PATH variables are updated correctly.
villet is offline   Reply With Quote

Old   October 20, 2008, 08:36
Default Ville, i see. I got rid of the
  #8
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Ville, i see. I got rid of the error message by giving execution rights to all the files in the openmpi directory. However I can not run cases in parallel so far.

Someone out there with experience in myrinet?
bastil is offline   Reply With Quote

Old   October 22, 2008, 02:54
Default Everything seems tio work quit
  #9
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Everything seems tio work quite fine now. I have one problem left after first tests: Parallel calculations crash at the end after saving data:

Finalising parallel run
*** glibc detected *** simpleFoam: corrupted double-linked list: 0x0000000006d69680 ***
.... lots of backtrace...

I have never seen this before. I have recompiled the whole application, any ideas?
bastil is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding root of a function hjasak OpenFOAM Programming & Development 4 August 10, 2016 11:16
root blower simulation carno FLUENT 4 May 21, 2015 17:47
ROOT-MEAN-SQUARE Andy Siemens 1 June 19, 2007 13:25
Polynomial Root finding agg Main CFD Forum 3 May 4, 2004 11:46
root mean square John FLUENT 4 May 30, 2002 16:14


All times are GMT -4. The time now is 00:19.