CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   OF15 libccmio and thus ccm26ToFoam do not compile (https://www.cfd-online.com/Forums/openfoam-bugs/62300-of15-libccmio-thus-ccm26tofoam-do-not-compile.html)

henry August 23, 2008 09:37

Sorry about the missing files
 
Sorry about the missing files in the release pack, I will tweak the pack scripts to sort this out. In the meantime here are the missing files
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif files
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif options

H

mwild August 23, 2008 11:58

Thanks Henry!
 
Thanks Henry!

mwild August 23, 2008 12:57

As an aside: what bugs me abou
 
As an aside: what bugs me about the current build system is that it is quite verbose and thus makes spotting build errors very difficult, especially since the Allwmake scripts simply continue on error, such that detecting build errors becomes nearly impossible.

I propose prefixing all calls in Allwmake scripts which might fail (wmake, make, cmake, mkdir, tar, cp,...) with a function call, e.g. called tryRun which might look like this:

# defined in some common file which gets sourced by
# all Allwmake scripts
function tryRun() {
if [ -n "$WM_STOP_ON_ERROR" ]; then
$@ || exit 1
else
$@
fi
}

# in some Allwmake script
tryRun wmake libso something
tryRun tar xzf something_else.tgz

This way, if the user set WM_STOP_ON_ERROR to anything except the empty string, the Allwmake script will abort on error.

And another thing: the shell scripts that come with OpenFOAM all use the shebang #!/bin/sh, but do not use POSIX sh, but extended (bash) features, such as command substitution with the $(command) form, instead of `command`.
On most Linux systems this works fine, as they alias /bin/sh to /bin/bash, but e.g. Ubuntu as a very widespread distribution does not do so (and with good reason) and uses /bin/dash instead, which does not support these syntax extensions. So why not use #!/bin/bash (or even better: #!/usr/bin/env bash) instead?

henry August 23, 2008 15:14

"especially since the Allwmake
 
"especially since the Allwmake scripts simply continue on error"

This was a request made by users which we put in. I would be happy to return to the previous settings where the build system stops on error.

Our intention is for our scripts to be POSIX compliant and as far as we are aware they are. We have tested them with bash in sh mode and with dash (which the developers claim is POSIX) and all the build scripts run fine. In fact the 32bit binary release of 1.5 was built on an Ubuntu machine. If you have found non-POSIX features in our scripts please let us know and we will remove them.

H

mwild August 23, 2008 16:02

"This was a request made by us
 
"This was a request made by users which we put in. I would be happy to return to the previous settings where the build system stops on error."

Or let the user choose what to do. I do see the use of "letting it run as far as it possibly can get", especially if you want to do the compilation over night and not be frustrated next morning at it having stopped after just 5 minutes. But then, afterwards, you usually want to be REALLY sure things went smoothly and don't want to dig out possible error messages in tons of output.

About the POSIX thing: I probably have to apologize as I based my claim on my experience with the 1.4.x version where I encountered exactly these problems. While reading through some of the scripts I thought I spotted some of the constructs which caused me some headaches with 1.4.x, but haven't actually tried it on a vanilla Ubuntu machine and now stand corrected. Sorry for the noise...

BTW, I really think OF-1.5 is a big step forward. I especially like that you separated out the third-party stuff in a cleaner way.

Michael

musahossein August 24, 2008 15:56

When running the following at
 
When running the following at the command prompt for OpenFoam 1.5,

tar -xzvf ThirdParty.linuxGcc.gtgz

I get the folliwng message after a while. Any suggestions?

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

Musaddeque Hossein

musahossein August 24, 2008 16:01

I have a question about OpenFo
 
I have a question about OpenFoam 1.5. If I install it the OpenFoam 1.4 directory, will it remove files as necessary and replace OpenFoam 1.4 with 1.5 i.e, is OpenFoam 1.5 an upgrade? If not will the presence fof OpenFoam 1.5 in the same dir as 1.4 create problems? Or should I get rid of 1.4 alltogether? I am not too keen on doing that yet, since it took quite an effort to get 1.4 up and running since a number of files were missing.

Any suggestions?

Thanks
Musaddeque Hossein

msrinath80 August 24, 2008 16:29

"gzip: stdin: unexpected end o
 
"gzip: stdin: unexpected end of file"

It probably means that your file download ended before the entire file was downloaded. The solution is to try and download the file again.


Regarding your other query, I don't think OpenFOAM releases are upgrades like some GNU/Linux distributions. So you will need to install OpenFOAM 1.5 afresh. If you want to be *very* safe, you can always create another user in your GNU/Linux system and install OpenFOAM 1.5 for that user. That way, you can preserve 1.4 and also get the chance to fool around with 1.5 until you decide to switch to it permanently.

My experience with OpenFOAM since version 1.2 suggests that you can safely remove the old version and move to the new one; as more often than not, many bugs are fixed in newer versions.

ivanwhlau August 24, 2008 20:52

Hi, musaddeque, I think bot
 
Hi, musaddeque,

I think both OpenFOAM 1.4.1 and 1.5 can exist in the same machine.
Well, I used to have both versions. I believe you can change your ".bashrc" file to determine which version to use. (Remark: I use Suse 10.3, so your setting may be different, but I think it should be similar).

iL

mwild August 25, 2008 02:37

"gzip: stdin: unexpected end o
 
"gzip: stdin: unexpected end of file" means corrupt download. After re-downloading, compare the output of:

md5sum <path/to/downloaded/file.gtgz>

(where you replace the part in between <> with the actual path to the file) with the value give on the download page. If they match, you're sure that the download was successful.

And Ivan is right, they can coexist without any problems, as they use a distinct directory structure. Just do:

cd ~/OpenFOAM
tar xzf <path/do/downloaded/file.gtgz>

and OF-1.5 goes into ~/OpenFOAM/OpenFOAM-1.5. You'll have to do this for the source- and binary-pack and then again for the ThirdParty source- and binary packs (unless you intend to build OF yourself).

HTH

Michael

musahossein August 25, 2008 06:44

Thanks, Srinath. You were righ
 
Thanks, Srinath. You were right - for some reason the file did not download completely.
http://www.cfd-online.com/cgi-bin/OpenFOAM_Discus/show.cgi?tpc=126&post=25921#POST259 21

Musa

bholbek December 10, 2008 10:26

Hi, i'm trying to compile w
 
Hi,

i'm trying to compile with wmake the ccm26ToFoam utility. I have the following error:

Making dependency list for source file ccm26ToFoam.C
SOURCE=ccm26ToFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -I/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/src/meshTools/lnInclude -I/ric_home/ep4/OpenFOAM/ThirdParty/libccmio-2.6.1 -I/ric_home/ep4/OpenFOAM/ThirdParty/libccmio-2.6.1/lnInclude -IlnInclude -I. -I/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ccm26ToFoam.o
ccm26ToFoam.C:47:19: error: ccmio.h: Datei oder Verzeichnis nicht gefunden
ccm26ToFoam.C:164: error: variable or field 'CheckError' declared void
ccm26ToFoam.C:164: error: 'CCMIOError' was not declared in this scope
ccm26ToFoam.C:164: error: expected primary-expression before 'const'
make: *** [Make/linux64GccDPOpt/ccm26ToFoam.o] Fehler 1

I don't understand what i have to do with files "files" and "options" of Henry Weller. I have no Make directory in ThirdParty/libccmio-2.3.1. Replacing the two initial files of the Make directory in ccm26ToFoam directory, i have the following error:

make: *** Keine Regel vorhanden, um das Target »libadf/ADF_fortran_2_c.dep«,
benötigt von »Make/linux64GccDPOpt/dependencies«, zu erstellen. Schluss.

Could someone help me?

Thank you

Bastien

mattijs December 19, 2008 05:17

Did you run AllwmakeLibccmio i
 
Did you run AllwmakeLibccmio in the ThirsParty directory? This should have installed the ccmio library (so including the file ccmio.h).

The compilation of then ccm26ToFoam includes that Thirdparty directory (/ric_home/ep4/OpenFOAM/ThirdParty/libccmio-2.6.1) to find the ccmio.h.

srikara February 16, 2009 03:38

Hi, I get the following mess
 
Hi,
I get the following message when I run the AllwmakeLibccmio command in the ThirdParty directory :
smahishi@system001:~/OpenFOAM/ThirdParty> ./AllwmakeLibccmio
+ packageDir=libccmio-2.6.1
+ '[' '!' -d libccmio-2.6.1 ']'
+ '[' -d libccmio-2.6.1 -a '!' -d libccmio-2.6.1/Make ']'
+ cp -r wmakeFiles/libccmio libccmio-2.6.1/Make
cp: cannot stat `wmakeFiles/libccmio': No such file or directory
+ '[' -d libccmio-2.6.1/Make ']'
smahishi@system001:~/OpenFOAM/ThirdParty>

Could anybody please help me out with this? I do not know where is it trying to copy the libccmio file to.

Thank you in advance,
Srikara

srikara February 16, 2009 08:06

Hello, I solved the problem.
 
Hello,
I solved the problem. It was something to do with the folder Make in the thirdParty directory. I had to change the case of the letter from m to M. After that I was able to run the AllwmakeLibccmio command from the thirdparty folder and it ran without any errors. But when I run the command Allwmake from the "mesh/conversion/Optional/ccm26ToFoam" folder I get the message

"No rule to make target : libadf/ADF_fortran_2_c.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop

What could be the problem? Does anybody know what is missing here?

Thank you,
Srikara

srikara February 16, 2009 08:09

Hello, I solved the problem.
 
Hello,
I solved the problem. It was something to do with the folder Make in the thirdParty directory. I had to change the case of the letter from m to M. After that I was able to run the AllwmakeLibccmio command from the thirdparty folder and it ran without any errors. But when I run the command Allwmake from the "mesh/conversion/Optional/ccm26ToFoam" folder I get the message

"No rule to make target : libadf/ADF_fortran_2_c.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop

What could be the problem? Does anybody know what is missing here?

Thank you,
Srikara

mattijs February 24, 2009 17:29

go to ThirdParty/libccmio-2.6.
 
go to ThirdParty/libccmio-2.6.1 and do a

wclean
wmake libso

to do a clean rebuild. This should rebuild the ADF_fortran_2_c.o it is complaining about.

Xabi March 25, 2009 06:11

No rule to make
 
Hi Srikara,

Did you finally manage to solve the problem? I am new with OpenFoam and I have the same problem you had some months ago with the compiling.
I try to compile my one solver (in this case a variation of simpleFoam) and the following error shows up after typing wmake:

make: *** No rule to make target ´mysimpleFoam.dep´ needed by 'Make/linux64GccDPOpt/dependencies'. Stop

Thank you in advance,

Xabi

Quote:

Originally Posted by srikara (Post 208529)
Hello,
I solved the problem. It was something to do with the folder Make in the thirdParty directory. I had to change the case of the letter from m to M. After that I was able to run the AllwmakeLibccmio command from the thirdparty folder and it ran without any errors. But when I run the command Allwmake from the "mesh/conversion/Optional/ccm26ToFoam" folder I get the message

"No rule to make target : libadf/ADF_fortran_2_c.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop

What could be the problem? Does anybody know what is missing here?

Thank you,
Srikara


srikara March 31, 2009 00:32

Hi Xabi,
I could not find out what the problem was. But I solved the problem by reinstalling OpenFOAM completely by logging in as root and then installed the library libccmio also as root. It worked perfectly after that.

I am facing the same problem trying to modify the source code of an existing solver. If I find an answer this time I would let you know asap:).

bernarde November 16, 2009 06:09

Hi

I aslo get this error when trying to build libccmio

"No rule to make target : libadf/ADF_fortran_2_c.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop

I tried this suggestion:

Quote:

go to ThirdParty/libccmio-2.6.1 and do a

wclean
wmake libso

to do a clean rebuild. This should rebuild the ADF_fortran_2_c.o it is complaining about.
but it just gave the same error. CAn anybody help? where is this file located: ADF_fortran_2_c.dep?


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