charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Artem Shvorin <shvorin AT gmail.com>
- To: charm AT cs.uiuc.edu
- Subject: [charm] Quoting charmc options
- Date: Tue, 10 May 2011 20:55:37 +0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hi!
It's rather hard to pass quoted options to charmc. For example, the following command fails when source code uses NAME macro as a c-string:
$ charmc -DNAME=\"foo\" ...
It is caused by “eval” inside charmc script which consumes quotes by itself. The latter example succeeds when both ce9bbf8f52ffdafd0a6b040f4b27039bfb496e79 and 1d6d611a9e6fc7d8dbb41bdf797d91480c21f850 are unrolled.
I don't know how to fix this easily. However mpicc script is to perform the same task (it has to pass some user's option to compiler/linker). As I can see mpicc from my distro tries to quote options in some cases though it may be fooled quite easily.
case $arg in
...
# Unrecognized args. Because we do an eval, we need to
# carefully quote any args that contain quotes.
*\"*)
qarg="'"$arg"'"
allargs="$allargs $qarg"
...
;;
*\'*)
qarg='\"'"$arg"'\"'
allargs="$allargs $qarg"
...
esac
Maybe something like this should be done in charmc script...
- [charm] Quoting charmc options, Artem Shvorin, 05/10/2011
Archive powered by MHonArc 2.6.16.