|
[Sponsors] |
October 2, 2017, 16:11 |
libacoustic
|
#1 |
New Member
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 11 |
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. |
|
October 3, 2017, 04:26 |
|
#2 |
New Member
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 11 |
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 |
|
October 4, 2017, 04:38 |
|
#3 |
New Member
gemxx
Join Date: Feb 2015
Posts: 28
Rep Power: 11 |
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? |
|
October 16, 2017, 05:31 |
|
#4 |
Member
mahdi
Join Date: Nov 2015
Location: Paris, France
Posts: 32
Rep Power: 11 |
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 |
|
October 27, 2019, 18:18 |
Solved the error and installed libAcoustics
|
#5 |
New Member
Ronith Stanly
Join Date: Mar 2017
Location: Sweden
Posts: 24
Rep Power: 9 |
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! |
|
September 11, 2020, 05:59 |
|
#6 |
Senior Member
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 13 |
Hi @ronithstanly
Code:
./wcleanAll.sh: bad interpreter: /bin/bash^M: no such file or directory |
|
September 11, 2020, 06:35 |
|
#7 | |
New Member
Ronith Stanly
Join Date: Mar 2017
Location: Sweden
Posts: 24
Rep Power: 9 |
Quote:
To be honest, I do not remember the exact details now. But I do not think I moved FFTW to the OpenFOAM-4.1 directory (I checked it and did not find it there). Can you check the wcleanAll.sh file using a text editior (vim wcleanAll.sh)? Maybe there is something missing, like the "#!/" infront of /bin/bash? It should be "#!/bin/bash". Nothing else comes to my mind right now. |
||
September 11, 2020, 06:40 |
|
#8 |
Senior Member
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 13 |
Hi @ronithstanly,
Thank your fast reply. I opened makelib.sh file. I think it cannot find the directory FFTW_LIB which does not exist in libAcoustic library folder. Code:
#!/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 libso # #END-OF-FILE # |
|
September 11, 2020, 07:51 |
|
#9 | |
New Member
Ronith Stanly
Join Date: Mar 2017
Location: Sweden
Posts: 24
Rep Power: 9 |
Quote:
Hi Huynh, $FFTW_LIB is not a directory by itself, but a variable name (kinda) for a location. The "real" directory to which this $FFTW_LIB points to is given in the ./libEnv.sh So when I checked my ./libEnv.sh, I can find: export FFTW_LIB=fftw-3.3.3 so inside makelib.sh, first you "source" this ./libEnv.sh file and thereby give FFTW_LIB=fftw-3.3.3 And this "fftw-3.3.3" directory is present inside my libAcoustic-master/OpenFOAM-4.1/lib/FoamFourierAnalysis/ directory I assume you have the same. Please check it. Also check that inside ./libEnv.sh you have FFTW_LIB= the same directory that you have inside ~/FoamFourierAnalysis/ If it is the same, then the problem should be something else. |
||
September 11, 2020, 11:25 |
|
#10 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Perhaps the following script would help?
https://develop.openfoam.com/Develop...aster/makeFFTW Support for FFTW was added in OpenFOAM-v1606. More recently, there are some wmake config scripts added as well: https://develop.openfoam.com/Develop...ipts/have_fftw |
|
December 17, 2020, 17:58 |
How to install fftw3 without sudo right.
|
#11 |
Member
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6 |
Hi everyone.
I want to install fftw3 before make libacoustics. But I do have the sudo right. It says: cannot create regular file ‘/usr/local/include/fftw3.h’: Read-only file system. Do you know some other way to install this? Thank you. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Acoustic Solver with openfoam | acoustica | OpenFOAM Programming & Development | 110 | February 24, 2021 19:50 |