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

Windows Installation BugsComments on Petrbs patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2006, 05:38
Default Brooks, I compiled on my rig L
  #21
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Brooks, I compiled on my rig LAM that is part of OpenFOAM distribution as well as libPstream against it without problems. All one needs to get LAM compiled is in OpenFOAM-1.2\src\Allwmake change usage of gmake to make and set WM_MPLIB=LAM.

I didn't made futher compilation as I found that addition of -L$(FOAM_LIBBIN)/dummy flag in Make\options files that patch provides will ignore my new library. I am poundering now how to conquer the world and how to solve it with some elegant way. My idea is to let .bashrc create a symbolic link to the right libPstream.dll based on WM_MPLIB variable. What you think about it?
pvita is offline   Reply With Quote

Old   March 3, 2006, 06:07
Default Good news about LAM compiling!
  #22
brooksmoses
Guest
 
Posts: n/a
Good news about LAM compiling!

I think, rather than relying on symbolic links, it might be cleaner to do this with environment variables, since the relevant one should already exist -- on my Linux machine (with LAM compiled), it appears that $FOAM_MPI_LIBBIN points to the correct location. The only problem is that it's not defined when the "dummy" Pstream library is used.

Thus, how about replacing the -L$(FOAM_LIBBIN)/dummy flags with -L$(FOAM_MPI_LIBBIN), and changing line 232 of .bashrc from

AddLib $FOAM_LIBBIN/dummy

to

export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
AddLib $FOAM_MPI_LIBBIN

in order to properly account for the no-MPI case?
  Reply With Quote

Old   March 3, 2006, 09:33
Default Dear OpenFoamer Friends I w
  #23
New Member
 
Pierre Maruzewski
Join Date: Mar 2009
Posts: 6
Rep Power: 17
pierrot is on a distinguished road
Dear OpenFoamer Friends

I want to compile, for example turbFoam with mpich-1.2.6 and not with LAM_MPI because I had some troubles between LAM_MPI and PBSPRO.
So I build libPstream.so with mpich-1.2.6 and try to compile turbFoam.
After typing : wmake turboFoam
I received this message :

wmake turbFoam
make: Nothing to be done for `allFiles'.
make: `Make/linuxAMD64Gcc4Opt/dependencies' is up to date.

/u12/maruzews/OpenFOAM/OpenFOAM-1.2/wmake/tcshScripts/mkObjectDir /u12/maruzews/OpenFOAM/OpenFOAM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbF
oam
g++ -m64 -DlinuxAMD64 -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/u1
2/maruzews/OpenFOAM/OpenFOAM-1.2/src/cfdTools/incompressible -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude -I/u12/maruz
ews/OpenFOAM/OpenFOAM-1.2/src/turbulenceModels -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2/src/transportModels -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2
/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC Make/linuxAMD64Gcc4Opt/turbFoam.o -L/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt
\
-lincompressibleTurbulenceModels -lincompressibleTransportModels -lcfdTools -lmeshTools -lOpenFOAM -lm -o /u12/maruzews/OpenFOAM/OpenFO
AM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbFoam
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_open'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_lookaside_alloc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_destroy_hash'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_unknown'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_set_acceptable_sizes'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_directed_send_with_callback'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_dma_free'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `memset.pathscale.opteron'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_create_lookaside'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_destroy_lookaside'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_deregister_memory'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_node_id_to_unique_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_insert'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_crc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_ticks'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_receive'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_strerror'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_dma_malloc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_bcopy'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_allow_remote_memory_access'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_send_with_callback'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_provide_receive_buffer'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_close'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_perror'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_compare_ptrs'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_hash_ptr'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `GM_PAGE_LEN'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_lookaside_free'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_remove'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_node_id_to_host_name'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_register_memory'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_bzero'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_blocking_receive'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_num_receive_tokens'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_find'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_unique_id_to_node_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_get_host_name'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_get_node_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_create_hash'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_blocking_receive_no_spin'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_num_send_tokens'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_drop_sends'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_provide_receive_buffer_with_ta
g'
collect2: ld returned 1 exit status
make: *** [/u12/maruzews/OpenFOAM/OpenFOAM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbFoam ] Error 1


BUT these gm_... are only used by LAM_MPI and I won't use it.

So can you explain the cleaner way to compile OpenFoam with mpich-1-2-6.

Thanks a lot,

Mail you soon,

Pierre
pierrot is offline   Reply With Quote

Old   March 3, 2006, 11:37
Default - only the Pstream library nee
  #24
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
- only the Pstream library needs to be recompiled. All mpp stuff is fully contained within that library.

To recompile Pstream for a different mpp:
- in the .OpenFOAM-1.2/bashrc set the WM_MPLIB variable (mpich probably is already there and just needs to be uncommented)
- in the OpenFOAM-1.2/.bashrc make sure it picks up the correct mpich paths.
- re'source' the bashrc etc.
- recompile libpstream.so:

cd $FOAM_SRC/Pstream/mpi
wclean
wmake libso

- now `ldd turbFoam` should pick up this new libPstream.so

- if you get any missing symbols relating to mpi specific system libs just add them to $WM_DIR/rules/$WM_ARCH/mplib$WM_MPLIB
mattijs is offline   Reply With Quote

Old   March 6, 2006, 11:43
Default Thanks Mattijs, I did it.
  #25
New Member
 
Pierre Maruzewski
Join Date: Mar 2009
Posts: 6
Rep Power: 17
pierrot is on a distinguished road
Thanks Mattijs,

I did it.
But after `ldd turbFoam` I received libincompressibleTurbulenceModels.so: Command not found.

So where I must add the share libraries before doing ldd

Pierre
pierrot is offline   Reply With Quote

Old   March 6, 2006, 14:34
Default Sorry wrote incorrectly. Do
  #26
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Sorry wrote incorrectly.

Do

ldd `which turbFoam`

and check which libPstream.so is used.
mattijs is offline   Reply With Quote

Old   March 21, 2006, 10:49
Default Dear experienced OpenFOAMers .
  #27
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
Dear experienced OpenFOAMers ...

I'm beginner with OpenFOAM and only windows 2000 user (Unix is unknown for me, just some experience in C programming under DOS 15 years ago).

I would like to install OpenFOAM with Cygwin.

I've downloaded OpenFOAM from the "Unofficial OpenFOAM Cygwin Port" from Brooks Moses. I did as right as possible what's described there and on the Official OpenFOAM web site.

My different problems :

1) In the bashrc from .OpenFOAM-1.2 at the line :
export WM_ARCH=cygwin the "=" is missed.

2) After sourcing the .OpenFOAM-1.2/apps/paraview/bashrc, I have the following message : bash : '[' : missing ']'
I looked in the file, but I can't see the problem... It must have some consequences but I don't know...

3) I must run "./Allwmake" many times to be able to bild the Objetcs files. Normal? I suppose yes.

4) I get the following warning :
ld : unrecognised emulation mode : elf_i386
emulation supported : i386pe.
Why? Must I change .../rules/cygwin/general and .../rules/cygwinGcc4/general to i386pe ?

5) No linking work : here is what I can read for the last linking :

g++ -m32 -Dcygwin -Wall -W -Wno-unused-parameter Wold-style-cast -03 -ffast-math -DnoRepository -ftemplate-depth-30 -I/home/Administrateur/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lInclude -IlnInclude -I. -L/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cygwinGcc4Opt \
-lOpenFOAM -lm -o OpenFOAM.exe
/usr/bin/ld: cannot find -lOpenFOAM
collect2:ld returned 1 exit status
make: *** [OpenFOAM.exe] Error 1


Thanks for help, even if it look a little stupid for you...

Philippe
ceradi is offline   Reply With Quote

Old   March 22, 2006, 02:00
Default Philippe - First, thanks mu
  #28
brooksmoses
Guest
 
Posts: n/a
Philippe -

First, thanks much for trying out the port, and for reporting how it worked. These aren't stupid questions at all -- it should just work, and if it doesn't, it probably means I did something wrong.

(One of the things I just realized I did "wrong" was that I never tested the bash scripts; I use tcsh, and only tested those. Mea culpa, and this means you're probably the first person to test them, which is probably why it's not working for you.)

As to your specific questions:

1) Yup, you're right. The line after it needs an "=" at the end, too. Thanks for catching that!

2) I don't immediately see what's causing that either. I'll work on tracking it down tomorrow.

3) That's definitely not normal; it should only need to be run once.

I wonder if the bash error about "missing ']'" means that it's not loading everything properly. (Also, one big thing to be aware of with the ./Allwmake scripts is that they keep going even if one of the steps doesn't work, which tends to hide the errors that really matter. If it doesn't work the first time, it's probably most useful to open the Allwmake script in a text editor, and run each line by hand.)

Hopefully, if I can fix the "missing ']'" issue, this will work right.

4) Yes, something is definitely wrong here -- this is probably a good part of why Allwmake isn't working.

Changing the /general files is probably worth trying (and I suspect it is indeed an error in the files), but I don't think it will help. I have the same ld on my system (which doesn't support elf_i386) and the same /general files, and it works for me, so I'm guessing the line in /general shouldn't actually affect anything -- perhaps the option is overwritten somewhere else.

5) This is almost certainly because of the previous errors. Is there a libOpenFOAM.dll file in the OpenFOAM-1.2\lib\cygwinGcc4Opt directory?

(Incidentally, did you retype the error message by hand, or cut-and-paste it? The first -I option ends with OpenFOAM/lInclude, and that should be lnInclude, and I'm wondering where the mistake came in -- if that typo is in the build scripts, that could be part of the problem!)

...

So, sometime in the next day or so I'll work on testing on the bash scripts, to see if I can duplicate your problems and find out what's causing them.

In the meantime, could you try doing a compilation under tcsh instead of bash to see if that works? (I don't think Cygwin installs tcsh by default, so you might have to go through Cygwin setup to install it first. And of course you source the cshrc scripts rather than the bashrc ones.) That should at least tell us whether it's a problem with the bash scripts, or with something else.

(And, if you don't mind, please try changing the "-melf_i386" to "-mi386pe" in the two /general files to see if that helps, just in case it does work.)

Also, did you install the binary package, or just the source package? (It should work either way; I'm just curious, and it might make a difference to tracking down the error.)
  Reply With Quote

Old   March 22, 2006, 04:15
Default Greetings! It seems it is
  #29
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Greetings!

It seems it is time I should install from scratch with Mose's patch version and to check it under my Cygwin/Win2000. Well, I would suggest to fix bashrc first as it sets path as well, so the compiler problem could be dependent on it.

Petr
pvita is offline   Reply With Quote

Old   March 22, 2006, 05:50
Default Thanks to Brooks and Petr for
  #30
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
Thanks to Brooks and Petr for helping me!

I will install tcsh and try...
I don't have to work with bash, if tcsh work ... I'll work with it!

For the specific questions :

4) I tryed to change indeed, but with no changes except the warning message wich disappear.

5) There isn't a libOpenFOAM.dll
(Yup !! I retype the message indeed and forgot the "n", sorry!)
By the way, is there a ".log" file created with all the messages somewhere? If not I can't paste...

I'm downloading the binary package now to try and see...

You're more into the code than me, but I can help by telling some more details, may be important...

- running the foamSystemCheck fail with 2 errors :
a) no support for cygwin
b) retyping the error message :

Checking networking...
************
Ping_ceradi : Ping_not_installed_in_usual_path
Ping_localHost : Ping_not_installed_in_usual_path
Test_rsh: No_telnet_running:cannot_check*
Test_ssh: No_telnet_running:cannot_check*
FATAL ERROR : No remote shell available.
Foam2.3 environnement requires passwordless
'ssh' and/or 'rsh' to the current host.
Contact your system administrator.

- To Petr,

I don't understand exactly what you mean by "to fix bashrc first as it sets path" but it remember me something may be interesting to help :
After unpacking OpenFOAM-1.2.cygwin-src-0.6.tar.gz and gcc-4.0.2.cygwin-OpenFOAM.tar.gz, sourcing the bashrc, when running ./Allwmake, it couldn't find the compiler...
I restarted the machine and it find it after...

So I'll continue the investigations before my childrens comes from school...

Philippe
ceradi is offline   Reply With Quote

Old   March 22, 2006, 07:17
Default I just unpacked the binaries i
  #31
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
I just unpacked the binaries in a FOAM directory.
made a copy of the tutorials as described in the user's manual tutorial.

Typed in : FoamX

The following message appear :

Can't find JDK at /cygdrive/c/WINNT/System32. Please set the JAVA_PATH to the JDK installation directory.

Well, java isn't on the machine I want to run OpenFOAM. This machine isn't connected to the internet for secured virus reasons.

It seem I must install java on the machine. Right? I must search internet for this.

Now I must switch to tcsh with cygwin and continuing the trials...

Philippe
ceradi is offline   Reply With Quote

Old   March 22, 2006, 08:51
Default Well Philippe! First you sh
  #32
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Well Philippe!

First you should know, that our patch allows to compile non-parallel part of OpenFOAM for number crushing. Parallel stuff and GUI was not on the list of changes as it was not important for us. Simply said, FoamX is not working at all. Forget it for now. It is in any case just tool to set some parameters in case files you can do manually as well.

Speaking about compiler and bashrc. When you start Cygwin terminal, you will execute bashrc. This should include OpenFOAM startup scripts that will set paths and other environment variables to those needed. These OpenFOAM stratup scripts change as well path to supported version of compiler. After a restart you simply executed these scripts, therefore those errors about compiler are gone.

I will try that bash stuff tomorrow.

Petr
pvita is offline   Reply With Quote

Old   March 22, 2006, 11:42
Default Thanks... Yup, you're right
  #33
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
Thanks...

Yup, you're right I noted this in a corner of my sheet of paper about FoamX and paraFoam. But forgot it at the time to try... sorry

I unpacked the binaries in $HOME/foam. You'll find trivial that it could not work there without environment changes. So I've copied the directories "applications" and "lib" to $HOME/OpenFOAM/$(LOGNAME)-1.2.
Now the applications are known but can't run because they can't find the .dll. In the error message, no "lib" directory was pointed to.
So, I copied the files from the directory "lib" and "lib/dummy" in $HOME/OpenFOAM/OpenFOAM-1.2/applications/bin/cygwinGcc4Opt.

I've runned the first example and it works!

For more investigations, I must learn myself! I'm new here...

About tcsh, I tried with it to compile the package. There is no error in the cshrc but the compilation keep the same problem.

The tricky mount I had to do give me some ideas to solve the compilation problem but you probably will find this easier than me.
ceradi is offline   Reply With Quote

Old   March 22, 2006, 15:10
Default Hmm. Sounds like you still mi
  #34
brooksmoses
Guest
 
Posts: n/a
Hmm. Sounds like you still might be having some path problems. What do the following commands return?

echo $PATH

echo $path

echo $WM_PROJECT_DIR

echo $WM_PROJECT_USER_DIR

echo $WM_ARCH

echo $WM_COMPILER_DIR

which gcc

Also, when you unpacked the source files, what directory did you put them in? Are they in $HOME/OpenFOAM or $HOME/foam?
  Reply With Quote

Old   March 23, 2006, 05:37
Default Yes, I feeld this too... But ?
  #35
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
Yes, I feeld this too... But ??

I only used $HOME/foam for the binaries because the $HOME/OpenFOAM allready existed for the sources and I wanted to have it independently.

So I well copied your file OpenFOAM-1.2.cygwin-src-0.6.tar.gz in $HOME/OpenFOAM and unpacked it there.

I uninstalled the gcc from the cygwin package to be sure using the good one.

I copied your file gcc-4.0.2.cygwin-OpenFOAM.tar.gz in $HOME/OpenFOAM/cygwin and unpacked it there.

Environment variables (retyped) :
PATH :
/home/Administrateur/OpenFOAM/cygwin/gcc-4.0.2/bin:/home/Administrateur/OpenFOAM /Administrateur-1.2/applications/bin/cygwinGcc4Opt:/home/Administrateur/OpenFOAM /OpenFOAM-1.2/applications/bin/cygwinGcc4Opt:/home/Administrateur/OpenFOAM/OpenF OAM-1.2/wmake:/home/Administrateur/OpenFOAM/OpenFOAM-1.2/bin:/usr/local/bin:/usr /bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/ c/WINNT/System32/Wbem:/usr/lib/lapack

path : (nothing)

WM_PROJECT_DIR :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2

WM_PROJECT_USER_DIR :
/home/Administrateur/OpenFOAM/Administrateur-1.2

WM_ARCH :
cygwin

WM_COMPILER_DIR :
/home/Administrateur/OpenFOAM/cygwin/gcc-4.0.2

MAKE_MODE :
unix

FOAM_LIB :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib

FOAM_LIBBIN :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cygwinGcc4Opt

FOAM_USER_APPBIN :
/home/Administrateur/OpenFOAM/Administrateur-1.2/applications/bin/cygwinGcc4Opt

FOAM_USER_LIBBIN :
/home/Administrateur/OpenFOAM/Administrateur-1.2/lib/cygwinGcc4Opt


Philippe
ceradi is offline   Reply With Quote

Old   March 26, 2006, 07:32
Default Thanks! That's helpful; it lo
  #36
brooksmoses
Guest
 
Posts: n/a
Thanks! That's helpful; it looks like everything is ok except the $PATH is incomplete. But I know why it's doing that.

There's one more problem in the .OpenFOAM-1.2/bashrc file, which is causing that path problem. Specifically, the line fifth from the end of the file should say:

if [ "$WM_ARCH" = "cygwin" ]; then

The space before the closing "]" character is missing. This causes the "missing ']'" error, and causes bash not to execute the following commands, which add the library paths to the overall path. (Cygwin uses PATH, not LD_LIBRARY_PATH, when looking for .dll files, so this is needed; that's why you couldn't run the programs until you put the .dll files in the "bin" directory. This should fix that.)

Now, ok. If you make that change to the .OpenFOAM-1.2/bashrc file, and the changes to the two "general" files in the wmake cygwin directories, that should fix all the bugs I know of so far.

That should make things work the same under bash as they do under tcsh. However, you say that things under tcsh aren't working either, so there must still be something wrong....

My next guess is that running Allwmake with the buggy version of bashrc caused something to be messed up. In any case, it's probably useful to go through the steps that Allwmake goes through, by hand, and see where things are next going wrong.

So, once you've made the above changes, try the following (in bash, once you've properly loaded the .OpenFOAM-1.2/bashrc file) and see what happens:

* run "echo $PATH" and make sure it's got some .../lib directories in it, as well as the .../bin ones.

* go into the wmake directory, and run "makeWmake".

* Check to make sure dirToString.exe and wmkdep.exe exist in wmake/rules/cygwinGcc4.

* go into the src directory, and run "wmake libso zlib-1.2.1".

* Check to make sure that libz.dll exists in the lib/cygwinGcc4Opt directory.

* in the src directory, run "wmake libso foamUser".

* Check to make sure that libfoamUser.dll exists in the lib/cygwinGcc4Opt directory.

* in the src/OpenFOAM directory, run "wmakeLnInclude".

* in the applications/utilities/miscellaneous directory, run "wmake exe foamFlex", then run "cp foamFlex/FlexLexer.h $FOAM_SRC/OpenFOAM/lnInclude"

* in the src/Pstream directory, run "wmake libso dummy".

* Check to make sure that libPstream.dll exists in the lib/cygwinGcc4Opt/dummy directory.

If you get that far without getting any errors, then everything should be working correctly. Go back to the main OpenFOAM directory, and run ./Allwmake.

If you do get an error (or one of the files doesn't exist), stop and report back what it is, and I'll try to figure out how to fix it!

...

Oh, and one more thing -- if you right-click on the icon that you use to launch your CygWin window, select "Properties" from the pop-up menu, and select the "Options" tab in the dialog box, that should have a checkbox for "QuickEdit mode". If you check that, then you can copy text out of the Cygwin window by selecting it with the mouse and then clicking the right mouse button on it. That should be a lot easier than retyping everything! (You can also now paste text into the Cygwin window just by right-clicking.)
  Reply With Quote

Old   March 27, 2006, 05:33
Default Thanks, The problems with t
  #37
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
Thanks,

The problems with the bashrc are fixed now.

I cleaned the directories an begun from zero.

Here is what happened :

Administrateur@ceradi ~/openfoam/openfoam-1.2
$ cd wmake

Administrateur@ceradi ~/openfoam/openfoam-1.2/wmake
$ makewmake
gcc -m32 -Wall -O3 -fPIC dirToString.c -o /home/Administrateur/OpenFOAM/OpenF
OAM-1.2/wmake/rules/cygwinGcc4/dirToString
dirToString.c:1: warning: -fPIC ignored for target (all code is position indepen
dent)
flex wmkdep.l ; gcc -m32 -Wall -O3 -fPIC lex.yy.c -o /home/Administrateur/Ope
nFOAM/OpenFOAM-1.2/wmake/rules/cygwinGcc4/wmkdep
lex.yy.c:1: warning: -fPIC ignored for target (all code is position independent)

lex.yy.c:1405: warning: 'yyunput' defined but not used


At this point the files dirToString.exe and wmkdep.exe exist in wmake/rules.cygwinGcc4. (created on 03-27-06)


Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ dir
Allwmake edgeMesh lam-7.1.1 thermophysicalModels
Gstream engine malloc topoFvMesh
LESmodels errorEstimation meshTools transportModels
ODE finiteArea mico-2.3.11 triSurface
OpenFOAM finiteElement movingFvMesh turbulenceModels
Pstream foamUser postProcessing zlib-1.2.1
cfdTools foamUtil randomProcesses
dynamicMesh lagrangian sampling

Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ wmake libso zlib-1.2.1
/bin/sh: /bin/cpp: No such file or directory
make: *** [cygwinGcc4Opt/files] Error 127
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/wmake/wmake: cannot make, file Make/c
ygwinGcc4Opt/objectFiles was not created successfully


Hoopping it will help you... (I am in dark...)


Thanks for your help for copy/paste!

Philippe
ceradi is offline   Reply With Quote

Old   March 27, 2006, 06:29
Default Well, dirToString.exe and wmkd
  #38
Member
 
Petr Vita
Join Date: Mar 2009
Posts: 59
Rep Power: 17
pvita is on a distinguished road
Send a message via MSN to pvita Send a message via Skype™ to pvita
Well, dirToString.exe and wmkdep.exe are just tools necessary for wmake based compilation. It is ok. But I would check your variable WM_MPLIB is empty. It seems you are compiling with LAM (parallel stuff) what is not supported in the patch yet. I would like to do it probably first with OpenFOAM 1.3 that is announced.
pvita is offline   Reply With Quote

Old   March 27, 2006, 19:10
Default A good thought, Petr, but if z
  #39
brooksmoses
Guest
 
Posts: n/a
A good thought, Petr, but if zlib isn't compiling, he's not even to the point in the process where WM_MPLIB has been checked; this all preceeds compiling Pstreams.

This "/bin/cpp: No such file or directory" error seems to be coming from the first line of wmake/rules/cygwinGcc4Opt/general and wmake/rules/cygwin/general. That's accidentally referencing the system version of cpp, in /bin/cpp, instead of the one in the local gcc installation. I never noticed the problem, because I had Cygwin's gcc installed as well (and, luckily, using the wrong cpp didn't cause problems). Since you've removed your Cygwin gcc installation, /bin/cpp doesn't exist on your system.

(So your idea of removing the Cygwin gcc installation, to make sure to avoid any confusion, was a good idea!)

To fix this, replace the first line of wmake/rules/cygwinGcc4Opt/general and wmake/rules/cygwin/general with:

CPP = cpp -D$(WM_ARCH)

That should fix this problem.

So, once you've fixed that, try the "wmake libso zlib-1.2.1" again, and so on down the list; hopefully it will work this time!
  Reply With Quote

Old   March 28, 2006, 06:54
Default To Petr, I checked WM_MPLIB It
  #40
New Member
 
Philippe STRAET
Join Date: Mar 2009
Location: Olne, Belgium
Posts: 9
Rep Power: 17
ceradi is on a distinguished road
To Petr, I checked WM_MPLIB It well empty.

It would be too easy... if it worked...

Here are the results :

Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ wmake libso zlib-1.2.1
make: `lnInclude/uptodate' is up to date.
Dropping import dependency files
libso
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/wmake/bashScripts/mkObjectDir libNULL

rm -f so_locations
cd Make/cygwinGcc4Opt; \
g++ -m32 -Dcygwin -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffas
t-math -DNoRepository -ftemplate-depth-30 -I/home/Administrateur/OpenFOAM/Open
FOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -shared -Wl,--dll -Wl,-mi386p
e -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--no-undefined -Wl,--no-
allow-shlib-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--out-implib,libNULL
.a -Wl,--whole-archive \
-Wl,--no-whole-archive -L/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cy
gwinGcc4Opt \
-o libNULL.dll
Creating library file: libNULL.a
`libNULL.dll' is up to date.

NO MORE ....

I have a libNULL.a and libNULL.dll in zlib-1.2.1/Make/cygwinGcc4Opt.

But no libz.dll anywhere in OpenFOAM

When running "wmake libso zlib-1.2.1" once again I get the following line in more at the begining :

make: Nothing to be done for `allFiles'.

I tried to look into wmake's codes and the wmake/makefilefiles.

I'm supprised that zlib-1.2.1/make/cygwinGcc4Opt/files is empty but the zlib-1.2.1/make/files
define the files in zlib-1.2.1 !

What must I do? Pray God or Brooks and Petr?

Thanks for your further help...

Philippe
ceradi 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
HELP NEEDED HOW TO MAP VALUES FROM PATCH OF ONE MESH TO PATCH OF ANOTHER MESH mkraposhin OpenFOAM Running, Solving & CFD 3 September 4, 2011 10:42
INSTALLATION OF 141 naveen OpenFOAM Installation 3 January 30, 2009 05:19
Regarding installation vidyaprakash Siemens 0 December 22, 2006 00:03
Installation of 13 grtabor OpenFOAM Installation 14 August 24, 2006 13:43
Windows Installation Petrbs Port Redux Patches and Binary Distribution brooksmoses OpenFOAM Installation 0 February 10, 2006 18:35


All times are GMT -4. The time now is 04:38.