CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installing as root in opt (http://www.cfd-online.com/Forums/openfoam-installation/57300-installing-root-opt.html)

bastil October 19, 2008 15:56

Hi all, I tried installing
 
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.

villet October 19, 2008 17:09

Hi BastiL, I have usually u
 
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 http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

bastil October 20, 2008 02:40

Uncomment "foamInstall=/opt/$W
 
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?

olesen October 20, 2008 03:43

There's something slightly fis
 
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.

bastil October 20, 2008 04:20

"Notice that 'ThirdParty' is a
 
"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.

lin October 20, 2008 04:52

Hi,BastiL For me ,I do not
 
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.

villet October 20, 2008 06:27

BastiL: The problem is in "
 
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.

bastil October 20, 2008 08:36

Ville, i see. I got rid of the
 
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 October 22, 2008 02:54

Everything seems tio work quit
 
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?


All times are GMT -4. The time now is 23:36.