Changeset 902 for branches


Ignore:
Timestamp:
Mar 29, 2019, 3:05:09 PM (5 years ago)
Author:
djay
Message:

Make Callback and HPC support independent.

Location:
branches/prototype-v0/zoo-project/zoo-kernel
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/Makefile.in

    r899 r902  
    6666
    6767service_yaml.o: service_yaml.c service.h
    68         g++ ${YAML_CFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_yaml.c
     68        gcc ${YAML_CFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_yaml.c
    6969
    7070meta_sql.o: meta_sql.c meta_sql.h service.h
     
    121121
    122122libzoo_service.${EXT}: version.h service_internal.o service.o sqlapi.o
    123         gcc -shared  ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o sqlapi.o ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS}
     123        g++ -shared  ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o sqlapi.o ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS} ${MACOS_LD_FLAGS}
    124124
    125125zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o  ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} service_callback.o
  • branches/prototype-v0/zoo-project/zoo-kernel/ZOOMakefile.opts.in

    r900 r902  
    9393PHP_FILE=@PHP_FILE@
    9494
    95 
    9695PERLCFLAGS=@PERL_CPPFLAGS@
    9796PERLLDFLAGS=@PERL_LDFLAGS@
     
    103102HPC_ENABLED=@HPC_ENABLED@
    104103HPC_FILES=@HPC_FILES@
     104
     105CALLBACK_FILE=@CALLBACK_FILE@
     106CALLBACK_USE=@CALLBACK_USE@
    105107
    106108OTBCFLAGS=@OTB_CPPFLAGS@
     
    119121MONO_FILE=@MONO_FILE@
    120122
    121 CFLAGS=@SSH2_CPPFLAGS@ @PROJ_CPPFLAGS@ @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ @UUID_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
    122 LDFLAGS=-lzoo_service @SSH2_LDFLAGS@ @PROJ_LDFLAGS@ @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ @UUID_LDFLAGS@ ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS} ${RLDFLAGS} @JSON_LDFLAGS@ @XSLT_LDFLAGS@
     123CFLAGS=@CALLBACK_USE@ @SSH2_CPPFLAGS@ @PROJ_CPPFLAGS@ @RELY_ON_DB@ @DEB_DEF@ -fpic @OPENSSL_CFLAGS@ @UUID_CFLAGS@ ${FCGI_CFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
     124LDFLAGS=-lzoo_service @SSH2_LDFLAGS@ @PROJ_LDFLAGS@ @DEFAULT_LIBS@ -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS}  ${FCGI_LDFLAGS} @OPENSSL_LDFLAGS@ @UUID_LDFLAGS@ ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${MACOS_LD_NET_FLAGS} ${YAML_LDFLAGS} ${OTBLDFLAGS} ${SAGA_LDFLAGS} ${MONO_LDFLAGS} ${RLDFLAGS} @JSON_LDFLAGS@ @XSLT_LDFLAGS@
    123125
    124126DATAROOTDIR=@datarootdir@/zoo-project
  • branches/prototype-v0/zoo-project/zoo-kernel/configure.ac

    r900 r902  
    6565#============================================================================
    6666
     67AC_ARG_WITH([callback],
     68    [AS_HELP_STRING([--with-callback=yes], [Activate callback invocation during HPC execution])],
     69    [CALLBACK_ACTIVATED="$withval"], [CALLBACK_ACTIVATED="no"])
     70   
    6771AC_ARG_WITH([json],
    6872    [AS_HELP_STRING([--with-json=PATH], [Specifies an alternative location for the json-c library])],
    6973    [JSON_DIR="$withval"], [JSON_DIR="/usr/"])
    70 if test "x$JSON_DIR" != "x"
     74if test "x$JSON_DIR" != "x" && test "x$CALLBACK_ACTIVATED" == "xyes"
    7175then
    7276        JSON_CPPFLAGS="-I$JSON_DIR/include/json-c/"
     
    8387        JSON_FILE="service_json.o"
    8488        JSON_ENABLED="-DJSON"
     89        CALLBACK_FILE="service_callback.o"
     90        CALLBACK_USE="-DUSE_CALLBACK"
    8591fi
    8692AC_SUBST([JSON_CPPFLAGS])
     
    8894AC_SUBST([JSON_FILE])
    8995AC_SUBST([JSON_ENABLED])
     96AC_SUBST([CALLBACK_FILE])
     97AC_SUBST([CALLBACK_USE])
    9098
    9199#============================================================================
  • branches/prototype-v0/zoo-project/zoo-kernel/response_print.c

    r897 r902  
    3333#include "cpl_vsi.h"
    3434#endif
    35 #ifdef USE_HPC
     35#ifdef USE_CALLBACK
    3636#include "service_callback.h"
    3737#endif
     
    19901990      nc = xmlNewNode(ns, BAD_CAST "ProcessOutputs");
    19911991    }
    1992     //dumpMaps(outputs);
    19931992    maps* mcursor=outputs;
    19941993    elements* scursor=serv->outputs;
     
    29012900    else{
    29022901      maps* tmpMaps=getMaps(m,"lenv");
    2903       dumpMap(tmpMaps->content);
    2904 #ifdef USE_HPC
     2902#ifdef USE_CALLBACK
    29052903      invokeCallback(m,NULL,NULL,7,0);
    29062904#endif
  • branches/prototype-v0/zoo-project/zoo-kernel/server_internal.c

    r890 r902  
    2626#include "service_internal.h"
    2727#include "response_print.h"
    28 #include "service_callback.h"
     28//#include "service_callback.h"
    2929#include "mimetypes.h"
    3030#ifndef WIN32
  • branches/prototype-v0/zoo-project/zoo-kernel/service_internal_hpc.c

    r899 r902  
    471471  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
    472472#endif
     473#ifdef USE_CALLBACK
    473474  invokeCallback(m,inputs,NULL,1,1);
    474475  invokeCallback(m,inputs,NULL,2,0);
     476#endif 
    475477  if(getMapFromMaps(m,"lenv","mapError")!=NULL){
     478#ifdef USE_CALLBACK
    476479    invokeCallback(*main_conf,inputs,NULL,7,0);
     480#endif
    477481    return -1;
    478482  }
     
    489493    fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
    490494#endif
     495#ifdef USE_CALLBACK
    491496    invokeCallback(*main_conf,inputs,NULL,7,0);
     497#endif
    492498#ifdef HPC_DEBUG
    493499    fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    498504  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
    499505#endif
     506#ifdef USE_CALLBACK
    500507  invokeCallback(m,inputs,NULL,2,1);
     508#endif
    501509#ifdef HPC_DEBUG
    502510  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    611619  fflush(stderr);
    612620#endif
     621#ifdef USE_CALLBACK
    613622  invokeCallback(m,inputs,NULL,3,0);
     623#endif
    614624#ifdef HPC_DEBUG
    615625  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    708718  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
    709719#endif
     720#ifdef USE_CALLBACK
    710721  invokeCallback(m,inputs,NULL,3,1);
     722#endif
    711723#ifdef HPC_DEBUG
    712724  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    717729  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
    718730#endif
     731#ifdef USE_CALLBACK
    719732  invokeCallback(m,inputs,NULL,4,0);
     733#endif
    720734#ifdef HPC_DEBUG
    721735  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    731745    fflush(stderr);
    732746#endif
     747#ifdef USE_CALLBACK
    733748    invokeCallback(*main_conf,NULL,NULL,7,0);
     749#endif
    734750#ifdef HPC_DEBUG
    735751    fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    748764  if(copy0!=true){
    749765    setMapInMaps(*main_conf,"lenv","message",_("Unable to upload the script"));
     766#ifdef USE_CALLBACK
    750767    invokeCallback(*main_conf,NULL,NULL,7,0);
     768#endif
    751769    errorException(*main_conf,_("Unable to upload the script"),"NoApplicableCode",NULL);
    752770    return -1;
     
    790808    fflush(stderr);
    791809#endif
     810#ifdef USE_CALLBACK
    792811    invokeCallback(*main_conf,NULL,NULL,7,0);
     812#endif
    793813#ifdef HPC_DEBUG
    794814    fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    808828  fflush(stderr);
    809829#endif
     830#ifdef USE_CALLBACK
    810831  invokeCallback(m,NULL,NULL,4,1);
     832#endif
    811833#ifdef HPC_DEBUG
    812834  fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    836858    fflush(stderr);
    837859#endif
     860#ifdef USE_CALLBACK
    838861    invokeCallback(*main_conf,NULL,NULL,7,0);
     862#endif
    839863    removeReadLocks(main_conf);
    840864#ifdef HPC_DEBUG
     
    856880    fflush(stderr);
    857881#endif
     882#ifdef USE_CALLBACK
    858883    invokeCallback(*main_conf,NULL,NULL,7,0);
     884#endif
    859885    removeReadLocks(main_conf);
    860886#ifdef HPC_DEBUG
     
    872898    fflush(stderr);
    873899#endif
     900#ifdef USE_CALLBACK
    874901    invokeCallback(*main_conf,NULL,NULL,7,0);
     902#endif
    875903    removeReadLocks(main_conf);
    876904#ifdef HPC_DEBUG
     
    896924        fflush(stderr);
    897925#endif
     926#ifdef USE_CALLBACK
    898927        invokeCallback(*main_conf,NULL,NULL,7,0);
     928#endif
    899929        removeReadLocks(main_conf);
    900930#ifdef HPC_DEBUG
     
    912942          fflush(stderr);
    913943#endif
     944#ifdef USE_CALLBACK
    914945          invokeCallback(*main_conf,NULL,NULL,7,0);
     946#endif
    915947          removeReadLocks(main_conf);
    916948#ifdef HPC_DEBUG
     
    932964        fflush(stderr);
    933965#endif
     966#ifdef USE_CALLBACK
    934967        invokeCallback(m,NULL,outputs,5,0);
     968#endif
    935969#ifdef HPC_DEBUG
    936970        fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    10061040                  free(tmpStr);
    10071041                }
     1042#ifdef USE_CALLBACK
    10081043                invokeCallback(*main_conf,NULL,NULL,7,0);
     1044#endif
    10091045                return SERVICE_FAILED;
    10101046              }
     
    10831119                  free(tmpStr);
    10841120                }
     1121#ifdef USE_CALLBACK
    10851122                invokeCallback(*main_conf,NULL,NULL,7,0);
     1123#endif
    10861124                return SERVICE_FAILED;
    10871125              }
     
    11011139        fflush(stderr);
    11021140#endif
     1141#ifdef USE_CALLBACK
    11031142        invokeCallback(*main_conf,NULL,NULL,7,0);
     1143#endif
    11041144#ifdef HPC_DEBUG
    11051145        fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
     
    11171157      fflush(stderr);
    11181158#endif
     1159#ifdef USE_CALLBACK
    11191160      invokeCallback(*main_conf,NULL,NULL,7,0);
     1161#endif
    11201162#ifdef HPC_DEBUG
    11211163      fprintf(stderr,"************************* %s %d \n\n",__FILE__,__LINE__);
  • branches/prototype-v0/zoo-project/zoo-kernel/service_yaml.c

    r790 r902  
    487487              addMapToIoType(&current_element->supported,current_content);
    488488          }
    489           freeMaps(&current_content);
     489          freeMap(&current_content);
    490490          free(current_content);
    491491          current_content=NULL;
  • branches/prototype-v0/zoo-project/zoo-kernel/zoo_service_loader.c

    r897 r902  
    107107#endif
    108108
    109 #ifdef USE_HPC
     109#ifdef USE_CALLBACK
    110110#include "service_json.h"
    111111#include "service_callback.h"
     
    24892489          recordServiceStatus(m);
    24902490#endif
    2491 #ifdef USE_HPC
     2491#ifdef USE_CALLBACK
    24922492          invokeCallback(m,NULL,NULL,0,0);
    24932493#endif
     
    25332533          free(flenv);
    25342534
    2535 #ifdef USE_HPC
     2535#ifdef USE_CALLBACK
    25362536          invokeCallback(m,request_input_real_format,NULL,1,0);
    25372537#endif
     
    25502550#else
    25512551            recordResponse(m,fbkp1);
    2552 #ifdef USE_HPC
     2552#ifdef USE_CALLBACK
    25532553            invokeCallback(m,NULL,NULL,7,0);
    25542554#endif
     
    25772577          if(getMapFromMaps(m,"lenv","mapError")!=NULL){
    25782578            setMapInMaps(m,"lenv","message",_("Issue with geographic data"));
    2579 #ifdef USE_HPC
     2579#ifdef USE_CALLBACK
    25802580            invokeCallback(m,NULL,NULL,7,0);
    25812581#endif
     
    26342634    {
    26352635      if (eres == SERVICE_SUCCEEDED)
    2636 #ifdef USE_HPC
     2636#ifdef USE_CALLBACK
    26372637        invokeCallback(m,NULL,request_output_real_format,5,1);
    26382638#endif
     
    26652665      recordResponse(m,fbkp1);
    26662666      if (eres == SERVICE_SUCCEEDED)
    2667 #ifdef USE_HPC
     2667#ifdef USE_CALLBACK
    26682668        invokeCallback(m,NULL,request_output_real_format,6,0);
    26692669#endif
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png