Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » pth.ca
  • » Profile

Posts

Posts

Thanks a lot for your help thus far. I've opened up a new ticket as you recommended. I'll post back to this thread if/when something comes along.

Running omc as you suggested gave me the following:

Code:


XXX:~ XXX$ omc +d=interactiveCorba
Warning: Failed to set locale: ''
Created server.
Dumped Corba IOR in file: /var/folders/ta/taZOlHGXGfqAd5vYye0I6++++TI/-Tmp-//openmodelica.XXX.objid
Started the Corba ORB thread with id: 0x10af04000

It seems that this part is working, but for OMEdit is still non-functional. I've tried recompiling everything from scratch, to make sure that something didn't get broken along the way, but still no luck.

Thanks for the patch. Switching to the Apple OpenCL headers did the trick. Everything seems to have compiled without issue. However, launching OMEdit.app gives the following error:

Code:


Unable to find OMEdit server, Object reference file /var/folders/../openmodelica... not created. OMEdit will close.

OMShell seems to work well though. I've noticed that the default configure flags that MacPorts uses disables paradiseo (ergo OMOptim) and OMNotebook. I noticed a warning about OMNotebook on the Mac download page, but any reason why I shouldn't have OMOptim compiled?

Well the instructions for building on Mac said that I should set configure.compiler=macports-gcc-4.4 or set +gcc44, however I see that it's been recently (past 24 hrs?) updated. I executed port clean openmodelica-devel and repeated the installation with port install openmodelica-devel +clang. Make still bombs out in cl.h:

Code:


/opt/local/bin/clang++-mp-3.1  -I/opt/local/include -I. -I"../../c"  -c -o omc_ocl_builtin_kernels.o omc_ocl_builtin_kernels.cpp
In file included from omc_ocl_memory_ops.cpp:47:
In file included from ./omc_ocl_memory_ops.h:48:
In file included from ./omc_ocl_common_header.h:47:
./CL/cl.h:479:35: In file included from error: omc_ocl_interface.cppexpected ')'
:52:
In file included from ./omc_ocl_interface.h:55:
In file included from ./omc_ocl_common_header.h:47:
./CL/cl.h:479:35: error: expected ')'
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                                  ^
./CL/cl.h:479:22: note: to match this '('
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                     ^
./CL/cl.h:486:43: error: expected ')'
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                                  ^
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                                          ^
./CL/cl.h./CL/cl.h:486:30: note: to match this '('
:479:22: note: to match this '('
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                             ^
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                     ^
./CL/cl.h:486:43: error: expected ')'
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                                          ^
./CL/cl.h:486:30: note: to match this '('
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                             ^
./CL/cl.h:554:63: error: expected function body after function declarator
                  cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
                                                              ^
./CL/cl.h:554:63: error: expected function body after function declarator
                  cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
                                                              ^
./CL/cl.h:608:55: error: expected ')'
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                                      ^
./CL/cl.h:608:42:./CL/cl.h:608:55: error: expected ')'
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                                      ^
./CL/cl.h:608:42: note: to match this '('
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                         ^
./CL/cl.h:609:73: error: expected function body after function declarator
note: to match this '('
                                    void * /*user_data */ )             CL_API_SUFFIX__VERSION_1_1; 
                                                                        ^
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                         ^
./CL/cl.h:660:34: error: expected ')'
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                                 ^./CL/cl.h:609:73: error: expected function body after function declarator
                                    void * /*user_data */ )             CL_API_SUFFIX__VERSION_1_1; 
                                                                        ^

./CL/cl.h:660:21: note: to match this '('
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                    ^
./CL/cl.h:734:52: error: expected function body after function declarator
                  cl_int *      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;               
                                                   ^
./CL/cl.h:744:57: error: expected function body after function declarator
                     cl_int     /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
                                                        ^
./CL/cl.h:749:39: error: expected ')'
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                                      ^
./CL/cl.h:749:26: note: to match this '('
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                         ^
./CL/cl.h:750:50: error: expected function body after function declarator
                    void *      /* user_data */) CL_API_SUFFIX__VERSION_1_1;
                                                 ^
./CL/cl.h:793:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
./CL/cl.h:820:59: error: expected function body after function declarator
                         cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                          ^
./CL/cl.h:846:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
./CL/cl.h:660:34: error: expected ')'
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                                 ^
./CL/cl.h:660:21: note: to match this '('
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                    ^
./CL/cl.h:734:52: error: expected function body after function declarator
                  cl_int *      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;               
                                                   ^
./CL/cl.h:744:57: error: expected function body after function declarator
                     cl_int     /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
                                                        ^
./CL/cl.h:749:39: error: expected ')'
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                                      ^
./CL/cl.h:749:26: note: to match this '('
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                         ^
./CL/cl.h:750:50: error: expected function body after function declarator
                    void *      /* user_data */) CL_API_SUFFIX__VERSION_1_1;
                                                 ^
./CL/cl.h:793:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
./CL/cl.h:820:59: error: expected function body after function declarator
                         cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                          ^
./CL/cl.h:846:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
13 errors generated.
13 errors generated.
make[1]: *** [omc_ocl_memory_ops.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/make -C testsuite/difftool
make[1]: *** [omc_ocl_interface.o] Error 1
cp -pP 3rdParty/gc-7.2/include/gc.h build/include/omc/gc.h
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_14576/testsuite/difftool'
flex omc-diff.l
In file included from omc_ocl_builtin_kernels.cpp:53:
In file included from ./omc_ocl_builtin_kernels.h:60:
In file included from ./omc_ocl_memory_ops.h:48:
In file included from ./omc_ocl_common_header.h:47:
./CL/cl.h:479:35: error: expected ')'
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                                  ^
./CL/cl.h:479:22: note: to match this '('
                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
                     ^
./CL/cl.h:486:43: error: expected ')'
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                                          ^
./CL/cl.h:486:30: note: to match this '('
                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
                             ^
./CL/cl.h:554:63: error: expected function body after function declarator
                  cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
                                                              ^
./CL/cl.h:608:55: error: expected ')'
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                                      ^
./CL/cl.h:608:42: note: to match this '('
                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
                                         ^
./CL/cl.h:609:73: error: expected function body after function declarator
                                    void * /*user_data */ )             CL_API_SUFFIX__VERSION_1_1; 
                                                                        ^
./CL/cl.h:660:34: error: expected ')'
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                                 ^
./CL/cl.h:660:21: note: to match this '('
               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
                    ^
./CL/cl.h:734:52: error: expected function body after function declarator
                  cl_int *      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;               
                                                   ^
./CL/cl.h:744:57: error: expected function body after function declarator
                     cl_int     /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
                                                        ^
./CL/cl.h:749:39: error: expected ')'
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                                      ^
./CL/cl.h:749:26: note: to match this '('
                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
                         ^
./CL/cl.h:750:50: error: expected function body after function declarator
                    void *      /* user_data */) CL_API_SUFFIX__VERSION_1_1;
                                                 ^
./CL/cl.h:793:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
./CL/cl.h:820:59: error: expected function body after function declarator
                         cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                          ^
./CL/cl.h:846:58: error: expected function body after function declarator
                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
                                                         ^
gcc -o ../../build/bin/omc-diff lex.yy.c
/opt/local/bin/clang++-mp-3.1 -pipe -O2 -arch x86_64 -Wall -DUSE_CORBA -DUSE_OMNIORB -I/opt/local/include  -c -o options.o options.cpp
13 errors generated.
make[1]: *** [omc_ocl_builtin_kernels.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_14576/SimulationRuntime/ParModelica/OpenCLRuntime'
make: *** [opencl_rt] Error 2

I've been trying to get OpenModelica running on my machine running 10.6.8 with no luck. I followed the instructions given here to build from sources using macports, but it seems to fail with error code 2. I then just cd'd over to the macports workspace and started trying to diagnose the issue. The first thing I noticed was that gcc/g++ was complaining about an unrecognised option:

Code:

gcc-mp-4.4: unrecognized option '-Xarch_x86_64'

I think this is a typo and should have a space rather than an underscore between Xarch and x86_64. Several Makefiles seemed to have this problem (OMShellGUI, OMEditGUI, OMPlotGUI). After fixing the individual Makefiles, compilation broke again for SimulationRuntime/ParModelica/OpenCLRuntime/CL/cl.h . This time it appears as though the error is from the parser, shown below:

Code:


make -C SimulationRuntime/ParModelica/OpenCLRuntime -f Makefile
/opt/local/bin/g++-mp-4.4  -I/opt/local/include -I. -I"../../c"  -c -o omc_ocl_memory_ops.o omc_ocl_memory_ops.cpp
In file included from ./omc_ocl_common_header.h:47,
                 from ./omc_ocl_memory_ops.h:48,
                 from omc_ocl_memory_ops.cpp:47:
./CL/cl.h:479: error: expected ')' before '*' token
./CL/cl.h:479: error: expected ')' before '*' token
./CL/cl.h:479: error: expected initializer before '*' token
./CL/cl.h:486: error: expected ')' before '*' token
./CL/cl.h:486: error: expected ')' before '*' token
./CL/cl.h:486: error: expected initializer before '*' token
./CL/cl.h:554: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
./CL/cl.h:608: error: expected ')' before '*' token
./CL/cl.h:608: error: expected ')' before '*' token
./CL/cl.h:608: error: expected initializer before '*' token
./CL/cl.h:660: error: expected ')' before '*' token
./CL/cl.h:660: error: expected ')' before '*' token
./CL/cl.h:660: error: expected initializer before '*' token
./CL/cl.h:734: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
./CL/cl.h:744: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
./CL/cl.h:749: error: expected ')' before '*' token
./CL/cl.h:749: error: expected ')' before '*' token
./CL/cl.h:749: error: expected initializer before '*' token
./CL/cl.h:793: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
./CL/cl.h:820: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
./CL/cl.h:846: error: expected initializer before 'CL_API_SUFFIX__VERSION_1_1'
make[1]: *** [omc_ocl_memory_ops.o] Error 1
make: *** [opencl_rt] Error 2

I'd appreciate any help that anyone could offer in tracking down this issue.

Oh and it appears that the binaries for Mac also linked on the "Download Mac" page doesn't work on my computer, failing with the following error when /opt/openmodelica/bin/omc is executed:

Code:


terminate called after throwing an instance of '__gnu_cxx::__concurrence_lock_error'
  what():  __gnu_cxx::__concurrence_lock_error
Abort trap

  • Index
  • » Users
  • » pth.ca
  • » Profile
You are here: