From 792590138007f36bf801f67f1d2ec2842753b2b5 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 18 Feb 2013 15:07:43 +0100 Subject: [PATCH 1/4] Import cmake/ from commit 5f82198c in opm-core --- GNUmakefile | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 GNUmakefile diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 000000000..63889ab39 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,43 @@ +# GNUmakefile is processed before Makefile, which is why we arrive here +# first; when we call the other makefile, then we must specify its real +# name with the -f parameter + +# figure out the number of processors from the system, add one and round +# to nearest integer. this is the maximum number of processes we want running +# at the same time (one for each core and one stuck on I/O) +# if we are running this is a VM, then /proc won't be mounted and we revert +# to single CPU processing +CPUINFO:=/proc/cpuinfo +NUM_CPUS:=$(shell test -r $(CPUINFO) && grep -P -c '^processor\t:' $(CPUINFO) || echo 0) +PROCS:=$(shell echo "("$(NUM_CPUS)+1")"/1 | bc) + +# use these utilities if they are available +IONICE:=$(shell test -x "$$(which ionice)" && echo ionice -c2 -n7) +NICE:=$(shell test -x "$$(which nice)" && echo nice) + +# we do dependency management the right way; don't attempt to cache +export CCACHE_DISABLE:=1 + +# ignore that there may be files with these names, we are going to call +# the other make regardless +.PHONY: __everything $(MAKECMDGOALS) + +# outsource the processing to the real makefile, running in parallel and +# in a nice environment so that it doesn't hog our workstation. if there +# is nothing else happening on the box, then it will run just as fast +# the leading plus makes us run this regardless of options, see +# http://www.gnu.org/software/make/manual/make.html#Instead-of-Execution +__everything: +# only put on a parallel flag if there isn't already one; otherwise we +# get the warning "-jN forced in submake: disabling jobserver mode". +# this have to happen inside the rule, because -j option is removed from +# MAKEFLAGS outside + +@$(IONICE) $(NICE) $(MAKE) --no-print-directory -f Makefile $(if $(findstring -j,$(MAKEFLAGS)),,-j $(PROCS)) $(MAKECMDGOALS) + +# automatically generate all the goals we are asked to make and delegate +# processing of them to the real makefile through the dependency (since +# everything depends on the same thing, then we only call the other make +# once). the dummy command is just there to make sure that make doesn't +# show the "Nothing to do for `foo'" message after processing +$(MAKECMDGOALS): __everything + @true From 4e34a967cbfa662619897c5435739d048cf36864 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 22 Feb 2013 20:30:29 +0100 Subject: [PATCH 2/4] Ignore output from CMake build --- .gitignore | 58 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 02721ea10..9c1b8581d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,71 @@ +# use shell glob syntax for wildcards etc. +# editor backup *~ +.\#* +\#*\# +.\#*\# + +# Eclipse project settings +.cproject +.project +.settings/* + +# QtCreator project settings +CMakeLists.txt.user* + +# compiler output *.o *.lo *.la +*.a +*.so .libs .deps -*.pc stamp-* -.dirstamp +*.aux +*.log +# executables (test programs) +bin/ + +# configure artifacts Makefile +config.h +CMakeCache.txt +CMakeFiles/ +CTestTestfile.cmake +DartConfiguration.tcl +Testing/ +*install.cmake +*-config*.cmake +*.pc +install_manifest.txt + +# doxygen artifacts +doc/doxygen/Doxyfile.in +doc/doxygen/Doxyfile + +# Some more files generated by autotools. Makefile.in -Doxyfile -Doxyfile.in aclocal.m4 +am autom4te.cache config.* configure -compile -depcomp dependencies.m4 +depcomp install-sh libtool ltmain.sh -m4/libtool.m4 -m4/lt*.m4 missing # Ignoring executables *_test -examples/hello +examples/cpchop* +examples/cpregularize +examples/exp_variogram +examples/upscale_* +examples/grdecldips +data +steadystate_test_implicit +steadystate_test_explicit \ No newline at end of file From f5e19e9b87d4f8880d84cee0b3abee0dff550e4a Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 22 Feb 2013 20:32:35 +0100 Subject: [PATCH 3/4] Remove remnants of the Autotools build system --- Makefile.am | 35 ----------------- configure.ac | 92 -------------------------------------------- examples/Makefile.am | 25 ------------ 3 files changed, 152 deletions(-) delete mode 100644 Makefile.am delete mode 100644 configure.ac delete mode 100644 examples/Makefile.am diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 0a4b61d4a..000000000 --- a/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = . examples - - -# Declare libraries -lib_LTLIBRARIES = libopmpolymer.la - -libopmpolymer_la_SOURCES = \ -opm/polymer/CompressibleTpfaPolymer.cpp \ -opm/polymer/IncompTpfaPolymer.cpp \ -opm/polymer/PolymerInflow.cpp \ -opm/polymer/PolymerProperties.cpp \ -opm/polymer/SimulatorCompressiblePolymer.cpp \ -opm/polymer/SimulatorPolymer.cpp \ -opm/polymer/TransportModelCompressiblePolymer.cpp \ -opm/polymer/TransportModelPolymer.cpp \ -opm/polymer/polymerUtilities.cpp - -nobase_include_HEADERS = \ -opm/polymer/CompressibleTpfaPolymer.hpp \ -opm/polymer/GravityColumnSolverPolymer.hpp \ -opm/polymer/GravityColumnSolverPolymer_impl.hpp \ -opm/polymer/IncompPropertiesDefaultPolymer.hpp \ -opm/polymer/IncompTpfaPolymer.hpp \ -opm/polymer/PolymerBlackoilState.hpp \ -opm/polymer/PolymerInflow.hpp \ -opm/polymer/PolymerProperties.hpp \ -opm/polymer/PolymerState.hpp \ -opm/polymer/SimulatorCompressiblePolymer.hpp \ -opm/polymer/SimulatorPolymer.hpp \ -opm/polymer/SinglePointUpwindTwoPhasePolymer.hpp \ -opm/polymer/TransportModelCompressiblePolymer.hpp \ -opm/polymer/TransportModelPolymer.hpp \ -opm/polymer/polymerUtilities.hpp diff --git a/configure.ac b/configure.ac deleted file mode 100644 index c52b7f62c..000000000 --- a/configure.ac +++ /dev/null @@ -1,92 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.59]) -AC_INIT([OPM Polymer Module], [0.1], [atgeirr@sintef.no],dnl - [opmpolymer], [https://public.ict.sintef.no/opm/hg/opm-polymer]) - -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) - -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -m4_ifdef([LT_INIT], [LT_INIT]) - -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([opm/polymer/TransportModelPolymer.hpp]) -AC_CONFIG_HEADERS([config.h]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CXX -AM_PROG_CC_C_O -AC_PROG_RANLIB -m4_ifdef([LT_INIT], [], [AC_PROG_LIBTOOL]) - -# AX_LAPACK requires a working F77 compiler or, rather, its runtime -# support libraries. -AC_PROG_F77 - -# F77 name mangling -AC_F77_WRAPPERS - -# Checks for libraries. -AC_SEARCH_LIBS([sqrt], [m]) -AC_CHECK_FUNCS([sqrt]) - -AX_LAPACK -AX_BOOST_BASE([1.37]) -AX_BOOST_SYSTEM -AX_BOOST_DATE_TIME -AX_BOOST_FILESYSTEM -AX_BOOST_UNIT_TEST_FRAMEWORK - -ERT - -# Checks for header files. -AC_CHECK_HEADERS([opm/core/grid.h], [], -[AC_MSG_ERROR( - [cannot proceed without 'opm-core' header files. - *** Update CPPFLAGS and try again. ***])]) - -AC_CHECK_HEADERS([suitesparse/umfpack.h], - [umfpack_header=yes], - [umfpack_header=no]) - - -# Checks for typedefs, structures, and compiler characteristics. - -# Checks for library functions. - -AC_F77_FUNC(dgetrf) -AC_SEARCH_LIBS($dgemm, [blas]) -AC_SEARCH_LIBS($dgetrf, [lapack]) - -AC_SEARCH_LIBS([amd_free], [amd]) -AC_SEARCH_LIBS([camd_free], [camd]) -AC_SEARCH_LIBS([colamd_set_defaults], [colamd]) -AC_SEARCH_LIBS([ccolamd_set_defaults], [ccolamd]) -AC_SEARCH_LIBS([cholmod_l_start], [cholmod]) - -AC_SEARCH_LIBS([umfpack_dl_solve], [umfpack], - [umfpack_lib=yes], [umfpack_lib=no]) - -AM_CONDITIONAL([UMFPACK], - [test "x$umfpack_header" != "xno" -a "x$umfpack_lib" != "xno"]) - -m4_ifdef([AM_COND_IF], -[AM_COND_IF([UMFPACK], [], - [AC_MSG_NOTICE([Found no working installation of UMFPACK. - UMFPACK support is disabled.])]) -]) - -AC_SEARCH_LIBS([process_grdecl], [opmcore], - [opmcore_lib=yes], - [opmcore_lib=no], - [$BOOST_LDFLAGS $BOOST_SYSTEM_LIB - $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS]) - -AC_CONFIG_FILES([ - Makefile - examples/Makefile -]) - -AC_OUTPUT diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 4256ea6b8..000000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -AM_CPPFLAGS = \ --I$(top_srcdir) \ -$(BOOST_CPPFLAGS) - -LDFLAGS = $(BOOST_LDFLAGS) - -LDADD = $(top_builddir)/libopmpolymer.la \ -$(BOOST_FILESYSTEM_LIB) \ -$(BOOST_SYSTEM_LIB) - - -noinst_PROGRAMS = \ -sim_poly2p_incomp_reorder \ -sim_poly2p_comp_reorder \ -test_singlecellsolves - -sim_poly2p_incomp_reorder_SOURCES = \ -sim_poly2p_incomp_reorder.cpp - -sim_poly2p_comp_reorder_SOURCES = \ -sim_poly2p_comp_reorder.cpp - -test_singlecellsolves_SOURCES = \ -test_singlecellsolves.cpp - From 7e3a81f1a6e9bb6579b798c00010f8feaf85f837 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Tue, 5 Mar 2013 12:11:27 +0100 Subject: [PATCH 4/4] Remove make execution wrapper --- GNUmakefile | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 GNUmakefile diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 63889ab39..000000000 --- a/GNUmakefile +++ /dev/null @@ -1,43 +0,0 @@ -# GNUmakefile is processed before Makefile, which is why we arrive here -# first; when we call the other makefile, then we must specify its real -# name with the -f parameter - -# figure out the number of processors from the system, add one and round -# to nearest integer. this is the maximum number of processes we want running -# at the same time (one for each core and one stuck on I/O) -# if we are running this is a VM, then /proc won't be mounted and we revert -# to single CPU processing -CPUINFO:=/proc/cpuinfo -NUM_CPUS:=$(shell test -r $(CPUINFO) && grep -P -c '^processor\t:' $(CPUINFO) || echo 0) -PROCS:=$(shell echo "("$(NUM_CPUS)+1")"/1 | bc) - -# use these utilities if they are available -IONICE:=$(shell test -x "$$(which ionice)" && echo ionice -c2 -n7) -NICE:=$(shell test -x "$$(which nice)" && echo nice) - -# we do dependency management the right way; don't attempt to cache -export CCACHE_DISABLE:=1 - -# ignore that there may be files with these names, we are going to call -# the other make regardless -.PHONY: __everything $(MAKECMDGOALS) - -# outsource the processing to the real makefile, running in parallel and -# in a nice environment so that it doesn't hog our workstation. if there -# is nothing else happening on the box, then it will run just as fast -# the leading plus makes us run this regardless of options, see -# http://www.gnu.org/software/make/manual/make.html#Instead-of-Execution -__everything: -# only put on a parallel flag if there isn't already one; otherwise we -# get the warning "-jN forced in submake: disabling jobserver mode". -# this have to happen inside the rule, because -j option is removed from -# MAKEFLAGS outside - +@$(IONICE) $(NICE) $(MAKE) --no-print-directory -f Makefile $(if $(findstring -j,$(MAKEFLAGS)),,-j $(PROCS)) $(MAKECMDGOALS) - -# automatically generate all the goals we are asked to make and delegate -# processing of them to the real makefile through the dependency (since -# everything depends on the same thing, then we only call the other make -# once). the dummy command is just there to make sure that make doesn't -# show the "Nothing to do for `foo'" message after processing -$(MAKECMDGOALS): __everything - @true