Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

[37876]$(u'lfs setstripe -c 12 /home/user') #634

Open
guoqiangzh001 opened this issue May 3, 2018 · 3 comments
Open

[37876]$(u'lfs setstripe -c 12 /home/user') #634

guoqiangzh001 opened this issue May 3, 2018 · 3 comments
Assignees

Comments

@guoqiangzh001
Copy link

I followed the quick start at [http://pb-falcon.readthedocs.io/en/latest/quick_start.html#] and it says:
FALCON & FALCON_unzip have been successfully installed into a virtualenv.
To activate the FALCON_unzip environment:
$ source /myPATH/FALCON-unzip/fc_env_180503/bin/activate

However, when I activate the FALCON_unzip environment and type the command fc_run, the following error appears:
[37876]$(u'lfs setstripe -c 12 /home/user')
sh: lfs: command not found
[37876]WARNING: Call u'lfs setstripe -c 12 /home/user' returned 32512.
usage: fc_run [-h] config [logger]
fc_run: error: too few argument

@rob123king
Copy link

I had that but didn't seem to impact upon running the jobs, successfully.

@peterjc
Copy link

peterjc commented May 30, 2018

I was about to report this as well, trying FALCON from git on a system which does not use Lustre (lfs = Lustre File System):

$ fc_run.py -h
pypeflow 2.0.2
[3159]$('lfs setstripe -c 12 /mnt/shared/users/xxx')
sh: lfs: command not found
[3159]WARNING: Call 'lfs setstripe -c 12 /mnt/shared/users/xxx' returned 32512.
usage: fc_run.py [-h] config [logger]

positional arguments:
  config      .cfg/.ini/.json
  logger      (Optional)JSON config for standard Python logging module

optional arguments:
  -h, --help  show this help message and exit

The problem code is here:

https://github.com/PacificBiosciences/FALCON/blob/master/falcon_kit/util/system.py#L45

def lfs_setstripe_maybe(path='.', stripe=12):
    path = os.path.abspath(path)
    cmd = 'lfs setstripe -c {:d} {!s}'.format(stripe, path)
    try:
        capture(cmd)
        log.info('Lustre filesystem detected. This lfs stripe ({}) should propagate to subdirs of {!r}.'.format(
            stripe, path))
    except Exception as exc:
        log.info('Apparently {!r} is not in lustre filesystem, which is fine.'.format(
            path))

That in turn calls this pypeFLOW function:

def capture(cmd):
    """Return stdout, fully captured.
    Wait for subproc to finish.
    Raise if empty.
    Raise on non-zero exit-code.
    """
    import subprocess
    LOG.info('$ {} >'.format(cmd))
    output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
    if not output:
        msg = '{!r} failed to produce any output.'.format(cmd)
        LOG.warning(msg)
    return output

This has no option to hide or capture the stderr (which subprocess.check_output could do), which is why it appears on the terminal even though in the context this is harmless.

Should we open an issue on pypeFLOW to enhance the capture function?

@pb-cdunn
Copy link

Sorry about the annoying stderr. But it's important internally. We have had trouble when running on Lustre File System without setting the "striping". So we always test for lustre, and if detected, we set the "stripe" to somehing reasonable.

SInce it's an old problem, we can probably capture stderr safely now. We'll make that change fairly soon...

@pb-cdunn pb-cdunn self-assigned this Jun 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants