Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2010-10-13 16:09:23

dede
Member
From: Paris
Registered: 2007-12-12
Posts: 16
Website

[Debian] Testing the Code_Aster package

This post describes the steps for building the Code_Aster package on Debian sid (unstable) with its dependencies in case some people would like to try and maybe help with the packaging process. The current guide is for an amd64 architecture but it should be similar for others. 

The sources for building Debian packages can be found from the Debian-Science SVN:

$ cd
$ svn co svn://svn.debian.org/debian-science/packages/code-aster

The Code_Aster sources come from the official site but may be patched while building a Debian package:

$ mkdir srcs
$ cd srcs
$ wget http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/aster-full-src-10.3.0-3.noarch.tar.gz
$ tar xzf aster-full-src-10.3.0-3.noarch.tar.gz

For building and installing metis, the steps are:

$ cd ~/code-aster/metis-edf
$ mkdir tarballs
$ cp ~/srcs/aster-full-src-10.3.0/SRC/metis-edf-4.1-2.noarch.tar.gz \
tarballs/metis-edf_4.1.orig.tar.gz
$ cd trunk
$ svn-buildpackage
$ cd ../build-area
$ su
$ dpkg -i libmetis-edf4.1_4.1-1_amd64.deb
$ dpkg -i libmetis-edf-dev_4.1-1_amd64.deb
$ dpkg -i metis-edf_4.1-1_amd64.deb
$ exit

For building and installing Eficas, the steps are:

$ cd ~/code-aster/eficas
$ mkdir tarballs
$ cp ~/srcs/aster-full-src-10.3.0/SRC/eficas-2.1.1-1.tar.gz \
tarballs/eficas_2.1.1-1.orig.tar.gz
$ cd trunk
$ svn-buildpackage
$ cd ../build-area
$ su
$ dpkg -i eficas_2.1.1-1-1_all.deb
$ exit

For building and installing Astk (correspding to the code-aster-run package for the server side and code-aster-gui for the GUI client):

$ cd ~/code-aster/astk
$ cp ~/srcs/aster-full-src-10.3.0/SRC/astk-1.8.4.tar.gz \
tarballs/astk_1.8.4.orig.tar.gz
$ cd trunk
$ svn-buildpackage
$ cd ../build-area
$ su
$ dpkg -i code-aster-run_1.8.4-1_all.deb
$ dpkg -i code-aster-gui_1.8.4-1_all.deb
$ exit

Finally for building and installing the Aster solver:

$ cd ~/code-aster/aster
$ mkdir tarballs && cd tarballs/
$ cp ~/srcs/aster-full-src-10.3.0/SRC/aster-src-10.3.0-1.noarch.tar.gz .
$ tar xzf aster-src-10.3.0-1.noarch.tar.gz
$ mkdir aster-10.3.0-1
$ mv STA10.3 aster-10.3.0-1/
$ tar czf aster_10.3.0-1.orig.tar.gz aster-10.3.0-1/
$ rm -rf aster-10.3.0-1/ aster-src-10.3.0-1.noarch.tar.gz
$ cd ../trunk
$ svn-buildpackage
$ cd ../build-area
$ su
$ dpkg -i code-aster-engine_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-engine-dbg_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-dev_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-test_10.3.0-1-1.1_all.deb
$ exit

Then for running a short list of tests without homard (its license is not Debian compatible), you can run:

$ as_run /usr/lib/codeaster/STA10.3/astout.export

All the tests should pass. Once finished you may want to have a lookt at the results by:

$ as_run --diag --astest_dir=/tmp/resu_test/ | less

By installing homard manually, all the tests from liste_short should pass. Finally by running liste_internet I got 35 errors on 2068 tests, the list of failling tests is attached.

Last edited by dede (2011-01-13 09:55:54)


Attachments:
error_list, Size: 313 B, Downloads: 579

Offline

#2 2010-10-13 16:21:03

Thomas DE SOZA
Guru
From: EDF
Registered: 2007-11-23
Posts: 3,066

Re: [Debian] Testing the Code_Aster package

Hi,

Congrats for the packaging.

dede wrote:

It seems that there are still problems with the MUMPS solver, a typical log is attached in 'zzzz231b.mess'.

Does the linking against MUMPS use the includes provided by the mumps-dev debian package or those provided in the aster sources files ?
The problem might lie here in the latter case : since MUMPS uses INTEGER declaration in its includes and since Aster 64bits converts INTEGER to INTEGER*8 this causes a problem. That's why modified MUMPS includes are provided in the aster sources.

TdS

Offline

#3 2010-10-13 18:42:53

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

This post describes the steps for building the Code_Aster package on Debian sid (unstable) with its dependencies in case some people would like to try and maybe help with the packaging process. The current guide is for an amd64 architecture but it should be similar for others.

This is interesting, I'll be happy to try it and see if I can contribute in some way! I guess you're also in contact with Cristophe Trophime, the one who packaged astk; I was just thinking of contacting him about the possible packaging of code aster big_smile

For building and installing metis, the steps are:

If someone wants to use the already-packaged metis, it is found in the non-free section: http://packages.debian.org/source/squeeze/parmetis

For building and installing Astk (correspding to the code-aster-run package for the server side and code-aster-gui for the GUI client):

Astk is also already packaged in sid (http://packages.debian.org/source/sid/astk)  so this can be skipped if one wants.

$ dpkg -i --force-depends code-aster-test_10.2.0-1-1.1_all.deb
$ exit

Why --force-depends ?

On amd64, the MED library (corresponding to the med-fichier-2.3.6 package) needs to be built again
with the following flags during the configure step:

FFLAGS="-fdefault-integer-8"
FCFLAGS="-fdefault-integer-8"

I guess this is the reason of the problem here http://www.code-aster.org/forum2/viewtopic.php?id=14323 ; but if you recompile libmed with those flags there could be problems with other programs using the same libraries (e.g. salome), isn't it?

Maybe a better solution would be to add to the aster sources a modified copy of the libmed includes where all INTEGERs (or whatever, if they are not written in fortran) are explicitly declared as INTEGER*4, as it's done with MUMPS.

It seems that there are still problems with the MUMPS solver, a typical log is attached in 'zzzz231b.mess'.

As TdS also said, this can be caused by the different integer size between code aster and libmumps - see also this thread http://www.code-aster.org/forum2/viewtopic.php?id=14362

The solution is to use the code aster's includes for mumps, where all integers are specified as INTEGER*4

Bye

Andrea

Offline

#4 2010-10-14 08:26:40

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,170

Re: [Debian] Testing the Code_Aster package

Hi,

I will have a look to see if it's not too hard to use "short" integers (not 8 bytes ones) when using med API from Code_Aster.

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#5 2010-10-17 11:54:42

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

This post describes the steps for building the Code_Aster package on Debian sid (unstable) with its dependencies in case some people would like to try and maybe help with the packaging process. The current guide is for an amd64 architecture but it should be similar for others. 

The sources for building Debian packages can be found from the Debian-Science SVN:

$ cd
$ svn co http://svn.debian.org/wsvn/debian-science/packages/code-aster/

This doesn't work; instead, use:

svn co svn://svn.debian.org/debian-science/packages/code-aster

Eficas builds but fails to run: the message is

import multiarray
ImportError: No module named multiarray

I see that eficas looks for python 2.5: is that really necessary? I use python2.6 and eficas runs without problems:

mapo@marcopolo:~$ source ~/aster/etc/codeaster/profile.sh 
mapo@marcopolo:~$ which python
/usr/bin/python
mapo@marcopolo:~$ python --version
Python 2.6.6

Finally for building and installing the Aster solver:

Skipping this for the moment... I don't want to rebuild the med libraries with 64bit integers, I'll wait if coutois  fixes this issue.

Bye

Andre

Offline

#6 2010-10-18 09:11:13

dede
Member
From: Paris
Registered: 2007-12-12
Posts: 16
Website

Re: [Debian] Testing the Code_Aster package

Hello,

Thanks for your replies.

Thomas I will have a look for mumps and I guess that a part of the problem lies here. It seems that Code Aster will need its own MUMPS library.

Andrea Yes, I am testing the Christophe Trophime's work. The astk and parmetis packages in Debian sid are actually coming from the Debian SVN. I gave a report on the last development versions but you are right that I should try with the available packages too.
The '--force-depends' option for code-aster-tests was because of a dependency mistake on the package (asking for aster or aster-mpi which both do not exist).
Then you are right with the MED problem, Salome does not work with a library built with 8 bytes long integers.
MC may provide a patch for working only with 4 bytes long integers on the Aster side. It could be the best solution on the Debian side but I hope it is not too hard to achieve.
I have just updated the link for cloning the SVN repository, thank you very much for notifying me the error.
Then the Eficas package still need some work but should work with python2.6, that is now the default python version on sid.

MC Thank you very much for trying the patch, that is the hardest way but it will simplify a lot the Debian packaging. In case you need some help, just let me know.

Offline

#7 2010-10-18 09:44:56

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

Hello,

Thanks for your replies.

Thomas I will have a look for mumps and I guess that a part of the problem lies here. It seems that Code Aster will need its own MUMPS library.

In fact, it only needs a modified version of the mumps includes: I've successfully built code aster using the debian packaged mumps libraries.

Then the Eficas package still need some work but should work with python2.6, that is now the default python version on sid.

I'm using eficas with python2.6, so - at least in my case - it actually works.

Regarding the problem with med files, I did some debugging in the weekend:
- I've modified the med include files, so that integers are explicitlpy declared as INTEGER*4 (fortran) or int32_t (c); it didn't work.
- I've also modified the HDF5 includes, so that all the INTEGER are explicitly declared as INTEGER*4; but still no luck.
- then I started to modify the aster sources where the error raised; now code aster goes a little further, but it doesn't find any mesh; I didn't proceed any further, I don't feel comfortable in modifying the source without knowing exaclty what they do...

Bye

Andrea

Last edited by apalazzi (2010-10-18 09:45:32)

Offline

#8 2010-10-18 13:47:02

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,170

Re: [Debian] Testing the Code_Aster package

Hi,

dede wrote:

MC Thank you very much for trying the patch, that is the hardest way but it will simplify a lot the Debian packaging. In case you need some help, just let me know.

This will be available in the next update (10.2.21) and so for the next release (10.3 in december).

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#9 2010-10-19 07:32:01

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

courtois wrote:

Hi,

dede wrote:

MC Thank you very much for trying the patch, that is the hardest way but it will simplify a lot the Debian packaging. In case you need some help, just let me know.

This will be available in the next update (10.2.21) and so for the next release (10.3 in december).

MC

That's a great news! Thank you for the job, MC!

Bye

Andrea

Offline

#10 2010-11-20 13:20:55

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

Then you are right with the MED problem, Salome does not work with a library built with 8 bytes long integers.
MC may provide a patch for working only with 4 bytes long integers on the Aster side. It could be the best solution on the Debian side but I hope it is not too hard to achieve.

Since it seems that using INTEGER*4 in code aster for the med libraries it's not as trivial as it appeared, maybe you could build a different package for libmed with 8 bytes integer, give it a different name - e.g. libmed-int64 - and make the code aster package depend on it... that would make code aster installable without breaking the salome package.

Bye

Andrea

Last edited by apalazzi (2010-11-20 13:21:53)

Offline

#11 2010-12-07 14:10:09

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

On amd64, the MED library (corresponding to the med-fichier-2.3.6 package) needs to be built again
with the following flags during the configure step:

FFLAGS="-fdefault-integer-8"
FCFLAGS="-fdefault-integer-8"

Hi,

can you please explain this a bit more? I've downloaded the source with apt-get source med-fichier, but now I'm a bit lost: how do I create a new debian package compiled with those flags?

Bye

Andrea

Offline

#12 2010-12-23 11:32:30

dede
Member
From: Paris
Registered: 2007-12-12
Posts: 16
Website

Re: [Debian] Testing the Code_Aster package

Hello Andrea,

I hope those steps will guide you more in details:

$ cd /tmp
$ apt-get source med-fichier
$ cd med-fichier-2.3.6/
$ apt-get install hdf5-tools
$ ./configure --prefix=$HOME/prog CFLAGS="-I/usr/include/openmpi" CXXFLAGS="-I/usr/include/openmpi" \
FFLAGS="-fdefault-integer-8" FCFLAGS="-fdefault-integer-8"
$ make

Then all the tests should pass so you can install the library:

$ make check
$ make install

Now Code_Aster needs to be built again with this new med library:

$ sudo chown -R $USER:$USER /usr/lib/codeaster/STA10.2/
$ sed -i "s:-L/usr/lib -lmed:$HOME/prog/lib/libmed.a -lmpi++:" \
/usr/lib/codeaster/STA10.2/config.txt
$ rm /usr/lib/codeaster/STA10.2/aster*
$ as_run --make

Note that you could speed up the compilation by asking to build only a debug version in config.txt (look at the line MAKE | build). For testing, you may try:

$ sed -i "s:?ASTER_ROOT?:/usr/lib/codeaster:"  /usr/lib/codeaster/STA10.2/astout.export
$ sed -i "s:?ASTER_VERSION?:STA10.2:" /usr/lib/codeaster/STA10.2/astout.export
$ as_run  /usr/lib/codeaster/STA10.2/astout.export

By editing astout.export, I advise you to try first the liste_short. Only the tests using Homard should fail because that tool can not be installed on Debian (due to a licensing issue).

All the best,

André

Offline

#13 2011-01-13 10:05:54

dede
Member
From: Paris
Registered: 2007-12-12
Posts: 16
Website

Re: [Debian] Testing the Code_Aster package

Hello,

I have just updated the original post to Aster 10.3. Thanks to Mathieu Courtois, it is now possible to use the Debian MED library built with short integers (add USE_MED_SHORT_INT to config.txt). Moreover there was a conflict with MUMPS libraries (between parallel and sequential versions), it seems to work correctly now so I removed the 'zzzz231b.mess' original attachement.
The future work may be to use scotch because there is a licensing issue with metis-edf. Moreover a Debian package with a parallel version of Code_Aster could be interesting.

Cheers,

André

Offline

#14 2011-02-18 13:51:44

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

courtois wrote:

Hi,

dede wrote:

MC Thank you very much for trying the patch, that is the hardest way but it will simplify a lot the Debian packaging. In case you need some help, just let me know.

This will be available in the next update (10.2.21) and so for the next release (10.3 in december).

MC

Hello Courtois,

what are the consequences of using the build with _USE_MED_SHORT_INT ? Does it have effects only on the mesh reading, or also somewhere in the solver?

Bye
Andrea

Offline

#15 2011-02-19 20:43:42

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:

Hello,

I have just updated the original post to Aster 10.3. Thanks to Mathieu Courtois, it is now possible to use the Debian MED library built with short integers (add USE_MED_SHORT_INT to config.txt). Moreover there was a conflict with MUMPS libraries (between parallel and sequential versions), it seems to work correctly now so I removed the 'zzzz231b.mess' original attachement.
The future work may be to use scotch because there is a licensing issue with metis-edf. Moreover a Debian package with a parallel version of Code_Aster could be interesting.

Cheers,

André

Hello dede,

I'm trying to build the package for Debian; it's proceeding, however I did some changes to use scotchmetis instead of metis-edf, and "plain" mumps instead of mumps-ptscotch, because ptscotch seems to depend both on openmpi and mpich1 (seems strange however...).

I'll let you know if I succeed!

Bye
Andrea

Offline

#16 2011-02-20 14:45:46

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

dede wrote:
$ cd ~/code-aster/aster
$ mkdir tarballs && cd tarballs/
$ cp ~/srcs/aster-full-src-10.3.0/SRC/aster-src-10.3.0-1.noarch.tar.gz .
$ tar xzf aster-src-10.3.0-1.noarch.tar.gz
$ mkdir aster-10.3.0-1
$ mv STA10.3 aster-10.3.0-1/
$ tar czf aster_10.3.0-1.orig.tar.gz aster-10.3.0-1/
$ rm -rf aster-10.3.0-1/ aster-src-10.3.0-1.noarch.tar.gz
$ cd ../trunk
$ svn-buildpackage
$ cd ../build-area
$ su
$ dpkg -i code-aster-engine_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-engine-dbg_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-dev_10.3.0-1-1.1_amd64.deb
$ dpkg -i code-aster-test_10.3.0-1-1.1_all.deb
$ exit

Then for running a short list of tests without homard (its license is not Debian compatible), you can run:

$ as_run /usr/lib/codeaster/STA10.3/astout.export

Hi,

I've successfully built the code-aster package after some changes: replaced metis-edf with scotchmetis, and replaced mumps-ptscotch with plain mumps (see attached diff); however, when I run the tests, I get this error:

mapo@marcopolo:~$ as_run /usr/lib/codeaster/STA10.3/astout.export

<F>_FILE_NOT_FOUND file not found : /usr/lib/codeaster/?ASTER_VERSION?/config.txt


 
 ---------------------------------------------------------------------------------
                                            cpu     system    cpu+sys    elapsed
 ---------------------------------------------------------------------------------
   Total                                   0.06       0.02       0.08       0.07
 ---------------------------------------------------------------------------------

as_run 1.8.4

------------------------------------------------------------
--- DIAGNOSTIC JOB : <F>_FILE_NOT_FOUND
------------------------------------------------------------


EXIT_CODE=4

I'll try to narrow the problem, in the meantime if you have the solution, tell me smile

Bye
Andrea


Attachments:
aster-seq.diff, Size: 1.96 KiB, Downloads: 554

Offline

#17 2011-02-22 19:36:00

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

Just a little update, since I noticed that someone downloaded my diff:

- at the moment the package builds only a serial version of CA
- and anyway it doesn't work: it exits on almost all tests with "<EXCEPTION> <ALGELINE3_25> erreur a l'appel de METIS"; but I'm trying to use scotchmetis instead of metis, probably this could go away if one builds also metis-edf.

As for the first problem, I obtained a parallel package once, but alas, I can't get the compilation end anymore, I always end up with errors like:

/home/mapo/debian-aster/code-aster/aster/build-area/aster-10.3.0-1/debian/tmp/usr/lib/codeaster/STA10.3_mpi/bibc/hdf/hdfclf.c:19:19: error: aster.h: No such file or directory
/home/mapo/debian-aster/code-aster/aster/build-area/aster-10.3.0-1/debian/tmp/usr/lib/codeaster/STA10.3_mpi/bibc/hdf/hdfclf.c:20:24: error: aster_fort.h: No such file or directory
/home/mapo/debian-aster/code-aster/aster/build-area/aster-10.3.0-1/debian/tmp/usr/lib/codeaster/STA10.3_mpi/bibc/hdf/hdfclf.c:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘DEFP’

I'm attaching the config.txt, any help is welcome smile

For the second problem, I can think of two reasons: either the problem with integer size, or some utility missing... any hint here? It's not a "not enough memory" problem since it also fails on very simple problems...

Anyway, can CA be built without metis?

Bye
Andrea

Last edited by apalazzi (2011-02-22 19:38:35)


Attachments:
config-mpi.txt, Size: 6.83 KiB, Downloads: 612

Offline

#18 2011-02-28 09:03:58

apalazzi
Member
Registered: 2010-05-11
Posts: 283

Re: [Debian] Testing the Code_Aster package

Hi,

I have made a fairly complete page on the wiki, you can look at it for the procedure to build the packages. Let me know if everything works or there are still some errors.

http://www.code-aster.org/wiki/doku.php … anpackages

Bye
Andrea

Last edited by apalazzi (2011-02-28 09:04:22)

Offline

#19 2011-02-28 09:31:57

dede
Member
From: Paris
Registered: 2007-12-12
Posts: 16
Website

Re: [Debian] Testing the Code_Aster package

Hello Andrea,

Thank you very much for your work and documentation on the wiki, I really appreciate it. You can build Code-Aster without metis-edf however many tests will fail (with the typical error  "<EXCEPTION> <ALGELINE3_25> erreur a l'appel de METIS"). In case you succeed to make the tests from liste_internet pass with scotchmetis, I am very interested about your build (because it means that you can supply an alternative to onmetis, kmetis and onmetis.exe).
By the way, sorry for the error on /usr/lib/codeaster/?ASTER_VERSION?/config.txt (it means that ASTER_VERSION has not been replaced during the build). Concerning you second error (aster.h is not found), the mistake seems to be here in your config.txt: "-IDEB_DESTDIR/ASTER_ROOT/STA10.3_mpi/bibc/include", the variables DEB_DESTDIR and ASTER_ROOT have not been replaced. You just need to change them to a valid path and the compilation should work.
Finally, I have started to work on an alternative way to build Code_Aster (by using a waf script [1]), I keep you in touch as soon as I validate it.

Cheers,

André

[1] http://code.google.com/p/waf/

Offline