Editing
Advanced Installation
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Fedora 25=== The following explains how to install madagascar on Fedora 25. We use the following compiler: <code>gcc</code>, <code>g++</code> and <code>gfortran</code>. * Install some packages <syntaxhighlight lang="bash" inline style="white-space:wrap">sudo dnf install scons lapack-static lapack64-static atlas-static fftw-static gd gd-devel libtool-ltdl-devel \ libXaw-devel mesa-libGL-devel freeglut-devel netpbm-devel plplot-devel ffmpeg-devel swig openmpi openmpi-devel suitesparse-devel</syntaxhighlight> This installed the following packages: <pre> scons-2.5.1-1.fc25.noarch lapack-static-3.6.1-2.fc25.x86_64 lapack64-static-3.6.1-2.fc25.x86_64 atlas-static-3.10.2-14.fc25.x86_64 fftw-static-3.3.5-3.fc25.x86_64 gd-2.2.4-1.fc25.x86_64 gd-devel-2.2.4-1.fc25.x86_64 libtool-ltdl-devel-2.4.6-13.fc25.x86_64 libXaw-devel-1.0.13-4.fc25.x86_64 mesa-libGL-devel-17.0.5-3.fc25.x86_64 freeglut-devel-3.0.0-3.fc24.x86_64 netpbm-devel-10.78.00-1.fc25.x86_64 plplot-devel-5.11.1-13.fc25.x86_64 ffmpeg-devel-3.1.9-1.fc25.x86_64 swig-3.0.11-1.fc25.x86_64 openmpi-1.10.5-1.fc25.x86_64 openmpi-devel-1.10.5-1.fc25.x86_64 suitesparse-devel-4.4.6-7.fc25.x86_64 </pre> and many other dependencies. * Get the sources from the git repository <syntaxhighlight lang="bash">git clone https://github.com/ahay/src</syntaxhighlight> If you run now the <code>configure</code> script, you will get: <syntaxhighlight lang="bash"> checking for Python ... /usr/bin/python checking Python version ... 2.7.13 checking for RSFROOT ... /usr/local/rsf checking for SCons ... /usr/bin/scons checking SCons version ... v2.5.1.rel_2.5.1:3735:9dc6cee5c168[MODIFIED] Running RSFROOT=/usr/local/rsf /usr/bin/scons config ... ------------------------ scons: Reading SConscript files ... checking platform ... (cached) linux [fedora] checking for C compiler ... (cached) gcc checking if gcc works ... yes checking if gcc accepts '-x c -std=gnu99 -Wall -pedantic' ... yes checking for ar ... (cached) ar checking for libraries ... ['m'] checking complex support ... yes checking for X11 headers ... /usr/include checking for X11 libraries ... /usr/lib checking for OpenGL ... yes checking for sfpen ... (cached) xtpen checking for ppm ... yes checking for tiff ... yes checking for GD (PNG) ... yes checking for GD (GIF) ... yes checking for plplot ... no Optional package: plplot-devel checking for ffmpeg ... yes checking for cairo (PNG) ... yes checking for cairo (SVG) ... yes checking for cairo (PDF) ... yes checking for jpeg ... yes checking for BLAS ... yes checking for LAPACK ... no Optional package: blas + blas-devel + atlas + atlas-devel checking for SWIG ... (cached) /usr/bin/swig checking for numpy ... (cached) yes checking API options ... (cached) [] checking for C++ compiler ... (cached) g++ checking if g++ works ... yes checking if g++ accepts '-std=c++11 -U__STRICT_ANSI__ -Wall -pedantic' ... yes checking for MPICC ... (cached) /usr/lib64/openmpi/bin/mpicc checking if /usr/lib64/openmpi/bin/mpicc works ... yes checking for MPICXX ... (cached) /usr/lib64/openmpi/bin/mpicxx checking if /usr/lib64/openmpi/bin/mpicxx works ... yes checking for MPIRUN ... (cached) /usr/lib64/openmpi/bin/mpirun checking for Posix threads ... yes checking for OpenMP ... yes checking for CUDA ... (cached) no checking for FFTW ... yes checking if FFTW supports threads ... yes checking for SuiteSparse ... yes checking for pfft ... no scons: done reading SConscript files. scons: Building targets ... shell_script(["env.sh"], []) shell_script(["env.csh"], []) scons: done building targets. ------------------------ Done with configuration. </syntaxhighlight> Libraries <code>plplot</code> and <code>lapack</code> are not found. File <code>config.log</code> says <pre> /bin/ld: cannot find -lplplotd </pre> and <pre> gcc -o .sconf_temp/sfconftest_21 .sconf_temp/conftest_21.o -L/usr/lib64/atlas -lm -lf77blas -lcblas -latlas -llapack -lcblas /usr/lib64/atlas/liblapack.a(dgesv.o): In function `dgesv_': (.text+0x69): undefined reference to `xerbla_' /usr/lib64/atlas/liblapack.a(ATL_f77wrap_dgesv.o): In function `atl_f77wrap_dgesv_': (.text+0x10d): undefined reference to `ATL_xerbla' /usr/lib64/atlas/liblapack.a(ATL_dgetf2.o): In function `ATL_dgetf2': (.text+0x184): undefined reference to `ATL_dger' ... </pre> So library <code>plplotd</code> doesn't exist on Fedora 25 and the <code>configure</code> script is looking for the wrong <code>lapack</code> library. If compiling now, 2 other libraries won't be found: <code>gfortran</code> and <code>quadmath</code> * Regarding the <code>plplotd</code> library, edit file <code>framework/configure.py</code> and change the line 724: <syntaxhighlight lang="python" line start="724">plplot = context.env.get('PLPLOT','plplotd')</syntaxhighlight> to <syntaxhighlight lang="python" line start="724">plplot = context.env.get('PLPLOT','plplot')</syntaxhighlight> * As for the libraries ** <code>lapack</code> ** <code>gfortran</code> ** <code>quadmath</code> We must use the <code>lapack</code> library installed in <code>/usr/lib64</code>, not the one installed in <code>/usr/lib64/atlas</code>. And libraries <code>gfortran</code> and <code>quadmath</code> are installed in <code>/usr/lib/gcc/x86_64-redhat-linux/6.3.1/</code>. Edit file <code>framework/configure.py</code> and add the following 4 lines: <pre> ['/usr/lib/gcc/x86_64-redhat-linux/6.3.1/', '/usr/lib64/', </pre> and <pre> LIBS.append('gfortran') LIBS.append('quadmath') </pre> so that we end up with the following <code>blas</code> function: <syntaxhighlight lang="python" line start="971">def blas(context): context.Message("checking for BLAS ... ") text = ''' #ifdef __APPLE__ #include <Accelerate/Accelerate.h> #else #ifdef HAVE_MKL #include <mkl.h> #else #include <cblas.h> #endif #endif int main(int argc,char* argv[]) { float d, x[]={1.,2.,3.}, y[]={3.,2.,1.}; d = cblas_sdot(3,x,1,y,1); return 0; }\n''' if plat['OS'] == 'cygwin': context.env['ENV']['PATH'] = context.env['ENV']['PATH'] + \ ':/lib/lapack' res = context.TryLink(text,'.c') if res: context.Result(res) context.env['BLAS'] = True else: # first try blas LIBS = path_get(context,'LIBS') blas = context.env.get('BLAS','blas') LIBS.append(blas) res = context.TryLink(text,'.c') if res: context.Result(res) context.env['LIBS'] = LIBS context.env['BLAS'] = blas else: # some systems require cblas and atlas for atlas_dir in filter(os.path.isdir, ['/usr/lib/gcc/x86_64-redhat-linux/6.3.1/', # <--- add this line '/usr/lib64/', # <--- add this line '/usr/lib64/atlas/', '/usr/lib/atlas/']): context.env['LIBPATH'].append(atlas_dir) LIBS.pop() LIBS.append('f77blas') LIBS.append('cblas') LIBS.append('atlas') LIBS.append('gfortran') # <----------------------------------------------- add this line LIBS.append('quadmath') # <----------------------------------------------- add this line res = context.TryLink(text,'.c') if res: context.Result(res) context.env['LIBS'] = LIBS context.env['BLAS'] = 'cblas' else: context.Result(context_failure) context.env['CPPDEFINES'] = \ path_get(context,'CPPDEFINES','NO_BLAS') LIBS.pop() LIBS.pop() LIBS.pop() context.env['BLAS'] = None need_pkg('blas', fatal=False) </syntaxhighlight> * Run the <code>configure</code> script, for example: <syntaxhighlight lang="bash">./configure --prefix=/usr/local/rsf</syntaxhighlight> Output should give: <syntaxhighlight lang="bash"> checking for Python ... /usr/bin/python checking Python version ... 2.7.13 checking for RSFROOT ... /usr/local/rsf checking for SCons ... /usr/bin/scons checking SCons version ... v2.5.1.rel_2.5.1:3735:9dc6cee5c168[MODIFIED] Running RSFROOT=/usr/local/rsf /usr/bin/scons config ... ------------------------ scons: Reading SConscript files ... checking platform ... (cached) linux [fedora] checking for C compiler ... (cached) gcc checking if gcc works ... yes checking if gcc accepts '-x c -std=gnu99 -Wall -pedantic' ... yes checking for ar ... (cached) ar checking for libraries ... ['m'] checking complex support ... yes checking for X11 headers ... /usr/include checking for X11 libraries ... /usr/lib checking for OpenGL ... yes checking for sfpen ... (cached) xtpen checking for ppm ... yes checking for tiff ... yes checking for GD (PNG) ... yes checking for GD (GIF) ... yes checking for plplot ... yes checking for ffmpeg ... yes checking for cairo (PNG) ... yes checking for cairo (SVG) ... yes checking for cairo (PDF) ... yes checking for jpeg ... yes checking for BLAS ... yes checking for LAPACK ... yes checking for SWIG ... (cached) /usr/bin/swig checking for numpy ... (cached) yes checking API options ... (cached) [] checking for C++ compiler ... (cached) g++ checking if g++ works ... yes checking if g++ accepts '-std=c++11 -U__STRICT_ANSI__ -Wall -pedantic' ... yes checking for MPICC ... (cached) /usr/lib64/openmpi/bin/mpicc checking if /usr/lib64/openmpi/bin/mpicc works ... yes checking for MPICXX ... (cached) /usr/lib64/openmpi/bin/mpicxx checking if /usr/lib64/openmpi/bin/mpicxx works ... yes checking for MPIRUN ... (cached) /usr/lib64/openmpi/bin/mpirun checking for Posix threads ... yes checking for OpenMP ... yes checking for CUDA ... (cached) no checking for FFTW ... yes checking if FFTW supports threads ... yes checking for SuiteSparse ... yes checking for pfft ... no scons: done reading SConscript files. scons: Building targets ... shell_script(["env.sh"], []) shell_script(["env.csh"], []) scons: done building targets. ------------------------ Done with configuration. </syntaxhighlight> * Then run the compilation: <syntaxhighlight lang="bash">make</syntaxhighlight> * and finally the installation <syntaxhighlight lang="bash">sudo make install</syntaxhighlight>
Summary:
Please note that all contributions to Madagascar are considered to be released under the GNU Free Documentation License 1.3 or later (see
My wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Getting Madagascar
download
Installation
GitHub repository
SEGTeX
Introduction
Package overview
Tutorial
Hands-on tour
Reproducible documents
Hall of Fame
User Documentation
List of programs
Common programs
Popular programs
The RSF file format
Reproducibility with SCons
Developer documentation
Adding programs
Contributing programs
API demo: clipping data
API demo: explicit finite differences
Community
Conferences
User mailing list
Developer mailing list
GitHub organization
LinkedIn group
Development blog
Twitter
Slack
Tools
What links here
Related changes
Special pages
Page information