Chapter 2. Application integration 145Job Command File for OpenMP jobFigure 2-20 shows a sample job command file for an OpenMP job. This job is requesting fourseparate cores on four CPUs. You set the number of threads for the OpenMP job by usingparallel_threads and OMP_NUM_THREADS environment variable.Figure 2-20 Job Command File for OpenMP jobJob Command File for MPI jobFigure 2-21 shows a sample job command file for an MPI job. This job is requesting fourCPUs on four separate cores. The export of OMP_NUM_THREADS andMEMORY_AFFINITY is not needed.Figure 2-21 Job Command File for an MPI job#!/bin/ksh# @ job_name = myjob.openmp# @ job_type = parallel# @ class = X_Class# @ output = $(job_name).out# @ error = $(job_name).err# @ task_affinity = core(4)# @ cpus_per_core = 1# @ parallel_threads = 4# @ queueexport OMP_NUM_THREADS=4export MEMORY_AFFINITY=MCM./openmp.exe#!/bin/ksh# @ job_name = myjob.mpi# @ job_type = parallel# @ class = X_Class# @ output = $(job_name).out# @ error = $(job_name).err# @ env_copy = all# @ bulkxfer = yes# @ network.MPI = sn_all,shared,US,,4# @ rset = RSET_MCM_AFFINITY# @ mcm_affinity_options = mcm_mem_req mcm_distribute mcm_sni_none# @ task_affinity=core# @ cpus_per_core=1# @ node = 2# @ tasks_per_node = 32# @ collective_groups = 64# @ queueexport MP_LABELIO=yesexport LANG=en_USexport MP_SHARED_MEMORY=yesexport MP_SINGLE_THREAD=yesexport MP_DEVTYPE=hfiexport MP_USE_BULK_XFER=yesexport MP_RDMA_ROUTE_MODE="hw_indirect"export MP_FIFO_ROUTE_MODE="hw_indirect"poe ./mpi.exe