[petsc-dev] CFLAGS and COPTFLAGS

William Gropp wgropp at illinois.edu
Mon Jan 20 10:58:17 CST 2014


Ah, well this is the problem, and it is tough.  Users commonly use CFLAGS for three things:

1) Specify optimization levels.  This should not be included in any wrappers
2) Change the instruction set architecture (e.g., -m32 or -m64).  This must be included in the wrappers
3) Change the language accepted by the compiler (e.g.,, -std=gnu99).  This must be included in the wrappers

These really should be separate flags, but that's not going to happen.  This is why we originally introduced COPTFLAGS - so that those could be easily separated.  It is still a good idea, but it never caught on as standard practice.

Bill

William Gropp
Director, Parallel Computing Institute
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Thomas M. Siebel Chair in Computer Science
University of Illinois Urbana-Champaign




On Jan 18, 2014, at 9:41 AM, Jed Brown wrote:

> William Gropp <wgropp at illinois.edu> writes:
> 
>> If the MPI wrapper adds -O, its buggy.  
> 
> MPICH puts CFLAGS into the wrappers.  Since this is the standard way of
> specifying optimization when building a package, many users have
> wrappers configured this way.  MPICH must be configured using
> MPICHLIB_CFLAGS (formerly MPICH2LIB_CFLAGS) if they do not want the
> optimization to go into the wrappers.  This causes real confusion such
> as in this thread.
> 
> http://www.open-mpi.org/community/lists/users/2008/10/6924.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140120/c04acb2d/attachment.html>


More information about the petsc-dev mailing list