stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Cannot compile example_mnorm.f90

Open Beliavsky opened this issue 1 month ago • 4 comments

Description

On Windows, python config/fypp_deployment.py --maxrank 2 --build gave

...
example_matrix_exp.f90                 done.
example_mnorm.f90                      failed.
[ 41%] Compiling...
example\linalg\example_mnorm.f90:22:9:

   22 |     nb = mnorm(b, 'inf', dim=[1,2])
      |         1
Error: There is no specific function for the generic 'mnorm' at (1)
<ERROR> Compilation failed for object " example_linalg_example_mnorm.f90.o "
<ERROR> stopping due to failed compilation
STOP 1
Traceback (most recent call last):
  File "c:\fortran\public_domain\github\stdlib\config\fypp_deployment.py", line 165, in <module>
    fpm_build(args,unknown)
    ~~~~~~~~~^^^^^^^^^^^^^^
  File "c:\fortran\public_domain\github\stdlib\config\fypp_deployment.py", line 124, in fpm_build
    subprocess.run("fpm build"+
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^
                   " --compiler "+FPM_FC+
                   ^^^^^^^^^^^^^^^^^^^^^^
                   " --c-compiler "+FPM_CC+
                   ^^^^^^^^^^^^^^^^^^^^^^^^
                   " --cxx-compiler "+FPM_CXX+
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                   " --flag \"{}\"".format(flags), shell=True, check=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\Programs\Python313\Lib\subprocess.py", line 577, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'fpm build --compiler gfortran --c-compiler gcc --cxx-compiler gcc --flag "-cpp "' returned non-zero exit status 1.

Expected Behaviour

to compile

Version of stdlib

940bba4476ecbabea87d58df3faacacbd94dd144

Platform and Architecture

Windows

Additional Information

No response

Beliavsky avatar Oct 20 '26 13:10 Beliavsky

I think #1223 should fix this issue. Could you retry ?

jalvesz avatar Oct 24 '26 17:10 jalvesz

@jalvesz i checked #1223 out With gfortran 15.3.1 and FPM 0.13.0 on Linux, python3 config/fypp_deployment.py --maxrank 2 --build still fails at example_mnorm.f90:22 with the same error. Changing --maxrank to 3 builds successfully, and the example runs correctly. It uses a rank-3 array, but --maxrank 2 leaves out the matching mnorm interface. #1223 only changes the indexing in the test file, so it doesn’t address this example build failure.

chaitanya-bhardwaj avatar Oct 28 '26 10:10 chaitanya-bhardwaj

Hello, I’m interested in investigating this compilation failure. I would first reproduce the example_mnorm.f90 failure with the affected compiler/build configuration, compare it with the successful --maxrank 3 case, and then propose a focused fix with regression coverage. Is this issue available, and may I work on it?

RohitSutar1823 avatar Oct 30 '26 17:10 RohitSutar1823

4. Hello, I’m interested in investigating this compilation failure. I would first reproduce the example_mnorm.f90 failure with the affected compiler/build configuration, compare it with the successful --maxrank 3 case, and then propose a focused fix with regression coverage. Is this issue available, and may I work on it?

Hi Rohit, sorry but I'm already working on it.

chaitanya-bhardwaj avatar Oct 30 '26 17:10 chaitanya-bhardwaj