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

Example fails with nvfortran #59

Open
awvwgk opened this issue Mar 12, 2022 · 1 comment
Open

Example fails with nvfortran #59

awvwgk opened this issue Mar 12, 2022 · 1 comment
Labels
compiler: nvfortran Related to Nvidia's Fortran compiler

Comments

@awvwgk
Copy link
Member

awvwgk commented Mar 12, 2022

Nvidia's Fortran compiler can compile minpack, however it segfaults in the examples

❯ nvfortran --version

nvfortran 22.1-0 64-bit target on x86-64 Linux -tp haswell 
NVIDIA Compilers and Tools
Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

❯ fpm run --example example_primes --compiler nvfortran --runner gdb
...
(gdb) run
Starting program: /home/awvwgk/projects/src/git/minpack/build/nvfortran_15E77B831143CB1F/example/example_primes 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004028f4 in fcn () at examples/example_primes.f90:60
60	fvec = data_y - expr(data_x, x)
(gdb) bt
#0  0x00000000004028f4 in fcn () at examples/example_primes.f90:60
#1  0x000000000040ba45 in minpack_module::lmdif () at ./src/minpack.f90:2080
#2  0x000000000040d951 in minpack_module::lmdif1 () at ./src/minpack.f90:2383
#3  0x000000000040279c in find_fit_module::find_fit () at examples/example_primes.f90:48
#4  0x0000000000402ceb in example_primes () at examples/example_primes.f90:81
@awvwgk awvwgk changed the title Example / C-API fails with nvfortran Example fails with nvfortran Mar 12, 2022
@awvwgk awvwgk added the compiler: nvfortran Related to Nvidia's Fortran compiler label Mar 12, 2022
@ivan-pi
Copy link
Member

ivan-pi commented Mar 18, 2022

Looks like a problem related to nested procedures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: nvfortran Related to Nvidia's Fortran compiler
Projects
None yet
Development

No branches or pull requests

2 participants