Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: global name 'parser' is not defined

global name 'parser' is not defined 11 years 3 months ago #9966

  • dsc1r12
  • dsc1r12's Avatar
Hi,

I am trying to install the parallel version of telemac on Windows. I have downloaded MPICH2 and the METIS library and updated the path to include the mpi. I have changed the module in systel.cfg to wintelmpi. I then defined the number of parallel processors to 2 in the steering file to test the installation but when I run the code the following error appears which I do not understand...


... parsing configuration file: c:\opentelemac\v6p2r2\config\systel.cfg
Traceback (most recent call last):
File "C:\opentelemac\v6p2r2\pytel\runcode.py", line 963, in <module>
cfgs = parseConfigFile(options.configFile)
File "C:\opentelemac\v6p2r2\pytel\config.py", line 189, in parseConfigFile
configDict = getConfigs(file)
File "C:\opentelemac\v6p2r2\pytel\config.py", line 165, in getConfigs
parser.error("Could not access required parameters in config file")
NameError: global name 'parser' is not defined

Any help would be greatly appreciated.

Cheers

Danny
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9968

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

Can you share your config file with us ?
You may have forgotten ":" between keys and values, or you may have have forgotten to update configs at the top.

Thanks,
Sébastien.
PS: Can you update your profile under "COMMUNITY"
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9970

  • dsc1r12
  • dsc1r12's Avatar
Hi Sebastian,

I have attached the config file below...

I'll update my profile now.

Thanks for your help

Danny
Attachments:
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9972

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Indeed, you need to set
configs: wintelmpi
at the top of your file.

Also, you can comment all three lines with par_cmdexec (add "#" as first character of the line).

The rest looks OK, although you may wish to replace
cmd_exe: xilink.exe ...
by:
cmd_exe: mpif90.exe ...
if you can find it under your mpi install.

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

global name 'parser' is not defined 11 years 3 months ago #9982

  • dsc1r12
  • dsc1r12's Avatar
I changed the configs to configmpi and commented out the 3 par lines, however I still get the same error message when I try to run the model as below:

... parsing configuration file: c:\opentelemac\v6p2r2\config\systel.cfg
Traceback (most recent call last):
File "C:\opentelemac\v6p2r2\pytel\runcode.py", line 963, in <module>
cfgs = parseConfigFile(options.configFile)
File "C:\opentelemac\v6p2r2\pytel\config.py", line 189, in parseConfigFile
configDict = getConfigs(file)
File "C:\opentelemac\v6p2r2\pytel\config.py", line 165, in getConfigs
parser.error("Could not access required parameters in config file")
NameError: global name 'parser' is not defined


Im not sure what you mean by your last suggestion; to replace cmd_exe: xilink.exe ... by cmd_exe: mpif90.exe ... if I can find the mpi install. Any further detail on this may help.

Cheers

Danny
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9988

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
OK -- I overlooked you cfg file.

You also need to comment the lines below as follows (you have no comment at present):

# also possible val_root: <root>\..\validation
val_root: <modpath>\validation
# also possible val_rank: all
val_rank: 0
#<3 >7 6

This should fix your problem.

Sebastien.
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9990

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
I did not find mpif90 under my install of MPICH2 on Windows. I must have been confused with Linux or gfortran Windows.

You configuration should now be OK.

Sebastien.
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9992

  • dsc1r12
  • dsc1r12's Avatar
Ok it seems we are almost there, but now I get the error message:

... reading module dictionary
... running in English with Steering50.txt
re-writing: C:\opentelemac\Oceans\Steering50.txt_2013-08-13-14h59min14s\T2DCAS

copying: dragfo2.f C:\opentelemac\Oceans\Steering50.txt_2013-08-13-14h59min
14s\t2dfort.f
copying: boundaryconditions.cli C:\opentelemac\Oceans\Steering50.txt_2013-0
8-13-14h59min14s\T2DCLI
copying: geometry.slf C:\opentelemac\Oceans\Steering50.txt_2013-08-13-14h59
min14s\T2DGEO
copying: telemac2dv6p2.dico C:\opentelemac\Oceans\Steering50.txt_2013-08-13
-14h59min14s\T2DDICO
_____________
runcode::main:
C:\opentelemac\Oceans:
|runCAS:
|Not able to find your OBJECT command line: wintelmpi\telemac2dv6p2.cmdo
|
| ... you have to compile this module at least: telemac2d
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9993

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Almost there.

Indeed, as you have defined a new configuration (wintelmpi), you need to recompile the system for that new configuration. Just type:

compileTELEMAC.py

And it should all be ready for you to use after that.

Sebastien.
The administrator has disabled public write access.

global name 'parser' is not defined 11 years 3 months ago #9994

  • dsc1r12
  • dsc1r12's Avatar
Ah ok, I did this but then get the following when compliling :



Building the who calls who tree for GREDELMET_AUTOP and dependents
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

xilib: executing 'lib'
- created C:\opentelemac\v6p2r2\parallel\parallel_v6p2\wintelmpi\parallelv6p2
.lib
ipo: error #11018: Cannot open C:\opentelemac\mpi\lib\fmpich2.lib
ipo: error #11018: Cannot open C:\opentelemac\lib\libmetis.lib
xilink: executing 'link'
LINK : fatal error LNK1181: cannot open input file 'C:\opentelemac\mpi\lib\fmpic
h2.lib'
... The following command failed for the reason above
xilink.exe /nologo /subsystem:console /stack:536870912 /nodefaultlib:libc.lib /o
ut:C:\opentelemac\v6p2r2\parallel\parallel_v6p2\wintelmpi\gredelmet_autop.exe gr
edelmet_autop.obj C:\opentelemac\mpi\lib\fmpich2.lib C:\opentelemac\lib\libmeti
s.lib
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: borisb

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