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

Problems with compiling new solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 4, 2014, 08:02
Default Problems with compiling new solver
  #1
New Member
 
Join Date: Sep 2011
Posts: 16
Rep Power: 5
Philipp Dietrich is on a distinguished road
Hello,

I just installed OpenFOAM 2.3.0 on openSUSE 13.1.
The simulation of the tutorials went fine, however I cannot compile a solver (based on http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam from the openFOAM-Wiki).

If I try to compile the solver "myicoFoam", which only differs from "icoFoam" in the name, with "wmake", I get the following error-message:

Code:
Making dependency list for source file myicoFoam.C
SOURCE=myicoFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/opt/OpenFOAM-2.3.0/src/sampling/lnInclude -IlnInclude -I. -I/opt/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myicoFoam.o
In file included from myicoFoam.C:53:0:
/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
     const int nOuterCorr =
               ^
/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
     const bool momentumPredictor =
                ^
/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
     const bool transonic =
                ^
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -I/opt/OpenFOAM-2.3.0/src/sampling/lnInclude -IlnInclude -I. -I/opt/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/opt/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/myicoFoam.o -L/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib \
     -lfiniteVolume -lsampling -lOpenFOAM -ldl   -lm -o /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/myicoFoam
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot open output file /opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/myicoFoam: Permission denied
collect2: error: ld returned 1 exit status
make: *** [/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/myicoFoam] Error 1
If I use "sudo wmake" to compile, I get this error:

Code:
wmake error: environment variable $WM_OPTIONS not set
The environment variables in the .bashrc-File are set according to the instruction on: http://www.openfoam.org/download/suse.php

Is there anything I missed?
Thank you for your help in advance.
Philipp Dietrich
Philipp Dietrich is offline   Reply With Quote

Old   June 4, 2014, 10:19
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,132
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

change line

Code:
EXE = $(FOAM_APPBIN)/myicoFoam
in Make/files file to

Code:
EXE = $(FOAM_USER_APPBIN)/myicoFoam
As in fact compilation is successful, you just don't have permissions to write executable into

Code:
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/
alexeym is offline   Reply With Quote

Old   June 9, 2014, 07:14
Default
  #3
New Member
 
Join Date: Sep 2011
Posts: 16
Rep Power: 5
Philipp Dietrich is on a distinguished road
Thanks a lot.
That was the error.
Philipp Dietrich is offline   Reply With Quote

Old   October 2, 2014, 19:03
Default
  #4
New Member
 
Altan
Join Date: Apr 2011
Posts: 12
Rep Power: 6
alyucel is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

change line

Code:
EXE = $(FOAM_APPBIN)/myicoFoam
in Make/files file to

Code:
EXE = $(FOAM_USER_APPBIN)/myicoFoam
As in fact compilation is successful, you just don't have permissions to write executable into

Code:
/opt/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/
why ı have to write this way ? EXE = $(FOAM_USER_APPBIN)/myicoFoam ?
alyucel is offline   Reply With Quote

Old   October 3, 2014, 01:30
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,132
Rep Power: 20
alexeym will become famous soon enoughalexeym will become famous soon enough
Hi,

Quote:
Originally Posted by alyucel View Post
why ı have to write this way ? EXE = $(FOAM_USER_APPBIN)/myicoFoam ?
not quite sure I've got the question right, but the answer is "by convention".
alexeym is offline   Reply With Quote

Reply

Tags
openfoam, solver, wmake

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Problems on implementing actuation disk on piso solver frankyux OpenFOAM Programming & Development 2 October 2, 2013 23:06
2D case with steady solver problems p_kmb FLUENT 6 April 14, 2013 17:32
compiling a solver fferroni OpenFOAM Programming & Development 7 January 28, 2012 20:25
error compiling solver in OpenFOAM 1.6-ext: pimpleDymFoam tupe OpenFOAM 0 October 3, 2011 05:55


All times are GMT -4. The time now is 19:41.