Skip to content

Commit 4371556

Browse files
author
Marcus Walther
committed
- revert r20442,20445,20446,20450 and 20451
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20452 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 8f5fe9a commit 4371556

File tree

5 files changed

+51
-61
lines changed

5 files changed

+51
-61
lines changed

Compiler/omc_release/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ifdef USE_GRAPH
4242
endif
4343
endif
4444

45-
LDFLAGS = @LDFLAGS@ -lm -L$(RMLHOME)/lib/plain -lrml $(GRAPHSTREAMLIB) $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) $(METISLIB) $(PATOHLIB) -L../../build/lib/omc @RPATH@ @OMC_LIBS@ -lgc -lexpat -lcjson @RT_LDFLAGS@
45+
LDFLAGS = @LDFLAGS@ -lm -L$(RMLHOME)/lib/plain -lrml $(GRAPHSTREAMLIB) $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) $(METISLIB) $(PATOHLIB) -L../../build/lib/omc @RPATH@ @OMC_LIBS@ -lgc -lexpat @RT_LDFLAGS@
4646

4747
PROG = omc
4848
RMLC = @rmlc_bin@

Compiler/runtime/HpcOmBenchmarkExt.cpp

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <sstream>
2828
#include <stdio.h>
2929
#include <fstream>
30-
#include "cJSON.h"
30+
//#include "cJSON.h"
3131

3232
struct Equation {
3333
int id;
@@ -336,52 +336,52 @@ class XmlBenchReader {
336336

337337
std::list<std::list<double> > ReadJsonBenchFileEquations(std::string filePath)
338338
{
339-
std::list<std::list<double> > resultList = std::list<std::list<double> >();
340-
341-
FILE *fp;
342-
long lSize;
343-
char *buffer;
344-
int arraySize, i;
345-
cJSON *root;
346-
cJSON *profileBlocks;
347-
348-
fp = fopen ( filePath.c_str() , "rb" );
349-
if( !fp ) perror(filePath.c_str()),exit(1);
350-
351-
fseek( fp , 0L , SEEK_END);
352-
lSize = ftell( fp );
353-
rewind( fp );
354-
355-
/* allocate memory for entire content */
356-
buffer = (char*)calloc( 1, lSize+1 );
357-
if( !buffer ) fclose(fp),fputs("memory alloc fails",stderr),exit(1);
358-
359-
/* copy the file into the buffer */
360-
if( 1!=fread( buffer , lSize, 1 , fp) )
361-
fclose(fp),free(buffer),fputs("entire read fails",stderr),exit(1);
362-
363-
/* do your work here, buffer is a string contains the whole text */
364-
root = cJSON_Parse(buffer);
365-
profileBlocks = cJSON_GetObjectItem(root,"profileBlocks");
366-
arraySize = cJSON_GetArraySize(profileBlocks);
367-
for(i = 0; i < arraySize; i++)
368-
{
369-
cJSON *item = cJSON_GetArrayItem(profileBlocks, i);
370-
cJSON *idItem = cJSON_GetObjectItem(item, "id");
371-
cJSON *ncallItem = cJSON_GetObjectItem(item, "ncall");
372-
cJSON *timeItem = cJSON_GetObjectItem(item, "time");
373-
std::list<double> tmpLst = std::list<double>();
374-
375-
tmpLst.push_back(idItem->valuedouble);
376-
tmpLst.push_back(timeItem->valuedouble);
377-
tmpLst.push_back(ncallItem->valuedouble);
378-
resultList.push_back(tmpLst);
379-
}
380-
381-
fclose(fp);
382-
free(buffer);
339+
std::list<std::list<double> > resultList = std::list<std::list<double> >();
340+
341+
// FILE *fp;
342+
// long lSize;
343+
// char *buffer;
344+
// int arraySize, i;
345+
// cJSON *root;
346+
// cJSON *profileBlocks;
347+
//
348+
// fp = fopen ( filePath.c_str() , "rb" );
349+
// if( !fp ) perror(filePath.c_str()),exit(1);
350+
//
351+
// fseek( fp , 0L , SEEK_END);
352+
// lSize = ftell( fp );
353+
// rewind( fp );
354+
//
355+
// /* allocate memory for entire content */
356+
// buffer = (char*)calloc( 1, lSize+1 );
357+
// if( !buffer ) fclose(fp),fputs("memory alloc fails",stderr),exit(1);
358+
//
359+
// /* copy the file into the buffer */
360+
// if( 1!=fread( buffer , lSize, 1 , fp) )
361+
// fclose(fp),free(buffer),fputs("entire read fails",stderr),exit(1);
362+
//
363+
// /* do your work here, buffer is a string contains the whole text */
364+
// root = cJSON_Parse(buffer);
365+
// profileBlocks = cJSON_GetObjectItem(root,"profileBlocks");
366+
// arraySize = cJSON_GetArraySize(profileBlocks);
367+
// for(i = 0; i < arraySize; i++)
368+
// {
369+
// cJSON *item = cJSON_GetArrayItem(profileBlocks, i);
370+
// cJSON *idItem = cJSON_GetObjectItem(item, "id");
371+
// cJSON *ncallItem = cJSON_GetObjectItem(item, "ncall");
372+
// cJSON *timeItem = cJSON_GetObjectItem(item, "time");
373+
// std::list<double> tmpLst = std::list<double>();
374+
//
375+
// tmpLst.push_back(idItem->valuedouble);
376+
// tmpLst.push_back(timeItem->valuedouble);
377+
// tmpLst.push_back(ncallItem->valuedouble);
378+
// resultList.push_back(tmpLst);
379+
// }
380+
//
381+
// fclose(fp);
382+
// free(buffer);
383383

384-
return resultList;
384+
return resultList;
385385
}
386386

387387
void* HpcOmBenchmarkExtImpl__readCalcTimesFromXml(const char *filename)

Compiler/runtime/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ endif
1414

1515
FMIINCLUDE = ../../3rdParty/FMIL/install/include
1616
GRAPHSTREAMINCLUDE = ../../3rdParty/graphstream/gs-netstream/c++/src/
17-
CJSONINCLUDE = ../../3rdParty/cJSON/
1817
CFLAGS = @CFLAGS@ $(USE_CORBA)
1918
OMPCC = @OMPCC@
2019

@@ -38,7 +37,7 @@ CXX = @CXX@
3837
IDL = @IDLCMD@
3938
IDLPYTHON = @IDLPYTHONCMD@
4039
CXXFLAGS = $(CFLAGS)
41-
CPPFLAGS = @CPPFLAGS@ $(RMLINCLUDE) -I$(top_builddir)/SimulationRuntime/c -I$(top_builddir)/SimulationRuntime/c/simulation/results -I$(top_builddir)/SimulationRuntime/c/simulation/libf2c -I$(top_builddir)/SimulationRuntime/c/util -I$(top_builddir)/SimulationRuntime/c/meta -I$(top_builddir)/SimulationRuntime/c/meta/gc -I$(srcdir) -I. $(CORBAINCL) -I$(FMIINCLUDE) -I$(top_builddir)/3rdParty/gc-7.2/include -I$(GRAPHSTREAMINCLUDE) -I$(CJSONINCLUDE)
40+
CPPFLAGS = @CPPFLAGS@ $(RMLINCLUDE) -I$(top_builddir)/SimulationRuntime/c -I$(top_builddir)/SimulationRuntime/c/simulation/results -I$(top_builddir)/SimulationRuntime/c/simulation/libf2c -I$(top_builddir)/SimulationRuntime/c/util -I$(top_builddir)/SimulationRuntime/c/meta -I$(top_builddir)/SimulationRuntime/c/meta/gc -I$(srcdir) -I. $(CORBAINCL) -I$(FMIINCLUDE) -I$(top_builddir)/3rdParty/gc-7.2/include -I$(GRAPHSTREAMINCLUDE)
4241

4342
include Makefile.common
4443

Makefile.common

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mkbuilddirs:
4949

5050
release: omc-diff omc
5151

52-
bootstrap-dependencies: omc-diff interactive docs fmi fmil opencl_rt lis graphstream cjson
52+
bootstrap-dependencies: omc-diff interactive docs fmi fmil opencl_rt lis graphstream
5353
# NOTE: OpenModelicaBootstrappingHeader.h has to be regenerated without any other process writing to so/etc or you get bus errors
5454
$(MAKE) -C Compiler OpenModelicaBootstrappingHeader.h
5555
$(MAKE) -C Compiler/runtime install
@@ -189,7 +189,6 @@ qjson:
189189
test "(" ! `uname` = Darwin ")" -o "(" ! -f 3rdParty/qjson-0.8.1/build/lib/libqjson$(SHREXT) ")" || install_name_tool -id @rpath/libqjson$(SHREXT) 3rdParty/qjson-0.8.1/build/lib/libqjson$(SHREXT)
190190
cp -a 3rdParty/qjson-0.8.1/build/lib/libqjson*$(SHREXT)* $(builddir_lib)/omc/
191191
cp -a 3rdParty/qjson-0.8.1/src/*.h 3rdParty/qjson-0.8.1/build/include/qjson
192-
193192
CMinpack:
194193
test -d 3rdParty/CMinpack
195194
mkdir -p 3rdParty/CMinpack/build
@@ -314,7 +313,7 @@ bootstrap-clean:
314313
openblas-clean:
315314
# OpenBLAS make clean actually gives error-messages. Let it do it, but silently
316315
$(MAKE) -C 3rdParty/OpenBLAS-0.2.8 clean > /dev/null 2>&1
317-
clean: qtclean fmil-clean opencl_rt_clean gc-clean lis-clean runtimeCPPclean CMinpack-clean Cdaskr-clean bootstrap-clean msgpack-clean graphstream-clean openblas-clean cjson-clean
316+
clean: qtclean fmil-clean opencl_rt_clean gc-clean lis-clean runtimeCPPclean CMinpack-clean Cdaskr-clean bootstrap-clean msgpack-clean graphstream-clean openblas-clean
318317
(cd SimulationRuntime/c && $(MAKE) -f $(defaultMakefileTarget) clean)
319318
(cd SimulationRuntime/interactive && $(MAKE) -f $(defaultMakefileTarget) clean)
320319
(cd Compiler && $(MAKE) -f $(defaultMakefileTarget) clean)

Makefile.in

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ settings:
6060

6161
omc: @OMCTARGET@
6262

63-
omc-rml: omc-diff interactive docs fmil opencl_rt lis omc-rml-nolink graphstream cjson
63+
omc-rml: omc-diff interactive docs fmil opencl_rt lis omc-rml-nolink graphstream
6464
$(MAKE) -C Compiler -f Makefile release
6565
$(MAKE) omlibrary
6666
omc-rml-nolink:
@@ -217,11 +217,3 @@ emcc: msl-external-libs-emcc emcc-simulationruntime
217217
emcc-simulationruntime:
218218
mkdir -p build/lib/omc/emcc/
219219
$(MAKE) -C SimulationRuntime/c emcc
220-
221-
cjson:
222-
cd 3rdParty/cJSON && ./configure && $(MAKE)
223-
cp 3rdParty/cJSON/libcjson.so build/lib/omc/
224-
225-
cjson-clean:
226-
rm -f 3rdParty/cJSON/*.o
227-
rm -f 3rdParty/cJSON/*.so

0 commit comments

Comments
 (0)