Skip navigation links
Friday, January 4th 2013 11:25:01 PM PST
This page shows simple examples of how to compile codes for the Tritan Resource. There is a C example and an equivalent Fortran example.
Note: The Triton Resource is now running in full production. The Triton Compute Cluster (TCC) and Petascale Data Analysis Facility (PDAF) are available to anyone with a TAPP account as of October 5, 2009.
The trial account phase of Triton Resource will be discontinued after January 31, 2013. Please refer to the Research Cyberinfrastructure website for information regarding possible startup opportunities for research computing at UCSD and SDSC.
TAPP, the Triton Affiliates and Partners Program, is the prescribed way to manage your access.
Triton staff maintain a Discussion List to which all Triton users are encouraged to subscribe. Members can post questions and comments to Triton Discussion List (triton-discuss@sdsc.edu) to obtain help and support for issues and community feedback.
The default compiler/mpi stack combination is the Portland compiler (pgf90, pgf77, pgcc, pgCC) and openmpi. Other compilers and mpi variants may be accessed by loading the appropriate modules. The commands mpicc, mpiCC, mpif77, mpif90 will access a particular compiler/mpi combination based on the module choices. Read about modules to learn how Triton Resource manages compiler configurations.
A simple MPI C program is given below (mpi_c.c):
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
main(int argc,char *argv[])
{
int myproc,numproc;
MPI_Status status;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myproc);
MPI_Comm_size(MPI_COMM_WORLD,&numproc);
if(myproc == 0)
printf("NUMPROC %d\n",numproc);
printf("Process %d\n running",myproc);
MPI_Finalize();
}
This program can be compiled with the following command
mpicc -o mpi_c mpic.cThe program will print the total number of MPI processes initiated and a message printed by each process (see Submitting a job)
Following is the Fortran equivalent of the above program (mpi_f.f):
program mpi implicit double precision (a-h,o-z) include "mpif.h" call mpi_init(ierror) call mpi_comm_rank(MPI_COMM_WORLD,myproc,ierror) call mpi_comm_size(MPI_COMM_WORLD,numproc,ierror) if(myproc.eq.0) write(6,*) 'NUMPROC ',numproc write(6,*) 'Process ',myproc,' running' call mpi_finalize(); end
and can be compiled as follows :
mpif77 -o mpi_f mpi_f.fMore information about compiling can be found on the Compiler Jobs page.
Open a Ticket with Triton Resource Support using the Support Ticket Form.
Join the Discussion Forum Sign up for our Email Discussion List.
FAQ Read the FAQ Page.
