CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] Installing OpenFOAM-3.0.x on RHEL 6.7 (https://www.cfd-online.com/Forums/openfoam-installation/163195-installing-openfoam-3-0-x-rhel-6-7-a.html)

vabishek November 24, 2015 15:43

Installing OpenFOAM-3.0.x on RHEL 6.7
 
1 Attachment(s)
Hello FOAMers,

I am trying to install OF-3.0.x on RHEL 6.7. I am following the steps provided in the link below:

https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL

Everything works fine until step #16. When I try to run ./Allwmake inside the OpenFOAM-3-0.x/ directory, I get the following error:

Code:

g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/include/openmpi-x86_64 -pthread -IlnInclude -I. -I/home/vabishek/OpenFOAM//OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/vabishek/OpenFOAM//OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64Gcc48DPInt64OptSYSTEMOPENMPI/UOPwrite.o Make/linux64Gcc48DPInt64OptSYSTEMOPENMPI/UIPread.o Make/linux64Gcc48DPInt64OptSYSTEMOPENMPI/UPstream.o Make/linux64Gcc48DPInt64OptSYSTEMOPENMPI/PstreamGlobals.o -L/home/vabishek/OpenFOAM//OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt64OptSYSTEMOPENMPI/lib \
            -pthread -Wl,-rpath -Wl,/usr/lib64/openmpi/lib -Wl,--enable-new-dtags -L/usr/lib64/openmpi/lib -lmpi  -o /home/vabishek/OpenFOAM//OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt64Opt/lib/openmpi-system/libPstream.so
'/home/vabishek/OpenFOAM//OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt64Opt/lib/openmpi-system/libPstream.so' is up to date.
touch: cannot touch `/home/vabishek/OpenFOAM//OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt64OptSYSTEMOPENMPI/src/Pstream/mpi/using:openmpi-system': No such file or directory

I have also attached the entire log(make.log.txt). Not sure why it is trying to access ~/OpenFOAM-3.0.x/platforms/linux64Gcc48DPInt64OptSYSTEMOPENMPI/ directory. The only directory present in "~/OpenFOAM-3.0.x/platforms/" is "linux64Gcc48DPInt64Opt". I believe above error arises from setting the incorrect path/environment variables. However, I am not sure how to resolve this. Any comments/suggestions would really help. I have previously installed OF-2.3 and OF-2.4 on the same machine/OS without any such issues.

Thanks!

wyldckat November 24, 2015 16:22

A few questions:
  1. How are you keeping the OpenFOAM versions separated? Or in other words, how are you changing between versions?
  2. Did you make any additional modifications to the files in the folder "OpenFOAM-3.0.x"?
Because there is something very strange going on with your build, because for example, you have this near the end of the log file:
Code:

-fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64Gcc48DPInt64OptSYSTEMOPENMPI/UOPwrite.o
When you should have something like this instead:
Code:

-fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed /home/ofuser/OpenFOAM/OpenFOAM-dev/platforms/linux64Gcc48DPInt64OptSYSTEMOPENMPI/src/Pstream/mpi/UOPwrite.o
In other words, you have the output for the older building type that OpenFOAM 2.4 was still using. Which is why I suspect something from the old versions is somehow being used in your 3.0.x installation.

vabishek November 24, 2015 16:49

Hello Bruno,

Quote:

Originally Posted by wyldckat (Post 574835)
A few questions:
  1. How are you keeping the OpenFOAM versions separated? Or in other words, how are you changing between versions?
  2. Did you make any additional modifications to the files in the folder "OpenFOAM-3.0.x"?

1. Using the aliases (of230, of240 and of30x). I have all the OF-* directories under the same parent dir i.e. /home/user/OpenFOAM/

2. No, I did not make any changes.

vabishek November 25, 2015 08:01

Update: Problem resolved.

I was able to install OF-3.0.x without any further issues. Thanks a lot for your help, Bruno. Your questions helped me solved the problem. As you had mentioned, the installer was referring to the old path instead of the newer one. I commented out the aliases for earlier version in my bashrc, and did a fresh install on a new terminal. It worked well! :)

wyldckat November 27, 2015 16:18

Quote:

Originally Posted by vabishek (Post 574932)
I commented out the aliases for earlier version in my bashrc, and did a fresh install on a new terminal. It worked well! :)

Quick question: Were you always using the same terminal for all versions?

Because that would be the reason for the problem. You should be able to uncomment the aliases again and use the other OpenFOAM versions without problems, as long as you only use one version per terminal window.

vabishek November 30, 2015 08:22

Quote:

Originally Posted by wyldckat (Post 575287)
Quick question: Were you always using the same terminal for all versions?

Because that would be the reason for the problem. You should be able to uncomment the aliases again and use the other OpenFOAM versions without problems, as long as you only use one version per terminal window.

Yes, I have been doing that all this while. I have fixed it now. As you mentioned, I shouldn't encounter any problem as long as I have one version per terminal window.

Thanks!

huynhthienloc March 13, 2016 01:56

1 Attachment(s)
Dear Bruno,

I've been having lots of problems installing OpenFOAM on RHEL 6.7 (kernel version 2.6.32-573) too. As I follow the post https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL
all seems to work well until #16. It takes only a minute complete and no error pops up. I installed OpenFOAM on ubuntu 14.04 before without any issue but I've spent days trying other OpenFOAM versions also but none worked properly.

Please refer to the make.log attached below for your reference. I appreciate any help from your part.

Thank you.

wyldckat March 13, 2016 11:41

Quick answer:
Quote:

Originally Posted by huynhthienloc (Post 589384)
Please refer to the make.log attached below for your reference. I appreciate any help from your part.

Something went wrong with the custom build of GCC 4.8.4. Please run this command:
Code:

echo $FOAM_SETTINGS
and tell me what it gives you.

In addition, please run the following commands:
Code:

cd $WM_THIRD_PARTY_DIR
gzip < mkgcc.log > mkgcc.log.gz

pwd

and attach the file "mkgcc.log.gz" to your next post. The file is located at the directory (folder) pointed out by the last command.

huynhthienloc March 14, 2016 01:37

echo $FOAM_SETTINGS doesn't give result
 
Dear Bruno,

I'm very glad for your prompt reply.
Unfortunately, the echo $FOAM_SETTINGS command doesn't give any result even as root as shown in the picture below.
Also the mkgcc.log after zipping is still bigger (350kb) than the standard allowed in the forum. So could you please go to this link https://drive.google.com/file/d/0B35lBYMD1NcTUEJSYlpZQko2M1k/view?usp=sharing
and see if things went wrong? I'm sorry for this burden.

In the mean time, I succeed in installing OF2.1.1 thanks to http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL
But with my server's specs, I modified (4) to (1)
#here you can change 4 to the number of cores you've got
source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
So I can't do mpirun. Then should I redo the whole process by changing (4) to (12) or only re-run this command?

Thank you very much and hope to hear from you soon.

huynhthienloc March 14, 2016 10:21

CPU Specs
 
2 Attachment(s)
Dear Bruno,

I forgot to attach the photos about the outcome of echo $FOAM_SETTINGS and the specs of my computer. I'm confused about the number of cores I should specify when installing OpenFOAM is (1) or (12)?
(for example:
source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI )

Thank you very much.

wyldckat March 19, 2016 16:09

Greetings Huynh,
Quote:

Originally Posted by huynhthienloc (Post 589523)
I'm very glad for your prompt reply.
[...]
Thank you very much and hope to hear from you soon.

I'm usually able to answer some questions during the weekend, but it's a lot rarer for me during the week :(

Quote:

Originally Posted by huynhthienloc (Post 589523)
Also the mkgcc.log after zipping is still bigger (350kb) than the standard allowed in the forum. So could you please go to this link https://drive.google.com/file/d/0B35lBYMD1NcTUEJSYlpZQko2M1k/view?usp=sharing
and see if things went wrong? I'm sorry for this burden.

Well, GCC 4.8.4 was built successfully. Therefore the origin of the problem is elsewhere.

Quote:

Originally Posted by huynhthienloc (Post 589523)
In the mean time, I succeed in installing OF2.1.1 thanks to http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL

Interesting... this one went well, but not with 3.0.x...

Quote:

Originally Posted by huynhthienloc (Post 589523)
But with my server's specs, I modified (4) to (1)
#here you can change 4 to the number of cores you've got
source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
So I can't do mpirun. Then should I redo the whole process by changing (4) to (12) or only re-run this command?

The "WM_NCOMPPROCS" is not related to being able to run the solvers in parallel. This is only for building OpenFOAM itself faster, by using more cores.

Quote:

Originally Posted by huynhthienloc (Post 589523)
Unfortunately, the echo $FOAM_SETTINGS command doesn't give any result even as root as shown in the picture below.

Quote:

Originally Posted by huynhthienloc (Post 589602)
I forgot to attach the photos about the outcome of echo $FOAM_SETTINGS

You didn't run the command with the correct user. You tried to run the command with the root user, but according to the log file you provided, you built OpenFOAM in your own user.
Therefore, you should run the following commands in a new terminal with your own user (namely without switching user with su):
Code:

of30x
echo $FOAM_SETTINGS


Quote:

Originally Posted by huynhthienloc (Post 589602)
and the specs of my computer. I'm confused about the number of cores I should specify when installing OpenFOAM is (1) or (12)?
(for example:
source $HOME/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI )

You can use either 4 or 12. Your machine seems to have 12 cores, 6 in each socket, therefore you can build OpenFOAM using 12 cores. Nonetheless, if it's already built, then you don't need to change this.

Quote:

Originally Posted by huynhthienloc (Post 589523)
So I can't do mpirun.

I suspect that the problem has to do with how you are loading the OpenFOAM environment. Details on what I mean are given here: http://openfoamwiki.net/index.php/In...with_the_Shell

But in specific, I request that you tell me what you get from the following commands, right after you start a new terminal window:
Code:

alias | grep OpenFOAM
grep OpenFOAM ~/.bashrc

of211
which mpirun

Best regards,
Bruno


All times are GMT -4. The time now is 02:15.