Welcome, Guest
Username: Password: Remember me

TOPIC: V8p1 pre compilation - config.py error

V8p1 pre compilation - config.py error 3 years 10 months ago #37446

  • Kurum
  • Kurum's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 2
Hi,
I have the following setup and trying to compile Telemac v8p1
GNU Fortran (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0
gcc (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0
g++ (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0
openmpi-4.1.0
python 3.8

after source'ing pysource.sh with no problems, I am getting the following error after
source ./v8p1/scripts/python3/config.py
@author TELEMAC-MASCARET Consortium

   @brief display configuration information
: command not found
import-im6.q16: unable to open X server `' @ error/import.c/ImportImageCommand/358.
from: can't read /var/mail/os
from: can't read /var/mail/argparse
from: can't read /var/mail/utils.messages
from: can't read /var/mail/configuration.cfg
-bash: ./v8p1/scripts/python3/config.py: line 16: syntax error near unexpected token `('
-bash: ./v8p1/scripts/python3/config.py: line 16: `CFGS = Config()'

I'd appreciate any feedback on what to try here
Cheers
The administrator has disabled public write access.

V8p1 pre compilation - config.py error 3 years 10 months ago #37448

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello,

In your error message, the line:
: command not found
is suspicious.

Do you have any : command in one of the scripts you use?
Perhaps a problem with a path?

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

V8p1 pre compilation - config.py error 3 years 10 months ago #37450

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello again,

As you have not compiled yet, please use the latest release v8p2r0 as it is advised.

Chi-Tuan
The administrator has disabled public write access.

V8p1 pre compilation - config.py error 3 years 10 months ago #37454

  • Kurum
  • Kurum's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 2
Hi Chi-Tuan,

thanks for looking into this.

I am not sure what's wrong. Here are the first 30 lines of config.py in the ~/v8p1/scripts/python3/ folder
"""@author TELEMAC-MASCARET Consortium

   @brief display configuration information
"""
# _____          ___________________________________________________
# ____/ Imports /__________________________________________________/
#
# ~~> dependencies towards standard python
import sys
from os import path, environ
from argparse import ArgumentParser
from utils.messages import svn_banner
from configuration.cfg import Config

CFGS = Config()
# ______                  _________________________________________
# ____/ Global Variables /_________________________________________/
#
"""
     Contains the entire configuration tree for all user configurations.
     By default the name is systel.cfg stored locally
"""
def add_config_argument(parser):
    """
    Adding to a parser the option for configuration

    @param parser (ArgumentParser) Parser to update

    @return (ArgumentParser) The udpated parser
    """

I have a modified subroutine that is already implemented into v8p1 and it was compiled on a HPC machine without problems. I will upgrade to the latest (v8p2r0) when I can but for now I need to solve this issue for v8p1.

Cheers
The administrator has disabled public write access.

V8p1 pre compilation - config.py error 3 years 10 months ago #37456

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello again,

Rather than running
source ./v8p1/scripts/python3/config.py
can you only run
./v8p1/scripts/python3/config.py
without source before?

It works for me.

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Kurum

V8p1 pre compilation - config.py error 3 years 10 months ago #37543

  • Kurum
  • Kurum's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 23
  • Thank you received: 2
This totally worked, Thank you Chi-Tuan.
pham wrote:
Hello again,

Rather than running
source ./v8p1/scripts/python3/config.py
can you only run
./v8p1/scripts/python3/config.py
without source before?

It works for me.

Chi-Tuan
The administrator has disabled public write access.
Moderators: borisb

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