[cp2k/f18] update to current SVN 2.3 stable branch

Dominik Mierzejewski rathann at fedoraproject.org
Thu Feb 21 00:17:06 UTC 2013


commit 61a7f23525b871c77250878f912f3f714d7e4ca8
Author: Dominik Mierzejewski <rpm at greysector.net>
Date:   Thu Feb 21 01:16:51 2013 +0100

    update to current SVN 2.3 stable branch
    
    - re-enable regtests
    - drop svn patch (no longer needed)
    - link with libfftw3_omp for ssmp build
    - reorder libraries in LDFLAGS per M. Guidon's cp2k installation primer
    - add -ffree-line-length-none to Fortran flags
    - add a patch to echo the name of reach test (from Debian package)
    - update libint/libderiv options to match current builds

 .gitignore                  |    1 +
 Linux-gfortran-openmpi.popt |    8 +++-----
 Linux-gfortran.ssmp         |    6 +++---
 Linux-i686-gfortran.sopt    |    4 ++--
 cp2k-rpm.patch              |   29 ++++++++++++++++++++++++-----
 cp2k-snapshot.sh            |    5 +++--
 cp2k-svn.patch              |    9 ---------
 cp2k.spec                   |   28 ++++++++++++++++++----------
 sources                     |    2 +-
 9 files changed, 55 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 25f305c..84ebbc1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /cp2k-2_1-branch.tar.gz
 /cp2k-2.3-20120825.tar.bz2
 /cp2k-2.3.tar.bz2
+/cp2k-2.3-20130220.tar.bz2
diff --git a/Linux-gfortran-openmpi.popt b/Linux-gfortran-openmpi.popt
index 8e0c98f..17fd913 100644
--- a/Linux-gfortran-openmpi.popt
+++ b/Linux-gfortran-openmpi.popt
@@ -11,12 +11,10 @@ LD       = mpif90
 AR       = ar -r
 
 CPPFLAGS = 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__parallel -D__BLACS -D__SCALAPACK -D__LIBINT -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__parallel -D__BLACS -D__SCALAPACK -D__LIBINT -D__LIBINT_MAX_AM=8 -D__LIBDERIV_MAX_AM1=6
 OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
-FCFLAGS  = $(OPTFLAGS) -ffree-form $(DFLAGS)
+FCFLAGS  = $(OPTFLAGS) -ffree-form -ffree-line-length-none $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) 
-#LIBS     = -llapack -lblas -lfftw3
-LIBS     = -lstdc++ -llapack -lscalapack -lint -lderiv -lmpiblacsF77init -lmpiblacs -lmpiblacsCinit -lfftw3
-#          -lstdc++ -lscalapack -lint -lderiv -lblacsF77 -lblacs -lblacsC -lfftw3
+LIBS     = -lstdc++ -llapack -lscalapack -lmpiblacsF77init -lmpiblacs -lmpiblacsCinit -lfftw3 -lint -lderiv
 
 OBJECTS_ARCHITECTURE = machine_gfortran.o
diff --git a/Linux-gfortran.ssmp b/Linux-gfortran.ssmp
index 1f3d72d..b421d58 100644
--- a/Linux-gfortran.ssmp
+++ b/Linux-gfortran.ssmp
@@ -11,10 +11,10 @@ LD       = gfortran
 AR       = ar -r
 
 CPPFLAGS = 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=8 -D__LIBDERIV_MAX_AM1=6
 OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
-FCFLAGS  = $(OPTFLAGS) -ffree-form -fopenmp $(DFLAGS)
+FCFLAGS  = $(OPTFLAGS) -ffree-form -ffree-line-length-none -fopenmp $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) 
-LIBS     = -llapack -lf77blas -latlas -lfftw3 -lint -lderiv
+LIBS     = -llapack -lf77blas -latlas -lfftw3_omp -lfftw3 -lint -lderiv
 
 OBJECTS_ARCHITECTURE = machine_gfortran.o
diff --git a/Linux-i686-gfortran.sopt b/Linux-i686-gfortran.sopt
index 1143c8b..8232a07 100644
--- a/Linux-i686-gfortran.sopt
+++ b/Linux-i686-gfortran.sopt
@@ -11,9 +11,9 @@ LD       = gfortran
 AR       = ar -r
 
 CPPFLAGS = 
-DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=8 -D__LIBDERIV_MAX_AM1=6
 OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
-FCFLAGS  = $(OPTFLAGS) -ffree-form $(DFLAGS)
+FCFLAGS  = $(OPTFLAGS) -ffree-form -ffree-line-length-none $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) 
 LIBS     = -llapack -lf77blas -latlas -lfftw3 -lint -lderiv
 
diff --git a/cp2k-rpm.patch b/cp2k-rpm.patch
index ff47fe1..a34b824 100644
--- a/cp2k-rpm.patch
+++ b/cp2k-rpm.patch
@@ -1,15 +1,15 @@
 diff -up cp2k-2.3/arch/Linux-x86-64-gfortran.sopt.r cp2k-2.3/arch/Linux-x86-64-gfortran.sopt
 --- cp2k-2.3/arch/Linux-x86-64-gfortran.sopt.r	2010-12-22 17:46:11.000000000 +0100
-+++ cp2k-2.3/arch/Linux-x86-64-gfortran.sopt	2012-08-26 00:34:48.000000000 +0200
++++ cp2k-2.3/arch/Linux-x86-64-gfortran.sopt	2013-02-20 23:48:26.058052003 +0100
 @@ -11,9 +11,10 @@ LD       = gfortran
  AR       = ar -r
  
  CPPFLAGS = 
 -DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 
 -FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS)
-+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=7 -D__LIBDERIV_MAX_AM1=6
++DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -D__LIBINT_MAX_AM=8 -D__LIBDERIV_MAX_AM1=6
 +OPTFLAGS = -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native
-+FCFLAGS  = $(OPTFLAGS) -ffree-form $(DFLAGS)
++FCFLAGS  = $(OPTFLAGS) -ffree-form -ffree-line-length-none $(DFLAGS)
  LDFLAGS  = $(FCFLAGS) 
 -LIBS     = -llapack -lblas -lfftw3
 +LIBS     = -llapack -lf77blas -latlas -lfftw3 -lint -lderiv
@@ -17,7 +17,7 @@ diff -up cp2k-2.3/arch/Linux-x86-64-gfortran.sopt.r cp2k-2.3/arch/Linux-x86-64-g
  OBJECTS_ARCHITECTURE = machine_gfortran.o
 diff -up cp2k-2.3/makefiles/Makefile.r cp2k-2.3/makefiles/Makefile
 --- cp2k-2.3/makefiles/Makefile.r	2012-08-21 13:35:17.000000000 +0200
-+++ cp2k-2.3/makefiles/Makefile	2012-08-26 00:34:48.000000000 +0200
++++ cp2k-2.3/makefiles/Makefile	2013-02-20 23:50:10.898183206 +0100
 @@ -90,11 +90,11 @@ CLEAN_TARGETS = $(addsuffix /clean ,$(VE
  # lists the targets that are not files
  #
@@ -103,7 +103,18 @@ diff -up cp2k-2.3/makefiles/Makefile.r cp2k-2.3/makefiles/Makefile
  # the rule how to generate the .o from the .F
 diff -up cp2k-2.3/tools/do_regtest.r cp2k-2.3/tools/do_regtest
 --- cp2k-2.3/tools/do_regtest.r	2012-08-21 10:25:41.000000000 +0200
-+++ cp2k-2.3/tools/do_regtest	2012-08-26 00:34:48.000000000 +0200
++++ cp2k-2.3/tools/do_regtest	2013-02-20 23:48:26.059052004 +0100
+@@ -103,8 +103,8 @@ leakcheck="NO"
+ 
+ # *** how to execute an input file [ cp2k_prefix input cp2k_postfix ]
+ # Leave empty for serial, uncomment for parallel
+-cp2k_run_prefix="mpiexec -np 2"
+-#cp2k_run_prefix=""
++#cp2k_run_prefix="mpiexec -np 2"
++cp2k_run_prefix=""
+ cp2k_run_postfix=
+ #cp2k_prefix="( ulimit -t 300; ${dir_base}/${cp2k_dir}/exe/${dir_triplet}/cp2k.${cp2k_version}"
+ #cp2k_postfix=" )"
 @@ -353,9 +353,6 @@ if [[ ${quick} != "quick" ]]; then
     else
        echo "make realclean VERSION=${cp2k_version} went fine"
@@ -125,3 +136,11 @@ diff -up cp2k-2.3/tools/do_regtest.r cp2k-2.3/tools/do_regtest
  echo "-------------------------regtesting cp2k----------------------------------"
  
  ###################################################################################
+@@ -519,6 +520,7 @@ do
+      input_file=`grep -v "#" TEST_FILES | ${awk} -v itest=$itest '{c=c+1;if (c==itest) print $1}'`
+      # just one test right now, but this should generalize
+      test_types=`grep -v "#" TEST_FILES | ${awk} -v itest=$itest '{c=c+1;if (c==itest) print $2}'`
++     echo "Running ${input_file}"
+      output_file=${dir_out}/${dir}/${input_file}.out
+      output_last=${dir_last}/${dir}/${input_file}.out
+      ( ulimit -t ${job_max_time} -v 2000000 ; ${cp2k_prefix} ${input_file} ${cp2k_postfix} &> ${output_file} )
diff --git a/cp2k-snapshot.sh b/cp2k-snapshot.sh
index 0fa351a..349adff 100755
--- a/cp2k-snapshot.sh
+++ b/cp2k-snapshot.sh
@@ -13,14 +13,15 @@ cleanup() {
 unset CDPATH
 pwd=$(pwd)
 svn=$(date +%Y%m%d)
+svn=20130220
 dirname=cp2k-2.3
-url=https://cp2k.svn.sourceforge.net/svnroot/cp2k/trunk/cp2k
+url=https://cp2k.svn.sourceforge.net/svnroot/cp2k/branches/cp2k-2_3-branch/cp2k
 rev={$svn}
 
 cd "$tmp"
 svn checkout -r ${rev} ${url} $dirname
 cd $dirname
-tools/get_revision_number . >src/REVISION
+tools/get_revision_number . >REVISION
 find . -type d -name .svn -print0 | xargs -0r rm -rf
 cd ..
 tar jcf "$pwd"/$dirname-$svn.tar.bz2 $dirname
diff --git a/cp2k.spec b/cp2k.spec
index f3e21aa..79c9540 100644
--- a/cp2k.spec
+++ b/cp2k.spec
@@ -1,9 +1,9 @@
-%define svn 0
-%define snapshot 20120825
+%define svn 1
+%define snapshot 20130220
 
 Name: cp2k
 Version: 2.3
-Release: 1%{?dist}
+Release: 2.%{?snapshot}%{?dist}
 Group: Applications/Engineering
 Summary: A molecular dynamics engine capable of classical and Car-Parrinello simulations
 License: GPLv2+
@@ -28,13 +28,14 @@ Source4: cp2k-snapshot.sh
 # use external makedepf90
 # skip compilation during regtests
 Patch0: %{name}-rpm.patch
-# hardcode version in get_revision_number script to work with snapshots
-Patch1: %{name}-svn.patch
 BuildRequires: atlas-devel
+# for regtests
+BuildRequires: bc
 BuildRequires: fftw-devel
 BuildRequires: gcc-gfortran
 BuildRequires: libint-devel >= 1.1.4
 BuildRequires: makedepf90
+BuildRequires: /bin/hostname
 Requires: %{name}-common = %{version}-%{release}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -104,9 +105,6 @@ cp -p %{SOURCE2} arch/Linux-i686-gfortran.ssmp
 cp -p %{SOURCE2} arch/Linux-x86-64-gfortran.ssmp
 cp -p %{SOURCE3} arch/
 %patch0 -p1 -b .r
-%if %{svn}
-%patch1 -p1 -b .svn
-%endif
 rm -r tools/makedepf90
 chmod -x src/harris_{functional,{env,energy}_types}.F
 
@@ -141,7 +139,7 @@ install -pm755 exe/`tools/get_arch_code`/cp2k.ssmp %{buildroot}%{_bindir}
 %clean
 rm -rf %{buildroot}
 
-%if 0
+%if 1
 %check
 export FORT_C_NAME=gfortran
 cat > tests/fedora.config << __EOF__
@@ -150,7 +148,7 @@ export FORT_C_NAME=gfortran
 dir_base=%{_builddir}
 cp2k_version=sopt
 dir_triplet=`tools/get_arch_code`
-cp2k_dir=cp2k
+cp2k_dir=cp2k-%{version}
 maxtasks=`getconf _NPROCESSORS_ONLN`
 emptycheck="NO"
 leakcheck="NO"
@@ -181,6 +179,16 @@ popd
 %{_libdir}/mpich2%{?_opt_cc_suffix}/bin/cp2k.popt_mpich2
 
 %changelog
+* Wed Feb 20 2013 Dominik Mierzejewski <rpm at greysector.net> - 2.3-2.20130220
+- update to current SVN 2.3 stable branch
+- re-enable regtests
+- drop svn patch (no longer needed)
+- link with libfftw3_omp for ssmp build
+- reorder libraries in LDFLAGS per M. Guidon's cp2k installation primer
+- add -ffree-line-length-none to Fortran flags
+- add a patch to echo the name of reach test (from Debian package)
+- update libint/libderiv options to match current builds
+
 * Wed Sep 05 2012 Dominik Mierzejewski <rpm at greysector.net> - 2.3-1
 - updated to 2.3 release
 
diff --git a/sources b/sources
index 18dedd6..efc01c7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4e85f42d652d85753c11adaff59f0566  cp2k-2.3.tar.bz2
+9e2bf7ddba59e01eef1209f7c4f0659d  cp2k-2.3-20130220.tar.bz2


More information about the scm-commits mailing list