Building FEBio with PARDISO in VS2013 (64bit Win8)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • fluviolobo
    • May 2024

    Building FEBio with PARDISO in VS2013 (64bit Win8)

    Hello,

    We are attempting to build FEBio, with PARDISO, through VS2013 on a 64bit-win8. We are getting an error stating "Error 2393 error LNK1104: cannot open file 'C:\Program Files\FEBio build\FEBio\x64\Debug-Pardisodl\FECored.lib". We are using the libpardiso500-WIN-X86-64 package to work with a 64 bit computer. I was initially getting a mesage stating that the program couldn't find "libpardiso400...32.dll".
    afterwards, I changed the info in the debuggers to x64 from win32.

    We have been following the forum post online at http://mrlforums.sci.utah.edu/forums...om-source-code. The libraries should be correct and lead to the Pardiso solver files. We also changed the environment path variable to include the Pardiso solver.

    Any help or suggestions would be greatly appreciated.

    Thank you,
  • dsrawlins
    Developer
    • Dec 2008
    • 366

    #2
    Hi Fluvio,

    On the FEBio Property Pages > VC++ Directories, please let me know the contents of the Include Directories and Library Directories. Also, let me know the contents of Linker > Input > Additional Dependencies.

    Thanks,

    Dave
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

    Comment

    • fluviolobo

      #3
      Hi Dave,

      In the VC++ directories the include directories and library directories both path to the same file which contains the libpardiso500-WIN-x86-64 components (including the Application extension, Exports library file, and object file library) as well as the FECore and FEBio file folders (containing all the solvers).

      In the contents of Linker>input>additional dependencies we have the following:

      ..\Debug-Pardisodl\fecored.lib
      libpardiso500-WIN-X86-64.dll

      Thanks for your help

      Comment

      • dsrawlins
        Developer
        • Dec 2008
        • 366

        #4
        Hi Fluvio,

        I think the "..\Debug-Pardisodl\fecored.lib" is the culprit. I would put "fecored.lib" in "Linker>input>additional dependencies" and add the macro $(OutDir) to the Library Directories.

        Cheers,

        Dave
        Department of Bioengineering, University of Utah
        Scientific Computing and Imaging institute, University of Utah

        Comment

        • fluviolobo

          #5
          Dave,

          I had some more time this afternoon to play with this project. Here is a recap of what I have and the error that I am getting:

          1 - The Configurations Properties of both FECore and FEBio are "Debug-Pardisodl" and the Paltform is "x64."

          2 - For FECore:
          2.1 - Under VC++ Directories > Include Directories, I have listed the location of all the files + the specific directory of the PARDISO files "C:\Program Files\FEBio\Build; C:\Program Files\FEBio\Build\PARDISO"
          2.2 - Under Debugging > Environment, I have listed the direct path to the .dll file "C:\Program Files\FEBio\Build\PARDISO\libpardiso412-WIN-X86-64.dll"
          2.3 - FECore was built successfully!!

          3 - For FEBio:
          3.1 - same as 2.1
          3.2 - same as 2.2
          3.3 - Under Linker>Input>Additional Dependencies, I added the following "..\x64\Debug-Pardisodl\fecored.lib; C:\Program Files\FEBio\Build\PARDISO\libpardiso412-WIN-X86-64.dll" (1) I was initially getting the "cannot open fecored.lib" error. I figured it was a path error. (2) Then added "libpardiso412..." which started by giving me a "cannot open..." error also, so I decided to write the entire path. (3) Now, and this is where I am stuck, I get an error saying the ".dll" file is currupt or invalid (shown below)!!

          "error LNK1107: invalid or corrupt file: cannot read at 0x2E8 C:\Program Files\FEBio\Build\PARDISO\libpardiso412-WIN-X86-64.dll"

          Hope this summary clarifies the issue a little better!

          -FLLF

          Comment

          • dsrawlins
            Developer
            • Dec 2008
            • 366

            #6
            Hi Fluvio,

            When you download the PARDISO library you should have both a .lib and a .dll file, and in the linker you should be linking to the .lib file. Also, I'm not sure whether this is part of the problem, but Windows has special permissions for the "C:\Program Files" directory. You may need to move your directory to "C:\FEBio" or to your "My Documents" directory. Hope that helps.

            Best,

            Dave
            Department of Bioengineering, University of Utah
            Scientific Computing and Imaging institute, University of Utah

            Comment

            • fluviolobo

              #7
              Dave,

              Found a fix!
              I moved all the FEBio documents to the "C:\" directory and also changed the Linker>Input to the PARDISO ."lib" file.
              Now, when I did this I was still getting the cannot open ".dll" file. To fix this problem I removed the ".dll" from the linker>Input.
              The ".dll" files must only go under Debugging>Environment.

              The updated steps are then:
              -----------------------------

              1 - The Configurations Properties of both FECore and FEBio are "Debug-Pardisodl" and the Paltform is "x64."

              2 - For FECore:
              2.1 - Under VC++ Directories > Include Directories, I have listed the location of all the files + the specific directory of the PARDISO files "C:\FEBio\Build; C:\FEBio\Build\PARDISO"
              2.2 - Under Debugging > Environment, I have listed the direct path to the .dll file "C:\FEBio\Build\PARDISO\libpardiso412-WIN-X86-64.dll"
              2.3 - FECore was built successfully!!

              3 - For FEBio:
              3.1 - same as 2.1
              3.2 - same as 2.2
              3.3 - Under Linker>Input>Additional Dependencies, I added the following "C:\FEBio\Build\PARDISO\libpardiso412-WIN-X86-64.lib.
              3.4 - FEBio was built successfully!

              --------------------------------

              Thanks for the help! I hope this benefit other members.
              -FLLF

              Comment

              • iancampbell
                Junior Member
                • May 2013
                • 20

                #8
                Hi Fluvio and Dave,

                Thanks for your documentation on this. I'm trying to build FEBio 1.8 using these instructions and can't quite get there. I am using VS2012 on Windows 7. In the .sln file in the VS2010 directory, I only have the options of building a Debug or Release version. There is no option for Debug-Pardisodl as mentioned above, so I picked Release and x64. I followed all of Fluvio's instructions above, except in 3.3 not only did I add libpardiso500-WIN-X86-64.lib, I also deleted three entries for MKL .lib files since I'm not using the MKL version of Pardiso. There was also something called libiomp5md.dll that I deleted as well because it wouldn't build. Once I made those changes and followed the rest of Fluvio's instructions, everything built successfully.

                The first time I ran FEBio64.exe, a window popped up stating that libpardiso500-WIN-X86-64.dll was missing from my system. I added the Pardiso folder to my path environment variable, and ran FEBio64.exe again. Now I'm getting an error that libiomp5md.dll is missing. Does anyone know what to do at this point? Googling suggests that libiomp5md.dll is part of the MKL package, but I'm not trying to use that package. Is there someplace else I need to tell VS2012 this?

                Thanks,
                Ian

                Comment

                • fluviolobo

                  #9
                  Ian,

                  I am gonna go back to working on FEBio in the following weeks. I may be of more help then.
                  However, I believe we were building an earlier version of FEBio (1.7 I think). I doubt this is the issue, but it wouldn't hurt to try.

                  -FLLF

                  Comment

                  • dsrawlins
                    Developer
                    • Dec 2008
                    • 366

                    #10
                    Hi Ian,

                    Unfortunately we didn't migrate the Debug-Pardisodl configuration from VS2008 to VS2010 (this will be fixed in the next release of the source code). You can get the Debug-Pardisodl configuration by converting the VS2008 solution file instead of the VS2010 solution file to VS2012.

                    Cheers,

                    Dave
                    Department of Bioengineering, University of Utah
                    Scientific Computing and Imaging institute, University of Utah

                    Comment

                    • iancampbell
                      Junior Member
                      • May 2013
                      • 20

                      #11
                      Hi Dave,

                      Thanks for the tip--you are correct that the Release-Pardisodl and Debug-Pardisodl configurations are present in the VS2008 file. Unfortunately, although I now got those to build as well, my built FEBio.exe is still reporting that it can't find libiomp5md.dll, so it looks like it's still trying to use the MKL version of Pardiso. I'm not really sure where to begin poking around in the code to rectify this, but I may be in over my head as far as development skills go--I really just want to play around with some custom material models, but I don't want to lose multi-threading.

                      A few things to note:
                      1) The VS2008 Release-Pardisodl configuration for x64 still tries to build Win32 binaries. I over-rode that in the configuration manager to manually build x64 versions since the Pardiso-Project.org server only seems to be hosting 64-bit libraries.
                      2) I see the following code in PardisoSolver.h:
                      #ifdef WIN32

                      #define pardisoinit_ PARDISOINIT
                      #define pardiso_ PARDISO

                      #endif
                      but there is no equivalent block for x64. Might this be related? I tried changing the first line to #ifdef X64 on a whim (I really don't know what I'm doing here) but no dice on resolving the libiomp5md.dll error.

                      Thanks,
                      Ian

                      Comment

                      • dsrawlins
                        Developer
                        • Dec 2008
                        • 366

                        #12
                        Hi Ian,

                        The WIN32 preprocessor macro is used for both 32bit and 64bit compilation on Windows. Check the Property Pages for the FEBio project, go to Configuration Properties > Linker > Input, and look at Additional Dependencies. You should only have fecored.lib and the Pardiso library referenced there. If libiomp5md.dll isn't referenced there, paste the text at Linker > Command Line here.

                        Cheers,

                        Dave
                        Department of Bioengineering, University of Utah
                        Scientific Computing and Imaging institute, University of Utah

                        Comment

                        • iancampbell
                          Junior Member
                          • May 2013
                          • 20

                          #13
                          Hi Dave,

                          The only items under Linker > Input > Additional Dependencies are paths that I hard-coded to FECore.lib and libpardiso500-WIN-X86-86.lib, as well as %(AdditionalDependencies). Here's my command line:

                          Code:
                          /OUT:"C:\FEBio\x64\Release-Pardisodl\FEBio.exe" /MANIFEST /LTCG /NXCOMPAT /PDB:"C:\FEBio\x64\Release-Pardisodl\FEBio.pdb" /DYNAMICBASE "C:\FEBio\x64\Release-Pardisodl\FECore.lib" "C:\libpardiso500-WIN-X86-64\libpardiso500-WIN-X86-64.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /PGD:"C:\FEBio\x64\Release-Pardisodl\FEBio.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Release-Pardisodl\FEBio.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /TLBID:1
                          Thanks,
                          Ian

                          Comment

                          Working...
                          X