CERNLIB (x86-64) Page of Harald Vogt
CERNLIB 2005 (64 bit)
for AMD64/Intel® EM64T (x86-64) and Itanium (ia64)
compatible with the gcc4/gfortran compiler suite
Harald Vogt
Deutsches Elektronensynchrotron
DESY Zeuthen
Wed Aug 05, 2009:
New version of CERNLIB for gcc-4.3.2 and gfortran
The latest cernlib.2005.corr.2009.06.13.tgz tarball has been provided by Jacek M. Holeczek. Some additional debian patches were applied
in order to get cernlib working on systems with newer compilers (openSUSE 11.1/i586).
Fri Feb 23, 2007: Examples of the C / Fortran interface updated
An updated
cernlib.2005.corr.tgz is provided which includes now also the modified code
for cernlib's C / Fortran interface located in ./2005/src/cfortran/Examples .
Remark:
In this directory I have added a script
run_example which can be used to compile, link and run
the examples.
This requires that you have installed the ./2005/include directory after downloading the new
cernlib.2005.corr.tgz and copying it into your installation.
Using your installation environment you should run:
cd $CERN
gtar -zxvf cernlib.2005.corr.tgz
cd $CERN_ROOT
mkdir include
export CERN_INCLUDEDIR=$CERN_ROOT/include
cd $CERN_ROOT/build
gmake install.include
The compiled cernlib versions for SL4 and SL5 provided for download are updated already to include the
modifications for ./2005/src/cfortran/Examples .
Thu Feb 9, 2007: LAPACK installation script modified
The script
Install_lapack was modified to include the -fPIC compile option.
I assume that this is required for
GENSER (Generator Services Subproject)
and for the ATLAS offline/external generator code
used in the ATHENA framework of ATLAS. The cernlib code itself (except the patchy stuff)
has been compiled using this compile option.
Provided for download:
a compiled version for SL4 on x86_64
containing the lib, bin, and include subdirs (remark: libpacklib/libkernlib does not contain shift).
Remark:
The cernlib distribution is runnning and has beeen tested now also on
RHEL5 beta2 -> SL5 (which uses the gcc4 compiler suite including gfortran as default).
Provided for download:
a compiled version for SL5 on x86_64
containing the lib, bin, and include subdirs (remark: libpacklib/libkernlib does not contain shift).
Tue Dec 12, 2006: Reorganization of the CERNLIB distribution
Here is now the
cernlib-2005-all-new.tgz and the
info have been updated.
A patch which may be applied to the CERNLIB 2005 original distribution can be found
here.
The installation scripts coming with cernlib-2005-all.tgz are now more structured and a script
cernlib_env
was added. This may be used in the directory which contains cernlibs "tar.gz" files if one has
to reinstall some parts of cernlib,
see cernlib install:
"Installing Individual packages".
Again follow this procedure:
download cernlib-2005-all.tgz to your installation directory
run "gtar -zxf cernlib-2005-all-new.tgz"
run "./Install_cernlib"
One can see all the cernlib code modified
following this link.
For 64 bit architectures the following
paw example (running in the pawdemo subdirectory)
.
is now also executed correctly. Futhermore the example given in the
HBOOK Reference Manual (section 9.3.1 - Using PAW and Unix shared memory)
is working as expected.
History
Fri Sep 22, 2006: Additional corrections from Kevin B. McCarty added
The
cernlib.2005.corr.tgz and the
info have been updated.
Wed Sep 20, 2006: Some small corrections for CERNLIB version 2005 added
To apply this
corrections the installation procedure as described below has to be modified as follows:
download
cernlib-2005-all.tgz to your installation directory
run "gtar -zxf cernlib-2005-all.tgz
now download here
cernlib.2005.corr.tgz which replaces the original one
and after that run "./Install_cernlib"
Tue Jul 18, 2006: CERNLIB version 2005 updated to include
AMD64/Intel® EM64 (x86-64) and Itanium (ia64) architectures.
It is now also compatible with gcc4 (gfortran).
What is essential for porting CERNLIB to 64 bit architectures is the pointer (memory addresses) handling
in the ZEBRA, HBOOK, and PAW packages. One has to take care that this still fits into 32 bit.
If the application is not to large (huge COMMON areas which may exceed the 32 bit address space)
than it is possible to run applications using those CERNLIB packages on 64 bit architectures.
I have installed a version of CERNLIB under
Scientific Linux 3.0.7 (32 bit) and 4.3 (64 bit) with gcc version
3.2.3 and 3.4.5 respectively .
To check the gcc4 compatibility I have used an experimental release of gcc4:
gcc version 4.2.0 20060603 (experimental).
The installed version passes all CERNLIB tests including the paw/paw++ demo tests.
The original CERNLIB code is available
by this link
which already supports LP64 architectures but has still problems when using paw/paw++.
Thanks to the work of Kevin B. McCarty from debian concerning the cfortran package
which is used in the CERNLIB code
the g77 compiler option -fno-f2c is not needed anymore.
The critical parts of CERNLIB code for going to 64 bit architectures are in
"packlib/kernlib/kerngen/ccgen" and in "pawlib/comis/deccc".
In my CERNLIB distribution I have included the LAPACK package to get a consistent blas and lapack
library if gcc4/gfortran is used. It is not possible to link the pawX11 and paw++ binaries with
blas and lapack libraries compiled with gcc3/g77 (libgfortran is not backward compatible to libg2c).
If one uses gcc3/g77 to install CERNLIB one may also use blas and lapack which come with the
Linux distributions.
I provide here
a special zipped tar file containing all CERNLIB 2005 code and the LAPACK and patchy4 sources and install scripts
which makes the life easy. It creates all libraries and executables.
The following is needed:
download cernlib-2005-all.tgz to your installation directory
run "gtar -zxf cernlib-2005-all.tgz
run "./Install_cernlib"
This script checks for the compiler suite used and installs:
- the blas and lapack libraries in the LAPACK subdirectory,
- the patchy4 executables in the patchy subdirectory,
- and in the ./2005 directory tree all CERNLIB sources, libraries, and executables.
The modifications compared to original code are listed
here.
A complete 2005/src tree of the CERNLIB 2005 modified can be found
here.
A patch which may be used for the CERNLIB 2005 original distribution can be found
here.
A compiled version of CERNLIB 2005 with gcc3/g77 for 32 and 64 bit architectures can be found
here.
A compiled version of CERNLIB 2005 with gcc4/gfortran for 32 and 64 bit architectures can be found
here.
created: Thu Jul 20, 2006
last updated: Fri Feb 9, 2007
H. Vogt