Giter Club home page Giter Club logo

Comments (6)

9il avatar 9il commented on May 20, 2024

Thanks for the report! Fixed in master, cc295db.

from mir-glas.

9il avatar 9il commented on May 20, 2024

@MigMuc please note #18

from mir-glas.

MigMuc avatar MigMuc commented on May 20, 2024

Thanks for the quick replay. Unfortunately the patch doesn't help. I get the following error:

warning: The -noboundscheck switch is deprecated, use -boundscheck=off instead.
Linking...
Linking...
.dub/build/application-release-linux.posix-x86_64-ldc_2071-C2BA41EA50595A242D053DA240AE0475/gemm_report.o: In function `_Dmain':
../../../../.dub/packages/mir-algorithm-0.4.5/mir-algorithm/source/mir/utility.d:(.text._Dmain[_Dmain]+0x61e): undefined reference to `cblas_sgemm'
/home/miguel/Dokumente/DLang/mir-glas-0.2.0//libmir-glas.a(home.miguel.Dokumente.DLang.mir-glas-0.2.0.source.glas.precompiled.context.d.o): In function `glas_init':
../source/glas/precompiled/context.d:(.text.glas_init[glas_init]+0x17): undefined reference to `cpuid_init'
../source/glas/precompiled/context.d:(.text.glas_init[glas_init]+0x1c): undefined reference to `cpuid_dCache'
../source/glas/precompiled/context.d:(.text.glas_init[glas_init]+0x27): undefined reference to `cpuid_uCache'
collect2: Fehler: ld gab 1 als Ende-Status zurück
Error: /usr/bin/gcc failed with status: 1
ldmd2 failed with exit code 1.``

I have included my precompiled OpenBLAS lib as follows:

`
#!/usr/bin/env dub
/+ dub.json:
{
        "name": "gemm_report",
        "libs": ["blas"],
    "lflags": ["-L$MIR_GLAS_PACKAGE_DIR", "-L$MIR_CPUID_PACKAGE_DIR", "-L.."],
    "dependencies": {
                "cblas": "~>1.0.0",
        "mir-glas":{
            "path": "../"
        },
        "mir-cpuid": "~>0.4.2"
    }
}
+/
        "lflags": ["-L/opt/OpenBLAS/lib"],
        "libs": ["openblas"],
`

from mir-glas.

9il avatar 9il commented on May 20, 2024

This looks like dub issue.

Please check that cblas_sgemm is defined in your BLAS library. If not, please link also Netlibs cblas. Proper openblas always have cblas_sgemm symbol.

The gemm_report.d from master works for me. Please send more information:
OS, compiler version, dub version, and how you call dub.

from mir-glas.

MigMuc avatar MigMuc commented on May 20, 2024

I have installed OpenBLAS in /opt/OpenBLAS/lib/libopenblas.so. cblas_gemm is included in the lib:
[miguel@antergos-mig bench]$ nm -D /opt/OpenBLAS/lib/libopenblas.so | grep cblas_sgemm 000000000004e6c0 T cblas_sgemm
Do I have to add anything to the *.json header (see in my post above)?

I am not familiar with dub so is there a possibility to chek the compile command?

from mir-glas.

MigMuc avatar MigMuc commented on May 20, 2024

Ok. I got it. I have to append my libs in the definition above like:

/+ dub.json:
{
        "name": "gemm_report",
        "libs": ["openblas"],
        "lflags": ["-L$MIR_GLAS_PACKAGE_DIR", "-L$MIR_CPUID_PACKAGE_DIR", "-L..", "-L/opt/OpenBLAS/lib"],
        "dependencies": {
                "cblas": "~>1.0.0",
                "mir-glas":{ "path": "../" },
                "mir-cpuid": "~>0.4.2"
        }
}
+/`

from mir-glas.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.