Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T transonic
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fluiddyn
  • transonic
  • Issues
  • #3
Closed
Open
Created Feb 02, 2019 by Bitbucket Importer@bitbucket_importerMaintainer

Pythran annotation parsing bug "float or int"?

Created originally on Bitbucket by avmo (Ashwin Vishnu)

Run the following file:

from transonic import jit
import numpy as np


@jit
def linear_eigenmode_from_values_1k(
    ux_fft: np.complex128,
    uy_fft: np.complex128,
    eta_fft: np.complex128,
    kx: float,
    ky: float,
    f: "float or int",
    c2: "float or int",
):
    """Compute q, d, a (fft) for a single wavenumber."""
    div_fft = 1j * (kx * ux_fft + ky * uy_fft)
    rot_fft = 1j * (kx * uy_fft - ky * ux_fft)
    q_fft = rot_fft - f * eta_fft
    k2 = kx ** 2 + ky ** 2
    ageo_fft = f * rot_fft / c2 + k2 * eta_fft
    return q_fft, div_fft, ageo_fft


if __name__ == "__main__":
    import time
    while True:
        time.sleep(1)
        print(linear_eigenmode_from_values_1k(1j, 1j, 1j, 2., 3., 4, 5.))

It results in

CRITICAL I am in trouble. Your input file does not seem to match Pythran's constraints...
E: Ambiguous overloads
	linear_eigenmode_from_values_1k(complex128, complex128, complex128, float64, float64, float, float)
	linear_eigenmode_from_values_1k(complex128, complex128, complex128, float, float, float, float).
Error! File /proj/kthmech/users/x_ashmo/data/.transonic/__jit__/fluidsim/solvers/sw1l/output/linear_eigenmode_from_values_1k_0a237d87741074dd44df6794aaab014b_729e5defb353ff4f34ac3744fde6ded9.cpython-37m-x86_64-linux-gnu.so has not been created by Pythran

The input was:

cat /home/x_ashmo/lustre/data/.transonic/__jit__/fluidsim/solvers/sw1l/output/linear_eigenmode_from_values_1k.pythran
export linear_eigenmode_from_values_1k(complex128, complex128, complex128, float, float, float or int, float or int)
export linear_eigenmode_from_values_1k(complex128, complex128, complex128, float64, float64, float, float)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking