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

Fixed errors (on aarm64 Macs) and deprecated syntax in C/CPP/TS targets #61

Merged
merged 6 commits into from
Feb 20, 2024

Conversation

AneesHl
Copy link
Contributor

@AneesHl AneesHl commented Feb 19, 2024

Many benchmarks were failing when executed locally on Macs with Apple Silicon. The reasons varied between the usage of incompatible types (size_t vs. int), typos, missing header imports and deprecated syntax (e.g. int(5) instead of int=5).

Not all benchmarks were failing but I tried extend the improvements to all benchmarks wherever applicable.

However, one benchmark (PiPrecise) is still failing in C/Cpp on Arm Macs, but the reason is unrelated to the improvements in this PR and has to do with how the GMP library/headers are built/included, and would probably be better investigated in a dedicated issue.

Fixes #60

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

These changes look good to me. Thanks for the fixes, @AneesHl! In a separate PR (to not obfuscate the diff), please run lff on these files to make sure the formatting is correct also. We should add a CI check for that as well (refer to the playground-lingua-franca repo for how to do that).

@cmnrd
Copy link
Contributor

cmnrd commented Feb 20, 2024

Let's handle the formatting as a separate issue: #62. I can take care of that.

Copy link
Contributor

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

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

This is amazing work! Thank you for digging into this. This helps considerably with removing the deprecated target properties and syntax rules (lf-lang/lingua-franca#2209, lf-lang/lingua-franca#2202, lf-lang/lingua-franca#1675)

C/Savina/src/concurrency/BoundedBuffer.lf Outdated Show resolved Hide resolved
C/Savina/src/parallelism/PiPrecision.lf Outdated Show resolved Hide resolved
C/Savina/src/parallelism/PiPrecision.lf Outdated Show resolved Hide resolved
@cmnrd cmnrd merged commit 79413ee into lf-lang:main Feb 20, 2024
4 checks passed
cmnrd added a commit to lf-lang/lingua-franca that referenced this pull request Feb 22, 2024
Currently, if the target declarationu uses a property that is not
supported by the target, this is reported as a warning. This is
problematic, as we and potentially users don't notice if a target
property is not supported anymore. For instance, we had several uses of
the `flags` property in the C tests although it was renamed. Also the
benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61).

This PR converts the warning message into an error, adjusts the unit
tests, and fixes some of the C tests. I opted for simply dropping the
`flags` property, as apparently it wasn't required and not used for a while.
In particular, some tests attempted to avoid optimization, which is not
needed as we compile the tests in Debug mode (whithout optimization)
anyway.
cmnrd added a commit to lf-lang/lingua-franca that referenced this pull request Feb 23, 2024
Currently, if the target declarationu uses a property that is not
supported by the target, this is reported as a warning. This is
problematic, as we and potentially users don't notice if a target
property is not supported anymore. For instance, we had several uses of
the `flags` property in the C tests although it was renamed. Also the
benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61).

This PR converts the warning message into an error, adjusts the unit
tests, and fixes some of the C tests. I opted for simply dropping the
`flags` property, as apparently it wasn't required and not used for a while.
In particular, some tests attempted to avoid optimization, which is not
needed as we compile the tests in Debug mode (whithout optimization)
anyway.
cmnrd added a commit to lf-lang/lingua-franca that referenced this pull request Feb 23, 2024
Currently, if the target declarationu uses a property that is not
supported by the target, this is reported as a warning. This is
problematic, as we and potentially users don't notice if a target
property is not supported anymore. For instance, we had several uses of
the `flags` property in the C tests although it was renamed. Also the
benchmarks used properties that we removed (See lf-lang/benchmarks-lingua-franca#61).

This PR converts the warning message into an error, adjusts the unit
tests, and fixes some of the C tests. I opted for simply dropping the
`flags` property, as apparently it wasn't required and not used for a while.
In particular, some tests attempted to avoid optimization, which is not
needed as we compile the tests in Debug mode (whithout optimization)
anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PingPong benchmarks does not compile with clang
3 participants