deallocate(b) deallocate(c) call blacs_gridexit(icontxt) call blacs_exit(0) end Example 7-8 on page 182 explicitly states that you should use two GPUs per MPI task. To  change this configuration, change the following lines: ngpus = 1  ids(1) = mod(iam,4) to the following lines: ngpus = 2 ids(1) = mod(iam,2)*2 ids(2) = mod(iam,2)*2 + 1 The IBM Parallel ESSL subroutines can be called from 64-bit-environment application  programs, which are written in Fortran, C, and C++. Compilation commands of source code  for different types of IBM Parallel ESSL libraries (SMP and SMP CUDA) that use MPICH  libraries are described in Table 7-12, Table 7-13 on page 187, Table 7-14 on page 187,  Table 7-15 on page 188, and Table 7-16 on page 188. You do not need to modify your Fortran compilation procedures when IBM Parallel ESSL for  Linux is used. When linking and running your program, you must modify your job procedures  to set up the necessary libraries. If you are accessing IBM Parallel ESSL for Linux from a  Fortran program, you can compile and link by running the commands that are listed in  Table 7-12. 186  IBM High-Performance Computing Insights with IBM Power System AC922 Clustered Solution  Table 7-12 Fortran compilation commands for IBM Parallel ESSL by using IBM Spectrum MPI libraries Type of IBM Parallel ESSL  library Compilation command 64-bit SMP mpifort -O program.f -lesslsmp -lpesslsmp -lblacssmp  -lxlsmp 64-bit SMP CUDA mpifort -O xyz.f -lesslsmpcuda -lpesslsmp -lblacssmp  -lxlsmp -lcublas -lcudart -L/usr/local/cuda/lib64  -R/usr/local/cuda/lib64 7.4.3 Compilation