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

[OpenFOAM.org] Installing OpenFOAM-3.0.x on RHEL 6.7

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By vabishek

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2015, 16:43
Exclamation Installing OpenFOAM-3.0.x on RHEL 6.7
  #1
Member
 
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 11
vabishek is on a distinguished road
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!
Attached Files
File Type: txt make.log.txt (38.6 KB, 5 views)
vabishek is offline   Reply With Quote

Old   November 24, 2015, 17:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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.
wyldckat is offline   Reply With Quote

Old   November 24, 2015, 17:49
Default
  #3
Member
 
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 11
vabishek is on a distinguished road
Hello Bruno,

Quote:
Originally Posted by wyldckat View Post
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 is offline   Reply With Quote

Old   November 25, 2015, 09:01
Default
  #4
Member
 
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 11
vabishek is on a distinguished road
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!
vabishek is offline   Reply With Quote

Old   November 27, 2015, 17:18
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by vabishek View Post
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.
wyldckat is offline   Reply With Quote

Old   November 30, 2015, 09:22
Default
  #6
Member
 
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 11
vabishek is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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!
wyldckat likes this.
vabishek is offline   Reply With Quote

Old   March 13, 2016, 02:56
Default
  #7
New Member
 
Huynh Thien Loc
Join Date: Sep 2015
Posts: 5
Rep Power: 10
huynhthienloc is on a distinguished road
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.
Attached Files
File Type: txt make.log.txt (3.2 KB, 10 views)
huynhthienloc is offline   Reply With Quote

Old   March 13, 2016, 12:41
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
Quote:
Originally Posted by huynhthienloc View Post
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.
__________________
wyldckat is offline   Reply With Quote

Old   March 14, 2016, 02:37
Default echo $FOAM_SETTINGS doesn't give result
  #9
New Member
 
Huynh Thien Loc
Join Date: Sep 2015
Posts: 5
Rep Power: 10
huynhthienloc is on a distinguished road
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 is offline   Reply With Quote

Old   March 14, 2016, 11:21
Default CPU Specs
  #10
New Member
 
Huynh Thien Loc
Join Date: Sep 2015
Posts: 5
Rep Power: 10
huynhthienloc is on a distinguished road
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.
Attached Images
File Type: png Foam Setting.PNG (6.0 KB, 9 views)
File Type: png CPU_Spec.PNG (17.9 KB, 10 views)
huynhthienloc is offline   Reply With Quote

Old   March 19, 2016, 17:09
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Huynh,
Quote:
Originally Posted by huynhthienloc View Post
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 View Post
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 View Post
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 View Post
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 View Post
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 View Post
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 View Post
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 View Post
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
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
[Other] How to install OpenFOAM under Windows? lzgwhy OpenFOAM Installation 19 October 7, 2023 05:27
[Other] Basic questions about OpenFOAM cluster running and installing Fauster OpenFOAM Installation 0 May 25, 2018 16:00
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 04:19


All times are GMT -4. The time now is 16:44.