CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 Display Modes
Old   November 28, 2013, 13: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: 226
Rep Power: 6
Artur is on a distinguished road
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, 16:05
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 06:50
Default
  #3
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
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, 15:13
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,507
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 16:28
Default
  #5
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 226
Rep Power: 6
Artur is on a distinguished road
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 58 November 12, 2014 14:51
installing funkySetFields igo OpenFOAM 1 November 20, 2012 21:16
Problem running perturbUCyl sen.1986 OpenFOAM 14 March 23, 2012 05:12
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 16:16


All times are GMT -4. The time now is 02:00.