CPU and GPU Job Submission Scripts
CPU and GPU Job Submission Scripts
The 'aprun' command is used to launch the application across multiple compute nodes, specifying how many tasks to run (`-n 80`) and how many tasks per node (`-N 40`). Its significance lies in its ability to efficiently distribute computational work, essential for parallel processing in high-performance computing environments .
The 'qsub' command submits jobs to the PBS queue. It is responsible for setting up the job according to specified resources, queue priorities, and environment configurations, ensuring proper execution in PBS-managed clusters .
The 'scatter' place directive in the PBS script is used to distribute the job's tasks across different compute nodes to optimize resource usage and minimize contention. This ensures each task runs on a separate node, leveraging distributed computing efficiently .
In the PBS script for CPU nodes, the resource allocation directive is specified as `#PBS -l select=2:ncpus=40:vntype=cray_compute`, indicating the job will use 2 compute nodes each with 40 CPUs. In contrast, for CPU+GPU nodes, the directive is specified as `#PBS -l select=2:ncpus=1:accelerator=True:vntype=cray_compute`, which suggests that the job will use 2 nodes with 1 CPU per node and GPU accelerators enabled .
For CPU nodes, the NAMD job uses the executable located at `/home/apps/namd/2.12/intel/18.0.1/CRAY-XC-intel/namd2` with all tasks running on CPUs specified with `-n 80 -N 40`. In contrast, the CPU+GPU nodes use a GPU-capable executable at `/home/apps/namd/2.12/gpu/8.0/CRAY-XC.cuda.arch/namd2`, indicating it leverages GPU resources for computation .
The different environment modules loaded (`namd/2.12/intel-18.0.1` for CPU and `namd/2.12/gpu-8.0` for CPU+GPU) suggest that the underlying software optimizations differ based on the computational resources available. The CPU version is likely optimized for Intel's architecture, while the GPU version is adapted to utilize CUDA cores, thereby exploiting GPU parallelism .
The PBS script uses the directive `#PBS -V` to import the user's current environment variables into the job's runtime environment. This maintains consistency across compute nodes, ensuring that all necessary variables are correctly set .
Running NAMD simulations on CPU+GPU nodes can significantly enhance performance due to the GPUs' ability to handle parallel tasks concurrently, which is especially beneficial for molecular dynamics. CPUs, while versatile, cannot match the parallel processing power of modern GPUs, potentially resulting in slower overall execution times .
Logging information, such as job execution details and environment variables (e.g., `PBS_JOBID`, `PBS_O_WORKDIR`), helps track job performance and monitor resources. This can be crucial for debugging and optimizing job submissions over distributed computing environments .
Creating a symlink for the NAMD executable in the run directory (using `ln -s`) simplifies the invocation of the executable, allowing for easier management of the file structure and portability across different run environments. This approach avoids multiple copies of the large executable across directories .