Skip to content

Add ab09hd and tg01gd, and show that n,m,p can be removed #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ build.log
*.egg-info/
.coverage
*~
.#*
.*~
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.*~ This is already covered by *~
What kind of tool creates files with # in it?

setup.cfg
_skbuild
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "slycot/src/SLICOT-Reference"]
path = slycot/src/SLICOT-Reference
url = https://github.com/python-control/SLICOT-Reference
branch = balancers
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ cmake_policy(SET CMP0074 NEW)

project(slycot LANGUAGES NONE)

#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fcheck=all -Og -g -Wall")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fcheck=bounds -Og -g") # -Wall -fbacktrace
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_c_FLAGS_DEBUG} -Og -g -Wall") # -fsanitize=address

enable_language(C)
enable_language(Fortran)

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ write_to = "slycot/version.py"
[tool.pytest.ini_options]
# run the tests with compiled and installed package
addopts = "--pyargs slycot"

[tool.scikit-build]
cmake.verbose = true
logging.level = "INFO"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ def run(self):
packages=['slycot', 'slycot.tests'],
cmdclass={'sdist': sdist_checked},
cmake_languages=('C', 'Fortran'),
cmake_args=['-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON', '-DCMAKE_BUILD_TYPE=Debug'],
include_package_data = False,
)
29 changes: 22 additions & 7 deletions slycot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -634,23 +634,33 @@ src/SLICOT-Reference/src/SLCT_ZLATZM.f

)

set(SLYCOT_FSOURCE src/ftruefalse.f src/XERBLA.f)
set(SLYCOT_FSOURCE src/ftruefalse.f src/XERBLA.f src/dggbal.f src/zggbal.f)
# set(SLYCOT_FSOURCE src/ftruefalse.f src/XERBLA.f)

set(F2PYSOURCE src/_wrapper.pyf)
set(F2PYSOURCE_DEPS
src/analysis.pyf src/math.pyf
src/transform.pyf src/synthesis.pyf
src/_helper.pyf)
src/lapack_bal.pyf
src/analysis.pyf
src/math.pyf
src/transform.pyf
src/synthesis.pyf
src/_helper.pyf
)

set(SLYCOT_MODULE "_wrapper")

set(GENERATED_MODULE
${CMAKE_CURRENT_BINARY_DIR}/${SLYCOT_MODULE}${PYTHON_EXTENSION_MODULE_SUFFIX})


set(CMAKE_Fortran_FLAGS )

add_custom_target(wrapper ALL DEPENDS ${SLICOT_FSOURCE} ${SLYCOT_FSOURCE})

# add_custom_command(
# OUTPUT _wrappermodule.c _wrapper-f2pywrappers.f
# COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/src/generate_f2pymod.py -o ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_SOURCE_DIR}/src/_wrapper.pyf.src
# DEPENDS ${F2PYSOURCE_DEPS} ${F2PYSOURCE} src/lapack_bal.pyf.src src/_wrapper.pyf.src
# )

add_custom_command(
OUTPUT _wrappermodule.c _wrapper-f2pywrappers.f
COMMAND ${F2PY_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${F2PYSOURCE}
Expand All @@ -665,7 +675,8 @@ add_library(
${SLICOT_FSOURCE} ${SLYCOT_FSOURCE})

target_link_libraries(${SLYCOT_MODULE}
${LAPACK_LIBRARIES})
${LAPACK_LIBRARIES}
)

target_include_directories(
${SLYCOT_MODULE} PUBLIC
Expand All @@ -674,6 +685,9 @@ target_include_directories(
${F2PY_INCLUDE_DIRS}
)

# set_target_properties(${SLYCOT_MODULE} PROPERTIES
# LINK_FLAGS_DEBUG "-fsanitize=address")

if (UNIX)
if (APPLE)
set_target_properties(${SLYCOT_MODULE} PROPERTIES
Expand All @@ -686,4 +700,5 @@ endif()

python_extension_module(${SLYCOT_MODULE})


install(TARGETS ${SLYCOT_MODULE} LIBRARY DESTINATION slycot)
Loading