* arts-2-1-816

* OpenMP performance improvements.

* rte.cc (get_ppath_trans):

Remove parallelization.

Performance breaks down if threads > 4. This behavior is consistent
with different compiler versions on different operating systems and
machines. It can lead to deadlocking. OdinSMR test case with 32
threads sometimes never finishes. For explanation see below.

* src/test_omp.cc, src/CMakeLists.txt:

Add testcase to illustrate performance impact of 'nested' OpenMP loops.

Case 1): Runtime without #pragma omp in outer loop.

Case 2): Runtime with #pragma omp if (0) in outer loop, still only
the inner loop will run in parallel exactly as before.

(1) Laptop 8 threads:  6.3s
(2) Laptop 8 threads: 22.1s

(1) Server 8 threads:  3.2s (CPU Load 700-800%)
(2) Server 8 threads: 36.3s (CPU Load only 300%)

This is a quirk with OpenMP. When the program starts, OpenMP creates X
threads (X=8 in the test above). In case (1), these threads will be used
for parallelizing the inner loop.
However, in case (2), even though the outer loop runs sequentially due
to the if (0) condition, OpenMP cannot use the already existing 8
threads for the inner loop. Every time it enters the inner loop, it
has to create 8 new threads. As creating threads is very expensive,
this leads to the seen drop in performance.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8761 aaf1aab0-4228-0410-ad68-8dceda47f409
2014-01-13  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-817

            * src/m_checked.cc (sensor_checkedCalc): Added special check that
            sensor_response_aa is empty if antenna_dim = 1. Not catched before.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8763 aaf1aab0-4228-0410-ad68-8dceda47f409
* arts-2-1-818

* src/m_rte.cc (yCalc), src/rte.cc (iyb_calc):

Extract parallel loop bodies into separate functions. Works around the
OpenMP performance issue mentioned in previous commit when neither the
mblock nor za loop actually run vectorized.
Speed ups vary. E.g. TestWfuns runs 25% faster on our 32 core server
when number of cores > nza.

Print diagnostic info about parallelization and iteration count to
out3.

(iyb_calc): Further tweak parallel loop condition for za loop. Only
delay parallelization if nf >= 10*nza.

* src/m_ppath.cc (ppathFromRtePos2):

Remove duplicate code. los and dza where calculated twice for
atmosphere_dim <= 2 (inside and after the if statement).

* src/debug.h (DEBUG_VAR, DEBUG_VAR_FLT): Added more debug macros.

* src/m_disort.cc (ScatteringDisort):

Use DEBUG_VAR instead of DEBUG_PRINT.

* src/xml_io.cc (ArtsXMLTag::read_from_stream): Initialize ch.

git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8764 aaf1aab0-4228-0410-ad68-8dceda47f409
2014-01-15  Patrick Eriksson  <patrick.eriksson@chalmers.se>

            * arts-2-1-819

            * src/ppath.cc: Removed some lines now obselete after changes in
            the do_gridcell_Xd_byltest functions. Found by Oliver, using Xcode
            code analyser.



git-svn-id: https://www.sat.ltu.se/svn/rt/arts/trunk@8766 aaf1aab0-4228-0410-ad68-8dceda47f409