Welcome, Guest
Username: Password: Remember me

TOPIC: parser error during the installation

parser error during the installation 10 years 7 months ago #12500

  • sashagrm23
  • sashagrm23's Avatar
Hi Telemac users!

It's my first time that I'm writing to this forum and I'm doing, because I would like to use the Telemac system in parallel. I don't have any experience with this system.
In order to use Telemac, I have tried to compile the system, using the python process. I have python and gfortran in my pc (with Ubuntu 12.04 LTS), I compiled the metis libraries with success and I got the file libmetis.a. I have followed carefully each step of the compile process with python. I set my PATH and SYSTELCFG variables. I did the necessary changes in the config file.
But, when I try to compile the system, I get this message:
gar@glinux:~$ compileTELEMAC.py


Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... parsing configuration file: /home/gar/telemac_pa/v6p3r2/configs/systel.cis-ubuntugrm.cfg
Traceback (most recent call last):
  File "/home/gar/telemac_pa/v6p3r2/scripts/python27/compileTELEMAC.py", line 506, in <module>
    cfgs = parseConfigFile(options.configFile,options.configName)
  File "/home/gar/telemac_pa/v6p3r2/scripts/python27/config.py", line 238, in parseConfigFile
    generalDict,configDict = getConfigs(file,name,bypass)
  File "/home/gar/telemac_pa/v6p3r2/scripts/python27/config.py", line 191, in getConfigs
    parser.error("Could not access required parameters in config file")
NameError: global name 'parser' is not defined

What am I doing wrong? May anyone give me some idea how to compile Telemac system in parallel?

Thank you.

Kind Regards.
Attachments:
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12572

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

version: should be v6p3 (not v6p3r2)

We understand it could be confusing and we will try to upgrade that part.

Hope this helps,
Sébastien.
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12591

  • sashagrm23
  • sashagrm23's Avatar
Hi Sébastien,

thank you for replying my last post.

Sébastien, in my .cfg file, I modified the line in which I declare the Telemac system version and I wrote:
version: v6p3
as you said it.

I got the same error messages (that I published in the first message of this thread) when I tried to compile the Telemac system, again.

What could it be the problem?

King Regards.

Gabriel.
Attachments:
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12598

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

what version of Python are you using ?

can you make sure you have at least 2.7.2, (ideally 2.7.6)

Thanks.
Sébastien.
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12600

  • sashagrm23
  • sashagrm23's Avatar
Hi Sébastien,
thank you for replying my posts.

I'm using the python version: 2.7.3,
mpiexec: 1.4.3,
gfortran(gcc): 4.6.3.

I did a little test and I tried to install the Telemac system in serial mode. I had a successful compilation and installation process, even I have run some test cases and I didn't have any problem.
In order to compile in serial mode, my configuration file has these lines:
# _____                              _______________________________
# ____/ TELEMAC Project Definitions /______________________________/
#
[Configurations]
configs:    ubugfortrans
[general]
root:       /home/gar/telemac_se/v6p3r2
version:    v6p3r2
language:   2
modules:    update system -dredgesim
options:
#
mods_all:   -I <config>
#
sfx_zip:    .gztar
sfx_lib:    .a
sfx_obj:    .o
sfx_mod:    .mod
sfx_exe:
#
val_root:   <root>/examples
val_rank:   all
# also possible val_rank:   <3 >7 6
# _____                         ____________________________________
# ____/ Ubuntu gfortran scalar /___________________________________/
[ubugfortrans]
#
cmd_obj:    gfortran -c -O3 -fconvert=big-endian -frecord-marker=4 <mods> <incs> <f95name>
cmd_lib:    ar cru <libname> <objs>
cmd_exe:    gfortran -fconvert=big-endian -frecord-marker=4 -v -o <exename> <objs> <libs>

If I have been able to compile Telemac system in serial mode, I believe that my python and gfortran versions are right. About mpi libraries, I have done some test cases and I have not had problems with mpi.

Even, as you can see... using in line:
version: v6p3r2
I could compile the system.


Kind Regards.

Gabriel.
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12601

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
So your system works well / is well setup.

(I forgot that the latest python scripts ignore the version number since the source code is now only defined by the root, whatever version that source code is).

Can you try something for me:
-- just use config.py (instead of compileTELEMAC.py) to test the cfg file
-- can you rename your config file systel.cfg
-- can leave it with original name but use the option -f

... en let me know the outcomes ...

Thanks.
Sébastien
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12624

  • sashagrm23
  • sashagrm23's Avatar
Hi Sébastien,
thanks for your support.

Following your last post, I did the first test recommendation: using my cfg file, I compiled with config.py and I got this message:
config.py:error: Could not access required parameters in config file

Later of this failed test, I followed the next of your suggestion, I renamed my cfg.file. I updgraded my environmental variable SYSTELCFG with the new name and I tried to compile with config.py. I got the same message which said could not access required parameters in config file.

Again, I renamed my cfg file, but now with the original name (SYSTELCFG was upgraded, again) and I tried to use config.py with -f parameter and the name of cfg file.
The same error message.

What could it happen with my configuration file?

Kind Regards.
Gabriel.
The administrator has disabled public write access.

parser error during the installation 10 years 7 months ago #12628

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello,

I have looked at your latest config and cannot find the error. If I execute config.py on it, it works.

However, I also tried your previous config file (the one you attached: systel.cis...ugrm.cfg) and this one fails because you have a line the parser does not understands (the middle one):
# _____                         ____________________________________
_____                          ___________________________________
# ____/ Ubuntu gfortran openMPI /__________________________________/

Try to look for these. In the meantime I will change the error message so it report a better / more instructive error message ...

Thank you for pointing this out.

Hope this helps,
Sebastien.
The administrator has disabled public write access.
The following user(s) said Thank You: sashagrm23

parser error during the installation 10 years 7 months ago #12633

  • sashagrm23
  • sashagrm23's Avatar
Hi Sébastien.

I followed your last suggestion and finally, I could compile the Telemac system in parallel mode.

I really appreciate your support, posts and the time that you used to help me.

Thank you, so much.

Kind regards.

Gabriel.
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.