|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 17 ![]() |
Hey guyz,
I got the following errors when I tried to compile (wmake) a viscosity model. Everything was fine before with the same change. I don`t really know why I got these errors now: incompressible]$ wmake
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/transportModel.o Make/linux64GccDPOpt/singlePhaseTransportModel.o Make/linux64GccDPOpt/viscosityModel.o Make/linux64GccDPOpt/newViscosityModel.o Make/linux64GccDPOpt/Roelands.o Make/linux64GccDPOpt/EyringRoelands.o Make/linux64GccDPOpt/Doolittle.o Make/linux64GccDPOpt/Newtonian.o -L/home/ahajisha/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \ -lOpenFOAM -liberty -ldl -lm -o OpenFOAM.out /usr/lib/../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' Make/linux64GccDPOpt/viscosityModel.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::type() const': viscosityModel.C ![]() Make/linux64GccDPOpt/viscosityModel.o: In function `Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::type() const': . . . . collect2: ld returned 1 exit status make: *** [OpenFOAM.out] Error 1 I would be very grateful if anyone can lead me to the source of the error. Thanks alot, Ali |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 ![]() |
Probably you want to build a library, not an executable. Use 'wmake libso' to build a library. This is not a bug.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 17 ![]() |
I compiled the new viscosity model with wmake and I used to compile it with wmake every time I changed it. This time I only changed a constant value in it and got the above-mentioned error using wmake! I don`t know what is the reason...
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 17 ![]() |
I typed wmake in src/transportModels/incompressible by the way. As I mentioned it was fine using wmake for that before.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 17 ![]() |
First of all, that was not a bug ( Sorry for that)
Use of wmake is possible for executable files such as Solvers. There is a library specified to transportmodels/incompressible and that should be updated using wmake libso incompressible in src/transportmodels directory. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Emery
Join Date: Feb 2017
Location: France.
Posts: 33
Rep Power: 9 ![]() |
Hi foamers,
I'am working with simpleFoam, and I want to implement a new Herschel-Bulkley model. I have already done all the major steps and modifications required. Now when I try to execute the command "./Allwmake" in "src/transportModels/", I got the message depicted in the attachment. And even when I use the command "wmake libso incompressible" suggested on this thread, I still have this message. Does anybody know what it may be linked to? I hope that you will find a couple of minutes to give me a reply. Any contribution will be well aprreciated. Thanks in advance for your time, and have a nice week. Regards. |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20 ![]() |
Quote:
It says "impossible to create the repository ... permission denied". In other words, you do not have writing rights in that directory, which makes a lot of sense as it is the "/opt" directory. You need to either compile using the super-user account [you probably do not want to do this, especially as there is no reason to modify the original OpenFoam source code], or you should compile your modified code in a directory in which you have writing rights. I usually compile my own modifications in ${FOAM_RUN}/../applications or ${FOAM_RUN}/../libraries. It'd be a good idea to put your executable in $FOAM_USER_APPBIN, instead $FOAM_APPBIN, as it is a user modification. |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Emery
Join Date: Feb 2017
Location: France.
Posts: 33
Rep Power: 9 ![]() |
Good morning Sir,
Thank you very much for your advices, I will take them into account. Regards. |
|
![]() |
![]() |
![]() |
Tags |
compile, error, openfoam, wmake |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Implementing new viscosity model | prjohnston | OpenFOAM Running, Solving & CFD | 6 | July 3, 2015 04:26 |
Yielding viscosity for Herschel Bulkley model | Godwin | FLUENT | 1 | December 12, 2011 05:42 |
Power Law Viscosity Model | cpplabs | OpenFOAM Running, Solving & CFD | 1 | February 13, 2008 08:09 |
Casson Viscosity model as one user define function | Zahra Rahmdel | FLUENT | 0 | November 6, 2004 05:53 |