CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

libacoustic

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By gemxx

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2017, 15:11
Default libacoustic
  #1
New Member
 
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 7
gemxx is on a distinguished road
Hi all,

I'm looking for acoustic codes and I found "libacoustic" library related to this subject.
When I run "wmakeAll.sh" file in this library, it is seen the errors below on the panel.
Do you think what the reasons of these errors are ?

make[3]: Leaving directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/tools'
make[2]: Leaving directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/tools'
make[1]: Leaving directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/tools'
Making install in m4
make[1]: Entering directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/m4'
make[2]: Entering directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/m4'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/m4'
make[1]: Leaving directory '/home/kale/Case/UniCFD/libAcoustics-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/fftw-3.3.3/m4'
ls: cannot access 'fftw-3.3.3/lib/lib*.so*': No such file or directory
./makeLib.sh: line 35: wmake: command not found
./wmakeAll.sh: line 7: wmake: command not found

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

ls: cannot access 'fftw-3.3.3/lib/lib*.so*': No such file or directory

There is no lib directory and lib*.so file in the fftw-3.3.3 directory. What is the meaning of the extension .so ? What should I do to solve this problem ?

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

./makeLib.sh: line 35: wmake: command not found
./wmakeAll.sh: line 7: wmake: command not found

I looked at the 7th like of wmakeAll.sh and the 35th line of makeLib.sh. I'm writing all lines in these files. Could you please tell me what's wrong in these files ?

wmakeAll.sh

#!/bin/bash

cd lib/
./makeLib.sh

cd ../app/surfaceNoise
wmake

#
#END-OF-FILE
#

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


makeLib.sh


#!/bin/bash

source ./libEnv.sh

#
# Make FFT Library
#
if [ ! -e fftw.stamp ]
then
THIS_DIR=`pwd`
cd $THIS_DIR/FoamFourierAnalysis/$FFTW_LIB

CFLAGS=-fPIC\\
CXXFLAGS=-fPIC\\
./configure --prefix=$FOAM_USER_LIBBIN/$FFTW_LIB --enable-shared
make
make install

cd $FOAM_USER_LIBBIN
libs=`ls $FFTW_LIB/lib/lib*.so*`
ls $libs

for lib in $libs
do
ln -s $lib
done

cd $THIS_DIR
touch fftw.stamp
fi

#
# Make libAcoustics library
#
wmake lib.so

#
#END-OF-FILE
#

Thank you for your advice.
ronithstanly likes this.
gemxx is offline   Reply With Quote

Old   October 3, 2017, 03:26
Default
  #2
New Member
 
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 7
gemxx is on a distinguished road
When I change the 7th like of wmakeAll.sh as "wmake" to "./wmake" and change the 35th line of makeLib.sh. as "wmake lib.so" to "./wmake lib.so" , the errors below will be seen on the panel,

./makeLib.sh: line 35: ./wmake: no such file or directory
./wmakeAll.sh: line 7: ./wmake: no such file or directory
gemxx is offline   Reply With Quote

Old   October 4, 2017, 03:38
Default
  #3
New Member
 
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 7
gemxx is on a distinguished road
I uninstalled the OpenFOAM 4.1 and installed OpenFOAM-dev. The new command line errors is like below ;

wmake lib.so .
make: stat: /root/OpenFOAM/root-dev-17.10-cfdsupport/platforms/linux64Gcc62DPInt32Opt/lib/fftw-3.3.3/include/fftw3.h: Permission denied
make: *** No rule to make target 'lib.so'. Stop.
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/kale/OpenFOAM-in-Box-17.10/OpenFOAM-dev/src/randomProcesses/lnInclude -I/home/kale/OpenFOAM-in-Box-17.10/OpenFOAM-dev/src/sampling/lnInclude -I../../lib/lnInclude -IlnInclude -I. -I/home/kale/OpenFOAM-in-Box-17.10/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/home/kale/OpenFOAM-in-Box-17.10/OpenFOAM-dev/src/OSspecific/POSIX/lnInclude -fPIC -c surfaceNoise.C -o Make/linux64Gcc62DPInt32Opt/surfaceNoise.o
surfaceNoise.C:61:28: fatal error: FoamFftwDriver.H: No such file or directory
#include "FoamFftwDriver.H"
^
compilation terminated.
/home/kale/OpenFOAM-in-Box-17.10/OpenFOAM-dev/wmake/rules/General/transform:25: recipe for target 'Make/linux64Gcc62DPInt32Opt/surfaceNoise.o' failed
make: *** [Make/linux64Gcc62DPInt32Opt/surfaceNoise.o] Error 1

I think that it is related to the permission of
platforms directory, but I couldn't solve this problem. Could you please help me about the reason of this error?
gemxx is offline   Reply With Quote

Old   October 16, 2017, 04:31
Default
  #4
New Member
 
rezaeimahdi's Avatar
 
mahdi
Join Date: Nov 2015
Location: Strasbourg, France
Posts: 24
Rep Power: 6
rezaeimahdi is on a distinguished road
Hi gemxx

Today, I download the library and compile it in OpenFOAM 4.1.

It worked without any problem. I think in your case, the problem should be something else.

Best
rezaeimahdi is offline   Reply With Quote

Old   October 27, 2019, 17:18
Default Solved the error and installed libAcoustics
  #5
New Member
 
Ronith Stanly
Join Date: Mar 2017
Location: Israel
Posts: 19
Rep Power: 5
ronithstanly is on a distinguished road
Hi All !
I had the same problem of getting the following error after installing OpenFOAM 4.1 and then trying to install libAcoustics:
./makeLib.sh: line 35: wmake: command not found
./wmakeAll.sh: line 7: wmake: command not found

So I contacted the main author of the library and got to know that the reason was caused due to the fact that FFTW is an external library and should be installed separately by following the guidelines on www.fftw.org

So, once i did that and then tried installing it (but since i already tried using ./wmakeAll.sh, this time I had to first do ./wcleanAll.sh before doing ./wmakeAll.sh again), voila! it worked! So please follow the following instructions if you want to install libAcoustics:

1) Install FFTW from http://www.fftw.org/ ( https://www.youtube.com/watch?v=3vDfmd7u1wU&t=180s )

2) Download libAcoustic library from the GitHub https://github.com/unicfdlab/libAcoustics (clone or download button).

3) Then go to the OpenFOAM-4.1 folder and execute wmakeAll.sh script. After that libAcoustic library will start to compile.

4) From tutorial folder,for example monopole2D/system, copy commonSettings and fwhControl files to your case system folder and configure the necessary parameters.
In the end of controlDict file write
functions
{
include "fwhControl"
}

5) Try to start your case.

Many thanks to Andrey and everyone who got involved with this thread!
ronithstanly is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Acoustic Solver with openfoam acoustica OpenFOAM Programming & Development 106 March 17, 2020 11:34


All times are GMT -4. The time now is 06:29.