Subject: [Instant-dev] [HG instant] added openmp test (not working because I'm missing the omp

From: [email-masked] (Instant)
Date: Wed, 30 Jul 2008 11:44:10 +0200 (CEST)

One or more new changesets pushed to the primary instant repository.
A short summary of the last three changesets is included below.

changeset:   165:129a6f778ab18bdb23b52624dd12343cd7e59fdf
tag:         tip
user:        "Kent-Andre Mardal <[email-masked]>"
date:        Wed Jul 30 11:44:03 2008 +0200
files:       doc/html_reference/epydoc.css doc/html_reference/index.html doc/makedoc.sh tests/test_ode.py tests/test_omp.py
description:
added openmp test (not working because I'm missing the omp
    dynamic library to use)

changeset:   164:abf5bb69a6554b54f74b0ca2bb4f5daa37a40f0a
user:        Ilmar Wilbers <[email-masked]>
date:        Tue Jul 29 17:17:23 2008 +0200
files:       src/instant.py
description:
Added cross-platform support for cache directory and temp directory.

changeset:   163:224ef682ffb60b58892d69b26e459af1ca34bc62
parent:      161:067774ded47ed9745762e6b5a4ac1cc328df872f
parent:      162:0fb1ca0aaf71a33c34ad68678c43e43e993c4116
user:        Ilmar Wilbers <[email-masked]>
date:        Tue Jul 29 10:38:28 2008 +0200
files:       tests/test16.py
description:
Merge.

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/instant

---

From: Ilmar Wilbers <[email-masked]>
Date: Wed, 30 Jul 2008 11:54:40 +0200

I have openmp, but is does not work here:
ilmarw@multiboot:~/instant/tests$ python test_omp.py
--- Instant: compiling ---
Traceback (most recent call last):
  File "test_omp.py", line 23, in <module>
    compute_func = inline_with_numpy(c_code, arrays = [['n', 'x'], ['m', 
'y']], cppargs = '-fopenmp', system_headers=["omp.h"], libraries=['gomp']) 
  File "/usr/lib/python2.5/site-packages/instant.py", line 791, in 
inline_with_numpy
    exec("from inline_ext_numpy import %s as func_name"% func_name)
  File "<string>", line 1, in <module>
  File "/home/ilmarw/instant/tests/inline_ext_numpy/__init__.py", line 
1, in <module>
    from inline_ext_numpy import *
  File 
"/home/ilmarw/instant/tests/inline_ext_numpy/inline_ext_numpy.py", line 
6, in <module>
    import _inline_ext_numpy
ImportError: 
/home/ilmarw/instant/tests/inline_ext_numpy/_inline_ext_numpy.so: cannot 
allocate memory in static TLS block

Seeing as none of the buildbots have openmp, I will disable the test for 
it for now.

ilmar

Instant wrote:
> _______________________________________________
> Instant-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/instant-dev
>

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Wed, 30 Jul 2008 15:33:35 +0200

I think -fopenmp should be enough, you don't need to link manually to gomp.
(Note that g++ version >= 4.2 is required)

--
Martin

---

From: [email-masked]
Date: Thu, 31 Jul 2008 12:09:58 +0200 (CEST)

I've tried, but I get 'undefined symbol omp_...'

Kent

>>> files:       doc/html_reference/epydoc.css
>>> doc/html_reference/index.html doc/makedoc.sh tests/test_ode.py
>>> tests/test_omp.py
>>> description:

---

From: Ilmar Wilbers <[email-masked]>
Date: Mon, 04 Aug 2008 16:12:26 +0200

I get almost linear speed-up now:
ilmarw@bagvapp:~/instant/tests$ export OMP_NUM_THREADS=1
ilmarw@bagvapp:~/instant/tests$ python test_omp.py
Thread 0
With instant and OpenMP 1.74 seconds process time
With instant and OpenMP 1.7381939888 seconds wall time
ilmarw@bagvapp:~/instant/tests$ export OMP_NUM_THREADS=2
ilmarw@bagvapp:~/instant/tests$ python test_omp.py
Thread 1
Thread 0
With instant and OpenMP 1.72 seconds process time
With instant and OpenMP 1.00032997131 seconds wall time

Look at the wall time.

I used Intrepid Ibex, as the bug with gcc in 4.2 (used in Hardy) with 
linking in -lgomp has been resolved there.

ilmar

---

From: [email-masked]
Date: Mon, 4 Aug 2008 16:26:25 +0200 (CEST)

> linking in -lgomp has been resolved there.

Great!

What is Intrepid Ibex ?

Kent

---

From: Ilmar Wilbers <[email-masked]>
Date: Mon, 04 Aug 2008 16:27:20 +0200

The new Ubuntu distribution. It is schedules for release at the end of 
October.

ilmar