Symbol lookup error for mpi program - parallel-processing

I am not too clued-up on parallel computing, so pardon me if this is a naive question.
I inherited a parallelised version of a (C-coded) executable from a senior colleague. Unfortunately he didn't give me the actual C-code, so I can't recompile or fish around in there to find what is throwing this error.
My problem is that, when I run this executable (myexecutable), I get the error:
myexececutable: undefined symbol: ompi_mpi_int
I have a feeling there is some library dependence that is not being supported, and have pointed the PATH to where the openmpi stuff lives (/usr/lib64/openmpi/bin). It hasn't helped any.
Any help on this error would be much appreciated!

Related

Odd python driver files in micropython for esp32 and esp8266 cause make errors

I've been trying to build a micropython for esp32-camera and I keep getting errors during the make process when building some of the drivers in the mp/ports/esp32/modules directory. The error I get is a syntax error. For example there's a file named ntptime.py in this directory and it contains a single line:
../../esp8266/modules/ntptime.py
and that results in "SyntaxError: invalid syntax"
I've programmed python for a while, but am not familiar with this concept and don't understand how it can work, but maybe it can? I'm not familiar with doing that and since it's not working when I run make, maybe there's something setup-wise that I've missed or whatever. Can anyone shed some light on this practice and explain under what circumstances this works to direct make (or the python compiler) to resolve this statement by loading the source from the directory specified in that single line of code.
Duh, can't believe I missed this: there "files" are symbolic links; I should've remembered that, but alas, I'm getting older by the minute!
Still, it doesn't answer the question as to why they weren't being recognized during make but instead throwing a SyntaxError; but I'll leave that for another day.

Undefined reference to several OpenMP functions

I was trying to compile an openMP example and he refuses to compile saying "undefined reference to 'OSCR_init', undefined reference to `OSCR_getarg_int' and several other functions. Then I located these functions in the file OmpSCR.h, that came in another folder, searched inside it and saw that these funcions were defined externally, I believe that in omp.h. I included the file with "include " in the example source (OmpSCR.h was already included) hoping that it would solve the question, but nothing improved. I do have omp.h, it came with the os. Can it be a version conflict? I got the example file from OMPSCR_v2.0.tar.gz What should I do?
An "undefined reference" error means that no definition of the function was found at link time. A declaration in a header (such as omp.h) doesn't provide an implementation for the function; it just tells the compiler that the function exists somewhere. You have to link your program with a library that actually provides the function's implementation.
Basically, you just need to link your program to an OpenMP library. The way to do this depends on which compiler and which OpenMP implementation you're using, neither of which you've specified, so I can't provide specifics. (But if you happen to be using GCC, you should use the -fopenmp option for both compiling and linking.)

'_get_timezone' was not declared when trying to compile using MinGW

I use QtCreator 2.6 with Qt 4.8.4 and trying to compile my code on Windows 7 x64 by MinGW (4.4, 32bits).
I included Apache Thrift to my project, and got errors on file thrift\windows\GetTimeOfDay.cpp:
'errno_t' was not declared in this scope
'_get_timezone' was not declared in this scope`
'_get_daylight' was not declared in this scope
Have you ideas how yo solve that problem?
I got working idea. We must avoid all GetTimeOfDay, and delete from project files GetTimeOfDay.cpp, GetTimeOfDay.h and use <time.h>'s function gettimeofday.
If someone will get same error, I can provide more code.
And, of course, if you'll find better way to solve that problem (or point, that problem is solved in further versions of Thrift) -- feel free to post here! :)

Segmentation Fault with Otime

I have a structure defined in h files and some elements of that structure are in compile time flag. The file is compiled using arm-gcc with -Otime flag. When I run it , it is giving Segmentation Fault. But when I remove -Otime flag from the makefile the code runs perfectly.
I am befuddled at this observation. Can someone share some insight on this issue ?
Unfortunately there is never one easy answer for these scenarios. Certainly in the past, whenevr I have encountered such problems, its been down to the code, the compiler or even a combination of both. It would help if you could mention the version of the compiler you are using. It could simply be a Otime bug in the compiler, which is not unheard of.

undefined reference to `__ctype_b_loc' etc

I am compiling curl for an embedded device, and get:
main.c:(.text+0x375c): undefined reference to __strdup'
main.c:(.text+0x3818): undefined reference to__ctype_b_loc'
__fxstat64 etc
I have tried varied -lc etc.
From some research it seems there can be a mixup with older versions (__ctype_b).
I also suspect a mixup between C and C++.
(These are from makefiles generated with builtools (configure), and quite a lot of sourcefiles.
That looks like a broken cross-compiler setup. Those symbols (functions) are typically provided by your libc.
curl is frequently successfully built cross-compiled by users, which would be a hint that this problem may be in your environment and not in curl. Assuming you use a decently modern curl version for this.
If things keep being broken, consider using the curl-library mailing list to get help from the libcurl hackers directly.

Resources