Fixed compilation warnings.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1666 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
87bac7cafa
commit
67dfd7facb
@ -35,12 +35,13 @@ srcdir=@srcdir@
|
||||
SHLIB_CFLAGS=@SHLIB_CFLAGS@
|
||||
SHLIB_SUFFIX=@SHLIB_SUFFIX@
|
||||
CWD=$(PWD)
|
||||
MPIF=`$(MPI_CC) -showme|sed "s/[^ ]*//"|sed "s/-pt/-lpt/"`
|
||||
#MPIF=-L/usr/local/lib -llammpio -llamf77mpi -lmpi -llam -lutil -lpthread
|
||||
MPILDF=`$(MPI_CC) -showme|sed "s/[^ ]*//"|sed "s/-pt/-lpt/"`
|
||||
MPICF=`$(MPI_CC) -showme| cut -d " " -f 2`
|
||||
#
|
||||
|
||||
OBJS=yap_mpi.o hash.o prologterms2c.o
|
||||
SOBJS=yap_mpi@SHLIB_SUFFIX@
|
||||
SOBJS=@LAMOBJS@
|
||||
#yap_mpi@SHLIB_SUFFIX@
|
||||
|
||||
#in some systems we just create a single object, in others we need to
|
||||
# create a libray
|
||||
@ -48,7 +49,7 @@ SOBJS=yap_mpi@SHLIB_SUFFIX@
|
||||
all: $(SOBJS)
|
||||
|
||||
yap_mpi.o: $(srcdir)/yap_mpi.c $(srcdir)/yap_mpi.c
|
||||
$(MPI_CC) $(CFLAGS) $(SHLIB_CFLAGS) $(MPIF) -c $(srcdir)/yap_mpi.c -o yap_mpi.o
|
||||
$(MPI_CC) $(CFLAGS) $(SHLIB_CFLAGS) $(MPICF) -c $(srcdir)/yap_mpi.c -o yap_mpi.o
|
||||
|
||||
prologterms2c.o: $(srcdir)/prologterms2c.c $(srcdir)/prologterms2c.h
|
||||
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/prologterms2c.c -o prologterms2c.o
|
||||
@ -60,7 +61,7 @@ hash.o: $(srcdir)/hash.c $(srcdir)/hash.h
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ -o $@ $<
|
||||
|
||||
@DO_SECOND_LD@yap_mpi@SHLIB_SUFFIX@: $(OBJS)
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ $(MPIF) -o yap_mpi@SHLIB_SUFFIX@ $(OBJS)
|
||||
@DO_SECOND_LD@ @SHLIB_LD@ $(MPILDF) -o yap_mpi@SHLIB_SUFFIX@ $(OBJS)
|
||||
|
||||
install: all
|
||||
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(LIBDIR)
|
||||
@ -68,4 +69,6 @@ install: all
|
||||
clean:
|
||||
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
||||
|
||||
no:
|
||||
@echo "YAP LAM/MPI module not compiled."
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Author: Nuno Fonseca
|
||||
* File: prologterms2c.c
|
||||
* Last rev: $Id: prologterms2c.c,v 1.1 2006-06-02 04:16:31 nunofonseca Exp $
|
||||
* Last rev: $Id: prologterms2c.c,v 1.2 2006-06-04 18:45:20 nunofonseca Exp $
|
||||
* Comments: This file provides a set of functions to convert a prolog term to a C string and back.
|
||||
*************************************************************************/
|
||||
#include "prologterms2c.h"
|
||||
@ -196,6 +196,7 @@ YAP_Term
|
||||
string2term(char *const ptr,const size_t *size) {
|
||||
YAP_Term t;
|
||||
struct buffer_ds b;
|
||||
b.size=b.len=b.pos=0;
|
||||
|
||||
if (BUFFER_PTR!=ptr) { //
|
||||
#ifdef DEBUG
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Author: Nuno Fonseca
|
||||
* Date: 2004-05-02
|
||||
* YAP interface to LAM/MPI
|
||||
* $Id: yap_mpi.c,v 1.1 2006-06-02 04:16:31 nunofonseca Exp $
|
||||
* $Id: yap_mpi.c,v 1.2 2006-06-04 18:45:20 nunofonseca Exp $
|
||||
*
|
||||
******************************************************************************************/
|
||||
#include <stdlib.h>
|
||||
@ -91,42 +91,13 @@ static double total_time_spent; // total time spend in communication code
|
||||
|
||||
#define RETURN(p) {PAUSE_TIMER();return (p);}
|
||||
|
||||
//clock_t _tstart, _tend;
|
||||
//clock_t tz;
|
||||
|
||||
//struct tms _tstart,_tend;
|
||||
static struct timeval _tstart, _tend;
|
||||
//static struct timezone tz;
|
||||
/* void tstart(void) { */
|
||||
/* gettimeofday(&_tstart, &tz); */
|
||||
/* } */
|
||||
|
||||
/* void tend(void) { */
|
||||
/* gettimeofday(&_tend,&tz); */
|
||||
/* } */
|
||||
/* // */
|
||||
/* double tval(){ */
|
||||
/* double t1, t2; */
|
||||
/* t1 = (double)_tstart.tv_sec + (double)_tstart.tv_usec/(1000*1000); */
|
||||
/* t2 = (double)_tend.tv_sec + (double)_tend.tv_usec/(1000*1000); */
|
||||
/* // fprintf(stderr,"%f %f\n",(t2-t1),total_time_spent); */
|
||||
/* return t2-t1; */
|
||||
/* } */
|
||||
/* void tstart(void) { */
|
||||
/* _tstart = clock(); */
|
||||
/* } */
|
||||
/* void tend(void) { */
|
||||
/* _tend = clock(); */
|
||||
/* } */
|
||||
/* // */
|
||||
/* double tval(){ */
|
||||
/* fprintf(stderr,"%ld %ld %ld\n",(_tend-_tstart)/CLOCKS_PER_SEC,_tstart,_tend); */
|
||||
/* return (_tend-_tstart)/CLOCKS_PER_SEC; */
|
||||
/* } */
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void init_mpi(void);
|
||||
|
||||
void tstart(void) {
|
||||
struct rusage r;
|
||||
getrusage(RUSAGE_SELF,&r);
|
||||
@ -838,7 +809,7 @@ my_bcast(YAP_Term t1,YAP_Term t2, YAP_Term t3) {
|
||||
* mpi_bcast(+Root,+Data).
|
||||
*/
|
||||
static int
|
||||
mpi_bcast2() {
|
||||
mpi_bcast2(void) {
|
||||
return my_bcast(YAP_ARG1,YAP_ARG2,YAP_MkIntTerm(0));
|
||||
}
|
||||
/*
|
||||
@ -930,7 +901,7 @@ mpi_ibcast3(void) {
|
||||
* mpi_ibcast(+Root,+Data).
|
||||
*/
|
||||
static int
|
||||
mpi_ibcast2() {
|
||||
mpi_ibcast2(void) {
|
||||
return my_ibcast(YAP_ARG1,YAP_ARG2,YAP_MkIntTerm(0));
|
||||
}
|
||||
/*******************************************
|
||||
|
Reference in New Issue
Block a user