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

Error with custom library linked in controlDict

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Clouch
  • 1 Post By scleakey

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2020, 04:40
Question Error with custom library linked in controlDict
  #1
New Member
 
Clément CAPLIER
Join Date: Sep 2020
Posts: 1
Rep Power: 0
Clouch is on a distinguished road
Hello everyone,


I would like to perform computations on a case with a custom boundary condition, but I have some trouble making it work on a HPC cluster. I'm following the procedure given at the following link (from p19) which is based on the weirOverFlow tutorial, as the case I want to work on is similar :

http://www.tfd.chalmers.se/~hani/kur...key_report.pdf


The concept is to copy an existing boundary condition (the closest to our new boundary condition), modify it, compile with wmake and sourcing the new *.so library in the system/controlDict file of the case. I have done it on both the weirOverFlow tutorial and my personal case, and both on serial and parallel on my computer : it works.


Now I would like to perform this calculations on a HPC cluster and I have some troubles : I have copied the variableHeightFlowRateInletVelocity boundary condition *.H and *.C files in a personal src/ directory, renamed it and compiled with wmake without errors. When I run any of these commands on the weirOverFlow case : blockMesh, setFields, interFoam, this error occurs :
Code:
Create time

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  ? at depthOutletVelocityFvPatchVectorField.C:?
#4  ? in "/lib64/ld-linux-x86-64.so.2"
#5  ? in "/lib64/ld-linux-x86-64.so.2"
#6  ? in "/lib64/ld-linux-x86-64.so.2"
#7  _dl_catch_exception in "/lib64/libc.so.6"
#8  ? in "/lib64/ld-linux-x86-64.so.2"
#9  ? in "/lib64/libdl.so.2"
#10  _dl_catch_exception in "/lib64/libc.so.6"
#11  _dl_catch_error in "/lib64/libc.so.6"
#12  ? in "/lib64/libdl.so.2"
#13  dlopen in "/lib64/libdl.so.2"
#14  Foam::dlOpen(Foam::fileName const&, bool) at ??:?
#15  Foam::dlLibraryTable::open(Foam::fileName const&, bool) at ??:?
#16  Foam::dlLibraryTable::open(Foam::dictionary const&, Foam::word const&) at ??:?
#17  Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) at ??:?
#18  ? at ??:?
#19  __libc_start_main in "/lib64/libc.so.6"
#20  ? at ??:?
Segmentation fault (core dumped)
I've recompiled the copied boundary condition in debug mode (export WM_COMPILE_OPTION=Debug), this is what happens when I execute again the program :
Code:
Create time

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const in "/lib64/libstdc++.so.6"
#4  _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr3std9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ at /usr/include/c++/8/bits/basic_string.h:6058
#5  Foam::HashTable<Foam::tmp<Foam::fvPatchField<Foam::Vector<double> > > (*)(Foam::fvPatchField<Foam::Vector<double> > const&, Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&), Foam::word, Foam::string::hash>::set(Foam::word const&, Foam::tmp<Foam::fvPatchField<Foam::Vector<double> > > (* const&)(Foam::fvPatchField<Foam::Vector<double> > const&, Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&), bool) at /gpfslocalsup/spack_soft/openfoam-org/7/intel-19.0.5-hsmolp2atuki34neiwvbtp7tqsaxwvdm/src/OpenFOAM/lnInclude/HashTable.C:246
#6  Foam::HashTable<Foam::tmp<Foam::fvPatchField<Foam::Vector<double> > > (*)(Foam::fvPatchField<Foam::Vector<double> > const&, Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&), Foam::word, Foam::string::hash>::insert(Foam::word const&, Foam::tmp<Foam::fvPatchField<Foam::Vector<double> > > (* const&)(Foam::fvPatchField<Foam::Vector<double> > const&, Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&)) at /gpfslocalsup/spack_soft/openfoam-org/7/intel-19.0.5-hsmolp2atuki34neiwvbtp7tqsaxwvdm/src/OpenFOAM/lnInclude/HashTableI.H:85
#7  Foam::fvPatchField<Foam::Vector<double> >::addpatchMapperConstructorToTable<Foam::depthOutletVelocityFvPatchVectorField>::addpatchMapperConstructorToTable(Foam::word const&) at /gpfslocalsup/spack_soft/openfoam-org/7/intel-19.0.5-hsmolp2atuki34neiwvbtp7tqsaxwvdm/src/finiteVolume/lnInclude/fvPatchField.H:137
#8  ? at /gpfsdswork/projects/rech/hhg/umo91rl/src/depthOutletVelocity/depthOutletVelocityFvPatchVectorField.C:145
#9  ? at /usr/include/c++/8/iostream:74
#10  ? in "/lib64/ld-linux-x86-64.so.2"
#11  ? in "/lib64/ld-linux-x86-64.so.2"
#12  ? in "/lib64/ld-linux-x86-64.so.2"
#13  _dl_catch_exception in "/lib64/libc.so.6"
#14  ? in "/lib64/ld-linux-x86-64.so.2"
#15  ? in "/lib64/libdl.so.2"
#16  _dl_catch_exception in "/lib64/libc.so.6"
#17  _dl_catch_error in "/lib64/libc.so.6"
#18  ? in "/lib64/libdl.so.2"
#19  dlopen in "/lib64/libdl.so.2"
#20  Foam::dlOpen(Foam::fileName const&, bool) at ??:?
#21  Foam::dlLibraryTable::open(Foam::fileName const&, bool) at ??:?
#22  Foam::dlLibraryTable::open(Foam::dictionary const&, Foam::word const&) at ??:?
#23  Foam::Time::Time(Foam::word const&, Foam::argList const&, Foam::word const&, Foam::word const&) at ??:?
#24  ? at ??:?
#25  __libc_start_main in "/lib64/libc.so.6"
#26  ? at ??:?
Segmentation fault (core dumped)
Could you please help me debug this problem ? I don't know if it's a problem of compiler, of directory, ...



Regards,


Clouch
scleakey likes this.
Clouch is offline   Reply With Quote

Old   October 29, 2021, 10:29
Lightbulb depthOutletVelocity in parallel
  #2
New Member
 
Shannon Leakey
Join Date: Mar 2019
Posts: 10
Rep Power: 7
scleakey is on a distinguished road
Hello, this is my OSCFD report I think I answered you by email back in 2020, but just in case anyone else is reading this, the depthOutletVelocity boundary condition can be fixed to work in parallel by changing one line in the code. See http://www.tfd.chalmers.se/~hani/kur...key/Errata.pdf for the very brief instructions!
dalasrevo likes this.
scleakey 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
Duplicate library entries when running a solver with custom library francescomarra OpenFOAM Programming & Development 3 May 17, 2022 09:37
Forcing a solver to use your custom library. cdunn6754 OpenFOAM Programming & Development 0 March 30, 2017 17:05
decomposePar is missing a library whk1992 OpenFOAM Pre-Processing 8 March 7, 2015 08:53
Different errors when linking custom library via solver vs controlDict chrisb2244 OpenFOAM Programming & Development 0 February 21, 2014 04:12


All times are GMT -4. The time now is 10:45.