Updating and installing packages

Asked by Murtazo Nazarov on 2009-12-11

It would be great to add some functionality to dorsal which follows the fenics-tip. For example, whenever I run dorsal now, it recompiles and installs many packages, like PETCs, Trilinos, Epetra, etc. from the beginning which usually takes a long time. But usually quick updates come from the fenics projects. So, is it possible to add some extension to dorsal such that, when you run it,

1. it checks for the dependence packages, and skip them if they are already installed,
2. does bzr pull for the fenics projects and only install them?

murtazo

Question information

Language:
English Edit question
Status:
Solved
For:
Dorsal Edit question
Assignee:
No assignee Edit question
Solved by:
Murtazo Nazarov
Solved:
2009-12-11
Last query:
2009-12-11
Last reply:
2009-12-11
Harish Narayanan (hnarayanan) said : #1

This functionality exists already (though 1 is not automatic).

After the first run, make a copy of the platform file for your computer (say platforms/karmic.platform) to something like (platforms/murtazo.platform). Now, edit this file, adding 'skip:' to all packages you don't want it to rebuild. For further dorsal use, run dorsal via:

./dorsal.sh platforms/murtazo.platform

This will achieve what you are looking for.

Look at platforms/fenics.platform for an example. It is essentially leopard.platform (which is what I use on my own computer), but all non fenics packages are skipped.

Murtazo Nazarov (murtazo) said : #2

I did what you mentioned, but I get the following error:

murtazo@na50:~/local/dorsal$ ./dorsal.sh murtazo.platform
Platform set 'murtazo.platform' not found. Refer to the file README to check if your platform is supported.

Harish Narayanan (hnarayanan) said : #3

I asked you to try ./dorsal.sh platforms/murtazo.platform

Murtazo Nazarov (murtazo) said : #4

yeppps. Sorry, that is my bad..

Nuno Lopes (ndlopes) said : #5

Hi!

Is it possible to have a mixed stable/unstable version of the installation?
This is, install some packages stable and others unstable.
I was able to do this in several steps by editing dorsal.cfg and 'myplatform.platform'.

Instead of global dorsal.cfg option STABLE_BUILD it would be nice to have in 'myplatform.platform'
the option to decide if the package to install is stable or not.

Harish Narayanan (hnarayanan) said : #6

I don't see how moving the STABLE_BUILD variable into a platform file gives you what you want (an arbitrary mix of stable and unstable packages). Today, the way you would do this is by opening the platform file, and replacing foo in the package list with foo-stable. I don't think this could be considered "several steps." :)

But suppose your question was something slightly different, I see the advantage of setting STABLE_BUILD in the platform. If your intent is to run:

./dorsal.sh platforms/yourstableplatform.platform
./dorsal.sh platforms/yourunstableplatform.platform

and have them both work as you would expect without changing dorsal.cfg in between, then it is better to set STABLE_BUILD in the platform file.

I haven not tried it, but setting "export STABLE_BUILD=true" (or false) in the platform file should work as of right now. These are just bash variables and can be set anywhere.

Nuno Lopes (ndlopes) said : #7

  I was suggesting to have in
the platform file something like
****
PACKAGES=(
# blabla
....
ffc-stable
dolfin-dev
)

> Today, the way you would do this is by opening the platform
> file, and replacing foo in the package list with foo-stable. I don't
> think this could be considered "several steps." :)

Do you mean: using STABLE_BUILD=false
and in platform file foo-stable ?
I didn't know that was possible.
If so, that solves my doubt :D

Still I'll explain my several steps
(it could be useful for later reference):
I've installed FEniCS with DORSAL 0.5.1 in Karmic Koala.
Firstly with STABLE_BUILD=true
everything worked out, but a reported (somewhere in a mailing list) bug with
Umfpack linkage in Dolfin
unable the usage of the C++ interface, (which I use in my code).
Then I've tried the STABLE_BUILD=false.
Dolfin problem is solved, but then ffc is broken (heavy changes are in process
for ffc right?).

So I've installed the stable version, then replaced in dorsal.cfg
STABLE_BUILD=true by STABLE_BUILD=false and kept the same INSTALL_PATH.
Then I've commented all the packages with the exception of dolfin in
myplatform.platform.
So dolfin-0.9.5 is replace by dolfin.
An almost stable version of FEniCS is installed. :D
Dolfin and ffc works but I've lost viper in the way :s)

--
Nuno David Lopes

e-mail:<email address hidden> (FCUL/CMAF)
       <email address hidden> (ISEL)
       <email address hidden>
http://ptmat.ptmat.fc.ul.pt/%7Endl/

Sun Dec 20 12:45:11 WET 2009

Murtazo Nazarov (murtazo) said : #8

You are right. With the exactly the same version of dorsal I got also ffc broken. Then I install ffc-stable instead or do as you do.

Harish Narayanan (hnarayanan) said : #9

On 20/12/2009 21:48, Nuno Lopes wrote:
> Question #93756 on Dorsal changed:
> https://answers.launchpad.net/dorsal/+question/93756
>
> Nuno Lopes posted a new comment:
> I was suggesting to have in
> the platform file something like
> ****
> PACKAGES=(
> # blabla
> ....
> ffc-stable
> dolfin-dev
> )

You can do the above right now.

Make sure STABLE_BUILD=false is set (somewhere, so Dorsal looks for
unstable packages by default), and then you can just add -stable to all
the packages you want stable versions of:

PACKAGES=(
# Blah blah
ffc-stable
dolfin
)

That's all.

>
> Do you mean: using STABLE_BUILD=false
> and in platform file foo-stable ?
> I didn't know that was possible.
> If so, that solves my doubt :D

Yes, you can set this in the platform file also.
>
>
> Still I'll explain my several steps
> (it could be useful for later reference):
> I've installed FEniCS with DORSAL 0.5.1 in Karmic Koala.
> Firstly with STABLE_BUILD=true
> everything worked out, but a reported (somewhere in a mailing list) bug with
> Umfpack linkage in Dolfin
> unable the usage of the C++ interface, (which I use in my code).
> Then I've tried the STABLE_BUILD=false.
> Dolfin problem is solved, but then ffc is broken (heavy changes are in process
> for ffc right?).
>
> So I've installed the stable version, then replaced in dorsal.cfg
> STABLE_BUILD=true by STABLE_BUILD=false and kept the same INSTALL_PATH.
> Then I've commented all the packages with the exception of dolfin in
> myplatform.platform.
> So dolfin-0.9.5 is replace by dolfin.
> An almost stable version of FEniCS is installed. :D
> Dolfin and ffc works but I've lost viper in the way :s)

What you've done is OK, but you don't need so much effort. Try my
suggestions. I hope it will help. :)

Harish

Harish Narayanan (hnarayanan) said : #10

On 20/12/2009 22:11, Murtazo Nazarov wrote:
> Question #93756 on Dorsal changed:
> https://answers.launchpad.net/dorsal/+question/93756
>
> Murtazo Nazarov posted a new comment:
>
> You are right. With the exactly the same version of dorsal I got also ffc broken. Then I install ffc-stable instead or do as you do.
>

Just to clarify, you are confusing ffc/dolfin problems with dorsal
errors. Development versions of ffc/dolfin are going through numerous
changes right now and they are sometimes broken. Dorsal does not know
about this, and will pull the development versions if you ask for them.

Murtazo Nazarov (murtazo) said : #11

Harish Narayanan wrote:
> Your question #93756 on Dorsal changed:
> https://answers.launchpad.net/dorsal/+question/93756
>
> Harish Narayanan posted a new comment:
> On 20/12/2009 21:48, Nuno Lopes wrote:
>
>> Question #93756 on Dorsal changed:
>> https://answers.launchpad.net/dorsal/+question/93756
>>
>> Nuno Lopes posted a new comment:
>> I was suggesting to have in
>> the platform file something like
>> ****
>> PACKAGES=(
>> # blabla
>> ....
>> ffc-stable
>> dolfin-dev
>> )
>>
>
> You can do the above right now.
>
> Make sure STABLE_BUILD=false is set (somewhere, so Dorsal looks for
> unstable packages by default), and then you can just add -stable to all
> the packages you want stable versions of:
>
> PACKAGES=(
> # Blah blah
> ffc-stable
> dolfin
> )
>
> That's all.
>
>

Maybe it does not work only for me:

ffc-stable.package is not properly formed. Please check that all
necessary variables are defined.

murtazo

>> Do you mean: using STABLE_BUILD=false
>> and in platform file foo-stable ?
>> I didn't know that was possible.
>> If so, that solves my doubt :D
>>
>
> Yes, you can set this in the platform file also.
>
>> Still I'll explain my several steps
>> (it could be useful for later reference):
>> I've installed FEniCS with DORSAL 0.5.1 in Karmic Koala.
>> Firstly with STABLE_BUILD=true
>> everything worked out, but a reported (somewhere in a mailing list) bug with
>> Umfpack linkage in Dolfin
>> unable the usage of the C++ interface, (which I use in my code).
>> Then I've tried the STABLE_BUILD=false.
>> Dolfin problem is solved, but then ffc is broken (heavy changes are in process
>> for ffc right?).
>>
>> So I've installed the stable version, then replaced in dorsal.cfg
>> STABLE_BUILD=true by STABLE_BUILD=false and kept the same INSTALL_PATH.
>> Then I've commented all the packages with the exception of dolfin in
>> myplatform.platform.
>> So dolfin-0.9.5 is replace by dolfin.
>> An almost stable version of FEniCS is installed. :D
>> Dolfin and ffc works but I've lost viper in the way :s)
>>
>
> What you've done is OK, but you don't need so much effort. Try my
> suggestions. I hope it will help. :)
>
> Harish
>
>

Harish Narayanan (hnarayanan) said : #12

On 25/12/2009 21:18, Murtazo Nazarov wrote:
> Question #93756 on Dorsal changed:
> https://answers.launchpad.net/dorsal/+question/93756
>
> Murtazo Nazarov posted a new comment:
> Harish Narayanan wrote:
>> Your question #93756 on Dorsal changed:
>> https://answers.launchpad.net/dorsal/+question/93756
>>
>> Harish Narayanan posted a new comment:
>> On 20/12/2009 21:48, Nuno Lopes wrote:
>>
>>> Question #93756 on Dorsal changed:
>>> https://answers.launchpad.net/dorsal/+question/93756
>>>
>>> Nuno Lopes posted a new comment:
>>> I was suggesting to have in
>>> the platform file something like
>>> ****
>>> PACKAGES=(
>>> # blabla
>>> ....
>>> ffc-stable
>>> dolfin-dev
>>> )
>>>
>>
>> You can do the above right now.
>>
>> Make sure STABLE_BUILD=false is set (somewhere, so Dorsal looks for
>> unstable packages by default), and then you can just add -stable to all
>> the packages you want stable versions of:
>>
>> PACKAGES=(
>> # Blah blah
>> ffc-stable
>> dolfin
>> )
>>
>> That's all.
>>
>>
>
> Maybe it does not work only for me:
>
> ffc-stable.package is not properly formed. Please check that all
> necessary variables are defined.

You should poke around a bit when things like this come up.

Try looking at ffc.package and ffc-unstable.package. Add the one extra
definition from ffc.package (BUILDCHAIN=python) to ffc-stable.package.

Harish