patch for FreeBSD support
Johannes Dieterich
dieter... at googlemail.com
Sun Mar 4 21:29:28 UTC 2012
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
More information about the CP2K-user
mailing list