[Dune] suggestion for example adaptivefinitevolume.cc
Matteo Semplice
matteo.semplice at uninsubria.it
Sat Nov 26 18:28:52 CET 2011
On 26/11/2011 17:57, Dedner, Andreas wrote:
>
> Thanks, such suggestion in improving the howto code is greatly
> appreciated.
> Added them to the trunk.
> Do you also have a suggestion for what to add to the dunecontrol
> documentation
> to avoid the difficulties you had?
>
> Best
> Andreas
>
Andreas,
dunecontrol --help says it all (if you read also the first two
lines...). It says
"All entries in the DUNE_CONTROL_PATH variable are scanned recursively
for Dune modules. If DUNE_CONTROL_PATH is empty, the current directory
is scanned."
I was put off track by the README created by duneproject in the
directory for my source project. It claims that dunecontrol will find
both installed and local modules, but in fact it doesn't see the
installed ones (exactly as dunecontrol --help says!). I created my new
module by calling duneproject in ~/ufficio/Ricerca/dune, but
matteo at montebianco:~/ufficio/Ricerca/dune$ which dunecontrol
/home/matteo/bin/dunecontrol
matteo at montebianco:~/ufficio/Ricerca/dune$ dunecontrol print
fv-ent-adap
matteo at montebianco:~/ufficio/Ricerca/dune$ dunecontrol all
[... ERRORS ]
matteo at montebianco:~/ufficio/Ricerca/dune$ export
DUNE_CONTROL_PATH=/home/matteo/lib/dunecontrol:/home/matteo/ufficio/Ricerca/dune/
matteo at montebianco:~/ufficio/Ricerca/dune$ dunecontrol print
dune-common dune-grid fv-ent-adap
I think that the correct behaviour should be the one mentioned in the
README
(i.e. if no DUNE_CONTROL_PATH is set, PREFIX/bin/dunecontrol should scan
*both* PREFIX/lib/dunecontrol as well as the current directory). In case
that would break something else, maybe modify that README as here below:
--- README~ 2011-11-26 13:48:15.000000000 +0100
+++ README 2011-11-26 18:19:36.000000000 +0100
@@ -17,11 +17,11 @@
dunecontrol all
-which will find all installed dune modules as well as all dune modules
-(not installed) which sources reside in a subdirectory of the current
-directory. Note that if dune is not installed properly you will either
-have to add the directory where the dunecontrol script resides (probably
-./dune-common/bin) to your path or specify the relative path of the script.
+which will find all dune modules which sources reside in a subdirectory
+of the current directory. Note that if dune is not installed properly you
+will either have to add the directory where the dunecontrol script resides
+(probably ./dune-common/bin) to your path or specify the relative path of
+the script.
On your project and all uninstalled DUNE source modules found the script
will then calls the GNU autoconf/automake to create a ./configure-script
@@ -31,6 +31,12 @@
Most probably you'll have to provide additional information to
dunecontrol
(e. g. compilers, configure options) and/or make options.
+If your module resides outside dune source tree and dunecontrol does not
+find dune installed modules (check running 'dunecontrol print'), you have
+to define the DUNE_CONTROL_PATH environment variable to a colon separated
+list of directories where dune modules are (most likely
+PREFIX/lib/dunecontrol and the current directory).
+
The most convenient way is to use options files in this case. The files
defining three variables:
Matteo
--
Matteo Semplice Dip. di Fisica e Matematica
Phone: 031-2386132 Università dell'Insubria
Fax: 031-2386209 Via Valleggio, 11
22100 Como
More information about the Dune
mailing list