Remove accelerator locale model

[reviewed by greg]

This essentially reverts revisions 22384 and 22385. 

The accelerator locale model was added with the expectation that it would be
updated and polished before the 1.9 release. Since accelerator support
requiring the locale model is no longer going to be part of the release this
removes that code to avoid confusion and clutter. Setting the accelerator
locale model would have no effect for the release and it seems better to remove
the prototype than have it left in non-functional. 

It will be easy to revert this patch and add the accelerator locale model back
in when it is needed again. 



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22770 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Clean up task call stack size handling.

[Reviewed by Sung.]

Currently we handle task call stack sizes in a somewhat fractured way in
the runtime.  There is a function common shared by all tasking layers
that collects from the environment any call stack size specified by the
user, and then each tasking layer implementation uses this value (if
any) and its own default to select an actual call stack size.

This commit changes that somewhat, moving the specification of a default
call stack size into the common code of the runtime.  Tasking layers are
expected to implement task call stacks that are no smaller than the size
given by this common code.

While here, I also changed the type of the task call stack size to
size_t, and did some other cleanups.

The specific file changes are as follows:

runtime/include/chpl-tasks.h
runtime/src/chpl-tasks.c
  Rename chpl_task_getenvCallStackSize() as chpl_task_getMinCallStackSize()
  and change its return type from uint64_t to size_t.  Change it to return
  the minimum call stack size rather than the size specified by the user in
  the environment, if any.  Make the default call stack size 8 MiB.

runtime/include/chpl-threads.h
  Change the type of chpl_threads_getCallStackSize() from uint64_t to
  size_t.

runtime/src/tasks/fifo/tasks-fifo.c
  Change the type of chpl_task_getCallStackSize() from uint64_t to
  size_t.

runtime/src/tasks/massivethreads/tasks-massivethreads.c
  Remove logic that handles the default call stack size, since this is
  now done in the common code.  Change chpl_task_getCallStackSize() from
  uint64_t to size_t.

runtime/src/threads/pthreads/threads-pthreads.c
  Rework the call stack size logic, since the common code now provides a
  default value.  Change chpl_thread_getCallStackSize() from uint64_t to
  size_t.

third-party/qthread/qthread-1.10/src/interfaces/chapel/tasks-qthreads.c
  Rework the call stack size logic, since the common code now provides a
  default value.  Change chpl_task_getCallStackSize() from uint64_t to
  size_t.

modules/internal/localeModels/numa/LocaleModel.chpl
modules/internal/localeModels/flat/LocaleModel.chpl
  Change here.callStackSize and chpl_task_getCallStackSize() from
  uint64_t to size_t.

modules/internal/ChapelThreads.chpl
  Remove callStackSize and extern proc chpl_task_getenvCallStackSize(),
  which is used to initialize it.  This variable was not being used and
  is not documented anywhere.  Plus, since we've said that the call
  stack size is at least potentially different on each locale, it's hard
  to see how a global variable containing its value could be useful.

test/execflags/bradc/callStackSize.prediff
test/execflags/bradc/callStackSize.good (deleted, moved to .good.in)
test/execflags/bradc/callStackSize.good.in (new)
test/execflags/bradc/callStackSize.comm-none.good (deleted, moved to .good.in)
test/execflags/bradc/callStackSize.comm-none.good.in (new)
test/execflags/bradc/callStackSize.cleanfiles
  The output for this test varies depending on which tasking layer it's
  built with, because some tasking layers (fifo, for example) round up
  the call stack size to the next system page boundary, while others do
  not.  To handle this, add a .prediff script to create the appropriate
  .good for the specific test environment.  Move the existing .good
  files to new .good.in files containing the output that would match the
  stack size specified in the .execenv file.  The new .prediff processes
  these as necessary to match the specific case.  The new .cleanfiles
  file removes the dynamically created .good file.


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22771 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix hwloc and qthreads builds on darwin

[Reviewed by gbt]

r22756 changed a few options on hwloc and qthreads builds that are incompatible
with darwin. This patch makes it so the options are only set on non-darwin
builds.

runtime/etc/Makefile.tasks-qthreads:
librt doesn't exist in darwin

third-party/hwloc/Makefile:
-static causes autoconf to attempt to create a statically linked binary to test
if the C compiler works... statically linked binaries are not supported under
darwin so it fails.


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22772 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Minor touch-ups in start_test.

[reviewed by Elliot]

I wanted to make it more readable esp. w.r.t. GRAPHFILES notation,
and also prepare it for my upcoming change for an alternative GRAPHFILES.

* In the "CHPL_TEST_PERF_DIR must be set" warning, print the actual
default being used.

* Drop the trailing / in $compperfdir, for simplicity.

* Updated the message upon running checkGraphfiles.

* Renamed $graphFile to $compGraphList, for ease of grepping.

* Replaced $CHPL_HOME/test/GRAPHFILES with $execGraphList.
I intend to let the user control this with an option.


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22773 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Handle differing test output for qthreads with and without guard pages.

[Reviewed by Sung.]

Adjust the prediff to take into account the qthreads guard pages
setting, because that determines whether/how qthreads rounds up the call
stack size.


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22774 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Send cron mail to normal recipients on chap12-14.

Those boxes have now been fixed.

git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22775 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Fix problem with link order with -llvm

[reviewed by Greg]

Tiffany Mintz pointed out a problem using -l libraries
when compiling with -llvm. Turns out we were adding the
libraries in the wrong part of the link line - they should
be at the end, after the .o files. This patch fixes the
problem and makes the clang++ link line more similar to
the one in the C backend's Makefiles.




git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22776 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Feature request for split/join on strings


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22777 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
more -Wall friendly cody compiler/

[reviewed by Tom]

I'm using gcc 4.7.2 on Debian 7.4 and get many warnings
enabled by -Wall about casting away const. This patch
fixes the code to make the warnings go away, in most
cases by making cast-to types include 'const' in the right way,
but in one case I actually added C++'s const_cast.



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22778 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
End of week triage update

Triage:
  + race conditions in numa iterators (sungeun)
  + studies/madness numa and baseline non-determinism
  - param for break future has been implemented

Regressions:
  + fast testing runs over the whole suite now, a few expected regressions added
  + incorrect comm counts due to r22632 and r22674 (hilde)
  + execution timeouts for parallel/taskPool/figueroa/OneThread*


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22779 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
fix portability problems in test/ sh and csh scripts

[reviewed by Brad]

I recently switched to using Debian 7.4 for my Chapel development,
and I discovered:
- /bin/sh is more POSIX-compilant and doesn't like bash-isms
- /bin/csh is not tcsh and behaves oddly with echo >> somefile
  (namely that echo >> somefile does not add a newline, but
   echo "" >> somefile does).

The main /bin/sh problem is that [ "a" == "b" ] does not
work; what we want is [ "a" = "b" ] for string comparison
or [ 1 -eq 2 ] for numeric comparison.

The /bin/csh problems caused me to convert two tests
to using /bin/sh :
 test/memory/shannon/outofmemory/sub_test
and lots of tiny scripts in
 test/compflags/bradc/printstuff/

since the group has been trying to move away from csh. 




git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22780 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Restore .skipif tests incorrectly removed by r22709.

[Brad noticed the need for this.]

I deleted these two .skipif files in r22709, which removed tasks=none
support, because I thought that was all they tested for and thus they
were no longer needed.  But I was wrong -- they test for other things
and those tests need to remain.  Restoring them ...


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22781 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Make dataParIgnoreRunningTasks=true by default for numa iteration and also make it obey dataParTasksPerLocale

[previewed by David, will be reviewed post-commit]

This commit makes the default for dataparIgnoreRunningTasks to be
true, because we don't (yet) have a way to query the number of running
tasks on a per sublocale basis.

This commit also fixes numa iteration over DefaultRectangular and
RangeBase to consider dataParTasksPerLocale.  Similarly, this is also
bit of a temporary solution, as we would really like to be able to
query for defaults for these values on a per sublocale basis.



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22782 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Added directory-wide skipif for madness tests

[reviewed by Brad]

These tests tend to be very noisy in nightly testing due mostly to
numerical differences in output and stack overflow.  Since we don't
have time to clean them up right now, we're disabling them for all but
gcc without baseline, no numa, and no valgrind.



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22783 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Making --fast and --verify testing skip futures

[minimal, not verified]

For tests that aren't working, we tend to get different behavior when
compiling with --fast and --verify, and it arguably just wastes time.
This commit runs these test configurations with --no-futures in order
to save time.  Once the future is retired, if it starts failing
specifically in these modes, that seems like the proper time to deal
with it anyway.



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22784 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add comments in primitive.h and codegen.cpp. [trivial, reviewed by eronagha]

    compiler/include/primitive.h
    compiler/passes/codegen.cpp
Noted that the operands of PRIM_PRIVATE_BROADCAST change in codegen_header(),
and their order changes as well.  This is potentially confusing.

[smoke-tested with hello.chpl]


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22785 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add performance futures suggesting bulk copy optimization to replace field-by-field remote puts. [not reviewed]

The specification states that the compiler-supplied record (and tuple)
assignment operators perform a field-by-field assignment.  But if these
assignments are also compiler-generated down to fundamental types, then the
entire assignment is equivalent to a bulk copy.

Right now, updating the fields in a remote object is expensive, because each
field write entails a remote put.  Replacing that with a bulk copy (where it is
legal) will replace those multiple remote puts with a single one.

[tested by themselves (gasnet-everything)]


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22786 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Make the runtime startup code more symmetric across locales.

[Reviewed by Tom.]

It used to be that the control flow for locale 0 and the other locales
occurred directly in the runtime startup code.  On locale 0 we launched
a tasking layer task to execute a wrapper that called the user's main
program.  Among other things the compiler-emitted code for the user's
main program calls the pre-user-code hook, a function in the runtime
that needs to be calledafter module initialization and before the actual
user code runs.  On the other locales we just call this pre-user-code
hook directly from the runtime startup code itself.

The change here is to launch a tasking layer task on all locales, rather
than just on locale 0, and move the control divergence for the 0 and
non-0 locales into the body of that launched task.  We also now call the
post-user-code hook on the non-0 locales, which we didn't do at all
before.  This makes the main control flow more symmetric, and the code a
bit more elegant, but it has a functional effect too: the post-user-code
hook is called on all locales just like the pre-user-code hook is, and
both hooks are called from a tasking layer task on all locales, rather
than (for the pre- hook) from a task on locale 0 and directly on the
other locales.

This also resolves a startup failure which has been occurring in all
numa+gasnet+qthreads tests that run on more than one locale.  The
failure was happening in chpl_setMemFlags(), which is called from the
pre-user-code hook.  A (Chapel) callee of that function ends up needing
to access qthreads task-locale storage (in module code having to do with
sublocales for numa), but that storage doesn't exist unless the code is
running in a qthreads task.  So when the hook was called directly from
the main startup code it failed an internal check in qthreads.  Now that
the pre-use-code hook is called from a task, the reference to task local
storage works.  As a result of this change, in gasnet+numa+qthreads
examples testing I saw the current 22 failures (all of the tests that
actually run on multiple locales) drop to just 2, both of which were
SSCA2 timeouts.


git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22787 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Adding forgotten .good files



git-svn-id: svn+ssh://svn.code.sf.net/p/chapel/code/trunk@22788 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Updating refcnt test to hopefully avoid race conditions.

The race condition was between the begin calling R's
destructor as it completed and the calling scope destroying
it. I believe I have modified it to always be deterministic.



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