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

Construction of a new ddtScheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2014, 03:44
Default Construction of a new ddtScheme
  #1
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi Foamers,
I am currently trying to construct a new ddtScheme to use it on OpenFOAM.
But i don't understand how to compile a new ddtScheme. Concerning the solvers, i know the rule : to have a 'Make' directory and to type wmake, but in the ddtScheme directories there is no 'Make' directory and the command wmake doesn't work.
There is something i don't know, can you help me to learn it ?
Thank you.
LD
laurentD is offline   Reply With Quote

Old   November 6, 2014, 03:50
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
The "Make"-directory is a few directories up:
Code:
$FOAM_SRC/finiteVolume/Make
That Make/files contains a line which tells the compiler to compile:
Code:
ddtSchemes = finiteVolume/ddtSchemes
$(ddtSchemes)/ddtScheme/ddtSchemes.C
So, you need to recompile the entire finiteVolume library (libfiniteVolume.so) by calling "wmake" in the directory containing the Make directory, i.e.:
Code:
$FOAM_SRC/finiteVolume
floquation is offline   Reply With Quote

Old   November 6, 2014, 03:53
Default
  #3
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Thank you, i will try it.
Have a good day,
LD
laurentD is offline   Reply With Quote

Old   November 6, 2014, 05:35
Default
  #4
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
I found the directory with the 'Make' subdirectory and i used te 'wmake' utility.
But after a few minutes, the process crashes and prints tghe message :
ld a retourné un code en état d'éxecution".
In enfglish, it means :
"ld returned a process which is actually running".
Does this error speak to you ?
Laurent
laurentD is offline   Reply With Quote

Old   November 7, 2014, 08:48
Default
  #5
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Hi Foamers,
i am back because this problem is stopping me in my work.
Does anybody know the solution for this kind of compilation problem.
Briefly : I want to compile a ddtScheme so i go in the finiteVolume directory and i run wmake.
After a few minutes and a lot of things written on my screen i can read the following message :
collect 2: ld retourne un code d'état exécution.
What's the problem ???

Sincerely,
Me
laurentD is offline   Reply With Quote

Old   November 7, 2014, 09:27
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

well (sometimes localisation is evil ), the error in fact just means "there was a problem during linking" (as ld is linker, and it returned 1 as the process exit code).

The reason for the error? No idea. Show the output of wmake command.

If you'd like to discuss your problem further:

1. What's your OpenFOAM version?
2. How it was installed? (i.e. binary package using package manager or self-compilation from sources)

In general it's not a good idea to mess with original source tree. If you'd like to create your own ddtScheme, create a folder in your home folder (or elsewhere), copy there sources of EulerDdtScheme (for example), rename source files (and classes inside) to myNewCoolDdtScheme, create Make folder, there create 'files' and 'options' files with necessary contents (or you can use wmakeFilesAndOptions to do it semi-automatically).
alexeym is offline   Reply With Quote

Old   November 7, 2014, 10:01
Default
  #7
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Well,
the output of the wmake is a very big file so i can write here the last lines.
Note that the word 'error' doesn't appear before those lines :

"
collect 2 : ld a retourné un code d'état d'exécution
make: *** [OpenFOAM.out] Erreur 1
"

No more informations... I have to add that when i remove all the new files and do wmake on the initial content, the same error occurs...
When i try to compile a solver, like buoyantPimpleFoam, it works. But not for the content of finiteVolume/

Thanks to give me some of your time.
Laurent
laurentD is offline   Reply With Quote

Old   November 7, 2014, 10:12
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
IIRC in old versions of OpenFOAM wmake wasn't clever enough and it was necessary to state explicitly if you'd like to build library (i.e. run wmake libso instead of just wmake). And it seems that it's the case as in 2.3.0 for example wmake will search for Make folder in parent folders (and actually will work in ddtScheme folder).

Unfortunately with the amount of information you've provided it's almost impossible to understand the source of the error, hope somebody will have a desire to continue guessing.
alexeym is offline   Reply With Quote

Old   November 7, 2014, 11:43
Default
  #9
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Thank you Alexey,

i have tried the command : wmake libso and the result is different. The last line told me that libFiniteVolume.so is up to date.

How can i know if the compilation has succeed ?

Laurent
laurentD is offline   Reply With Quote

Old   November 12, 2014, 04:51
Default
  #10
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Does anybody know a way to confirm that the compilation has succeed ?
Laurent
laurentD is offline   Reply With Quote

Old   November 12, 2014, 05:04
Default
  #11
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Comme toujours: try using what you were trying to compile. Also there are compiler and linker messages to check for errors.
alexeym is offline   Reply With Quote

Old   November 12, 2014, 09:07
Default
  #12
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 11
laurentD is on a distinguished road
Thank you Alexey but i knew it. My question was about a new compilation of something which works. If a try to use it it will works even if the second compilation has broken.

Anyway, i succeed to verify the compilation using the command :
/usr/bin/time -v -o wmake libso 1> log 2> log.err

After compilation i have three files : log (with the details of compilation), log.err (with the errors which occur during the compilation, and which is empty if all was good) and report with details about the time and the memory needed for the compilation.

Thank you Alexey from Nancy, for your time and your knowledge.

See you soon on this forum.
Laurent
laurentD 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
[DesignModeler] Need to create construction lines to plot data along them in cfd-post Soheyl.ysf ANSYS Meshing & Geometry 0 April 29, 2014 02:42
Convective heat loss out of a solar receiver construction Lionel Trébuchon CFX 10 April 6, 2014 20:25
Rotating flow through a construction EA1990 Main CFD Forum 0 July 13, 2013 10:49
Mirror mesh and construction lines? plunge11 ANSYS Meshing & Geometry 1 March 2, 2011 07:31
Modeling construction with movable details Bloshchitsyn Vladimir CFX 4 June 21, 2007 05:45


All times are GMT -4. The time now is 17:37.