Commit bbecedbd authored by Dion Haefner's avatar Dion Haefner

resolved conflicts

parents bf5a5603 b44dc25c
# Exclude build folder # Exclude build folder
build-cmake/ build-cmake/
# Exclude the parsed mini file
testing/convergence.mini
# Ignore temporary and auto-generated files # # Ignore temporary and auto-generated files #
*~ *~
*.pyc *.pyc
......
...@@ -2,7 +2,6 @@ image: dorie/dune-env:2.4 ...@@ -2,7 +2,6 @@ image: dorie/dune-env:2.4
variables: variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
COMPILER_FLAGS: -O3
before_script: before_script:
- cd /opt/dune - cd /opt/dune
...@@ -12,7 +11,6 @@ stages: ...@@ -12,7 +11,6 @@ stages:
main_job: main_job:
script: script:
- export CMAKE_FLAGS="-DCMAKE_CXX_FLAGS='$COMPILER_FLAGS'"
- ./dune-common/bin/dunecontrol --only=dorie all - ./dune-common/bin/dunecontrol --only=dorie all
- ./dune-common/bin/dunecontrol --only=dorie make install - ./dune-common/bin/dunecontrol --only=dorie make install
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test - ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
...@@ -20,9 +18,9 @@ main_job: ...@@ -20,9 +18,9 @@ main_job:
update_dune_job: update_dune_job:
script: script:
- export CMAKE_FLAGS="-DCMAKE_CXX_FLAGS='$COMPILER_FLAGS'"
- ./dune-common/bin/dunecontrol update || true - ./dune-common/bin/dunecontrol update || true
- ./dune-common/bin/dunecontrol --module=dorie all - ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol --only=dorie make install - ./dune-common/bin/dunecontrol all
- ./dune-common/bin/dunecontrol make install
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test - ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
stage: main stage: main
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 2.8.12)
project(dorie CXX) project(dorie CXX)
# set build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
if(CMAKE_BUILD_TYPE_UPPER MATCHES DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
#
if(NOT (dune-common_DIR OR dune-common_ROOT OR if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
${PROJECT_BINARY_DIR}) ${PROJECT_BINARY_DIR})
endif() endif()
#find dune-common and set the module path # find dune-common and set the module path
find_package(dune-common REQUIRED) find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules" list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
${dune-common_MODULE_PATH}) ${dune-common_MODULE_PATH})
#include the dune macros # include the dune macros
include(DuneMacros) include(DuneMacros)
# set some variables
set(CMAKE_DISABLE_FIND_PACKAGE_Python2Interp 1)
# start a dune project with information from dune.module # start a dune project with information from dune.module
dune_project() dune_project()
dune_enable_all_packages() dune_enable_all_packages()
dune_require_cxx_standard(MODULE "dorie" VERSION 14) dune_require_cxx_standard(MODULE "dorie" VERSION 14)
# add subdirectories # add subdirectories
add_subdirectory("src")
add_subdirectory("bin") add_subdirectory("bin")
add_subdirectory("m4") add_subdirectory("m4")
add_subdirectory("dune") add_subdirectory("dune")
...@@ -37,3 +45,5 @@ add_subdirectory("cmake/modules") ...@@ -37,3 +45,5 @@ add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc. # finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE) finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
This diff is collapsed.
...@@ -6,6 +6,7 @@ endfunction() ...@@ -6,6 +6,7 @@ endfunction()
set(python_paths "") set(python_paths "")
install_python_package("doc" python_paths)
install_python_package("utilities" python_paths) install_python_package("utilities" python_paths)
install_python_package("parscraper" python_paths) install_python_package("parscraper" python_paths)
add_subdirectory(parfield/wrapper) add_subdirectory(parfield/wrapper)
......
alabaster
Babel
breathe
docutils
Jinja2
MarkupSafe
Pygments
pytz
six
snowballstemmer
Sphinx
sphinx-rtd-theme
wheel
alabaster==0.7.7
Babel==2.2.0
breathe==4.1.0
docutils==0.12
Jinja2==2.8
MarkupSafe==0.23
Pygments==2.1
pytz==2015.7
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.5
sphinx-rtd-theme==0.1.9
wheel==0.24.0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
# do nothing, just install requirements
setup(name='dorie.doc')
#!/usr/bin/env python
import os
import argparse
import warnings
import subprocess
from dorie.parfield import configparser, pfgerror
from dorie.parfield.converter import ImageConverter, CSVConverter, H5Converter, FFTH5Converter
"""
Script invoking the image to h5 converter on a file given via command line.
"""
# path to random field generator executable, set by CMake
RFG_EXEC = "/home/dion/codes/dune/dorie/build-cmake/dune/dorie-rfg/dorie-rfg"
if __name__ == "__main__":
try: # catch all exceptions we we can output an error message
with warnings.catch_warnings(record=True) as warn: # catch all warnings so we can count them
# PARSE COMMAND LINE
parser = argparse.ArgumentParser()
parser.add_argument('-p','--param',help='The configuration file holding all parameterization information',required=True)
parser.add_argument('--debug',help='Display warnings',action='store_true',required=False)
args = vars(parser.parse_args())
cp = configparser.cp(args["param"])
params = {}
for par in ("generator","inputFile","outputFile"):
try:
params[par] = cp["general"][par]
except KeyError:
raise RuntimeError("Missing option general.generator in parameter file {}".format(args["param"]))
# CALL CONVERTER
if params["generator"] == "image":
ImageConverter(args["param"])
elif params["generator"] == "csv":
CSVConverter(args["param"])
elif params["generator"] == "fft":
try:
subprocess.check_call([RFG_EXEC,args["param"]])
except subprocess.CalledProcessError:
raise RuntimeError("FFT Field generator failed")
out_path = cp.get("generator.fft","outputPath")
FFTH5Converter(args["param"], out_path + "/YField.h5")
elif params["generator"] == "hdf5":
H5Converter(args["param"])
else:
raise RuntimeError("Unrecognized generator {}".format(gen))
# HANDLE WARNINGS
if not "debug" in args:
debug = False
else:
debug = args["debug"]
if debug:
for w in warn:
print(" {0}: {1}".format(w.category.__name__,w.message))
print("Parameter field generator exited successfully with ({0}) warning(s) and ({1}) error(s)".format(len(warn),0))
except Exception as e:
raise pfgerror.PFGError("Parameter field generator failed with ({0}) warning(s) and ({1}) error(s)".format(len(warn),1))
cycler==0.9.0 cycler
matplotlib==1.5.1 matplotlib
numpy==1.10.4 numpy
pyparsing==2.0.6 pyparsing
python-dateutil==2.4.2 python-dateutil
pytz==2015.7 pytz
scipy==0.17.0 scipy
six==1.10.0 six
wheel==0.24.0 wheel
...@@ -13,7 +13,6 @@ setup(name='dorie.parscraper', ...@@ -13,7 +13,6 @@ setup(name='dorie.parscraper',
author='Dion Häfner <mail@dionhaefner.de>', author='Dion Häfner <mail@dionhaefner.de>',
author_email='dorieteam@iup.uni-heidelberg.de', author_email='dorieteam@iup.uni-heidelberg.de',
url='', url='',
install_requires=['dorie.utilities'],
packages=['dorie.parscraper'], packages=['dorie.parscraper'],
scripts=dorie_parscraper_scripts() scripts=dorie_parscraper_scripts()
) )
cycler
matplotlib
numpy
pyparsing
python-dateutil
pytz
scipy
six
wheel
cycler==0.9.0
matplotlib==1.5.1
numpy==1.10.4
pyparsing==2.0.6
python-dateutil==2.4.2
pytz==2015.7
scipy==0.17.0
six==1.10.0
wheel==0.24.0
...@@ -15,5 +15,5 @@ setup(name='dorie.testtools', ...@@ -15,5 +15,5 @@ setup(name='dorie.testtools',
author_email='dorieteam@iup.uni-heidelberg.de', author_email='dorieteam@iup.uni-heidelberg.de',
url='', url='',
packages=['dorie.testtools','dorie.testtools.dorie', 'dorie.testtools.dorie_pfg', 'dorie.testtools.utilities','dorie.testtools.wrapper'], packages=['dorie.testtools','dorie.testtools.dorie', 'dorie.testtools.dorie_pfg', 'dorie.testtools.utilities','dorie.testtools.wrapper'],
install_requires=['numpy','scipy','matplotlib','dune.testtools','dorie.utilities','h5py'], install_requires=['dune.testtools'],
scripts=dorie_testtools_scripts()) scripts=dorie_testtools_scripts())
cycler
matplotlib
numpy
pyparsing
python-dateutil
pytz
scipy
six
wheel
cycler==0.9.0
matplotlib==1.5.1
numpy==1.10.4
pyparsing==2.0.6
python-dateutil==2.4.2
pytz==2015.7
scipy==0.17.0
six==1.10.0
wheel==0.24.0
...@@ -15,6 +15,5 @@ setup(name='dorie.utilities', ...@@ -15,6 +15,5 @@ setup(name='dorie.utilities',
author_email='dorieteam@iup.uni-heidelberg.de', author_email='dorieteam@iup.uni-heidelberg.de',
url='', url='',
packages=['dorie.utilities'], packages=['dorie.utilities'],
install_requires=['numpy','scipy','matplotlib'],
scripts=dorie_utilities_scripts() scripts=dorie_utilities_scripts()
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment