Skip to content
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

⬆️ Olb v1.7 #40

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

⬆️ Olb v1.7 #40

wants to merge 22 commits into from

Conversation

micheltakken
Copy link
Member

OpenLB v1.7

Update to OpenLB version 1.7

@micheltakken micheltakken added dependencies Pull requests that update a dependency file OpenLB Issue related to OpenLB package labels Aug 29, 2024
@micheltakken micheltakken added this to the GUI Ready Version milestone Aug 29, 2024
@micheltakken micheltakken self-assigned this Aug 29, 2024
@micheltakken micheltakken mentioned this pull request Aug 29, 2024
3 tasks
@micheltakken micheltakken changed the title Olb v1.7 ⬆️ Olb v1.7 Sep 6, 2024
@micheltakken micheltakken removed this from the GUI Ready Version milestone Sep 10, 2024
Copy link

@taminob taminob left a comment

Choose a reason for hiding this comment

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

I hope you don't mind that I had a look at your draft PR.
Unfortunately, the version on main doesn't compile for me at the moment because of the OpenLB version used there (a missing include on Linux with GCC 14.2.1) and this upgrade seems to resolve the issue.

After the minor fixes I added in the other comments, it compiled for me (but no guarantees that it actually does what it's supposed to do :) ). I'd love to see this get merged so that I can work with the project without dirty workarounds in the dependencies.

IF (WIN32)
set(patch_file ${CMAKE_CURRENT_BINARY_DIR}/_deps/lbm-src/src/core/singleton.h)
set(lbm_patch sed -i -f ${CMAKE_CURRENT_SOURCE_DIR}/script.sed ${patch_file})
IF (!WIN32)
Copy link

@taminob taminob Oct 12, 2024

Choose a reason for hiding this comment

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

This check does not work for me on Linux and is always false. Using NOT instead of the exclamation mark seems to work - but you could also simply swap the branches to avoid the negation altogether.

Since the majority of the if/else/endif in this file seem to be lower-case, maybe also consider using that instead for consistency reasons?

Suggested change
IF (!WIN32)
if (NOT WIN32)

set(patch_file ${CMAKE_CURRENT_BINARY_DIR}/_deps/lbm-src/src/core/singleton.h)
set(lbm_patch sed -i -f ${CMAKE_CURRENT_SOURCE_DIR}/script.sed ${patch_file})
IF (!WIN32)
set(CMAKE_CXX_FLAGS "-O3 -Wall -march=native -mtune=native")
Copy link

Choose a reason for hiding this comment

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

Without this line, the Eigen CMake module will complain because it fails to compile its compiler detection code. Must be some CMake weirdness that the flags bleed down into the dependencies. :)

The issue seems to be resolved on master of Eigen, but they do not seem to provide fixed tags anymore. :(
It could be considered to switch to a commit hash as a fixed reference point for a newer version. The dropped support of C++03 shouldn't matter too much since this repository uses C++17 anyway.

However, it works as-is - just pretty confusing at first if it doesn't work anymore just because this line is missing.

${EXTERNAL_DIR}/zlib/zlib.h
${EXTERNAL_DIR}/zlib/zutil.h
set(LBM_HEADER_LIST
incl/unistd.h
Copy link

Choose a reason for hiding this comment

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

This file prevents compilation on Linux (io.h does not exist on Unix systems). Maybe move it to incl/windows/unistd.h and then use if (WIN32) add_subdirectory(windows) endif()?
You can also have multiple calls to target_sources such that you only need the one if and the header will then get added to all necessary targets in the subdirectory CMakeLists.txt. Same for the target_include_directories.

Comment on lines -80 to -83
${EXTERNAL_DIR}/tinyxml/tinyxml.cpp
${EXTERNAL_DIR}/tinyxml/tinystr.cpp
${EXTERNAL_DIR}/tinyxml/tinyxmlerror.cpp
${EXTERNAL_DIR}/tinyxml/tinyxmlparser.cpp
Copy link

Choose a reason for hiding this comment

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

The tinyxml library sources unfortunately seem to be necessary for the definitions of the class TiXmlDocument which is used in OpenLB.
This looks like such a pain because OpenLB can only be built via Makefiles. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file OpenLB Issue related to OpenLB package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants