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

Problem with compiling a new solver in a supercomputer cluster and EasyBuild

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By missios
  • 1 Post By aliyah.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2022, 08:27
Default Problem with compiling a new solver in a supercomputer cluster and EasyBuild
  #1
Member
 
Al
Join Date: May 2019
Posts: 37
Rep Power: 7
aliyah. is on a distinguished road
Hi

I intended to employ my own solvers on a supercomputer cluster. I am receiving errors even though the solvers worked on my Linux machine and other clouds. Also, both my Linux Workstation and the supercomputer have the same openfoam version.

A difference that may create this problem is that the supercomputer uses EasyBuild to install openfoam.


To confirm that the problem is with the* compilation of a new solver in this supercomputer, I compiled icoFoam in "FOAM USER APPBIN." It failed. Error message:

HTML Code:
/usr/bin/ld: Make/linux64CrayDPInt32Opt/icoFoam.o: in function
 `Foam::fv::laplacianScheme<Foam::Vector<double>, 
double>::New(Foam::fvMesh const&, Foam::Istream&)':
   
 icoFoam.C:(.text._ZN4Foam2fv15laplacianSchemeINS_6VectorIdEEdE3NewERKNS_6fvM
eshERNS_7IstreamE[_ZN4Foam2fv15laplacianSchemeINS_6VectorIdEEdE3N
ewERKNS_6fvMeshERNS_7IstreamE]+0x37): undefined reference to 
`Foam::fv::laplacianScheme<Foam::Vector<double>, 
double>::IstreamConstructorTablePtr_[abi:cxx11]'   
 /usr/bin/ld: icoFoam.C:
(.text._ZN4Foam2fv15laplacianSchemeINS_6VectorIdEEdE3NewERKNS_6fvM
eshERNS_7IstreamE[_ZN4Foam2fv15laplacianSchemeINS_6VectorIdEEdE3N
ewERKNS_6fvMeshERNS_7IstreamE]+0x1f9): undefined reference to 
`Foam::fv::laplacianScheme<Foam::Vector<double>,
 double>::IstreamConstructorTablePtr_[abi:cxx11]'
/usr/bin/ld: Make/linux64CrayDPInt32Opt/icoFoam.o:
(.data.rel.ro._ZTVN4Foam8OPstreamE[_ZTVN4Foam8OPstreamE]+0x80):
 undefined reference to 
`Foam::UOPstream::writeQuoted(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, bool)'

Also the log file for the compilation is as follow.

HTML Code:
Making dependency list for source file icoFoam.C 
CC -std=c++11 -m64 -pthread -DOPENFOAM=2106 -DWM_DP -
DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -
Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-
unknown-pragmas  -O3  -DNoRepository -ftemplate-depth-100 -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/finiteVolume/lnInclude -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/meshTools/lnInclude -iquote. -
IlnInclude -I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/OpenFOAM/lnInclude -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/OSspecific/POSIX/lnInclude   -
fPIC -c icoFoam.C -o Make/linux64CrayDPInt32Opt/icoFoam.o 
CC -std=c++11 -m64 -pthread -DOPENFOAM=2106 -DWM_DP -
DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -
Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-
unknown-pragmas  -O3  -DNoRepository -ftemplate-depth-100 -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/finiteVolume/lnInclude -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/meshTools/lnInclude -iquote. -
IlnInclude -I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/OpenFOAM/lnInclude -
I/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-22.08/src/OSspecific/POSIX/lnInclude   -
fPIC -Xlinker --add-needed -Xlinker --no-as-needed  
Make/linux64CrayDPInt32Opt/icoFoam.o -
L/scratch/project_465000271/EasyBuild/SW/LUMI-
22.08/C/OpenFOAM/v2106-cpeGNU-
22.08/platforms/linux64CrayDPInt32Opt/lib \   
  -lfiniteVolume -lmeshTools -lOpenFOAM -ldl  \ 
  -lm -o /users/nujukamb/OpenFOAM/nujukamb-
v2106/platforms/linux64CrayDPInt32Opt/bin/myIcoFoam

I'll appreciate any help regarding this matter.

Thanks
aliyah. is offline   Reply With Quote

Old   February 9, 2023, 04:11
Default
  #2
New Member
 
Konstantinos Missios
Join Date: Mar 2017
Location: Copenhagen, Denmark.
Posts: 12
Rep Power: 9
missios is on a distinguished road
Hello aliyah.


I faced a similar issue. Although I can't recall the error message.



I remember that the OpenFOAM easyconfig file of LUMI had an issue at some point and the installed OpenFOAM couldn't compile new code.



A solution to that, provided by the LUMI support was:
Quote:
Please find `v2106-cpeGNU-22.08/wmake/rules/linux64Cray/c++` file in your OpenFOAM project directory and add `-D_GLIBCXX_USE_CXX11_ABI=0` in the line number 10, so it will look like this:

c++FLAGS = $(c++ARCH) $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG)
c++$(ptFLAGS)
$(LIB_HEADER_DIRS) -fPIC -D_GLIBCXX_USE_CXX11_ABI=0

Hope it helps. If not you could try compiling again OpenFOAM yourself. To do so, you can follow the instructions provided by prof H. Nilsson here http://www.tfd.chalmers.se/~hani/wik.../_Installation
aliyah. and Opalsky like this.
missios is offline   Reply With Quote

Old   February 9, 2023, 08:23
Default
  #3
Member
 
Al
Join Date: May 2019
Posts: 37
Rep Power: 7
aliyah. is on a distinguished road
Quote:
Originally Posted by missios View Post
Hello aliyah.


I faced a similar issue. Although I can't recall the error message.



I remember that the OpenFOAM easyconfig file of LUMI had an issue at some point and the installed OpenFOAM couldn't compile new code.



A solution to that, provided by the LUMI support was:



Hope it helps. If not you could try compiling again OpenFOAM yourself. To do so, you can follow the instructions provided by prof H. Nilsson here http://www.tfd.chalmers.se/~hani/wik.../_Installation
Thanks, Konstantinos. In fact, I was in touch with LUMI people, and they proposed a solution quite similar to the one you proposed.

Just to highlight Lumi's alternative solution: By adding the following line to the bashrc file, the problem can be solved.

Code:
export FOAM_EXTRA_CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
missios likes this.
aliyah. is offline   Reply With Quote

Reply

Tags
cluster setup, easybuild, new solver


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



All times are GMT -4. The time now is 20:08.