Skip to content

Commit

Permalink
Issue #1741 Suppressed -Wunknown_pragmas for codegen testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeandersson committed Apr 4, 2017
1 parent 8fb49bb commit 73d1b41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/python/helpers.py
Expand Up @@ -523,7 +523,7 @@ def check_codegen(self,F,inputs=None):
name = "codegen_%s" % (hashlib.md5(("%f" % np.random.random()+str(F)+str(time.time())).encode()).hexdigest())
F.generate(name)
import subprocess
p = subprocess.Popen("gcc -fPIC -shared -Wall -Werror -O3 %s.c -o %s.so" % (name,name) ,shell=True).wait()
p = subprocess.Popen("gcc -fPIC -shared -Wall -Werror -Wno-unknown-pragmas -O3 %s.c -o %s.so" % (name,name) ,shell=True).wait()
F2 = external(F.name(), './' + name + '.so')

Fout = F.call(inputs)
Expand Down

2 comments on commit 73d1b41

@jaeandersson
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgillis, I made this commit to suppress the following error:

test_mapsum (__main__.Functiontests) ... codegen_1e613f42d0ede7ad4c7684e402035e6b.c: In function тАШcodegen_1e613f42d0ede7ad4c7684e402035e6b_f1тАЩ:
codegen_1e613f42d0ede7ad4c7684e402035e6b.c:123:0: error: ignoring #pragma omp parallel [-Werror=unknown-pragmas]
   #pragma omp parallel for private(i,arg1,res1)
 ^
cc1: all warnings being treated as errors
ERROR
test_mapsum2 (__main__.Functiontests) ... codegen_ef4f2e91eeb11edf40a6f263daa74b21.c: In function тАШcodegen_ef4f2e91eeb11edf40a6f263daa74b21_f0тАЩ:
codegen_ef4f2e91eeb11edf40a6f263daa74b21.c:125:0: error: ignoring #pragma omp parallel [-Werror=unknown-pragmas]
   #pragma omp parallel for private(i,arg1,res1)
 ^
cc1: all warnings being treated as errors
ERROR

Does this mean that openmp is not tested in codegen?

@jgillis
Copy link
Member

@jgillis jgillis commented on 73d1b41 Apr 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function.py/mapsum2 should test openmp on codegen

Please sign in to comment.