Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c3c779
Showing
112 changed files
with
10,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
language: python | ||
python: | ||
- 2.5 | ||
- 2.6 | ||
- 2.7 | ||
before_install: | ||
- sudo apt-get install gfortran | ||
install: | ||
- pip install -q cython numpy --use-mirrors | ||
before_script: | ||
- make -f Makefile.manual # Test manual makefiles | ||
- git clean -dfx # Test CMake: | ||
- cmake -DCMAKE_INSTALL_PREFIX="$VIRTUAL_ENV" -DWITH_PYTHON="yes" . | ||
- make | ||
- make install | ||
script: | ||
- ctest -E conv | ||
- PYTHONPATH=. dftatom/test_runner | ||
- mkdir xx | ||
- cd xx # Make sure only the installed library is picked up | ||
- LD_LIBRARY_PATH="$VIRTUAL_ENV"/lib/ ../dftatom/test_runner | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | ||
|
||
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_SOURCE_DIR}/cmake/UserOverride.cmake) | ||
|
||
project(dftatom) | ||
enable_language(Fortran) | ||
|
||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
# Make sure that CMAKE_BUILD_TYPE is either Debug or Release: | ||
if (NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Debug | ||
CACHE STRING "Build type (Debug, Release)" FORCE) | ||
endif () | ||
if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR | ||
CMAKE_BUILD_TYPE STREQUAL "Release")) | ||
message("${CMAKE_BUILD_TYPE}") | ||
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of: Debug, Release (current value: '${CMAKE_BUILD_TYPE}')") | ||
endif () | ||
|
||
set(WITH_PYTHON no | ||
CACHE BOOL "Build with Python wrappers") | ||
set(WITH_C_INTERFACE no | ||
CACHE BOOL "Build with C interface") | ||
if (WITH_PYTHON) | ||
set(WITH_C_INTERFACE yes) | ||
endif () | ||
|
||
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") | ||
# gfortran | ||
# Enable this if you want to check for single/double corruption (and use | ||
# the Debug build): | ||
#set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fdefault-real-8") | ||
endif () | ||
|
||
|
||
enable_testing() | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(tests) | ||
if (WITH_PYTHON) | ||
# We need to execute the find_package() commands here, so that the | ||
# variables like ${PYTHON_INSTALL_PATH} are defined here and in all cmake | ||
# files (as opposed to just subset of cmake files). | ||
find_package(Python REQUIRED) | ||
find_package(NumPy REQUIRED) | ||
find_package(Cython REQUIRED) | ||
add_subdirectory(dftatom) | ||
add_custom_target(test | ||
COMMAND ./test_runner dftatom | ||
) | ||
endif () | ||
|
||
message("\n") | ||
message("Configuration results") | ||
message("---------------------") | ||
message("Fortran compiler: ${CMAKE_Fortran_COMPILER}") | ||
message("Build type: ${CMAKE_BUILD_TYPE}") | ||
if (CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
message("Fortran compiler flags: ${CMAKE_Fortran_FLAGS_DEBUG}") | ||
else () | ||
message("Fortran compiler flags: ${CMAKE_Fortran_FLAGS_RELEASE}") | ||
endif () | ||
message("Installation prefix: ${CMAKE_INSTALL_PREFIX}") | ||
if (WITH_PYTHON) | ||
message("Python install path: ${PYTHON_INSTALL_PATH}") | ||
endif () | ||
message("With C interface: ${WITH_C_INTERFACE}") | ||
message("With Python: ${WITH_PYTHON}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2006-2012 Ondřej Čertík, Jiří Vackář, John Pask | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Modify these for your Fortran compiler: | ||
|
||
# GFortran | ||
F90 = gfortran | ||
F90FLAGS = -Wall -std=f95 -Wextra -Wimplicit-interface -fPIC | ||
# Debug flags: | ||
F90FLAGS += -g -fbounds-check | ||
# Release flags: | ||
#F90FLAGS += -O3 -march=native -ffast-math -funroll-loops | ||
|
||
# Intel ifort | ||
#F90 = ifort-12.0.191 | ||
#F90FLAGS = -stand f95 -warn all | ||
# Debug flags: | ||
#F90FLAGS += -check all | ||
# Release flags: | ||
#F90FLAGS += -xHOST -O3 -no-prec-div -static | ||
|
||
# ---------------------------------------------------------------------------- | ||
|
||
export F90 | ||
export F90FLAGS | ||
|
||
all: | ||
cd src; make -f Makefile.manual | ||
cd tests; make -f Makefile.manual | ||
|
||
test: | ||
cd tests; make -f Makefile.manual test | ||
@echo | ||
@echo "All tests passed." | ||
|
||
clean: | ||
cd src; make -f Makefile.manual clean | ||
cd tests; make -f Makefile.manual clean |
Oops, something went wrong.