Building the fractal api library

2 views
Skip to first unread message

Ankita (Garg) Goel

unread,
Nov 8, 2011, 1:21:05 PM11/8/11
to MV5sim
Hi,

I am trying to build the sample benchmarks under hgfractal/api. I have setup the Alpha cross-compiler toolchain. There were some minor build issues which I could fix. However, not able to resolve the one below:

# cd hgfractal/api
# make
g++ -c  -O1  -D_MODE_=1 -D_UNI_PROCESSOR_=1 -D_PTHREADS_CMP_=2 -D_SHARED_MEM_CMP_=3 -D_COARSE_OPENMP_=4 -D_SHARED_MEM_ITERTHRD_=5 -D_SHARED_MEM_BLOCKTHRD_=6 -D_SHARED_MEM_BLOCKTASK_=7 -D_SIMD_OPENMP_=8 -D_SIMD_BLOCKTASK_=9 -D_TEMPORAL_MULTIPLEX_STREAM_CMP_=10 -D_SPATIAL_MULTIPLEX_STREAM_CMP_=11 -I.  api_asm.cpp -o objexec/./api_asm.o
g++ -c  -O1  -D_MODE_=1 -D_UNI_PROCESSOR_=1 -D_PTHREADS_CMP_=2 -D_SHARED_MEM_CMP_=3 -D_COARSE_OPENMP_=4 -D_SHARED_MEM_ITERTHRD_=5 -D_SHARED_MEM_BLOCKTHRD_=6 -D_SHARED_MEM_BLOCKTASK_=7 -D_SIMD_OPENMP_=8 -D_SIMD_BLOCKTASK_=9 -D_TEMPORAL_MULTIPLEX_STREAM_CMP_=10 -D_SPATIAL_MULTIPLEX_STREAM_CMP_=11 -I.  api.cpp -o objexec/./api.o
....
g++ -c  -O1  -D_MODE_=1 -D_UNI_PROCESSOR_=1 -D_PTHREADS_CMP_=2 -D_SHARED_MEM_CMP_=3 -D_COARSE_OPENMP_=4 -D_SHARED_MEM_ITERTHRD_=5 -D_SHARED_MEM_BLOCKTHRD_=6 -D_SHARED_MEM_BLOCKTASK_=7 -D_SIMD_OPENMP_=8 -D_SIMD_BLOCKTASK_=9 -D_TEMPORAL_MULTIPLEX_STREAM_CMP_=10 -D_SPATIAL_MULTIPLEX_STREAM_CMP_=11 -I.  api_frcontext.cpp -o objexec/./api_frcontext.o
g++ -c  -O1  -D_MODE_=1 -D_UNI_PROCESSOR_=1 -D_PTHREADS_CMP_=2 -D_SHARED_MEM_CMP_=3 -D_COARSE_OPENMP_=4 -D_SHARED_MEM_ITERTHRD_=5 -D_SHARED_MEM_BLOCKTHRD_=6 -D_SHARED_MEM_BLOCKTASK_=7 -D_SIMD_OPENMP_=8 -D_SIMD_BLOCKTASK_=9 -D_TEMPORAL_MULTIPLEX_STREAM_CMP_=10 -D_SPATIAL_MULTIPLEX_STREAM_CMP_=11 -I.  api_frcontext_emul.cpp -o objexec/./api_frcontext_emul.o
api_frcontext_emul.cpp: In member function ‘void frContext::break_loop(ulong)’:
api_frcontext_emul.cpp:346:67: error: no matching function for call to ‘find(std::deque<long unsigned int>::iterator, std::deque<long unsigned int>::iterator, std::map<long unsigned int, long unsigned int, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, long unsigned int> > >::mapped_type&)’
make: *** [objexec/./api_frcontext_emul.o] Error 1

Has anyone come across this error ? Also, this is what one needs to do to build the benchmarks right ?

Thanks for your help!

--
Regards,
Ankita


Ankita (Garg) Goel

unread,
Nov 8, 2011, 3:42:33 PM11/8/11
to MV5sim
I was referring to this link earlier, http://www.cs.virginia.edu/~jm6dg/fractal/smp.htm, but now it is not accessible (forbidden access).

Jiayuan, could you pl help ?

Regards,
Ankita
--
Regards,
Ankita


Jiayuan Meng

unread,
Nov 9, 2011, 11:35:31 PM11/9/11
to mv5...@googlegroups.com
Hi Ankita,

Are you still not able to access http://www.cs.virginia.edu/~jm6dg/fractal/smp.htm? I just tried and it is accessible, and I didn't modify any permission settings. 

Are you trying to compile the SIMD code to be simulated on MV5? You can type:

make MODE=9

"make" is by default building the benchmarks on the native machine, usually for testing a new benchmark. I haven't come across your error when trying "make", it seems to be caused by some GCC incompatibility with the STL library. I'm using GCC 4.2.4. 

Jiayuan

Ankita (Garg) Goel

unread,
Nov 10, 2011, 1:01:53 PM11/10/11
to mv5...@googlegroups.com
Hi Jiayuan,

I am able to access the link now. I am trying to compile the benchmarks uder the api/ directory. For this, I ran make. Even with make MODE=9, I am getting the same error. My GCC version is 4.3.4 though.

I was looking through the source of api, to find the definition of 'find' method that matches the errorneous usage,and I did not find any, hence the error:

api_frcontext_emul.cpp: In member function ‘void frContext::break_loop(ulong)’:
api_frcontext_emul.cpp:346:67: error: no matching function for call to ‘find(std::deque<long unsigned int>::iterator, std::deque<long unsigned int>::iterator, std::map<long unsigned int, long unsigned int, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, long unsigned int> > >::mapped_type&)’
make: *** [objexec/./api_frcontext_emul.o] Error 1

Is there a latest version of fractal api ?

Regards,
Ankita
--
Regards,
Ankita


Jiayuan Meng

unread,
Nov 10, 2011, 9:48:47 PM11/10/11
to mv5...@googlegroups.com
"find" is defined in <algorithm>. 

Possible solutions:

1. include <algorithm> explicitly in api_frcontext_emul.cpp, and then replace "find" with "std::find"

2. try explicit type conversion, so instead of  
find(condloops.begin(), condloops.end(), _strmNextLoop[flowid]);
use
find(condloops.begin(), condloops.end(), ulong(_strmNextLoop[flowid]));

Ankita (Garg) Goel

unread,
Nov 11, 2011, 1:00:53 AM11/11/11
to mv5...@googlegroups.com
Thanks a lot Jiayuan! I could successfully build the fractal library and also the benchmarks. As you suggested, I included <algorithm> explicitly. Then I got some other minor build issues (might be specific to the glibc version of my cross-compiler).

Regards,
Ankita
--
Regards,
Ankita


Reply all
Reply to author
Forward
0 new messages