![]() |
![]() |
||||
![]() |
![]() |
![]() |
![]() |
||
|
Hydra - Compiling programs The following compilers are provided on Hydra. They should all be accessible, with the default path provided once a choice has been made for the $COMPILER environment variable in your .cshrc.hydra file. If you are unsure about how do do this, refer to the Getting Started section of this User Guide.
NOTE: You may find that some programs will only compile, or will run faster, using certain compilers, so you may want to try them all. Check the man pages and the Documentation section of this User Guide for details on usage and options for each compiler. MPI Programs MPI programs can be compiled using mpicc (for C programs), mpiCC (C++), mpif77 (Fortran 77) or mpif90 (Fortran 90). This uses the underlying Compiler Suite that has been set to the $COMPILER environment variable in your .cshrc.hydra file. This could be one of gnu|pgi|intel and will have also set the $MPICHDIR environment variable and the appropriate MPI include ($MPICHINCDIR) and library ($MPICHLIBDIR) directory environment variables. NOTE: You will also need to set the $MPICH environment variable to either myrinet|ethernet in your .cshrc.hydra file to indicate which type of network communication you will be using. Use the which command to check you are getting the right version of the MPI compilers. For example, when using the Intel compiler Suite: which mpicc should return /opt/shared/mpich-gm/1.2.6..14a-intel/bin/mpicc NOTE: You can also use the C and Fortran compilers directly and just link in the MPI libraries compiled with the Intel compiler, for example: icc -I$MPICHINCDIR -L$MPICHLIBDIR -o MyMpiProgram MyMpiProgram.c -lm -lmpich -lgm -lpthread High Performance Fortran Programs HPF programs can be compiled using the Portland Group High Performance Fortran compiler pghpf, so you should make sure that you have set COMPILER pgi in your .cshrc.hydra file. When compiling to run a program over Myrinet you should:
For example: pghpf -Mmpi -L$MPICHLIBDIR -o MyHPFProgram MyHPFProgram.f -lgm -lpthread OpenMP Programs OpenMP directives for shared memory parallel programming are supported by the Portland Group and Intel compilers, however these will only be able to run on a single node of Hydra (i.e. 2 processors). General Tips and Information
|
| SAPAC SITE MAP |