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

build with gcc gfortran 13 version test_lmdif failed #84

Open
Quejiahao opened this issue Jul 24, 2024 · 0 comments
Open

build with gcc gfortran 13 version test_lmdif failed #84

Quejiahao opened this issue Jul 24, 2024 · 0 comments

Comments

@Quejiahao
Copy link

Recently, I update the gcc, gfortran and python to new version. When I build minpack, test_lmdif is failed. Here is the build log

The Meson build system
Version: 1.3.2
Source dir: /home/<username>/Fortran/minpack_fortran_lang
Build dir: /home/<username>/Fortran/minpack_fortran_lang/_build
Build type: native build
Project name: minpack
Project version: 2.0.0
Fortran compiler for the host machine: gfortran (gcc 13.2.0 "GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0")
Fortran linker for the host machine: gfortran ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
C compiler for the host machine: gcc (gcc 13.2.0 "gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0")
C linker for the host machine: gcc ld.bfd 2.42
Program config/install-mod.py found: YES (/usr/bin/env python /home/<username>/Fortran/minpack_fortran_lang/config/install-mod.py)
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Program /home/<username>/py/<projectname>/env/bin/python (cffi) found: YES (/home/<username>/py/<projectname>/env/bin/python) modules: cffi
Run-time dependency python found: YES 3.12
Configuring _libminpack.h with command
Configuring _libminpack.c with command
Build targets in project: 15

minpack 2.0.0

  User defined options
    prefix        : /opt/minpack
    python        : true
    python_version: /home/<username>/py/<projectname>/env/bin/python

Found ninja-1.11.1 at /usr/bin/ninja
ninja: Entering directory `/home/<username>/Fortran/minpack_fortran_lang/_build'
[14/40] Compiling Fortran object libminpack.so.p/src_minpack.f90.o
../src/minpack.f90:423:22:

  423 |     end function enorm
      |                      ^
Warning: ‘__result_enorm’ may be used uninitialized [-Wmaybe-uninitialized]
../src/minpack.f90:371:32:

  371 |     pure real(wp) function enorm(n, x)
      |                                ^
note: ‘__result_enorm’ was declared here
[15/40] Compiling Fortran object libminpack.so.p/src_minpack_capi.f90.o
../src/minpack_capi.f90:84:31:

   84 |     end function minpack_dpmpar
      |                               ^
Warning: ‘par’ may be used uninitialized [-Wmaybe-uninitialized]
../src/minpack_capi.f90:78:42:

   78 |     function minpack_dpmpar(i) result(par) bind(c)
      |                                          ^
note: ‘par’ was declared here
[16/40] Linking target libminpack.so
/usr/bin/ld: warning: libminpack.so.p/src_minpack_capi.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[17/40] Compiling Fortran object examples/example-hybrd1.p/example_hybrd1.f90.o
../examples/example_hybrd1.f90:53:36:

   53 |     subroutine fcn(n, x, fvec, iflag)
      |                                    1
Warning: Unused dummy argument ‘iflag’ at (1) [-Wunused-dummy-argument]
../examples/example_hybrd1.f90:17:16:

   17 |     integer :: j, info
      |                1
Warning: Unused variable ‘j’ declared at (1) [-Wunused-variable]
[23/40] Compiling Fortran object test/test-hybrd.p/test_hybrd.f90.o
../test/test_hybrd.f90:157:4:

  157 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
../test/test_hybrd.f90:601:23:

  601 |         integer :: ivar, j
      |                       1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_hybrd.f90:388:31:

  388 |         integer :: i, iev, ivar, j, k, k1, k2, kp1, ml, mu
      |                               1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_hybrd.f90:139:36:

  139 |     subroutine fcn(n, x, Fvec, Iflag)
      |                                    1
Warning: Unused dummy argument ‘iflag’ at (1) [-Wunused-dummy-argument]
[24/40] Compiling Fortran object test/test-lmdif.p/test_lmdif.f90.o
../test/test_lmdif.f90:170:4:

  170 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
../test/test_lmdif.f90:637:23:

  637 |         integer :: ivar, j
      |                       1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmdif.f90:397:31:

  397 |         integer :: i, iev, ivar, j, nm1
      |                               1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
[29/40] Linking target examples/example-primes
/usr/bin/ld: warning: examples/example-primes.p/example_primes.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[31/40] Compiling Fortran object test/test-chkder.p/test_chkder.f90.o
../test/test_chkder.f90:146:4:

  146 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
[32/40] Compiling Fortran object test/test-hybrj.p/test_hybrj.f90.o
../test/test_hybrj.f90:173:4:

  173 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
[33/40] Compiling Fortran object test/test-lmstr.p/test_lmstr.f90.o
../test/test_lmstr.f90:198:4:

  198 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
../test/test_lmstr.f90:873:27:

  873 |     integer :: i, iev, ivar, j, nm1
      |                           1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmstr.f90:683:19:

  683 |     integer :: ivar, j
      |                   1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmstr.f90:389:22:

  389 |     integer :: i, ivar, j, k, mm1, nm1
      |                      1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
[34/40] Compiling Fortran object test/test-lmder.p/test_lmder.f90.o
../test/test_lmder.f90:187:4:

  187 |     pure elemental function dfloat(i) result(f)
      |    1
Warning: ‘dfloat’ declared at (1) may shadow the intrinsic of the same name.  In order to call the intrinsic, explicit INTRINSIC declarations may be required. [-Wintrinsic-shadow]
../test/test_lmder.f90:934:31:

  934 |         integer :: i, iev, ivar, j, nm1
      |                               1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmder.f90:727:23:

  727 |         integer :: ivar, j
      |                       1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmder.f90:379:26:

  379 |         integer :: i, ivar, j, k, mm1, nm1
      |                          1
Warning: Unused variable ‘ivar’ declared at (1) [-Wunused-variable]
../test/test_lmder.f90:31:89:

   31 |     integer :: i, ic, info, k, ldfjac, lwa, m, n, NFEv, NJEv, NPRob, ntries, icase, iunit
      |                                                                                         1
Warning: Unused variable ‘iunit’ declared at (1) [-Wunused-variable]
[35/40] Linking target test/test-hybrd
/usr/bin/ld: warning: test/test-hybrd.p/test_hybrd.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[36/40] Linking target test/test-lmdif
/usr/bin/ld: warning: test/test-lmdif.p/test_lmdif.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[38/40] Linking target test/test-hybrj
/usr/bin/ld: warning: test/test-hybrj.p/test_hybrj.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[39/40] Linking target test/test-lmstr
/usr/bin/ld: warning: test/test-lmstr.p/test_lmstr.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
[40/40] Linking target test/test-lmder
/usr/bin/ld: warning: test/test-lmder.p/test_lmder.f90.o: requires executable stack (because the .note.GNU-stack section is executable)
 1/12 minpack:example / hybrd          OK              0.02s
 2/12 minpack:example / hybrd1         OK              0.02s
 3/12 minpack:example / lmder1         OK              0.02s
 4/12 minpack:example / lmdif1         OK              0.02s
 5/12 minpack:example / primes         OK              0.02s
 6/12 minpack:unit / chkder            OK              0.02s
 7/12 minpack:unit / hybrd             OK              0.01s
 8/12 minpack:unit / hybrj             OK              0.01s
 9/12 minpack:unit / lmder             OK              0.01s
10/12 minpack:api / c-api              OK              0.01s
11/12 minpack:unit / lmstr             OK              0.01s
12/12 minpack:unit / lmdif             FAIL            0.07s   exit status 1
>>> MALLOC_PERTURB_=18 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 LD_LIBRARY_PATH=/home/<username>/Fortran/minpack_fortran_lang/_build/ /home/<username>/Fortran/minpack_fortran_lang/_build/test/test-lmdif
―――――――――――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――――――――――――
Listing only the last 100 lines from a long log.
      NUMBER OF FUNCTION EVALUATIONS          77

      NUMBER OF JACOBIAN EVALUATIONS          68

      EXIT PARAMETER                           1

      FINAL APPROXIMATE SOLUTION

       0.1829225D+06 -0.1407587D+02 -0.8278551D+07 -0.5164171D+07




      PROBLEM    9      DIMENSIONS    4   11


      INITIAL L2 NORM OF THE RESIDUALS  0.2995906D+02

      FINAL L2 NORM OF THE RESIDUALS    0.3070912D-01

      NUMBER OF FUNCTION EVALUATIONS         229

      NUMBER OF JACOBIAN EVALUATIONS         193

      EXIT PARAMETER                           5

      FINAL APPROXIMATE SOLUTION

       0.3731182D-02  0.6367392D+03  0.7288615D+01  0.4922700D+01




      PROBLEM   10      DIMENSIONS    3   16


      INITIAL L2 NORM OF THE RESIDUALS  0.4115347D+05

      FINAL L2 NORM OF THE RESIDUALS    0.9377945D+01

      NUMBER OF FUNCTION EVALUATIONS         126

      NUMBER OF JACOBIAN EVALUATIONS         116

      EXIT PARAMETER                           1

      FINAL APPROXIMATE SOLUTION

       0.5609636D-02  0.6181346D+04  0.3452236D+03




      PROBLEM   10      DIMENSIONS    3   16


      INITIAL L2 NORM OF THE RESIDUALS  0.4168217D+07

      FINAL L2 NORM OF THE RESIDUALS    0.6237599D+05

      NUMBER OF FUNCTION EVALUATIONS           4

      NUMBER OF JACOBIAN EVALUATIONS           3

      EXIT PARAMETER                           4

      FINAL APPROXIMATE SOLUTION

       0.1382394D+01 -0.3663052D+04 -0.2250314D+02
Failed case


     Expected x:

       0.1382352D+01 -0.3663634D+04 -0.2257365D+02

     Computed x:

       0.1382394D+01 -0.3663052D+04 -0.2250314D+02

     absdiff:

       0.4202634D-04  0.5817030D+00  0.7051565D-01

     reldiff:

       0.3040206D-04  0.1587776D-03  0.3123803D-02
stderr:
ERROR STOP

Error termination. Backtrace:
#0  0x7f0f356cbc5d in ???
#1  0x7f0f356cc7b9 in ???
#2  0x7f0f356cde37 in ???
#3  0x5578fd9bf5a7 in compare_solutions
        at ../test/test_lmdif.f90:127
#4  0x5578fd9bf5a7 in test_lmdif
        at ../test/test_lmdif.f90:91
#5  0x5578fd9bc1ee in main
        at ../test/test_lmdif.f90:15
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――


Summary of Failures:

12/12 minpack:unit / lmdif     FAIL            0.07s   exit status 1

Ok:                 11
Expected Fail:      0
Fail:               1
Unexpected Pass:    0
Skipped:            0
Timeout:            0

Full log written to /home/<username>/Fortran/minpack_fortran_lang/_build/meson-logs/testlog.txt
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

No branches or pull requests

1 participant