#!/usr/bin/env python
#
# See top-level LICENSE.rst file for Copyright information
#
# -*- coding: utf-8 -*-

"""
This script computes the PSF with SpecEX using MPI.
"""

import desispec.scripts.specex as specex
import sys
from desispec.parallel import use_mpi

comm = None
rank = 0
nproc = 1
if use_mpi():
    from mpi4py import MPI
    comm = MPI.COMM_WORLD
    rank = comm.rank
    nproc = comm.size
else:
    print("mpi4py not found, using only one process")

if __name__ == '__main__':
    args = specex.parse()
    sys.exit(specex.main(args, comm=comm))

2ab903ba9decc9324fead9e94675ab82cd2bb533
<mask token>

<mask token>
if use_mpi():
    from mpi4py import MPI
    comm = MPI.COMM_WORLD
    rank = comm.rank
    nproc = comm.size
else:
    print('mpi4py not found, using only one process')
if __name__ == '__main__':
    args = specex.parse()
    sys.exit(specex.main(args, comm=comm))

<mask token>
comm = None
rank = 0
nproc = 1
if use_mpi():
    from mpi4py import MPI
    comm = MPI.COMM_WORLD
    rank = comm.rank
    nproc = comm.size
else:
    print('mpi4py not found, using only one process')
if __name__ == '__main__':
    args = specex.parse()
    sys.exit(specex.main(args, comm=comm))

<mask token>
import desispec.scripts.specex as specex
import sys
from desispec.parallel import use_mpi
comm = None
rank = 0
nproc = 1
if use_mpi():
    from mpi4py import MPI
    comm = MPI.COMM_WORLD
    rank = comm.rank
    nproc = comm.size
else:
    print('mpi4py not found, using only one process')
if __name__ == '__main__':
    args = specex.parse()
    sys.exit(specex.main(args, comm=comm))

#!/usr/bin/env python
#
# See top-level LICENSE.rst file for Copyright information
#
# -*- coding: utf-8 -*-

"""
This script computes the PSF with SpecEX using MPI.
"""

import desispec.scripts.specex as specex
import sys
from desispec.parallel import use_mpi

comm = None
rank = 0
nproc = 1
if use_mpi():
    from mpi4py import MPI
    comm = MPI.COMM_WORLD
    rank = comm.rank
    nproc = comm.size
else:
    print("mpi4py not found, using only one process")

if __name__ == '__main__':
    args = specex.parse()
    sys.exit(specex.main(args, comm=comm))
