CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [OLAFLOW] wmake error when installing on RHEL 6.5 (https://www.cfd-online.com/Forums/openfoam-community-contributions/179312-wmake-error-when-installing-rhel-6-5-a.html)

Lewis Liang October 27, 2016 12:15

wmake error when installing on RHEL 6.5
 
Hi All,

I am a new OpenFOAM user and currently study to learn build wave model by using waves2Foam and OLAFoam. And I have installed the OpenFOAM/2.4.0 in the cluster linux system, which is Red Hat Enterprise Linux Server release 6.5 (RHEL). However, when I try to install OLAFoam as a example, the terminal reports wmake error as bellow.

Code:

<command-line>:0:1: error: macro names must be identifiers
linux64Gcc49DPOpt/options:6: *** missing separator.  Stop.
wmake error: file 'Make/linux64Gcc49DPOpt/objectFiles' could not be created
olaFoam compilation failed

Additionally, I even though can not re compile a default solver (such as interFoam) by typing the wmake command, then it still has the same error as mention above.

For this issue, I think this error might cause by rule formatting in the file from linux64Gcc49 folder. So, I enclose the file: /OpenFOAM-2.4.0/wmake/rules/linux64Gcc49/general below.
Code:

CPP        = cpp -traditional-cpp

PROJECT_LIBS = -l$(WM_PROJECT) -ldl

include $(GENERAL_RULES)/standard

include $(RULES)/c
include $(RULES)/c++

Does anyone have a same problem with mine ?

I really look forward to having some helps from you.

Cheers!

zuodong

wyldckat October 30, 2016 10:46

Quick answer: We need the following information:
  1. What does this command give you?
    Code:

    which cpp
  2. And this one?
    Code:

    cpp --version
  3. Please run the following commands inside the "OLAFOAM" folder:
    Code:

    wclean solvers/olaFoamOF240
    wmake all solvers/olaFoamOF240 > log.make 2>&1
    gzip < log.make > log.make.gz

    then please attach the file "log.make.gz" to your next post.
  4. Furthermore, please also run the following command:
    Code:

    gzip < solvers/olaFoamOF240/Make/linux*/options > options.gz
    and attach the file "options.gz" to your next post.

Phicau October 30, 2016 21:23

Hi Zuodong,

from what you say, not being even able to compile interFoam indicates that there is something wrong in the OpenFOAM global installation. Maybe you can provide the log file for the complete installation (the output from the allMake file).

Once OpenFOAM is correctly installed, I assure you that olaFoam will compile without any errors.

Best,

Pablo

Lewis Liang November 4, 2016 02:19

2 Attachment(s)
Hi! @Bruno Santos, thanks for quick reply and your sugguestions. According to your advice and following your steps to test our RHEL 6.5 linux system, the outcomes are shown below:

(1)
Code:

which cpp
Code:

/sw/gcc/4.9.0/bin/cpp
(2)
Code:

cpp --version
Code:

cpp (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(3)
Code:

wclean solvers/olaFoamOF240
wmake all solvers/olaFoamOF240 > log.make 2>&1
gzip < log.make > log.make.gz

The file "log.make.gz" is attached below.

(4)
Code:

gzip < solvers/olaFoamOF240/Make/linux*/options > options.gz
The file "options.gz" is attached below.


Thanks for considering my problems and I am looking forward to your reply.

Best regards,

zuodong

Lewis Liang November 4, 2016 02:39

Hi @Pablo! Firstly thanks for your work that making a good OLAFoam for generating wave. Now, I have installed the OLAFoam in a laptop with Fedora 24 Linux system, in which the OF30X installed. However, the simulation of large modelling case have to run in the Cluster System. I run the command
Code:

./allMake >  log.allMake 2>&1
its outcome:
Code:

<command-line>:0:1: error: macro names must be identifiers
linux64Gcc49DPOpt/options:8: *** missing separator.  Stop.
wmake error: file 'Make/linux64Gcc49DPOpt/objectFiles' could not be created in /export/home/studentID/OLAFOAM/genAbs/waveGeneration
\n\nWave generation boundary conditions compilation failed

So, there is some problems that not working well on the global installation of OpenFOAM. Anyway, I'm ganna install OF again under private folder in the Cluster system. After that, to see how does the outcomes present.

Thanks for your time and help!

Cheers!

zuodong

wyldckat November 6, 2016 17:18

Greetings to all!

@Zuodong: From what I can figure out, something very wrong is going on with cpp. Please run the following commands:
Code:

cpp -traditional-cpp -D$WM_ARCH -DWM_$WM_PRECISION_OPTION solvers/olaFoamOF240/Make/options > options.test 2>&1
gzip < options.test > options.test.gz

I request this because the "options.gz" file you attached implied that the option "-traditional-cpp" is not working properly.

Another thing that comes to mind is regarding the installation itself... please run the following command and let us know what it gives you:
Code:

which blockMesh
Best regards,
Bruno

Lewis Liang November 9, 2016 21:38

1 Attachment(s)
Hi! @Bruno Santos good to see you !

First, I run the below command:
Code:

cpp -traditional-cpp -D$WM_ARCH -DWM_$WM_PRECISION_OPTION solvers/olaFoamOF240/Make/options > options.test 2>&1
gzip < options.test > options.test.gz

and the file options.test.gz is attached below.

Then, run
Code:

which blockMesh
It turns out
Code:

/sw/OpenFoam/OpenFOAM-2.4.0/platforms/linux64Gcc49DPOpt/bin/blockMesh
since the OpenFOAM is installed at the /root/sw/OpenFoam/OpenFOAM-2.4.0. So, as a general user, I invoke OF by entering below command to load OF module:
Code:

module load OpenFoam/2.4.0
Thanks for your time!

Best regards,

zuodong

wyldckat November 13, 2016 10:09

Quote:

Originally Posted by Lewis Liang (Post 624907)
since the OpenFOAM is installed at the /root/sw/OpenFoam/OpenFOAM-2.4.0. So, as a general user, I invoke OF by entering below command to load OF module:
Code:

module load OpenFoam/2.4.0
Thanks for your time!

Quick answer: OK, finally, we've gotten to the reason for the problem. If you run these two commands:
Code:

echo $WM_ARCH
echo $WM_PRECISION_OPTION

it will likely either give you two empty lines of output or at least the first one will be empty.

Please inform your system's administrator that the module is incomplete, because at least "WM_ARCH" is undefined, although "WM_PRECISION_OPTION" might also be undefined, which are necessary when building custom source code.

In your case, the quick fix is to run:
Code:

export WM_ARCH=linux64
export WM_PRECISION_OPTION=DP

after you run the module load command.


The reason why I'm stating this is because the command I asked you to run with cpp gave this warning at the start of the command:
Code:

<command-line>:0:0: error: macro names must be identifiers
which is consistent with using:
Code:

cpp -traditional-cpp -D  path/to/file
namely having "-D" with no text after it... which happens in your case with "WM_ARCH".

Sud09463 November 24, 2016 08:48

installing OpenFOAM-2.4.0 on HPC (RHEL6.5)
 
Hi All,

I am a new OpenFOAM user and currently study to learn build wave model by using waves2Foam and OLAFoam. And I have installed the OpenFOAM/2.4.0 in the cluster linux system, which is Red Hat Enterprise Linux Server release 6.5 (RHEL). However, when I try to install OLAFoam as a example, the terminal reports wmake error as bellow.

Code:
<command-line>:0:1: error: macro names must be identifiers linux64Gcc49DPOpt/options:6: *** missing separator. Stop. wmake error: file 'Make/linux64Gcc49DPOpt/objectFiles' could not be created olaFoam compilation failed
Additionally, I even though can not re compile a default solver (such as interFoam) by typing the wmake command, then it still has the same error as mention above.

For this issue, I think this error might cause by rule formatting in the file from linux64Gcc49 folder. So, I enclose the file: /OpenFOAM-2.4.0/wmake/rules/linux64Gcc49/general below.
Code:
CPP = cpp -traditional-cpp PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard include $(RULES)/c include $(RULES)/c++
Does anyone have a same problem with mine ?

I really look forward to having some helps from you.

Cheers!

zuodong


Hello zuodong,
i wann to install openfoam-2.4.0 on RHEL 6.5, but i am not getting the OpenFOAM-2.4.0 package for RHEL 6.5. I am new to OpenFOAM. I need help from you for installing openfoam-2.4.0 on HPC (RHEL 6.5).

cheers!
sudhakar singh

Sud09463 November 24, 2016 08:50

Hello zuodong,
i wann to install openfoam-2.4.0 on RHEL 6.5, but i am not getting the OpenFOAM-2.4.0 package for RHEL 6.5. I am new to OpenFOAM. I need help from you for installing openfoam-2.4.0 on HPC (RHEL 6.5).

cheers!
sudhakar singh

Lewis Liang November 26, 2016 11:10

Solved
 
@Bruno Santos @Pablo Thanks for your help! Now, I can install the OF2.3.0 in RHL 6.5 and successfully compile the olaFoam solver with it.

Hi!@sudhakar singh. Good to see you here since we are using the same Cluster system. As for my way to solve this problem. I have installed the Version of 2.3.0 OF in the RHL 6.5 system. Please follow the instruction step by step:
Link:https://openfoamwiki.net/index.php/I...HEL#CentOS_6.5

Please note that, to install the OF in the RHL 6.5, you need to be in the sudo list for some root behaviors. Otherwise, you have to let the system administrator to do so. Also, as for me, the cluster is not allow user to do some visual operations, i.e. I can not use the paraview to check simulation results. Therefore, I just finished all the installation until the step No.17. Also, I suggest you to install OpenFOAM in the root folder rather in your personal path. After the installation, using the bashrc file to module load the OF for your simulation.

Cheers!

Zuodong


All times are GMT -4. The time now is 14:18.