CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Compiling New solver on HPC machine (https://www.cfd-online.com/Forums/openfoam-programming-development/198594-compiling-new-solver-hpc-machine.html)

alinuman15 February 11, 2018 23:30

Compiling New solver on HPC machine
 
Hello All
I have successfully compiled a solver on my laptop. However, it is not the case when I tried to compile it on the HPC machine where there is a library includes some dependencies (.H files) and for some unknown reasons it is unable to identify them from the source code as it suppose to ( and as it happened without any problem on my laptop). It gives error like:-
fatal error: incompressibleTwoPhaseMixture.H: No such file or directory
#include "incompressibleTwoPhaseMixture.H"

I made different trials without success like compiling the solver from inside applications/ solver or trying to include the .H files inside the main folder of that library.
Any suggestion?
Thanks

alinuman15 February 17, 2018 00:15

I have found the reason behind the described issue. It is the version of OpenFoam! Where on my laptop, I have compiled the solver on OF2.2.2 but when tried to compile it on the HPC with OF Centos 2.2.2 , it is complaining and does not compile the solver because the locations of the dependencies and the files on Centos version are not the same as the regular OpenFoam version although they are the same!
To solve that we have to install the same exact OF version ! But , put in your mind : not all the HPC computers would accept that even if you compiled the same OF version ( Look at my next post which will report that kind of issue)

godfatherBond February 17, 2018 02:12

Quote:

Originally Posted by alinuman15 (Post 681794)
I have found the reason behind the described issue. It is the version of OpenFoam! Where on my laptop, I have compiled the solver on OF2.2.2 but when tried to compile it on the HPC with OF Centos 2.2.2 , it is complaining and does not compile the solver because the locations of the dependencies and the files on Centos version are not the same as the regular OpenFoam version although they are the same!
To solve that we have to install the same exact OF version ! But , put in your mind : not all the HPC computers would accept that even if you compiled the same OF version ( Look at my next post which will report that kind of issue)

Hi,
We had kind of a similar issue with our HPC compiling OpenFoam. What you can do is:
1.Compile OpenFoam direclty on the HPC after compiling Gcc,MPI,etc in third party folder. It may take time but will work fine.
2.Copy the compiled OF from your laptop to your HPC , the compiled applications will work but newly compiled solvers will have to be compiled on your local machines and then moved on to the HPC. Note: OpenMPI needs to be compiled on the HPC for the laptop compiled OF to work in parallel on the HPC.
3.Or you can use the precompiled versions such as Open-Foam-in-Box which work direclty.

ES7

alinuman15 February 18, 2018 01:43

Quote:

Originally Posted by godfatherBond (Post 681800)
Hi,
We had kind of a similar issue with our HPC compiling OpenFoam. What you can do is:
1.Compile OpenFoam direclty on the HPC after compiling Gcc,MPI,etc in third party folder. It may take time but will work fine.
2.Copy the compiled OF from your laptop to your HPC , the compiled applications will work but newly compiled solvers will have to be compiled on your local machines and then moved on to the HPC. Note: OpenMPI needs to be compiled on the HPC for the laptop compiled OF to work in parallel on the HPC.
3.Or you can use the precompiled versions such as Open-Foam-in-Box which work direclty.

ES7

Thanks for commenting. I have the following for each of your points:-
1. How could you know the suitable version of Gcc, .. etc ? Do they need root access ?

2. Unfortunately, it does not work where I got error like :-
make: Target `application' not remade because of errors.
after doing ./Allwmak inside applications folder.

3. Again ,that does not work. I have tried it!
for e.g. when you try to do blockMesh, you will get something like:-
blockMesh: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/home/XXX/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libblockMesh.so)

godfatherBond February 18, 2018 02:36

Quote:

Originally Posted by alinuman15 (Post 681873)
Thanks for commenting. I have the following for each of your points:-
1. How could you know the suitable version of Gcc, .. etc ? Do they need root access ?

2. Unfortunately, it does not work where I got error like :-
make: Target `application' not remade because of errors.
after doing ./Allwmak inside applications folder.

3. Again ,that does not work. I have tried it!
for e.g. when you try to do blockMesh, you will get something like:-
blockMesh: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/home/XXX/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libblockMesh.so)

Hi,
1. Check the Readme in the ThirdParty(or makeGcc script) , it will mention the version of GCC supported. No root access is not needed if you compile it in your user area.
2.Once you have compiled the solvers on your laptop, then just copy the compiled OF to your HPC account , source the bashrc and it'll run the compiled applications, may be not in parallel but serial would work.
3.I am pretty sure that a precompiled version such as Open-FOAM-in-Box will work directly on yor HPC as it is compiled and has all the dependent libraries.
https://www.cfdsupport.com/openfoam-in-box.html <-Check this

I am sure if you perform the steps carefully , it'll work. We also have CentOS in out HPC, and we are not provided root permissions.
ES7

alinuman15 February 18, 2018 22:12

Quote:

Originally Posted by godfatherBond (Post 681879)
Hi,
1. Check the Readme in the ThirdParty(or makeGcc script) , it will mention the version of GCC supported. No root access is not needed if you compile it in your user area.
2.Once you have compiled the solvers on your laptop, then just copy the compiled OF to your HPC account , source the bashrc and it'll run the compiled applications, may be not in parallel but serial would work.
3.I am pretty sure that a precompiled version such as Open-FOAM-in-Box will work directly on yor HPC as it is compiled and has all the dependent libraries.
https://www.cfdsupport.com/openfoam-in-box.html <-Check this

I am sure if you perform the steps carefully , it'll work. We also have CentOS in out HPC, and we are not provided root permissions.
ES7

Unfortunately all that does not work although I did even more than that before your suggestions.
Thanks though for all your comments.

godfatherBond February 18, 2018 22:25

Quote:

Originally Posted by alinuman15 (Post 681987)
Unfortunately all that does not work although I did even more than that before your suggestions.
Thanks though for all your comments.

Tough luck!!
It is interesting to know that the compiled version "OpenFoam-in-box" did not work.
May be if you explained in detail the steps you followed then someone may be able to help you in a better manner.

alinuman15 February 18, 2018 22:42

Quote:

Originally Posted by godfatherBond (Post 681988)
Tough luck!!
It is interesting to know that the compiled version "OpenFoam-in-box" did not work.
May be if you explained in detail the steps you followed then someone may be able to help you in a better manner.

I have followed the following steps:-
1. I have Installed OF2.2.2 on my laptop from the link :-
http://openfoamwiki.net/index.php/In...u#Ubuntu_15.10
2. I copied the main compiled folder of OF2.2.2 to the home of HPC, loaded of222 and then I changed the directory to application folder and inside i did :- ./Allwmake
but after certain time of compilation I got :-
make: Target 'application' not remade because of errors

godfatherBond February 18, 2018 23:07

Quote:

Originally Posted by alinuman15 (Post 681989)
I have followed the following steps:-
1. I have Installed OF2.2.2 on my laptop from the link :-
http://openfoamwiki.net/index.php/In...u#Ubuntu_15.10
2. I copied the main compiled folder of OF2.2.2 to the home of HPC, loaded of222 and then I changed the directory to application folder and inside i did :- ./Allwmake
but after certain time of compilation I got :-
make: Target 'application' not remade because of errors

I don't think you read my replies carefully.
You don't need to compile again on the HPC. Why are you running ./Allwamke again??
Just copy your full OpenFOAM folder, source the bashrc and run a simple cavity problem.

Also I think you do not understand what a pre-compiled version on OF is! It has all the dependent libraries , nothing is needed, it works out of the box.
Are you a beginner with linux system?? No offence though.

alinuman15 February 18, 2018 23:18

Quote:

Originally Posted by godfatherBond (Post 681991)
I don't think you read my replies carefully.
You don't need to compile again on the HPC. Why are you running ./Allwamke again??
Just copy your full OpenFOAM folder, source the bashrc and run a simple cavity problem.

Also I think you do not understand what a pre-compiled version on OF is! It has all the dependent libraries , nothing is needed, it works out of the box.
Are you a beginner with linux system?? No offence though.

I did ./Allwmake again because when I tried to run any solver (like cavity problem ) , I got something like:-

: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/home/XXX/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libblockMesh.so)

Regarding the pre-compiled version, I have tried all the possible trials you could imagine! But without successful compilation!

godfatherBond February 18, 2018 23:33

Quote:

Originally Posted by alinuman15 (Post 681993)
I did ./Allwmake again because when I tried to run any solver (like cavity problem ) , I got something like:-

: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /export/home/XXX/OpenFOAM/OpenFOAM-2.2.2/platforms/linux64GccDPOpt/lib/libblockMesh.so)

Regarding the pre-compiled version, I have tried all the possible trials you could imagine! But without successful compilation!

Ok first one I can agree you get a problem.

But regarding the pre-compiled version, if you notice it is aroun 2Gb when uncompressed and there is no need ti compile it again. Could you please mention the steps you followed for the pre-compiled version Open-Foam-in-box from cfd-support.com.

I find it hard to believe as I had done the same procedure, but did not face any issues. may be you are missing something.

Best
ES7

alinuman15 February 18, 2018 23:39

Quote:

Originally Posted by godfatherBond (Post 681995)
Ok first one I can agree you get a problem.

But regarding the pre-compiled version, if you notice it is aroun 2Gb when uncompressed and there is no need ti compile it again. Could you please mention the steps you followed for the pre-compiled version Open-Foam-in-box from cfd-support.com.

I find it hard to believe as I had done the same procedure, but did not face any issues. may be you are missing something.

Best
ES7

Could you describe specifically your steps because the link you have inserted ( cfd-support.com) is general!
Thanks!

godfatherBond February 18, 2018 23:53

Quote:

Originally Posted by alinuman15 (Post 681996)
Could you describe specifically your steps because the link you have inserted ( cfd-support.com) is general!
Thanks!

Download the file below
https://www.cfdsupport.com/download-...am-in-box.html
move it to you HPC.
Just extract(run) it and source .
You are good to go.

I did not understand the 'general' steps.

alinuman15 February 18, 2018 23:56

Compiling New solver on HPC machine
 
That what I did exactly! But does not work for me!
I meant it is a general Website ( there is nothing specific relates to what are we talking about)
thanks , long talk ;)

godfatherBond February 19, 2018 00:09

Quote:

Originally Posted by alinuman15 (Post 681998)
That what I did exactly! But does not work for me!
I meant it is a general Website ( there is nothing specific relates to what are we talking about)
thanks , long talk ;)

Hard Luck !!
I hope you find a way around.

Andrew.Coughtrie February 21, 2018 09:11

To compile the version of OpenFOAM you want on your HPC follow the relevant instructions from this page, OpenFOAM installation instructions

Since you're unlikely to have root access on the machine you'll have to hope the dependencies are already installed. If they aren't then you'll probably need to speak to whoever the administrator for the machine is and get them to sort it.

Good Luck.

Andy

alinuman15 February 21, 2018 10:06

Quote:

Originally Posted by Andrew.Coughtrie (Post 682410)
To compile the version of OpenFOAM you want on your HPC follow the relevant instructions from this page, OpenFOAM installation instructions

Since you're unlikely to have root access on the machine you'll have to hope the dependencies are already installed. If they aren't then you'll probably need to speak to whoever the administrator for the machine is and get them to sort it.

Good Luck.

Andy

Thanks Andy!
Unfortunately, I found that there is an old version of GLIBC and I have to contact the administrator as you have suggested.


All times are GMT -4. The time now is 11:07.