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

cannot compile solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2017, 12:26
Default cannot compile solver
  #1
New Member
 
Ricardo
Join Date: Sep 2011
Posts: 15
Rep Power: 14
rvmedina20 is on a distinguished road
Hello all,

I am having trouble compiling an application on a university cluster which had originally compiled without any trouble.

Background, I originally compiled and ran the code without any trouble. Couple of months later (NOW) I tried to recomplie again, but now I keep getting an error message.

My guess is that the compiler version was changed and its the reason why I get the message, but I am not sure about this. Can anyone help? This is the message I get:

OF: Version 2.4.0

Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/transportModels/incompressible/lnInclude -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude -I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/boundMinMax/lnInclude -I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/lib  -IlnInclude -I. -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude -I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/SbmFoamRM.o -L/data/apps/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib \
         -lfiniteVolume -lmeshTools -lfvOptions -lsampling -L -L/libfbsdmalloc.o -lOpenFOAM -ldl   -lm -o /data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/bin/SbmFoamRM

Make/linux64GccDPOpt/SbmFoamRM.o: In function `Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&)':
SbmFoamRM.C:(.text._ZN4Foam8fvMatrixINS_6VectorIdEEE15solveSegregatedERKNS_10dictionaryE[_ZN4Foam8fvMatrixINS_6VectorIdEEE15solveSegregatedERKNS_10dictionaryE]+0x4a6): undefined reference to `Foam::lduMatrix::solver::normFactor(Foam::Field<double> const&, Foam::Field<double> const&, unsigned char) const'
collect2: error: ld returned 1 exit status
make: *** [/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/bin/SbmFoamRM] Error 1
Thanks
rvmedina20 is offline   Reply With Quote

Old   April 10, 2017, 20:38
Default cannot compile solver
  #2
New Member
 
Ricardo
Join Date: Sep 2011
Posts: 15
Rep Power: 14
rvmedina20 is on a distinguished road
Hi All, I am having trouble compiling a solver. When I run wmake I get the following error

Code:
SOURCE=SbmFoamRM.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/transportModels/incompressible/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude
-I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/boundMinMax/lnInclude 
-I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/lib  
-IlnInclude 
-I. 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude   
-fPIC 
-c $SOURCE 
-o Make/linux64GccDPOpt/SbmFoamRM.o

g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/meshTools/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/transportModels/incompressible/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/sampling/lnInclude 
-I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/boundMinMax/lnInclude -I/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/lib  
-IlnInclude 
-I. 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude 
-I/data/apps/OpenFOAM/OpenFOAM-2.4.0/src/OSspecific/POSIX/lnInclude   
-fPIC -Xlinker --add-needed -Xlinker --no-as-needed 
Make/linux64GccDPOpt/SbmFoamRM.o 

-L/data/apps/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib \

-lfiniteVolume 
-lmeshTools 
-lfvOptions 
-lsampling 
-L 
-lboundMinMax 
-lOpenFOAM 
-ldl   
-lm 
-o /data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/bin/SbmFoamRM

Make/linux64GccDPOpt/SbmFoamRM.o: In function `Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&)':
SbmFoamRM.C:(.text._ZN4Foam8fvMatrixINS_6VectorIdEEE15solveSegregatedERKNS_10dictionaryE[Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&)]+0x7af): undefined reference to `Foam::lduMatrix::solver::normFactor(Foam::Field<double> const&, Foam::Field<double> const&, unsigned char) const'

collect2: ld returned 1 exit status

make: *** [/data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/platforms/linux64GccDPOpt/bin/SbmFoamRM] Error 1


My Make/options file includes the OpenFOAM/lnInclude which contains the link to the ldumatrix.H so I am not sure what to do
Code:
EXE_INC = \
    -I$(LIB_SRC)/OpenFOAM/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$//data/users/ricarm3/OpenFOAM/ricarm3-2.4.0/boundMinMax/lnInclude \
    -I$(FOAM_USER_LIBBIN) \

EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling \
    -L$(FOAM_USER_LIBIN) \
    -lboundMinMax
NOTE: I have compiled this before without problems, but now it does not compile and I do not know what the problem is. Any help/tips/advice welcome! Thanks
rvmedina20 is offline   Reply With Quote

Old   April 20, 2017, 06:06
Default Cannot compile
  #3
New Member
 
Max
Join Date: Sep 2016
Location: Delft
Posts: 22
Rep Power: 9
WildeCat is on a distinguished road
Hi,

This may sound like a stupid idea and I hope you already tried it, but I had some time ago a similar issue were a turbulence model just wouldnt compile. I checked all my linkages etc and couldnt find the error. Finally I run "wclean" and "wmake" and miraculously it worked.

If this still doesnt fix it, could you provide more information on what you are compiling. If it is a turbulence model, solver i.e. Furthermore could you provide your Make file and the folder structure on how it is stored.

I see you reference boundMinMax. If this is also a part build by you, try compiling this one first.

Good luck
WildeCat is offline   Reply With Quote

Reply

Tags
compiling error(s), fvmatrix, ldumatrix, 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile a new solver in OpenFOAM-2.1.0? sandy OpenFOAM Programming & Development 24 July 27, 2016 04:10
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
How to compile an unsteady solver based on solver of MRFSimpleFoam? renyun0511 OpenFOAM Running, Solving & CFD 0 April 27, 2010 11:16
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


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