CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   dep file not being made properly (https://www.cfd-online.com/Forums/openfoam-installation/57503-dep-file-not-being-made-properly.html)

fabianpk August 17, 2007 09:02

I'm trying to install OpenFOAM
 
I'm trying to install OpenFOAM 1.4.1, and I'm having issues recompiling some libraries I've made some minor additions to (it's not the changes that's causing it though, recompiling any library gives me several error messages, see sample below). It seems that the .dep files are generated without including everything that's needed, and thus the compiler thinks that many things are undefined. I get somewhat further (get rid of some error messages) by copying the old dep files from my old version of OpenFOAM, but this feels like a very temporary and odd solution that requires ALOT of manual work to get it right.
I noticed that there has been some major revisions to wmake, but that should only concern parallel compilations, right? I tried with the old version of wmake but that didn't help. I also tried reverting to gcc 4.1.2, but that didn't change anything either.
I've checked that I use gcc 4.2.1 and opensuse 10.2, and I haven't found anything in the release notes mentioning anything about this.
I should say that this is on a login-machine with 4 processors on a cluster, and it's extremely lagged.

Where should I look for what could be causing this? It worked ok with OF 1.3

Sample of errors:

In file included from parcel/parcel.C:27:
parcel/parcel.H:51: error: expected template-name before '<' token
parcel/parcel.H:51: error: expected `{' before '<' token
parcel/parcel.H:51: error: expected unqualified-id before '<' token
parcel/parcel.H:369: error: expected initializer before '<' token
parcel/parcel.H:376: error: expected initializer before '<' token
In file included from parcel/parcel.H:385,
from parcel/parcel.C:27:
parcel/parcelI.H:34: error: expected initializer before '<' token
parcel/parcelI.H:39: error: 'scalar' does not name a type

mattijs August 20, 2007 13:37

wmkdep (dependency generator)
 
wmkdep (dependency generator) is run always on the local machine but compilation is distributed (if you have WM_SCHEDULER defined) so perhaps it is an NFS/filing system issue.

Check if it works ok on one processor (unset WM_NCOMPROCS).

fabianpk August 21, 2007 09:43

Thanks for your reply. I reali
 
Thanks for your reply. I realized I made a mistake before, the cluster does not run Suse 10.2, I'm not sure which linux version it is but the kernel is 2.6.9-42.ELsmp. Is there any point in compiling my own version of gcc?

I have not set WM_NCOMPROCS or WM_SCHEDULER, I tried including "." in my $PATH, but that didn't change anything.

It seems as if the compiler doesn't include files properly. Example: It complains on this line in atomicWeights.H:

public HashTable<scalar>

the error it reports is that HashTable is not an acceptable template name (expected template-name before '<' token), and I'm guessing this has to do with it having ignored to include HashTable.H, which is done a couple of lines above.

/Fabian

mattijs August 21, 2007 17:36

You running the correct c++ ve
 
You running the correct c++ version? Or otherwise it might be a good idea to compie your own.

First thing I would check is whether wmkdep runs correctly (since your .dep files are incorrect if I remember correctly). Recompile/relink it and see if that helps. Next see how it is invoked from the $WM_DIR/Makefile and 'valgrind' it.

fabianpk August 22, 2007 10:56

I am running the gcc that came
 
I am running the gcc that came with OF 1.4.1, sorry for the ambiguity regarding who's version.

I found out after playing around with wmkdep a bit (I did recompile it) that it doesn't link anything but the files listed in the .C file, so for instance for atomicWeights.C (and .H), the .dep file contains scalar.H, Hashtable.H and atomicWeights.H. The .dep file created by the 1.3.2 compiler contains the entire OpenFOAM/lnInclude directory.

I ran valgrind on the make command that creates the .dep file, which gave the memory adresses in hex-format of some errors. Running wmkdep on its own (it produces the same .dep as the make command did) returns no errors, and doesn't really produce anything I can work with except that informs me there are no memory leaks. I have to admit, I'm not sure what I'm looking for really. If it gave more detailed output on how it creates the dep files perhaps it would be of use, but perhaps I need to recompile something using debug flags?

/Fabian


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