Linker error when building FEBio4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • paul_a
    Junior Member
    • Jun 2023
    • 4

    Linker error when building FEBio4

    Hello everyone,

    I am trying to build FEBio4 from the github-repo: https://github.com/febiosoftware/FEBio/tree/febio4. However I am getting a linker error at the end of the 'make'-process.
    These are the steps i followed:
    1. cloned the git repo
    2. checked out to 'febio4'
    3. ran 'ccmake ..' from the 'src' directory
    4. ran 'make' from the same directory

    In the pictures I provided can be seen the 'ccmake' options as well as the actual linker error.

    The system I am running on is Ubuntu 20.04 on WSL.
    As far as i understand, all the required packages are installed, since the actual build process works.

    I don't get what I'm doing wrong.
    Please help me.

    Best,
    Paul
    You do not have permission to view this gallery.
    This gallery has 2 photos.
  • mherron
    Developer
    • Aug 2016
    • 99

    #2
    Paul,

    These linker issues all have to do with OpenMP. I'm not sure why it's not finding the OMP library; it's a feature of the compiler and so it should be available if you've got a compiler installed.

    If you type t while you've got ccmake open, you should be able to see the advanced options. Could you check those advanced options for the one labeled OpenMP_gomp_LIBRARY?

    image.png

    It should be pointing to a library on your system.

    On another note, I highly recommend installing the Intel OneAPI and linking with MKL if you're building FEBio. The only solver that you'll have available to you otherwise is very slow. ​Additionally, MKL comes with it's own OpenMP library, and so if you can't link to your system's version for some reason, linking to the MKL libraries might provide a way past this linker error.

    Michael Herron
    Attached Files

    Comment

    • paul_a
      Junior Member
      • Jun 2023
      • 4

      #3
      Hi Michael,

      thanks for your quick reply.
      I checked the advanced options, a picture is provided.
      The option OpenMP_gomp_LIBRARY is pointing to an existing library on my system, still the linker errors remain ....

      I'll try to install the Intel OneApi and link to it.
      Once I have installed it, I'll update this post.

      EDIT:
      Installing oneApi and linking it fixed the problem.
      Thanks you, Michael!

      Best,
      Paul
      You do not have permission to view this gallery.
      This gallery has 1 photos.
      Last edited by paul_a; 06-06-2023, 06:35 PM.

      Comment

      • mherron
        Developer
        • Aug 2016
        • 99

        #4
        Glad to hear that the OneAPI fixed the issue. I've never built on WSL before, and so there might be some sort of issue with the system OMP library that I'm not aware of.

        Comment

        • maxgua
          Junior Member
          • Apr 2024
          • 2

          #5
          Hi Paul:
          I encountered the same issue, with the error screenshot below. I also installed Intel oneAPI MKL, but it didn't solve the problem. Could you please explain in detail how to install Intel MKL to solve this problem?
          operate system: windows wsl, Ubuntu 20.04 on WSL
          oneAPI MKL:2024.1

          I would be very grateful, if I could receive your reply.
          Thank you very much.

          image.png


          image.png

          image.png​​

          Comment

          • mherron
            Developer
            • Aug 2016
            • 99

            #6
            You'll need to point CMake to the MKL OMP library. In theory, it should find it automatically, but it seems to be having some trouble doing so for WSL.

            The library that you're looking for is called libiomp5.so, and for me, it's located here: /opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin/libiomp5.so

            Once you've found the correct path, you'll need to set the MKL_OMP_LIB CMake variable to point to it like so:

            image.png

            Give that a try and let me know if you're still running into issues.

            Michael Herron

            Comment

            • maxgua
              Junior Member
              • Apr 2024
              • 2

              #7
              Hi Michael:
              The issue has been resolved. I manually set the path for libiomp5.so and successfully linked it.
              Thank you very much.

              Bruce

              Comment

              • mherron
                Developer
                • Aug 2016
                • 99

                #8
                Glad I could help.

                Comment

                Working...
                X