charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Eric Bohm <ebohm AT illinois.edu>
- To: <charm AT lists.cs.illinois.edu>
- Subject: Re: [charm] [AMPI] C++ comments in C code
- Date: Thu, 25 Feb 2016 11:03:17 -0600
Thanks Jeff,
The issue of not being C89 compliant is wider than your AMPI use case, so we'll get those headers revised. Please, see https://charm.cs.illinois.edu/redmine/issues/990 for followup. On 02/24/2016 04:08 PM, Jeff Hammond wrote: It is perfectly valid if I need to link with C++
compiler or explicitly add the C++ runtime library to get the
code to link, since AMPI sits on top of C++ code. Maybe the
ampicc script can have an option specifically for linking that
adds the C++ library or uses the C++ compiler (the former is
preferred, although the latter is easier).
Thanks, Jeff
On Wed, Feb 24, 2016 at 4:04 PM, Phil
Miller <mille121 AT illinois.edu>
wrote:
On Wed, Feb 24, 2016 at 3:57
PM, Jeff Hammond <jeff.science AT gmail.com>
wrote:
I compile my C89 code with C89 flags
because I want the compiler to complain when I
don't follow that spec. Unfortunately, it
seems that AMPI forces me to compile in C++
mode, both because the config header uses C++
style comments and because ampicc seems to act
as a C++ compiler instead of a C one.
I got it working by hacking the header and
compilers tolerate improper -std options, this
isn't critical. Perhaps this is documented
and my complaint should be resolved as
WONTFIX_JEFF_NEEDS_TO_RTFM.
Nah, it's a reasonable couple of complaints. We
should get those fixed.
Thanks,
Jeff
================================================================
/opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= branch-ampi.c func.o -o branch-ampi In file included from /opt/charm/charm-6.7.0/multicore-linux64/bin/../include/conv-config.h:16:0, from /opt/charm/charm-6.7.0/multicore-linux64/bin/../include/mpi.h:4, from prk_mpi_util.h:36, from branch-ampi.c:120: /opt/charm/charm-6.7.0/multicore-linux64/bin/../include/conv-autoconfig.h:362:1: error: C++ style comments are not allowed in ISO C90 //#define PACKAGE_BUGREPORT "" ^ /opt/charm/charm-6.7.0/multicore-linux64/bin/../include/conv-autoconfig.h:362:1: error: (this will be reported only once per input file) Fatal Error by charmc in directory /home/jrhammon/Work/INTEL/PCL/ESG/PRK/github-official/C89 Command gcc -D_REENTRANT -m64 -DCMK_GFORTRAN -I/opt/charm/charm-6.7.0/multicore-linux64/bin/../include -D__CHARMC__=1 -DADAPTIVE_MPI -DPRKVERSION=2.16 -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= -O3 -std=c89 -U_FORTIFY_SOURCE -fno-stack-protector -c branch-ampi.c -o branch-ampi.o returned error code 1 charmc exiting... make: *** [branch-ampi] Error 1 ================================================================
$ make allampi /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= branch-ampi.c func.o -o branch-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= dgemm-ampi.c -o dgemm-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= nstream-ampi.c -o nstream-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= p2p-ampi.c -o p2p-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= random-ampi.c -o random-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= reduce-ampi.c -o reduce-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= sparse-ampi.c -o sparse-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= stencil-ampi.c -o stencil-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ /opt/charm/charm-6.7.0/multicore-linux64/bin/ampicc -DADAPTIVE_MPI -O3 -std=c89 -DPRKVERSION="\"2.16\"" -DRADIUS=2 -DSTAR -DDOUBLE -DRESTRICT= transpose-ampi.c -o transpose-ampi cc1plus: warning: command line option ‘-std=c90’ is valid for C/ObjC but not for C++ Jeff Hammond
jeff.science AT gmail.com http://jeffhammond.github.io/ Jeff Hammond
jeff.science AT gmail.com http://jeffhammond.github.io/ |
- [charm] [AMPI] C++ comments in C code, Jeff Hammond, 02/24/2016
- Re: [charm] [AMPI] C++ comments in C code, Phil Miller, 02/24/2016
- Re: [charm] [AMPI] C++ comments in C code, Jeff Hammond, 02/24/2016
- Re: [charm] [AMPI] C++ comments in C code, Eric Bohm, 02/25/2016
- Re: [charm] [AMPI] C++ comments in C code, Jeff Hammond, 02/24/2016
- Re: [charm] [AMPI] C++ comments in C code, Phil Miller, 02/24/2016
Archive powered by MHonArc 2.6.16.