LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-16-2009, 10:15 AM   #1
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Rep: Reputation: 94
Short Tutorial : How to install Code Aster in Slackware64 13


Hi Forum

I Created this topic ( is this the reight place to put this... ? )
In the hope that this may spare some headaches in installing a Finite elements software tool created by EDF Recherche

http://www.code-aster.org/V2/spip.php?rubrique1

http://www.code-aster.org/V2/spip.php?rubrique7

( If You do not understand French, Learn it... France is a top reference in European and Universal Culture, and not being able to read french is quite a big loss... IMHO Think of the French Revolution, the contributions of Lavoisier to Chemistry, Decartes to Philosophy and Math, Evariste Galois one of the founding peers of Modern Algebra ( Galois Field Theory ), the outstanding writings of Lagrange, Mecanique Analitique, the encyclopedists like Diderot, and D'Alembert... the Relativity of Henri Poincaré ... etc, etc, just to name a very few... )


This is the result of much googling around, to solve some nitty witty problems that came along when I was trying to install Code-Aster, Decided to put this all into one topic sould anyone find all this useful.

Anyway... for prerequirements in Slackware64 13 you will need :

lapack
blas
fftw3

You will find all these in SlackBuilds.org

As well as you will have to downgrade the Python version to Python-2.5.2
( Grab the SlackBuild or the Package from Slackware 12.2, and Install it... there is no Incompatibility in doing this, AFAIK)


You will also need to unqualify the hostname of your box from <whatever1>.<whatever2> to <whatever1>...

Failing to do this will hinder the ability of the solvers to tunnel TCP to X through ssh :

This means you must change the /etc/HOSTNAME, /etc/hosts, as well as /etc/kde/kdm/kdmrc ( assuming that u use a DE ( KDE ) and not a WM )
removing the "nolisten TCP" from the ServerArgsLocal line.

You will also have to edit /etc/hosts.equiv :

Code:
localhost
<your host name>

/etc/hosts.allow :

Code:
in.rshd: localhost,<hour host name>

/etc/inetd.conf

Code:
# Shell, login, exec and talk are BSD protocols
#
shell  stream  tcp     nowait  root    /usr/sbin/tcpd  in.rshd -L
login  stream  tcp     nowait  root    /usr/sbin/tcpd  in.rlogind
(uncomment the in.rshd, and the in.rlogind lines... )


Now create a file called ~/.rhosts with these entries :

Code:
localhost
<your hostname> <your user account name>
chmod it to 600

Now edit /etc/ssh/sshd_config and change its entries to match these... :


Code:
.................................
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
.................................
and /etc/ssh/ssh_config to match these... :


Code:
.............................................

ForwardAgent yes
ForwardX11 yes

............................................
Now reboot... ( You want all the services changed enabled with your new settings... )

As user do :

Code:
$ssh-keygen -t rsa
press enter to allow for passwordless login, and then

Code:
$cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
$ssh <your account name> [accept all to permanently add <user> to the allowed users ]
$ssh localhost [accept all to permanently add localhost to the allowed users ]
chmod 600 ~/.ssh/authorized_keys
Now you are done...

Untar the source tarball http://www.code-aster.org/V2/spip.ph...dw2_out&id=456, cd into it,

In Case You should compile Code Aster with the Intel Compilers instead of using gcc/gfortran
You should change setup.cfg as follows :

Code:
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-

# This file gives parameters value to complete installation
# NOTE : Python syntax MUST be respected !

import os

#-------------------------------------------------------------------------------
# Code_Aster toplevel directory (ex: /aster, /opt/aster...)
ASTER_ROOT='/opt/aster'

# astk configuration (for network capabilities)
# Let the setup configure it for you or define the 3 following parameters :
# Example for a stand-alone server (no other remote astk server)
#SERVER_NAME='localhost'
#DOMAIN_NAME='localdomain'
#FULL_SERVER_NAME='%s.%s' % (SERVER_NAME, DOMAIN_NAME)

# If you haven't write access in your Python site-packages directory
# setup.py will automatically install the Python modules (Numeric for example)
# with this prefix : [ASTER_ROOT]/public
# the files will be placed in [ASTER_ROOT]/public/lib/pythonX.X/site-packages
# PYMODULES_PREFIX = os.path.join(ASTER_ROOT, 'public')

#-------------------------------------------------------------------------------
#   Compilers
# The setup tries to find automatically your compilers and math libraries.
# You can set PATH and LD_LIBRARY_PATH environment variables before running setup.py
# to add paths in search list.
#
# You may want to select different compilers for products
# Example : PREFER_COMPILER_med = 'GNU'

# Default values are :
#    GNU compiler for all products
PREFER_COMPILER = 'GNU_without_MATH'

# If you have Intel compilers you should uncomment following lines:
# (aster, mumps, metis)
PREFER_COMPILER_aster = 'Intel'
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster


# There are also two variants Intel_without_MATH, GNU_without_MATH but if you choose
# one of these you MUST set your mathematical libraries argument using MATHLIB.
# Example : PREFER_COMPILER='Intel_without_MATH'
#       and MATHLIB = '-L/path_to_acml_libs -lacml'

# You may want to specify the values yourself by defining
# these variables : CC, F77, F90, CXX, LD, DEFINED,
#                   CFLAGS, FFLAGS, F90FLAGS, CXXFLAGS, LDFLAGS,
#                   MATHLIB, CXXLIB, OTHERLIB
# (these values will be common to ALL products)
MATH_LIST = ['lapack', 'blas']
#-------------------------------------------------------------------------------
# C and Fortran compilers and linker for Code_Aster
# classical values for GNU compilers
#CC='/usr/bin/gcc'
#CXX='/usr/bin/g++'
#F77='/usr/bin/g77'
#F90='/usr/bin/gfortran'
#LD=F77
#CFLAGS="-fno-stack-protector"      # for gcc 4.x

#                          Example for Intel compilers (see README file)
#CC='/opt/intel/cc/9.1.049/bin/icc'
#CXX='/opt/intel/cc/9.1.049/bin/icpc'
#F77='/opt/intel/fc/9.1.045/bin/ifort'
#LD=F77
#LDFLAGS='-nofor_main'
#FFLAGS="-fpe0 -traceback"
#F90FLAGS="-fpe0 -traceback -align sequence"

#OPT_ENV="""
#source /opt/intel/cc/9.1.049/bin/iccvars.sh
#source /opt/intel/fc/9.1.045/bin/ifortvars.sh
#source /opt/intel/mkl/9.0/tools/environment/mklvars32.sh
#"""

#                          Example for gfortran (32 bits) :
#F90FLAGS="-ffixed-line-length-0 -x f77-cpp-input"
#                          Example for gfortran 64 bits :
#FFLAGS="-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8"
#F90FLAGS="-ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8"


#-------------------------------------------------------------------------------
# You may want to add no standard directories in searched paths (as python list)
# to search respectively for binaries, libraries and include files :
#BINDIR=['/myprefix/bin', ]
#LIBDIR=['/myprefix/lib', ]
#INCLUDEDIR=['/myprefix/include', ]

# To search for shared libraries first
PREFER_SHARED_LIBS=False   # False/True


#-------------------------------------------------------------------------------
# Comment the two following lines to install tcl/tk
_install_tcl = False
_install_tk  = False

#-------------------------------------------------------------------------------
# Only if hdf5 was previously installed, uncomment following line
# and fill next one
#_install_hdf5 = False
#HOME_HDF = ''

#-------------------------------------------------------------------------------
# Only if med was previously installed, uncomment following line
# and fill next one
#_install_med = False
#HOME_MED = ''

#-------------------------------------------------------------------------------
# NB : Scotch is installed by default
# Uncomment the following line to not install Scotch libraries
# (under LGPL, available at http://www.labri.fr/perso/pelegrin/scotch/)
#_install_scotch  = False

# If scotch was previously installed, uncomment and fill following line
#HOME_SCOTCH = ''

#-------------------------------------------------------------------------------
# Optionnal packages
# NOTE : optionnal packages must be installed before Code_Aster to
#   correctly configure and build this one.
#
# NOTE : only a sequential version of Mumps will be built by `setup.py`
# MUMPS libraries (sources available at http://mumps.enseeiht.fr/)
# (Fortran 90 compiler is required to use MUMPS with Code_Aster)
#HOME_MUMPS=''    # which contains lib/libseq directory

# ZMAT libraries (commercial, available at http://www.mat.ensmp.fr/)
#HOME_ZMAT=''     # which contains PUBLIC/lib-Linux4/libZmat_base.so and others

#-------------------------------------------------------------------------------
# Interface between Code_Aster and Salome
_install_omniORB   = True
_install_omniORBpy = True
_install_pylotage  = True
# Salome version supported by pylotage
SALOME_VERSION = 'DEFAULT'    # DEFAULT means the last one supported by pylotage


# MUMPS libraries (sources available at http://mumps.enseeiht.fr/)
# (Fortran 90 compiler is required to use MUMPS with Code_Aster)
#HOME_MUMPS=''    # which contains lib/libseq directory

# ZMAT libraries (commercial, available at http://www.mat.ensmp.fr/)
#HOME_ZMAT=''     # which contains PUBLIC/lib-Linux4/libZmat_base.so and others

#-------------------------------------------------------------------------------
# Interface between Code_Aster and Salome
_install_omniORB   = True
_install_omniORBpy = True
_install_pylotage  = True
# Salome version supported by pylotage
SALOME_VERSION = 'DEFAULT'    # DEFAULT means the last one supported by pylotage
My changes are in bold.


and run

python setup.py

in the end, of all the install process, edit ~/.bashrc and add these lines :

Code:
export PATH=/opt/aster/outils:$PATH
. /opt/aster/<some-file-which-name-i-do-not-recall.sh>

( it is the only *.sh there, so, there should not be any confusion about this... )

open a new shell, type "bash", now type "astk"...

You are done here.

BTW: Much of my work was only possible with the help of Slackware Forum in LinuxQuestions, user Tux_Dude, user Didier_Spaier and user cmk77, once again thanks



BRGDS

Alex

Last edited by Alexvader; 12-22-2009 at 07:39 AM.
 
Old 12-17-2009, 01:45 AM   #2
cmk77
Member
 
Registered: May 2006
Location: netherlands
Distribution: slackware, centos, scientificlinux
Posts: 119

Rep: Reputation: 24
Nice tutorial, glad you sorted it out!
 
1 members found this post helpful.
Old 12-17-2009, 02:03 AM   #3
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Nice tutorial. You should post tags on it so that people using google can land up on this topic.


Regards
 
1 members found this post helpful.
Old 12-17-2009, 08:53 AM   #4
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Shylock

I tried to add tags, how do I make expressions like "Finite Elements" and "Code Aster" appear as a single tag instead of "Finite" and "Elements"... ?

BTW. Nice Tutorial, yours "Pimp my Slack"... you converted me to Kde... :-)


BRGDS

Alex
 
Old 12-17-2009, 09:05 AM   #5
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
I think LQ parses tags using spaces so I don't think you can. Obviously if it was Linux then you could Finite\ Elements. Not just that, tags become lowercase as well.
Thanks, I'm glad you liked the guide. Will be updating it with more stuffs shortly.

Regards
 
1 members found this post helpful.
Old 12-21-2009, 07:50 AM   #6
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
Hi Forum

I will now add to this tutorial the detailed steps to have Code aster compiled with the Intel Compilers;

By default, Aster will compile with gcc/gfortran ( or g77 ), but these are not so efficient in generating fast code as Ifort, and Icc from Intel.

I have wrote a howto on installing the Intel development toochain in Slackware64 13, and i have successfuly compiled Code Aster using Icc, Ifort and MKL.

Late in this afternoon I will post the changes that have to be made to a file in Aster source tree, called setup.cfg, in order for it to build with Intel.

BRGDS

Alex
 
Old 12-21-2009, 04:22 PM   #7
Alexvader
Member
 
Registered: Oct 2009
Location: Japan
Distribution: Arch, Debian, Slackware
Posts: 994

Original Poster
Rep: Reputation: 94
I have edited my original Post so as to Include the steps for compilation with Intel Compilers

BRGDS

Alex
 
  


Reply

Tags
code, elements, engineering, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Code tutorial: make your application sync with Ubuntu One LXer Syndicated Linux News 0 12-15-2009 02:20 AM
[SOLVED] Slackware64-C client wont detect Slackware64-C Samba server slackass Slackware 5 08-07-2009 11:23 PM
LXer: Tutorial: Can't Code? Squash a Few Bugs LXer Syndicated Linux News 0 07-18-2006 04:54 AM
What is the problem with this short code? Mistro116@yahoo.com Programming 3 11-13-2005 09:54 AM
Simple Tutorial for compiling source code? SoliTear Linux - Newbie 17 03-15-2004 08:39 AM


All times are GMT -5. The time now is 05:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration