Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleray-multinode.sge
#$ -N ray-multinode
#$ -q p28.q
#$ -pe *mpi 14
#$ -cwd

module load ray/1.10.0

ray_isabella_start.sh

python cluster_test.py


Code Block
titlecluster_test.py
import ray

ray.init(address='auto')
                                                                                                                                                            
print('''This cluster consists of
    {} nodes in total
    {} CPU resources in total
'''.format(len(ray.nodes()), ray.cluster_resources()['CPU']))



Warning
titleVažno

Prije pozivanja vaše Python skripte, obavezno je u skriptama za opis posla prvo pozvati skriptu ray_isabella_start.sh kako je navedeno u primjeru.

...