CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] FOAM Fatal Error wmake failed (https://www.cfd-online.com/Forums/openfoam-installation/241306-foam-fatal-error-wmake-failed.html)

jet_engine February 19, 2022 06:34

FOAM Fatal Error wmake failed
 
Hi, I was trying to run a case with buoyantBoussinesqSimpleFoam and it kept giving me the following error:


Code:

Reading thermophysical properties

Reading field T

Using dynamicCode for patch slipWall on field T at line 44 in "/home/username/Downloads/case_name/0/T.boundaryField.slipWall"
Could not load "/home/username/Downloads/case_name/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so"
/home/username/Downloads/case_name/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so: cannot open shared object file: No such file or directory
Creating new library in "dynamicCode/customSlipWall/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so"
Invoking wmake libso /home/username/Downloads/case_name/dynamicCode/customSlipWall


--> FOAM FATAL ERROR: (openfoam-2112)
exec(wmake, ...) failed


    From int Foam::system(const Foam::CStringList&, bool)
    in file POSIX.C at line 1638.

FOAM exiting


error::stream() : error stream has failed


�%�MV(openfoam-2112)


    From void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
    in file db/dynamicLibrary/codedBase/codedBase.C at line 240.

FOAM aborting

I've been checking the forum to see if anyone had a similar issue. Here's the list of things I've tried so far:
  1. Installing make (sudo apt-get install make)
  2. Installing gcc (sudo apt-get install gcc)
  3. Adding the following lines to the bashrc file: . /usr/lib/openfoam/openfoam2112/etc/bashrc and source /usr/lib/openfoam/openfoam2112/etc/bashrc
  4. sudo apt install build-essential flex bison
  5. Installing the complete version of openfoam v2112 from the repo
And nothing has worked so far. Does anyone know what may be causing this issue? I can run other solvers but for some reason it won't let me run buoyantBoussinesqSimpleFoam.


Thanks in advance!


Oh and btw here's the bit of the 0/T file where it crashes:
Code:

slipWall
    {
        type            codedFixedValue;
        value          uniform 0;
        name          customSlipWall;
 
        code
        #{
            scalarField& field = *this;
            scalar Twall  = 1;
            scalar lambda = 0.01;
            scalar sigma  = 1;
            scalar Pr    = 0.71;
            scalar gamma  = 1.4;
            scalar rlx    = 0.95;

            // DT/dn
            scalarField gradient = this->snGrad();

            field = rlx*(*this) + (1-rlx)*(Twall - lambda/Pr*(2-sigma)/sigma*2*gamma/(gamma+1)*gradient);
        #};       

        codeOptions
        #{
                -I$(LIB_SRC)/finiteVolume/lnInclude \
                -I$(LIB_SRC)/meshTools/lnInclude
        #};

        codeInclude
        #{
            #include "fvCFD.H"
            #include <cmath>
            #include <iostream>
        #};
    }

Line 44 is: name customSlipWall;

duanwuCHEN March 30, 2022 03:52

Quote:

Originally Posted by jet_engine (Post 822629)
Hi, I was trying to run a case with buoyantBoussinesqSimpleFoam and it kept giving me the following error:


Code:

Reading thermophysical properties

Reading field T

Using dynamicCode for patch slipWall on field T at line 44 in "/home/username/Downloads/case_name/0/T.boundaryField.slipWall"
Could not load "/home/username/Downloads/case_name/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so"
/home/username/Downloads/case_name/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so: cannot open shared object file: No such file or directory
Creating new library in "dynamicCode/customSlipWall/platforms/linux64GccDPInt32Opt/lib/libcustomSlipWall_f1f1ebc50acbbc2a63e2b97341909b084905be35.so"
Invoking wmake libso /home/username/Downloads/case_name/dynamicCode/customSlipWall


--> FOAM FATAL ERROR: (openfoam-2112)
exec(wmake, ...) failed


    From int Foam::system(const Foam::CStringList&, bool)
    in file POSIX.C at line 1638.

FOAM exiting


error::stream() : error stream has failed


�%�MV(openfoam-2112)


    From void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
    in file db/dynamicLibrary/codedBase/codedBase.C at line 240.

FOAM aborting

I've been checking the forum to see if anyone had a similar issue. Here's the list of things I've tried so far:
  1. Installing make (sudo apt-get install make)
  2. Installing gcc (sudo apt-get install gcc)
  3. Adding the following lines to the bashrc file: . /usr/lib/openfoam/openfoam2112/etc/bashrc and source /usr/lib/openfoam/openfoam2112/etc/bashrc
  4. sudo apt install build-essential flex bison
  5. Installing the complete version of openfoam v2112 from the repo
And nothing has worked so far. Does anyone know what may be causing this issue? I can run other solvers but for some reason it won't let me run buoyantBoussinesqSimpleFoam.


Thanks in advance!


Oh and btw here's the bit of the 0/T file where it crashes:
Code:

slipWall
    {
        type            codedFixedValue;
        value          uniform 0;
        name          customSlipWall;
 
        code
        #{
            scalarField& field = *this;
            scalar Twall  = 1;
            scalar lambda = 0.01;
            scalar sigma  = 1;
            scalar Pr    = 0.71;
            scalar gamma  = 1.4;
            scalar rlx    = 0.95;

            // DT/dn
            scalarField gradient = this->snGrad();

            field = rlx*(*this) + (1-rlx)*(Twall - lambda/Pr*(2-sigma)/sigma*2*gamma/(gamma+1)*gradient);
        #};       

        codeOptions
        #{
                -I$(LIB_SRC)/finiteVolume/lnInclude \
                -I$(LIB_SRC)/meshTools/lnInclude
        #};

        codeInclude
        #{
            #include "fvCFD.H"
            #include <cmath>
            #include <iostream>
        #};
    }

Line 44 is: name customSlipWall;

I've also get a similar problem, when I try to use inline calculation in blockMeshDict.

Sjoerd January 21, 2024 03:08

Hi,


I have found several posts on this forum about the error:


'FOAM FATAL ERROR: exec(wmake, ...) failed'


They are always unsolved (apart for the more or less trivial ones, where the user just forgot to install 'make'. The cases where the user did install all prerequisites remain unsolved.)


Did anyone ever solve it?


Thanks!!!

Sjoerd January 22, 2024 03:59

The solution, in my case, was to install the openfoamXXXX-dev package from the repo


All times are GMT -4. The time now is 13:40.