CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

modified OF version on HPC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2016, 05:24
Default modified OF version on HPC
  #1
Member
 
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10
federicabi is on a distinguished road
Hi everyone!
I need to compile a custom version of OF3.0.1 on a HPC cluster (CentOS 7.1) and I have never done this before so I'm not familiar with environment variables and .pbs files. I try to explain what my problem is even if it is not easy at all.

I compiled without errors the standard version of OF3.0.1 in $HOME/Openfoam following this guide https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL. I put the modified src folder in $HOME/Openfoam/fbiano00-3.0.1 (my folder on the cluster) and I run wmake to compile it. No errors came out.

Now I need to submit my jobs using the modified OF version instead of the standard version.
I used this .pbs file to submit jobs with standard OF and I don't know how to modify it for my purpose.

Allrun_18.pbs
Code:
#!/bin/bash
#PBS -A azi_prod_0
#PBS -l walltime=15:00:00
#PBS -l select=2:ncpus=16:mpiprocs=16:mem=120GB
#PBS -N 18
#### File di output e di errore
#PBS -o job.out
#PBS -e job.err
#PBS -M federica.biano@gmail.com
#### Coda di sottomissione
echo "Job started at " `date`
#### change dir to your working directory
cd $PBS_O_WORKDIR
#### load bash shell cineca to set the module environment
source /cineca/prod/environment/module/3.1.6/none/init/bash
module purge
module load gnu/4.9.2
module load openmpi/1.8.4--gnu--4.9.2
module load profile/advanced
module load openfoam/3.0.1
jobid=`echo $PBS_JOBID | sed 's/[.].*//'`
name=18kn
./Allrun $name > OUT.$jobid.txt
echo "Job finished at " `date`
exit
Can you please help me? I can give you any other relevant information if you ask.
Thanks in advance

Federica
federicabi is offline   Reply With Quote

Old   October 6, 2016, 16:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 Federica,

I've moved your post from the Installation forum to the Solving forum, because this seems more related to running in the HPC environment. And since you've stated that it seems to have been installed without any error messages, then we might as well move to the next step.

From your description, it seems like you did not use any of the following commands before building your custom build of OpenFOAM 3.0.1:
Code:
module load gnu/4.9.2
module load openmpi/1.8.4--gnu--4.9.2
module load profile/advanced
module load openfoam/3.0.1
If so, then I expect that you can remove those 4 lines and replace them with these two:
Code:
module load openmpi-x86_64
source $HOME/OpenFOAM/OpenFOAM-3.0.x/etc/bashrc foamCompiler=ThirdParty WM_COMPILER=Gcc48 FOAMY_HEX_MESH=yes
These 2 essentially do the same as the other 4, but for your own installation.


However, I am a bit worried about the following statement that you wrote:
Quote:
Originally Posted by federicabi View Post
I put the modified src folder in $HOME/Openfoam/fbiano00-3.0.1 (my folder on the cluster) and I run wmake to compile it. No errors came out.
I didn't understand where the "src" folder came from and why you placed it inside that folder.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 10, 2016, 09:23
Default
  #3
Member
 
Federica Biano
Join Date: Feb 2016
Location: Genova, Italy
Posts: 39
Rep Power: 10
federicabi is on a distinguished road
Hi Bruno!
Thank you for your reply! my apologies if I posted in the wrong section.
actually I replaced the four lines you mentioned with the two lines you suggested and it worked perfectly!

Regarding the src folder, I followed the procedure I used to compile a new OF library on my computer, but on the cluster, so since I modified a sixDoFRigidBodyMotion library, I recompile only that part of the OF source on my personal folder on the cluster. Indeed the src folder in my personal folder contains only the modified library.

I'm sorry if I'm not able to be more clear, I'm not an expert and I followed only the hints I found on this forum.

Anyway, thank you very much for your help!


Federica
federicabi is offline   Reply With Quote

Old   October 10, 2016, 19:18
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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 answers:
Quote:
Originally Posted by federicabi View Post
Thank you for your reply! my apologies if I posted in the wrong section.
No problem. I only pointed it out to make it clearer why I had moved the thread . Sometimes I also don't know for certain on which sub-forum a thread should be, since it's referring to several topics.

Quote:
Originally Posted by federicabi View Post
Regarding the src folder, I followed the procedure I used to compile a new OF library on my computer, but on the cluster, so since I modified a sixDoFRigidBodyMotion library, I recompile only that part of the OF source on my personal folder on the cluster. Indeed the src folder in my personal folder contains only the modified library.

I'm sorry if I'm not able to be more clear, I'm not an expert and I followed only the hints I found on this forum.
Mmm... well, this information is a bit important to understand other potential future problems.
Depending on the changes you've done, you might want to change the final name and location of the custom library. If you edit the file "Make/files" for this custom library and change the last line to use "FOAM_USER_LIBBIN" instead of "FOAM_LIBBIN" and if you use another name for the library, this way you can ensure that the original build of this library is not affected. Then don't forget to use the correct name in the dictionary files on the case.
wyldckat 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
OpenFOAM on cluster: version GLIBCXX_3.4.9 and GLIBCXX_3.4.11 not found ovie OpenFOAM 10 April 19, 2021 18:06
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 02:54
Can we merge HPC Pack licenses? Phillamon FLUENT 0 January 24, 2014 02:59
OpenFOAM Patched Version 1.5 via git Repository OpenFOAM discussion board administrator OpenFOAM Announcements from ESI-OpenCFD 0 August 26, 2008 05:06
Version 12 speed compared to 11 maka OpenFOAM Running, Solving & CFD 2 December 21, 2005 05:42


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