Registration Guide Register for HPC Access to HPCNew User Guide How to Run Batch Jobs
Portal User Guide
About the Service Subscribe to Pay-Per-Use Service Subscribe to Condominium Service Terms and ConditionsUser Guide
High Performance Workspace Service Utility Storage ServiceResearch Data Management ServiceCentre for Computational Science & Engineering
| Need help? | ||
![]() |
||
OpenMP is available on the Linux HPC clusters. To build/run your OpenMP code, please follow the details below.
- Parallelize your code using OpenMP. If you are new to OpenMP, there are some useful guides in the links below.
-
Login to the cluster head nodes (atlas4-c01, atlas5-c01, atlas6-c01 or atlas7-c01,), compile the program and link to the OpenMP libraries.
Compile C/C++ program:
Run the executable:
> icc -openmp hello.c -o hello
Compile Fortran program:
> ifort -openmp hello.f -o hello
Set the number of threads variable OMP_NUM_THREADS at command line
> export OMP_NUM_THREADS=8 (for bash shell)
> setenv OMP_NUM_THREADS 8 (for csh/tcsh shell)
or through runtime library omp_set_num_threads.
> ./hello
- For long running OpenMP jobs please submit your jobs to LSF queues.
To run jobs on atlas4, atlas5, atlas6 or atlas7 clusters, submit to the specific queue on the cluster as atlas4_parallel, atlas5_parallel, atlas6_parallel and atlas7_parallel queue (or atlas4_parallel_test and atlas5_parallel_test etc for testing only).
> bsub –q openmp -o stdout.o ./hello
> bsub –q atlas7_parallel -o stdout.o ./hello
Alternate, you can submit the job to queue “openmp”, using a maximum of 8 threads.
- Some useful websites for OpenMP:
http://www.openmp.org
http://en.wikipedia.org/wiki/OpenMP
http://www.msi.umn.edu/tutorial/scicomp/general/openMP/content_openMP.html
http://www.llnl.gov/computing/tutorials/openMP/
http://www.llnl.gov/computing/tutorials/openMP/exercise.html
![]()
Last Modified on Feb 2013. Copyright - All Rights Reserved.
