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

recompiling solver issue with wmake

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 3 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By peterhess
  • 1 Post By joshmccraney

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 23, 2020, 13:48
Default recompiling solver issue with wmake
  #1
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Hi FOAMers!

I am trying to recompile a solver in OF6 on Ubuntu 18.04, specifically interFoam.C. This file is located here: /opt/openfoam6/applications/solvers/multiphase/interFoam

Now after editing I execute "wclean" and have no issues. When I execute "wmake" I get the error
Code:
mkdir: cannot create directory ‘/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications’: Permission denied
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/options'.  Stop.
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/options', needed by 'all'.  Stop.
wmake error: file '/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/interFoam/sourceFiles' could not be created in /opt/openfoam6/applications/solvers/multiphase/interFoam
If I run as root, the command is not found. Any idea what is happening? And if I go to /opt/openfoam6 and execute ./Allmake I get the error

Code:
Allwmake /opt/openfoam6
make: Nothing to be done for 'all'.
Allwmake: no ThirdParty directory found - skipping
Allwmake src
no git description found
Allwmake src/Pstream
wmake dummy
mkdir: cannot create directory ‘/opt/openfoam6/platforms/linux64GccDPInt32Opt/src’: Permission denied
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options'.  Stop.
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options', needed by 'all'.  Stop.
wmake error: file '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/sourceFiles' could not be created in /opt/openfoam6/src/Pstream/dummy
joshmccraney is offline   Reply With Quote

Old   March 23, 2020, 16:37
Default
  #2
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Hello!

You need to change the premission to be able to add/modifi files in the folder.

The most easy but "dirty" way is to change the permission for the whole folder

- Go to root folder

- Type: sudo chmod -R 777 /opt/openfoam6/

- Give the password

- If that did not works then try:

sudo chmod -R 777 /opt/

Regards

Peter
Marpole, joshmccraney and MANI18 like this.
peterhess is offline   Reply With Quote

Old   March 23, 2020, 16:46
Default
  #3
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Hello!

You need to change the premission to be able to add/modifi files in the folder.

The most easy but "dirty" way is to change the permission for the whole folder

- Go to root folder

- Type: sudo chmod -R 777 /opt/openfoam6/

- Give the password

- If that did not works then try:

sudo chmod -R 777 /opt/

Regards

Peter
Two questions: what is the root folder? Would that be /opt/openfoam6?

Also, in opt/openfoam6 when I run ./Allmake I get the error

Code:
Allwmake /opt/openfoam6
make: Nothing to be done for 'all'.
Allwmake: no ThirdParty directory found - skipping
Allwmake src
no git description found
Allwmake src/Pstream
wmake dummy
mkdir: cannot create directory ‘/opt/openfoam6/platforms/linux64GccDPInt32Opt/src’: Permission denied
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options'.  Stop.
/bin/sh: 1: cannot create /opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options: Directory nonexistent
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/options', needed by 'all'.  Stop.
wmake error: file '/opt/openfoam6/platforms/linux64GccDPInt32Opt/src/Pstream/dummy/sourceFiles' could not be created in /opt/openfoam6/src/Pstream/dummy
Is there a way I can fix this or should I uninstall-reinstall OpenFOAM? Given the Coronavirus I have very slow internet and would prefer not to reinstall if you know a way to fix the issue?
joshmccraney is offline   Reply With Quote

Old   March 23, 2020, 17:29
Default
  #4
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Quote:

what is the root folder? Would that be /opt/openfoam6?
Go to /opt

Type: cd ..

You are now in root!

Regards

Peter
joshmccraney likes this.
peterhess is offline   Reply With Quote

Old   March 24, 2020, 11:03
Default
  #5
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Quote:
Originally Posted by peterhess View Post
Go to /opt

Type: cd ..

You are now in root!

Regards

Peter
You're the man Peter! Thanks so much; you've no idea what a headache you've saved me from!
joshmccraney is offline   Reply With Quote

Old   May 19, 2020, 20:32
Default
  #6
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Hey Peter

I copied /opt/openfoam6/applications/solvers/multiphase/interFoam and called it bfInterFoam. Then I edited bfInterFoam/Make/files to match the name bfInterFoam.

From here, I went into /opt/openfoam6/applications/solvers/multiphase/bfInterFoam and executed wclean (no errors) and then wmake, to which I get
Code:
make: *** No rule to make target '/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/bfInterFoam/bfInterFoam.C.dep', needed by '/opt/openfoam6/platforms/linux64GccDPInt32Opt/applications/solvers/multiphase/bfInterFoam/bfInterFoam.o'.  Stop.
I executed both commands you recommended but I still get this error. Any idea?

EDIT: nevermind, the error was I forgot to change the name of the .C file. can't believe this!
joshmccraney is offline   Reply With Quote

Old   May 20, 2020, 03:51
Default
  #7
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Hallo!

The best road map für doing this is to follow the tutorial:

https://openfoamwiki.net/index.php/H...ure_to_icoFoam

I can not answer the question directly, cause it is a while since I made thoe changes...

Regards

Peter
joshmccraney likes this.
peterhess is offline   Reply With Quote

Old   May 20, 2020, 16:21
Default
  #8
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
I had a similar issue some time ago, I was compiling a new solver and it just didn't work, but after changing:

EXE = $(FOAM_APPBIN)/interFoam

by

EXE = $(FOAM_USER_APPBIN)/interFoam

it worked. Just go to your Make folder and change it in the file "files".

Hope it works!
lebc is offline   Reply With Quote

Old   May 20, 2020, 16:42
Default
  #9
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8
joshmccraney is on a distinguished road
Thanks for the reply! I think I should have made my edit bigger, but the issue was the .C was not capitalized
lebc likes this.
joshmccraney is offline   Reply With Quote

Reply


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
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 06:29
[OpenFOAM.org] Errors compiling OpenFOAM-5.0 renardf OpenFOAM Installation 1 January 12, 2018 08:35
[OpenFOAM.org] wmake problem vville OpenFOAM Installation 1 October 8, 2015 05:01
Patches for OpenFOAM 1.7 on MacOS X gschaider OpenFOAM Installation 101 September 21, 2011 05:37
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26


All times are GMT -4. The time now is 15:28.