-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Zach,

> How do you control whether PyFR runs entirely on CPUs or GPUs?
> What if you want to run using both? By specifying options within 
> [backend-openmp] that point to a compiler and libraries other than 
> nvcc and cuBlAS or NVBLAS, respectively, are you directing PyFR to 
> run the simulation entirely on CPUs?

This is controlled by the '-b' (backend) switch to pyfr-sim.  Passing
'-bcuda' will instruct PyFR to use the CUDA backend.  If, instead, one
passes '-bopenmp' then PyFR will use the C/OpenMP backend which
targets CPUs.  The [backend-openmp] section of the configuration file
only affects the workings of the C/OpenMP backend.

Heterogeneous runs are a little bit trickier.  Firstly, you will want
to be using either MVAPICH2 or OpenMPI.  Second, you need to suitably
partition your mesh such that the partition sizes are commensurate
with the relative speeds of the platforms you are running on.
Thirdly, you need to get mpirun to execute a script which looks at the
MPI rank ($OMPI_COMM_WORLD_RANK for OpenMPI) and uses this to decide
if to execute:

    pyfr-sim -bcuda ...

or

    pyfr-sim -bopenmp ...

It works, but I'll agree it is complicated.  The idea of
simultaneously using CPUs and GPUs to solve the same problem (as
opposed to different problems -- which is what most heterogeneous
codes currently do) is still quite young.  As such the support
infrastructure really isn't there (MPI libraries doing 'the wrong
thing'; pinning is especially painful when undertaking such simulations).

> Also, in the latest changes merged into master, how do you point
> to your metis installation? I've taken a first attempt to partition
> a mesh with:
> 
> pyfr-mesh partition -p metis 4 naca_0012_2d.pyfrm .

This appears to imply that metis (version 5 built as a shared library)
can not be found by the dynamic linker.  Find the libmetis.so file and
add the directory to LD_LIBRARY_PATH.

Regards, Freddie.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlOjICUACgkQ/J9EM/uoqVfOVwCgkHvMm0iLtB612nZTFaXUkipV
hoIAn3wJNNOIk78DPkQgP0YtjS/EVRWs
=NVoC
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups "PyFR 
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at http://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.

Reply via email to