Elliot pointed out that the .graph file for miniMD was missing some perfkeys.
This commit adds them in.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22234 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Replace flag-by-flag copy with a bulk flag copy in copyInner() for subclasses of Symbol. [reviewed by bradc]

The length of the list of flags on function symbols we want to copy when the
function is instantiated has grown to five, that on TypeSymbol is three.
At this point, it appears more efficient to bulk-copy all flags and then remove
them explicitly from the copy (in the client code) if needed.

This patch started out just doing the bulk copy for FnSymbol.  At Brad's
suggestion, I added the other subclasses of symbol (for which copyInner is
implemented).

[FnSymbol::copyInner: tested on test/ (standard configuration) 
 all implementations of Symbol::copyInner: tested on primers/ (standard configuration),
                                           tested on multilocale/ (gasnet).]


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22235 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix fork count printInitCommCounts.good

I accidentally committed the .good file generated before Greg's
memTracking fix (which removed a fork on all non-0 locales).



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22236 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fixed users/christopher.doris/intersperse.future.

[reviewed by Sung]

BACKGROUND

The above bug appeared when an iterator was not inlined, but instead
an iterator class and methods such as advance() got created.

r21676 introduced a couple of changes in the above case, among others:

(a) A PRIM_YIELD could contain a SymExpr with any symbol, including
globals (including literals and other params). Different PRIM_YIELDs
in the same iterator could reference different Symbols.

(b) All iterator-local Symbols were represented by the 'value' field
of the iterator class (aka ic.value or valField in iterator.cpp)

(c) Upon a yield, ic.value got updated when yielding a global symbol,
but not when yielding a local symbol. The assumption was that, since
updates to a local symbol were already reflected in ic.value,
no additional updating was needed.

The above resulted in incorrect settings of ic.value for example
in the following scenarios:

  loc1 = expr
  yield literal
  yield loc1

  loc1 = expr1
  loc2 = expr2
  yield loc1
  yield loc2

THE FIX

This commit leaves (a) unchanged, but changes (b) and (c).

The case when all yields in the iterator reference the same local symbol
is an exception - it is handled as before. The variables 'oneLocalYS'
are set in this case.

From the new comment in iterator.cpp:

oneLocalYS is set when all PRIM_YIELDs in the iterator
yield the same Symbol *and* that Symbol is defined locally
within the iterator.

When oneLocalYS: that Symbol is represented directly by ic.value.
I.e. the Symbol is mapped directly to valField, in
local2field, replaceLocalsWithFields, etc.
ic.value is not updated explicitly upon a yield - because it always
has the up-to-date value of that Symbol.

When !oneLocalYS: each local Symbol is represented by its own field
ic.FNN_xxx. Non-local Symbols are not represented in ic's fields.
Upon each yield, ic.value aka valField is explicitly updated
with yield's expression.
E.g. 'yield localvar' is converted to ic.value = ic.FNN_localvar.

Addenda:

If there are no yields in the iterator, it does not seem to matter
whether 'oneLocalYS' is set or not.

oneLocalYS is set in collectYieldSymbols().

I modified addLocalsToClassAndRecord() to implement the above logic.

WHILE THERE

There was a question in replaceLocalWithFieldTemp() why we need
to check for the case call->isPrimitive(PRIM_SET_MEMBER) explicitly
instead of relying on 'is_def'.

The answer seems that currently buildDefUseSets() does not identify
PRIM_SET_MEMBER and PRIM_SVEC_SET_MEMBER as defs, so we need to
compensate for that. I added the case for SVEC and cleaned up comments.

I did not address the buildDefUseSets issue because some users of
the information (e.g. dead code elimination) rely on all defs being
PRIM_MOVE and so do not handle PRIM_SET_MEMBER and PRIM_SVEC_SET_MEMBER.

TESTS

Un-futurized christopher.doris/intersperse.chpl, obviously.

Added a bunch of tests in functions/iterators/vass/multi-yield-symbols.
Many are obtained by copying and small tweaking.

  11-oneLocalSymbol      - all yields use the same symbol, which is local
  12-oneLocalOneGlobal   - within an iterator, there are yield(s) using
                           a local symbol, there are yield(s) using
                           a global symbol
  13-oneLocalOneLiteral  - same as 12, but using a literal instead of
                           the global symbol
  14-diffLocalSymbols    - within an iterator, yields use different
                           local symbols
  15-diffLocalsOneGlobal - a blend of 12 and 14
  16-diffLocalsOneLitera - same as 15, but using a literal instead of
                           the global symbol

(A "local symbol" is either a formal or a local variable.)

Future work/todo: add copies of these tests where helper() is replaced
with a range or a domain, which is either a formal (as in Chris's
original test) or a global.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22237 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Adding line to performance graphs for 1.8.0 release



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22238 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Removed trailing comma in graphkeys.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22239 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Set up nightly numa testing

[reviewed by Elliot]

This patch sets up nightly testing on chap05 to include numa
localeModel examples.

In nightly, I added the -localeModel flag that says to use the locale
Mode suite (similar to the multilocale suite).  I also added the value
of CHPL_LOCALE_MODEL to the file names if it was not "flat".

The nightly.numa script runs the numa tests.  For now put in an exit
before running the gasnet tests, because when I tested it, they took
another 3 hours.

While I was in there, I changed the naming of the local tmp files in
nightly.fast, nightly. qthreads, and nightly.numa.  I put the username
and pid in the /tmp logfile name to avoid possible conflict.  The way
is it now, when someone runs the script for debugging purposes under
their own user id, you get permission denied due to the files in /tmp.
I also removed the tmp files if the copy to the central location was
successful.




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22240 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Rats, I forgot a comma in here somehow.

Yet it doesn't seem to have broken the nightly graphs as it did my local
ones...  Does anybody know why?




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22241 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Deprecate chpl_comm_alloc_registry() and simplify chpl_globals_registry

[reviewed by gbt and mppf]

In reviewing the communication interface recently, we noticed that all
implementations of chpl_comm_alloc_registry() are now identical,
suggeting that it's no longer a useful part of the communication
interface.  Looking at the archives, it appears that its original
intention was to permit the globals registry to be heap allocated, but
for whatever reason, we've gone away from that style of approach (I
believe it's because we've come up with more robust ways of dealing
with environments in which C isn't guaranteed to place globals at the
same base addresses across SPMD executions, as we saw a year or two
ago on the Mac).

This commit removes chpl_comm_alloc_registry(), and folds the
chpl_globals_registry and chpl_globals_registry_static variables into
a single variable (named chpl_globals_registry but declared as
chpl_globals_registry_static was before).  It also removes a compiler
primitive that was used to generate the call to
chpl_comm_alloc_registry() but is no longer required.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22242 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update syncsingle test

Work done after 1.7 to reduce the number of things being put on the
heap got rid of the unnecessary back and forth to locale 0 (described
in the original commit of this test).  Now locale 0 does not need to
do any gets, and so we can remove the prediff that handled this case.

While I was investigating I added a config param for verbose comm into
the test.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22243 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add a performance future for remote begins

The implicit sync around user main requires all begins to synchronize
via the user main's endCount.  Unfortunately, this means that any
begin not on locale 0 has to do 2 remote updates to the endCount
variable.

It would be nice if each locale could have a private endCount.  When
that endCount went to 0, some task could inform locale 0.
Unfortunately, this might be tricky since non-0 locales don't know
when user main is done.

In any case, I'm not sure how often this case comes up, but I wanted
to commit this test since it helped my understanding of variable comm
counts for some tests.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22244 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update of TRIAGE and REGRESSIONS files for the past week.

TRIAGE

* Requested Tom to harden the test types/records/hilde/sharedRefCount2

* More tests due to r22171.
  None of the tests due to r22171 failed on 10/31-11/3.

* More dates for execution timeouts for performance testing for
  mandelbrot-fancy, ptrans, ra-dist.

* Noted valgrind compilation timeouts for distributions/dm/t5a,
  plus a few that timed out (compilation or execution) on 9/7 and/or 10/26.

* Level_DiffusionBE_driver hsa been failing frequently for baseline since 9/28.

* A compilation timeout functions/bradc/typeFns/myTypeFnTest for prgenv-intel.

REGRESSIONS

* simple-alias-mem-use (--memTrack/Greg)

* NUMA failures for the first two nights of testing:
   - signal 11 for lulesh and mallocOutOfMemory
   - extra memory leaks or memory use for
     domainMaps, LeakedMemory5, printFinalMemStat
   - different line number for memory/shannon/memmaxExceedsLineno2

* timeouts related to CHPL_RT_NUM_THREADS_PER_LOCALE=1
  in parallel/taskPool/figueroa

* decreased memory usage in memory/shannon/printFinalMemStat
  (Greg - .good to be adjusted)

* removed "compilation timeouts (10/19/11)"
  as those tests no longer time out under cray-prgenv-cray

* parallel/sync/deitz/test_deadlock_detection1 - signal 11 for cray-prgenv-pgi

* fannkuch-redux times out under baseline


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22245 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Use FLAG_COMPILER_GENERATED instead of FLAG_TEMP to mark compiler-generated function and label symbols. [reviewed by vass]

Prior to this patch, we overloaded the meaning of FLAG_TEMP: attached to
variable symbols, it means an unnamed temporary; attached to label or
function symbols, it mas the more basic meaning of an AST element added by the
compiler.

When used with function symbols, its main purpose is to distinguish
compiler-supplied functions from user-supplied versions.  During resolution,
this allow the compiler-supplied versions of some functions (like the
default-initializer function for records and classes) to be overridden by a
user-supplied version.

When applied to a variable symbol, it has a deeper meaning.  The rules for
user-managed memory allow the copy-initialization and destruction of an unnamed
temporary to be removed (or never inserted in the first place), because the
lifetime of such variables are known and their ownership never escapes the
function in which they are defined.

Since it is possible to envision a language construct where a variable is
user-generated but still (according to language rules) is treated as a
temporary, it is good to split these two uses.  Not to mention that it renders
the code more self-documenting. 


In splitting the two uses, I had to take care to mention both flags if the
existing code could apply to both {function and label symbols} and variable
symbols.  The only case where I found this to be true was in
addToSymbolTable().  

[tested with test/ (std)]


DETAILS
  
    compiler/include/flags_list.h
Added FLAG_COMPILER_GENERATED.

    compiler/AST/build.cpp
Replaced FLAG_TEMP with FLAG_COMPILER_GENERATED on lines 539, 543, 569, 572,
932 and 936.  This means that compiler-generated labels now use the "compiler
generated" flag in place of the "temp" flag.

    compiler/passes/normalize.cpp
Added a comment on how FLAG_TEMP is used.
 
    compiler/passes/insertLineNumbers.cpp
The determination whether to insert filename/line-number information in a call
is made w.r.t. whether the function being called is internal or user-defined.
Since it pertains to function symbols, FLAG_COMPILER_GENERATED is the right flag
to test in this context.
 
    compiler/passes/scopeResolve.cpp
In addToSymbolTable(), added the flag "compiler generated" to cover the possible
case that some of the DefExprs passed in refer to label or function symbols.
For readability, I changed
  if (!def->sym->hasFlag(FLAG_TEMP) &&
      !def->sym->hasFlag(FLAG_COMPILER_GENERATED)) { ... }
to
  if (def->sym->hasFlag(FLAG_TEMP) ||
      def->sym->hasFlag(FLAG_COMPILER_GENERATED))
    continue;
    ...
and adjusted the indentation of the surrounding code.

In build_type_constructor() and build_constructor(), I changed FLAG_TEMP to
FLAG_COMILER_GENERATED, since these are both functions.

    compiler/passes/checkParsed.cpp
Added a comment about the use of FLAG_TEMP.

    compiler/passes/buildDefaultFunctions.cpp
Replaced FLAG_TEMP with FLAG_COMPILER_GENERATED on lines 160, 313, 338, 477, and
522.  These are all compiler-generated functions.  Added the "compiler
generated" flag to several other functions generated in this pass.

Ideally, all of the functions generated in this pass would get the "compiler
generated" flag.  As it stands, there is some contention with default versions
defined in the module code.  The desired compiler behavior is to choose the
compiler-generated version over the default version supplied in the module
code.  But resolution says the module version is preferred.

These places were noted in the code with TODO comments.  It is expected that in
a future patch the module default version will be removed or marked with
"compiler generated".  After that, it will be possible to mark all the functions
generated here with the "compiler generated" flag, and the TODO comments removed.

    compiler/resolution/wrappers.cpp
Replaced FLAG_TEMP with FLAG_COMPILER_GENERATED on lines 86 and 155.  These both
apply to wrapper functions.

    compiler/resolution/functionResolution.cpp
Replaced FLAG_TEMP with FLAG_COMPILER_GENERATED on lines 1820, 1823, 1975, 2014,
2331 and 2351.  All of these tests relate to function symbols.

    compiler/util/misc.cpp
Replaced FLAG_TEMP with FLAG_COMPILER_GENERATED on lines 151 and 206.  These
tests both relate to function symbols.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22246 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix some problems in Chapel string <--> C string translation.

[Reviewed by Sung, Michael.]

Our capability to convert Chapel strings to C strings and vice-versa
hasn't been working quite right, and we didn't realize this because the
testing wasn't complete.  This commit fixes some compiler problems and
adds explicit testing.

compiler/AST/expr.cpp
  Check the type of call->get(1) (the source parameter) rather than
  that of get(2) (the call itself) to decide whether the source is a
  wide pointer or not.  Always pass the destination (first) parameter as
  a by-reference local pointer, because that's what the runtime is
  compiled to expect.  Pass the source (second) parameter as a regular
  by-reference pointer.

test/extern/gbt/c_string_from_string.chpl
test/extern/gbt/c_string_from_string.compopts
test/extern/gbt/c_string_from_string.h
test/extern/gbt/c_string_from_string.good
  (added)
  This is a new test for c_string_from_string(), written so that the
  emitted code definitely includes a c_string_from_string() call.

test/extern/gbt/string_from_c_string.chpl
test/extern/gbt/string_from_c_string.compopts
test/extern/gbt/string_from_c_string.h
test/extern/gbt/string_from_c_string.good
  (added)
  This is a new test for string_from_c_string().


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22247 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Future test cleanup

Vass pointed out that this test was buggy (didn't capture what it was
meant to) and that the .good was missing a newline and asked me to fix
those issues which I did.  While here, I also updated the .future
message to reflect the last 5 years of thought about the language and
added a .bad file.

I also changed it from an "error message" future to a "bug" future
because the former are typically used when a future generates an error
message but that message should be clarified, whereas a case like this
where the test should generate an error message but doesn't is more a
case of buggy behavior.




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22248 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Added a couple of entries from CLEANFILES to svn:ignore.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22249 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Improve sharedRefCount2 test. [suggested by vass]

The previous version of the test relied on freed memory being reused immediately
and then overwritten.  It's up to the allocator whether freed memory is used
again right away, so the test did not fail reliably.

This was remedied by adding a flag to the implementation, to indicate if an
implementation is accessible after it is freed.

As written the test will still fail to fail (i.e. falsely report success) if the
allocator overwrites freed memory with zeroes.  This for example can be done in
the valgrind allocator by passing the --free-fill=00 option.   (Using anything
other than zero for the fill pattern should still elicit the error.)


DETAILS

    sharedRefCount2.chpl
Just test the freed flag in the implementation pointed by the handle returned
from escape().  If so, report an error.  (We should not be accessing freed
memory.)  If not, report success.

    refCountedType.chpl
Added the "freed" flag to the ref counted type implementation.  This flag is set
to true if the reference count has gone to zero, right before the implementation
is freed.  The helper routine release_helper() is used to do this consistently
between the handle destructor and the handle copy-assignment operator.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22250 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add svn:ignore and and CLEANFILES for parboil tests

[Reviewed by Vass]

Vass suggested adding svn:ignore and CLEANFILES for the generated output.bin
files in case the test fails to remove them.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22251 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Make the locale model part of the log filename for all locale models (including flat)

I actually did this on accident by a mis-capitalization in the script,
but since people seemed to this this was fine, I made it always add
the locale model name to the log filename.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22252 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Replaced stray tabs in the spectral norm directory with spaces.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@22253 3a8e244f-b0f2-452b-bcba-4c88e055c3ca