[CP2K:3736] patch for FreeBSD support

hut... at pci.uzh.ch hut... at pci.uzh.ch
Mon Mar 5 15:33:07 CET 2012


Hello

thanks a lot for the patches. I have applied them to the trunk.

The libint version used in CP2K is 1.1. It is not compatible
with the 2.0 version available since April last year. This might
cause problems with the FBSD tree.

best regards

Juerg 

--------------------------------------------------------------
Juerg Hutter                         Phone : ++41 44 635 4491
Physical Chemistry Institute   FAX   : ++41 44 635 6838
University of Zurich               E-mail:  hut... at pci.uzh.ch
Winterthurerstrasse 190
CH-8057 Zurich, Switzerland
---------------------------------------------------------------

-----cp... at googlegroups.com wrote: -----
To: cp2k <cp... at googlegroups.com>
From: Johannes Dieterich 
Sent by: cp... at googlegroups.com
Date: 03/04/2012 10:29PM
Subject: [CP2K:3736] patch for FreeBSD support

Hi,

please find attached a tiny patch that provides some basic support for
CP2K on FreeBSD (tested on FBSD10 amd64) against trunk. Please note
that the nolibint configurations are not used in the "get_arch_code"
script since FBSD provides science/libint as a port which IMHO should
be used by default. Also, I so far only had a look into sopt/ssmp
configurations and neglected MPI ones.

Would there be any objection in 1) getting this (and potential future
FBSD-specific patches) upstream and 2) if I to get a cp2k port into
the FBSD portstree (would require a release source tarball)?

Best regards

Johannes Dieterich


### SVN DIFF STARTS HERE ###
Index: cp2k/tools/get_arch_code
===================================================================
--- cp2k/tools/get_arch_code	(revision 12164)
+++ cp2k/tools/get_arch_code	(working copy)
@@ -62,6 +62,8 @@
         PLATFORM="IRIX";;
       IRIX64-*-*-*)
         PLATFORM="IRIX";;
+      FreeBSD-*-*-*)
+        PLATFORM="FreeBSD-libint-gfortran";;
       Linux-*-*-ppc64)
         PLATFORM="Linux-bgl-ibm";;
       Linux-*-*-alpha)
Index: cp2k/arch/FreeBSD-nolibint-gfortran.sopt
===================================================================
--- cp2k/arch/FreeBSD-nolibint-gfortran.sopt	(revision 0)
+++ cp2k/arch/FreeBSD-nolibint-gfortran.sopt	(working copy)
@@ -0,0 +1,19 @@
+#
+# gfortran arch file, currently for testing gfortran (svn version
4.3)
+# status on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29975
+#
+CC       = gcc46
+CPP      =
+
+FC       = gfortran46
+LD       = gfortran46
+
+AR       = ar -r
+
+CPPFLAGS =
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__NO_STATM_ACCESS
+FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form $(DFLAGS)
+LDFLAGS  = $(FCFLAGS)
+LIBS     = -llapack -lblas -lfftw3
+
+OBJECTS_ARCHITECTURE = machine_gfortran.o
Index: cp2k/arch/FreeBSD-nolibint-gfortran.ssmp
===================================================================
--- cp2k/arch/FreeBSD-nolibint-gfortran.ssmp	(revision 0)
+++ cp2k/arch/FreeBSD-nolibint-gfortran.ssmp	(working copy)
@@ -0,0 +1,19 @@
+#
+# gfortran arch file, currently for testing gfortran (svn version
4.3)
+# status on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29975
+#
+CC       = gcc46
+CPP      =
+
+FC       = gfortran46
+LD       = gfortran46
+
+AR       = ar -r
+
+CPPFLAGS =
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__NO_STATM_ACCESS
+FCFLAGS  = -O2 -fopenmp -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form $(DFLAGS)
+LDFLAGS  = $(FCFLAGS)
+LIBS     = -llapack -lblas -lfftw3
+
+OBJECTS_ARCHITECTURE = machine_gfortran.o
Index: cp2k/arch/FreeBSD-libint-gfortran.sopt
===================================================================
--- cp2k/arch/FreeBSD-libint-gfortran.sopt	(revision 0)
+++ cp2k/arch/FreeBSD-libint-gfortran.sopt	(working copy)
@@ -0,0 +1,19 @@
+#
+# gfortran arch file, currently for testing gfortran (svn version
4.3)
+# status on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29975
+#
+CC       = gcc46
+CPP      =
+
+FC       = gfortran46
+LD       = gfortran46
+
+AR       = ar -r
+
+CPPFLAGS =
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -
D__NO_STATM_ACCESS
+FCFLAGS  = -O2 -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form $(DFLAGS)
+LDFLAGS  = $(FCFLAGS)
+LIBS     = -llapack -lblas -lfftw3 -lderiv -lint
+
+OBJECTS_ARCHITECTURE = machine_gfortran.o
Index: cp2k/arch/FreeBSD-libint-gfortran.ssmp
===================================================================
--- cp2k/arch/FreeBSD-libint-gfortran.ssmp	(revision 0)
+++ cp2k/arch/FreeBSD-libint-gfortran.ssmp	(working copy)
@@ -0,0 +1,19 @@
+#
+# gfortran arch file, currently for testing gfortran (svn version
4.3)
+# status on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29975
+#
+CC       = gcc46
+CPP      =
+
+FC       = gfortran46
+LD       = gfortran46
+
+AR       = ar -r
+
+CPPFLAGS =
+DFLAGS   = -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -
D__NO_STATM_ACCESS
+FCFLAGS  = -O2 -fopenmp -ffast-math -funroll-loops -ftree-vectorize -
march=native -ffree-form $(DFLAGS)
+LDFLAGS  = $(FCFLAGS)
+LIBS     = -llapack -lblas -lfftw3 -lderiv -lint
+
+OBJECTS_ARCHITECTURE = machine_gfortran.o

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To post to this group, send email to cp... at googlegroups.com.
To unsubscribe from this group, send email to cp2k+uns... at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cp2k?hl=en.




More information about the CP2K-user mailing list