Removing ptrans and stream perfnumtrials

[ok'd by lydia]

Removing these two perfnumtrials to get multiple trials on stream and ptrans.
Ptrans was originally set to one because it took ~30 minutes on chap04, but
that was fixed with r23570.

The stream one is being removed for similar reasons as stream-ep's from r23206.

If it matters: these were the only two perfnumtrials in the repo so the only
tests that don't have multiple trials are the ones with timeouts (which is
currently just threadring I think.) 


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23708 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Use just lowecase 'cygwin' to check for platform cygwin.
Only check if the platform leads with 'cygwin' in the string (more general).


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23709 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add support for Phi using vanilla Intel compiler

[reviewed by Elliot and Greg]

This commit adds support for building for Intel Phi when using the
Intel compiler directly.  Updated instructions and TODO in
doc/release/technotes/README.knc.

Note that hwloc and tcmalloc are not supported (yet?) for knc.  The
regexp build currently only builds using g++, so is not yet supported,
though I expect it to be (soon?).

None of the ports are tuned at all, so if you want to try it out, I
would suggest setting dataParTasksPerLocale manually to be the number
of physical cores (~60).

====

third-party/gasnet/Makefile:
- Pass along -mmic in CFLAGS and recommended configure flags as per
  the provided cross-configure script
- Set minimal set of necessary environment variable for configuration
- not tested (I have no way to test it)

third-party/gmp/Makefile:
- Pass along -mmic in CFLAGS and recommended configure flags
- Disable make check for knc (note: this might be broken for Cray
  builds also)

third-party/dlmalloc/src/Makefile:
- Pass along -mmic in DLMALLOC_CFLAGS

third-party/dlmalloc/Makefile:
- Use += to add to existing DLMALLOC_CFLAGS

third-party/qthread/Makefile:
- Pass along -mmic in CFLAGS and recommended configure flags

util/chplenv/chpl_arch.py:
- Add knc as a specialization target

util/chplenv/chpl_hwloc.py:
- Set CHPL_HWLOC to none for knc

make/compiler/Makefile.intel:
- Add -mmic flag for knc



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23710 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add support for logical negation of integral types

Prior to this patch, the ! operator was only supported for bool types. This
patch extends that support to also support integral types with the obvious
interpretation (zero => true, non-zero => false).  This implementation adds
that support in both param and non-param versions. It also adds a few tests
to lock in the behavior and documentation to the spec for the non-param
versions (the existing param version did not seem to be documented in the
spec, so I followed suit here for now, and added a TODO to the spec TODO to
figure out how we want to document these in the future).

I believe that the rationale for the past behavior has probably been "it's
what C# does."  I believe C#'s rationale is to avoid making typos like the
following legal programs:

        if (!(x=5)) ...

where the user probably meant to type:

        if (!(x==5)) ...

Chapel prevents these typos another way -- by only permitting assignments at
the statement level, so that may be a reason to feel OK diverging from C#'s
practice.


Note that Chapel does permit integer expressions in conditionals, e.g.:

        var x: int;
        ...

        if (x) ...

which is why it seemed suprising to me to find that we do not support:

        if (!x)

Proposing this on chapel-developers yesterday, there were no objections, and
more positive response than most requests for comment generate.




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23711 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add a debug mode to printchplenv

[reviewed by sung]

Sung requested a mode in printchplenv that indicated whch options were being
set by the user through the env vars. This change adds that feature: any option
that is taken from the environment is prefixed with a *.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23712 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Change the return type of is_c_nil from c_int to bool

[reviewed by lydia]

This commit changes the return type of is_c_nil from c_int to bool. I
reviewed the concept with Michael (who wrote is_c_nil() originally)
before implementing.  I believe that is_c_nil returns a c_int simply
because it was wrapping a C comparison operator that returned an int;
making it a bool seems more natural for Chapel's sake and removes a
case where we rely on C types in something that an end-user or library
writer might want to use.

I implemented this by casting the result to chpl_bool in the C routine
that implements c_is_bool().  To do this, I had to move the definition
of chpl_bool up in the file.

I added a test to lock in this capability.

The reason I ran into this is that I was writing code of the form:

        if (!is_c_nil(x))

only to find that it wouldn't work due to our lack of support for ! on
int types, which led me to be surprised that is_c_nil returned an int.
In another patch, I've extended support of ! to include integers; this
commit solves the same issue in a different way and is not strictly
necessary with the previous, but feels like the cleaner/simpler
interface to support.

I also simplified existing uses of is_c_nil() to avoid the need to
compare against integers, based on this change.


Note for discussion: I think I would've called Chapel's notion of C's
'NULL' 'c_NULL' rather than 'c_nil', much like we call C's 'double'
'c_double' rather than 'c_real'.  Put another way, I worry that a C
programmer using Chapel would not find/guess 'c_nil' as quickly as
they would 'c_NULL' (I can never find it, anyway).  Thoughts?




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23713 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Minor style cleanup to my previous !-for-ints commit

[proposed by hilde, who reviewed the previous patch]

This commit changes the implementation of the param version of !() on
integers to use the same implementation as the non-param versions
(comparing to zero, rather than using a primitive), for the purpose of
making the two versions more similar and reducing the reliance on
primitives.

This re-raises a topic that was discussed on the Cray chatroom this
week about what it would take to write a function that could query the
param-ness of its arguments (was polymorphic over param-ness, say) and
optionally assert its own param-ness based on that information.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23714 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Improvements to filerator to make it testable

This commit changes the filerator to give it an option to skip over .svn
directories (for the purposes of exploration and testing; not suggesting
that this should necessarily be part of the final interface), and adds a
sorterator -- an iterator that takes another iterator, evaluates it, sorts
the results, and yields those -- to make the output deterministic.  This
should be sufficient to make this test portable and useful, so I'm removing
the NOTEST for now and will test in a few places to be sure.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23715 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
More cleanup to filerator

My first draft of the filerator yielded names of directories as well as
files.  This one yields filenames only which is probably closer to what
we want, at least by default.



git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23716 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add macroeconomics benchmark to test suite.

A recently published paper compared the performance of several programming
languages against a benchmark that is relevant to macroeconomics. The benchmark
implements, "the basic stochastic neoclassical growth model, which is the
foundation of much work in modern macroeconomics." Languages included: C++,
Fortran, Julia, Python (with Numpy and Numba), Java, Matlab, R, and
Mathematica.

The article that led me to this:

  http://marginalrevolution.com/marginalrevolution/2014/07/a-comparison-of-programming-languages-in-economics.html

The actual paper:

  http://economics.sas.upenn.edu/~jesusfv/comparison_languages.pdf

Source code for implementations in C++, Python, Julia, etc:

  https://github.com/jesusfv/Comparison-Programming-Languages-Economics

The good news is that this Chapel version is ~2.2x slower than the C++ version
(the top performer in the paper) on my machine. I suspect this will vary quite
a bit depending on the the natural degree of parallelism on the machine running
the benchmark. For reference, the paper says that Java and Julia were ~2-3x
slower than the C++ version, so this version is competitive.

The Chapel version here is based off the Java version. I made it Chapel-like
where it was convenient and left some comments where things could be
improved. It would be interesting to port the Julia or Python versions, as
well.

One issue that I noticed is the precision of the Chapel result is off
slightly. I couldn't tell if this was due to an algorithmic difference or if
our reals were "less precise" somehow than Java doubles, as an example. Seems
more likely that there is an algorithmic error. In any case, I marked it as
NOTEST to avoid issues since I have not tested it across platforms.

I added a perfkeys file to extract the elapsed time that was used in the study
and verify the "My check" result.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23717 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Set CHPL_REGEXP and CHPL_GMP when testing intel and gcc on whiteboxes.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23718 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Correctly set host and target platform values in new whitebox testing script.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23719 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Don't try to rebuild the hwloc doxygen docs.

[Reviewed conversationally with Elliot.]

Because we've stored the contents of the hwloc tarball into our
repository and we build with files pulled back out of the repo, we've
lost the file timestamps that are in the tarball.  As a result, make(1)
sometimes thinks it needs to rebuild things when in fact it doesn't.
Among these things are the doxygen docs; lately some of us have seen
attempts to rebuild those.  Unfortunately something about our use of a
separate build directory prevents the doxygen doc rebuild step from
working properly.  Combining the timestamp problem and the separate
build directory problem results in sporadic hwloc build failures.

This change touches $(HWLOC_SUBDIR)/README so that it is as new as its
prerequisite $(HWLOC_SUBDIR)/doc/doxygen-doc/hwloc.tag, preventing
make from trying to do the doxygen doc rebuild.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23720 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update util/cron/ script to use current working directory as CHPL_HOME.

Previously these scripts relied on ~/chapel as the main repo and would default
to using it as CHPL_HOME. The new testing system guarantees that the current
working directory is a clean, up-to-date working copy so we can use it.

Also, a couple of scripts are added to the perl compilation check in smokeTest
and some additional files are now ignored in .gitignore.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23721 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update util/cron/nightly to use current directory for CHPL_HOME.

The new test system guarantees the current directory is a clean, up-to-date
working copy of the subversion repo. This script no longer needs to rely on
~/chapel and it doesn't need to checkout/update a readonly copy of the repo in
/tmp/.

There is some additional clean up to be done in nightly, including:

* Moving all temp files to WORKSPACE/CHPL_HOME (stuff like temp logs).
* Migrating perf data svn commands to more scm agnostic system.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23722 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Factor machine.<name> scripts with multiple calls into standalone scripts.

These changes were made:

* machine.cflbs32 -> test-linux32-{default,gasnet}-examples.bash
* Moved release testing and token count from night.bradc-lnx to
  test-release.bash and token-count.bash.
* nightly.chap03 -> test-perf-chap03-{default,qthreads}.bash
* nightly.chap04 -> test-perf-chap04-{default,qthreads}.bash
* machine.chap05 -> test-linux64-numa-{default-full,gasnet-multilocale}.bash
* machine.chap10 was deleted
* machine.chap09 -> test-linux64-tcmalloc-{default-gasnet}-full.bash (note that
  tcmalloc testing is not currenctly running).
* machine.lnx-vass -> test-linux64-dist-{block,replicated}-default.bash and
  test-linux64-memleaks-default-examples.bash
* util/cron/README -> updated to reflect current system (mainly removed all the
  machine names from the file).
* Updates token count and test release scripts to recognize
  CHPL_NIGHTLY_CRON_RECIPIENT environment variable override for failure/success
  email recipient.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23723 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Update whitebox testing scripts to use new testing system.

Removes the old chpbld01-02 (aka whitebox) testing scripts, which used for
loops to test a bunch of different host and target compilers with and without a
programming environment.

The new testing system supports configuration matrices, which is how the
various compilers and programming environment are now expressed. The scripts in
this repo know how to setup a single configuration based on some environment
variables and then run nightly.

git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23724 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
To for_formals_actuals, add a test that a PRIM_VIRTUAL_METHOD_CALL gets the right number of arguments.

Added a clause to the for_formals_actuals macro, to also test that the argument list is
the right length when a virtual function (as opposed to a statically-bound function) is
being called.

This caused two test cases to fail:
  classes/deitz/dispatch/test_generic_where.chpl
  distributions/diten/Dimensional.chpl
because param and type arguments were being removed from calls only if the function called
was statically-bound.  I added code to removeRandomCalls(), to remove these arguments from
calls to virtual (dynamically-bound) functions as well.  After that, the tests passed.

[tested on / (std]
[reviewed by noakes]




git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23725 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Weaken checkFormalActualBaseTypesMatch() so it is valid before resolution is complete.

At present, this test passes after resolution is complete, but does not pass if it is run
at a point before post-resolution cleanup is performed.  To support future changes in the
IR that would allow certain unresolved functions to remain in the tree, this test is
weakened in the following ways:
  - It does not consider calls that are not in the tree, so the test can be run before
    post-pass cleanup.
  - It does not consider calls that lie inside unresolved functions.
  - It does not consider functions that remain unresolved.

[tested on / (--verify)]
[reviewed by vass]


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23726 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Adding 'noinit' to the list of keywords, and making sure it highlights the same
as the others do.



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