[CSC 435] Filename Extensions and MPI Compilation

Andrew J. Pounds pounds_aj at mercer.edu
Wed Apr 1 17:49:24 EDT 2020


BE VERY CAREFUL with your file name extensions for C, C++, and Fortran. 
mpicc can ONLY be use to compile .c files.   Here are the rules - and my
characterization of the languages.

BTW -- C++ in MPI is "kinda new".   I wrote my first ever MPI C++
programs in 2012.  I'll show it to you all at some point.


*.c    <--  straight C (a hot rod with no doors,  seatbelts, or a roll bar)

compile with mpicc


*.cc   <--  C++ ( a sportscar with a trailer hitch -- towing a of bunch
of libraries)

(other c++ exentsions are .CC, .cxx, etc.)

compile these with mpiCC, mpic++, mpicxx


*.f <-- Fortran ( a monster truck -- extremely powerful, but you might
get dirty using it)

(other fortran extensions are also accepted)

compile ALL fortran with mpifort

-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Director of the Computational Science Program
Mercer University,  Macon, GA 31207   (478) 301-5627

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20200401/6a6f219c/attachment.html>


More information about the csc435 mailing list