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

OpenFOAM 2.2.2 on a cluster as a job FlexLexer error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2013, 12:20
Default OpenFOAM 2.2.2 on a cluster as a job FlexLexer error
  #1
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 19
Artur will become famous soon enough
Hi Foamers!

My university just started a new cluster so the first thing I tried was compiling the new OF there. From the log in node it works without any problems. However, I don't think running such big jobs is an elegant thing to do on a login node and so I used my script I had written for the previous cluster to compile OF as a sequential job.

Here is the deal: running nodes don't have FlexLexer installed on them so to account for that I copy flex and flex++ into my own /bin directory and supply the header to OF via linking:

ln -s /home/akl1g09/include/FlexLexer.h $FOAM_SRC/OpenFOAM/lnInclude/FlexLexer.h

While it worked fine on the previous cluster on the new one I get the following error in the first lines of my log file:

Code:
flex: error writing output file lex.yy.c
I'm certain I have the correct version of the header. Is it possible that flex requires some other dependency which is missing on the running nodes?

Any advice will be appreciated

A
Artur is offline   Reply With Quote

Old   November 29, 2013, 15:05
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Artur,

OK, let's address this in parts:
  1. You mention that the nodes do not have FlexLexer... but in order to build OpenFOAM, you only need to build it in the master node (possibly the log-in node you mention) and then share or rsync the installation to all of the other slave nodes!
  2. This message:
    Code:
    flex: error writing output file lex.yy.c
    is implying that there is some sort of file writing problem, possibly related to insufficient file/folder permissions.
  3. More output from the build structure surrounding the error message above would be helpful to ascertain if that is the actual error.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 2, 2013, 05:50
Default
  #3
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 19
Artur will become famous soon enough
Hi Bruno,

Thanks for your reply. I set my script up so that it does the compilation in my home directory so that then I can just source the foam dot file from my .bash_profile when I log in (just as you say, it is enough to have the compiled source on my log in node).

When I ran it on the previous cluster just by running ./Allwmake from terminal upon ssh'ing to the server it was running painfully slowly so I wrote a script which submits the whole process as a job (not to overload the log in nodes and to be able to work while it's running).

In order to do that I had to do the flexlexer trick with copying it to my home/bin and linking the header for OF to see it. On the new cluster I did the same and I get the error listed previously, here's the surrounding bit of the log (literally very beginning):

Code:
gcc -m64  -Wall -O3   -fPIC dirToString.c -o /home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/wmake/platforms/linux64Gcc/dirToString
flex wmkdep.l
flex: fatal internal error, exec failed
flex: error writing output file lex.yy.c
make: *** [/home/akl1g09/OpenFOAM/OpenFOAM-2.2.2/wmake/platforms/linux64Gcc/wmkdep] Error 1
This does not happen when I run the process from my log in node.

All the best,

Artur
Artur is offline   Reply With Quote

Old   December 8, 2013, 14:13
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Artur,

Well, it looks like the job is not able to access the path with write capabilities, as this implies:
Quote:
Code:
flex: fatal internal error, exec failed
flex: error writing output file lex.yy.c
There might be something in the new cluster that enforces that write permission is only allowed in the dedicated parallel file-system or something similar. In other words:
  • the path to your user area might be read-only during the job;
  • or when it is not the correct binary trying to perform file writing, i.e. it is not the flex binary that was called for in the job script.
Either way, this looks like a security measure that you're stumbling on.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 8, 2013, 15:28
Default
  #5
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 372
Rep Power: 19
Artur will become famous soon enough
Hi Bruno,

Thanks for clearing this up for me. I'll just stick to compiling it from the log-in node then.

Have a nice day,

A
Artur is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Problem running perturbUCyl sen.1986 OpenFOAM 17 June 4, 2019 05:56
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 62 September 18, 2017 06:45
[swak4Foam] installing funkySetFields igo OpenFOAM Community Contributions 1 November 20, 2012 20:16
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


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