Thursday, March 31, 2016

miniGMG cheat sheet


(icc|mpiicc) -O3 -fno-alias -fno-fnalias -x(SSE3 || AVX) -openmp (bench.c|| miniGMG.c) mg.c box.c solver.c operators.(sse|| avx||ompif).c timer.x86.c -D__TEST_MG_CONVERGENCE -D__PRINT_NORM -o run.miniGMG

Bottom solver options
' -D__USE_CG', 

Collaborative threading for inter-intra-box parallelism

Ghost zone depth (one of my tweaks, not available in the public miniGMG release)



Sunday, February 28, 2016

SgInitializedName ambiguity during Omega/CHiLL installation

error: call of overloaded ‘SgInitializedName(const char* const&, SgTypeInt*)’ is ambiguous
note: candidates are: SgInitializedName::SgInitializedName(SgName, SgType*)

replace the call to SgInitializedName constructor with a call to the function buildInitializedName with the same parameters.

Saturday, February 27, 2016

edg-ROSE-4.4 make install pthread-create ERROR

undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'

add '-lpthread' to LIBS variable in the respective Makefile.

EDG-ROSE 4.4 installation

First of all, be advised that edg-rose-4.4 is an ancient version of ROSE but you might still need to build it as a dependency for some other prehistoric tool you are using.

make core

make file is looking for possibly broken tarball,


download a compatible binary tarball manually from to ..src/frontend/CXXFrontend and rename the extracted directory with the default file name that the make file looks for. In my case, roseBinaryEDG-4-4-x86_64-pc-linux-gnu-GNU-4.4-01a1c421fcd30d05abf1eb27d2a65b19

Also, should you get  "undefined reference to testing::internal::EqFailure" error, add -lgtest to $LIBS in the corresponding Makefile.

Saturday, January 30, 2016

Python/C++ Linking error

Python.h provides wrapper functions to embed python code in C/C++ code. If gcc complains about undefined references,

undefined reference to `Py_Initialize'
undefined reference to `Py_Finalize'

this is probably due to a linking error. Additionally, make sure Python.h is found by gcc.

gcc *.c -I($PATH_TO_Python.h) -lpython2.7

Saturday, July 18, 2015

Parallel vector dot product with p-threads

In this post, I report my results for parallel implementation of the vector dot product problem. (i.e., SUM(A[i]*B[i])). The multiplication step of the problem is embarrassingly parallel with the requirement of aggregation at the end(to obtain final result) which is achieved by a global variable protected by a mutex.

Full source code can be found here[1]
Fork me on GitHub