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

Compiling custom solver for profiling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2021, 05:12
Default Compiling custom solver for profiling
  #1
rku
New Member
 
Join Date: Feb 2018
Posts: 17
Rep Power: 8
rku is on a distinguished road
Hi,

I have a custom solver and am trying to compile it with profiling options switched on.

It's a code built on OpenFOAMv1912 and I compile the openfoam itself properly with the flags for the file 'wmake/rules/linux64Gcc/c++Prof' changed to:

Code:
c++DBUG = -pg
c++OPT = -O3 -finline -march=native -fno-omit-pointer
After which I try to compile the custom code (which compiles correctly in debug and normal mode) in profile mode. But I get the following error:

Code:
/home/rku/OpenFOAM/OpenFOAM-v1912/wmake/rules/General/transform:34: recipe for target 'Make/linux64GccDPInt32Prof/xxFvMesh/xxFvMesh.o' failed
make: *** [Make/linux64GccDPInt32Prof/xxFvMesh/xxFvMesh.o] Error 1
wmake solvers/xx
g++ -std=c++11 -m64 -DOPENFOAM=1912 -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 -finline -march=native -fno-omit-frame-pointer -pg -DNoRepository -ftemplate-depth-100 -I/home/rku/OpenFOAM/OpenFOAM-v1912/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools -I/home/rku/OpenFOAM/OpenFOAM-v1912/applications/utilities/mesh/generation/extrude/extrudeMesh -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/TurbulenceModels/incompressible/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/transportModels -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/transportModels/incompressible/singlePhaseTransportModel -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/meshTools/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/sampling/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/dynamicFvMesh/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/surfMesh/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/fvOptions/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/triSurface/lnInclude -I../../src/lnInclude -I../../src/include -IlnInclude -I. -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude -I/home/rku/OpenFOAM/OpenFOAM-v1912/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Prof/xx.o -L/home/rku/OpenFOAM/OpenFOAM-v1912/platforms/linux64GccDPInt32Prof/lib \
    -lturbulenceModels -lincompressibleTurbulenceModels -lincompressibleTransportModels -lfiniteVolume -lmeshTools -lsurfMesh -lfvOptions -lsampling -ldynamicFvMesh -L/home/rku/OpenFOAM/rku-v1912/platforms/linux64GccDPInt32Prof/lib -lxxMethod-lOpenFOAM -ldl  \
    -pg -lm -o /home/rku/OpenFOAM/rku-v1912/platforms/linux64GccDPInt32Prof/bin/xx
/usr/bin/ld: cannot find -lxxMethod
collect2: error: ld returned 1 exit status
There are already a bunch of posts regarding the error '/usr/bin/ld: cannot find -lxxx'. But I couldn't find a solution based on this problem where the error occurs because of switching on the profiling mode.

Does anyone else have it as well? Or link it to something similar already posted..

Thanks again for all the help

Cheers.
rku is offline   Reply With Quote

Reply

Tags
openfoam 1912, profiling


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
Poisson equation in custom solver diverges for large boundary values babakflame OpenFOAM Running, Solving & CFD 2 May 23, 2017 21:11
flow solver won't recognize custom library hakonbar OpenFOAM Programming & Development 2 April 7, 2014 09:09
Error compiling solver controlling custom BC Gaetano OpenFOAM Programming & Development 2 January 22, 2014 07:48
Working directory via command line Luiz CFX 4 March 6, 2011 21:02


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