Skip to content
Permalink
Browse files

Testing 64bit compiler flags on Intel

  • Loading branch information...
Jorge Daza Garcia-Blanes
Jorge Daza Garcia-Blanes committed Nov 1, 2006
1 parent 48bf5a2 commit 8fe68af006a091923e4243bead4967e041050c73
@@ -1,5 +1,9 @@
# $Id$

CHOST=x86_64-pc-linux-gnu
CFLAGS= -march=nocona -O2 -pipe
CXXFLAGS=${CFLAGS}

CC = gcc
CXX = g++
OBJS_LIBDRQUEUE = $(patsubst %.c,%.o,$(wildcard libdrqueue/*.c))
@@ -30,8 +34,8 @@ systype = $(shell bash -c "source ./bin/shlib; get_env_kernel")
machinetype = $(shell bash -c "source ./bin/shlib; get_env_machine")
endif

CFLAGS += -g -O2 -Wall
CPPFLAGS += -D_NO_COMPUTER_POOL_SEMAPHORES -D_GNU_SOURCE -DCOMM_REPORT -I. -Ilibdrqueue
CFLAGS += -g -O0 -Wall
CPPFLAGS += -D_NO_COMPUTER_SEMAPHORES -D_NO_COMPUTER_POOL_SEMAPHORES -D_GNU_SOURCE -DCOMM_REPORT -I. -Ilibdrqueue
CXXFLAGS += $(CFLAGS) -D__CPLUSPLUS

ifeq ($(systype),Linux)
@@ -4,7 +4,11 @@ import os

env = Environment ()

env.Append (CCFLAGS=Split ('-DCOMM_REPORT -D_GNU_SOURCE -D_NO_COMPUTER_POOL_SEMAPHORES -Wall -g -O0'))
env.Append (CFLAGS = Split('-march=nocona -O2 -pipe'))

env.Append (CCFLAGS=Split ('-DCOMM_REPORT -D_GNU_SOURCE -D_NO_COMPUTER_POOL_SEMAPHORES -D_NO_COMPUTER_SEMAPHORES \
-Wall -g -O0 -march=nocona -pipe'),
CXXFLAGS=Split('-march=nocona -O2 -pipe'))

print "Platform is: ",sys.platform

7 delipc
@@ -1,7 +1,6 @@
#!/bin/sh
ipcs | egrep 0x0000000 | egrep 64 | cut -f 2 -d" " > delete
ipcs | egrep 0x0000000 | egrep 128 | cut -f 2 -d" " >> delete
ipcs | egrep 0x0000000 | egrep 256 | cut -f 2 -d" " >> delete
ipcs | cut -f 2 -d" " >> delete
ipcs -s | grep '^0x' | cut -f2 -d" " > delete
for a in `cat delete`; do ipcrm -s $a; done
ipcs -m | grep '^0x' | cut -f2 -d" " > delete
for a in `cat delete`; do ipcrm -m $a; done

@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004 Jorge Daza Garcia-Blanes
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -16,9 +18,9 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
/*
* $Header: /root/cvs/drqueue/drqman/drqm_common.h,v 1.2 2001/09/24 16:10:20 jorge Exp $
*/
//
// $Header: /root/cvs/drqueue/drqman/drqm_common.h,v 1.2 2001/09/24 16:10:20 jorge Exp $
//

#ifndef _DRQM_COMMON_H_
#define _DRQM_COMMON_H_
@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004 Jorge Daza Garcia-Blanes
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -47,8 +49,11 @@ int common_environment_check (void) {
return 0;
}

#ifndef __CYGWIN
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_TMP"));
if (getenv("DRQUEUE_TMP") != NULL) {
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_TMP"));
} else {
snprintf (dir_str,BUFFERLEN-1,"%s/tmp",getenv("DRQUEUE_ROOT"));
}
if (stat (dir_str,&s_stat) == -1) {
drerrno = DRE_NOTMPDIR;
return 0;
@@ -58,7 +63,6 @@ int common_environment_check (void) {
return 0;
}
}
#endif

if (getenv("DRQUEUE_DB") != NULL) {
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_DB"));
@@ -73,7 +77,11 @@ int common_environment_check (void) {
return 0;
}

snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_LOGS"));
if (getenv("DRQUEUE_LOGS")) {
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_LOGS"));
} else {
snprintf (dir_str,BUFFERLEN-1,"%s/logs",getenv("DRQUEUE_ROOT"));
}
if (stat (dir_str,&s_stat) == -1) {
drerrno = DRE_NOLOGDIR;
return 0;
@@ -82,13 +90,21 @@ int common_environment_check (void) {
return 0;
}

snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_BIN"));
if (getenv("DRQUEUE_BIN")) {
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_BIN"));
} else {
snprintf (dir_str,BUFFERLEN-1,"%s/bin",getenv("DRQUEUE_ROOT"));
}
if (stat (dir_str,&s_stat) == -1) {
drerrno = DRE_NOBINDIR;
return 0;
}

snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_ETC"));
if (getenv("DRQUEUE_ETC")) {
snprintf (dir_str,BUFFERLEN-1,"%s",getenv("DRQUEUE_ETC"));
} else {
snprintf (dir_str,BUFFERLEN-1,"%s/etc",getenv("DRQUEUE_ROOT"));
}
if (stat (dir_str,&s_stat) == -1) {
drerrno = DRE_NOETCDIR;
return 0;
@@ -196,7 +212,9 @@ void set_default_env(void) {

if ((drq_root = getenv("DRQUEUE_ROOT")) == NULL) {
drerrno = DRE_NOENVROOT;
log_auto (L_ERROR,"Environment variable DRQUEUE_ROOT is not set. Please set your environment variables properly. DRQUEUE_ROOT should point to the base path of DrQueue's installation. Check the documentation for more help.");
log_auto (L_ERROR,"Environment variable DRQUEUE_ROOT is not set. Please set your environment "
"variables properly. DRQUEUE_ROOT should point to the base path of DrQueue's "
"installation. Check the documentation for more help.");
exit (1);
}

@@ -24,8 +24,6 @@
#ifndef _COMMUNICATIONS_H_
#define _COMMUNICATIONS_H_

#pragma pack(push,1)

#include "request.h"
#include "job.h"
#include "database.h"
@@ -36,8 +34,6 @@ extern long int bsent; /* Bytes sent */
extern long int brecv; /* Bytes received */
#endif

#pragma pack(pop)

int get_socket (uint16_t port);
int accept_socket (int sfd,struct database *wdb,struct sockaddr_in *addr);
int accept_socket_slave (int sfd);
@@ -382,6 +382,10 @@ void computer_autoenable_check (struct slave_database *sdb) {

int
computer_lock_check (struct computer *computer) {
#if defined (_NO_COMPUTER_SEMAPHORES)
return 1;
#endif

if (!semaphore_valid(computer->semid)) {
log_auto (L_WARNING,"computer_lock(): semaphore not valid, creating a new one. Computer Id: %u",computer->hwinfo.id);
computer->semid = semaphore_get();
@@ -396,6 +400,9 @@ computer_lock_check (struct computer *computer) {

int
computer_lock (struct computer *computer) {
#if defined (_NO_COMPUTER_SEMAPHORES)
return 1;
#endif
computer_lock_check (computer);
if (!semaphore_lock (computer->semid)) {
log_auto (L_ERROR,"computer_lock(): There was an error while trying to lock the computer structure. Msg: %s",
@@ -409,6 +416,9 @@ computer_lock (struct computer *computer) {

int
computer_release (struct computer *computer) {
#if defined (_NO_COMPUTER_SEMAPHORES)
return 1;
#endif
computer_lock_check (computer);
if (!semaphore_release (computer->semid)) {
log_auto (L_ERROR,"computer_release(): There was an error while trying to release the computer structure. Msg: %s",
@@ -29,11 +29,11 @@
#include <time.h>
#include <stdint.h>

#pragma pack (push,1)

#include "computer_info.h"
#include "computer_status.h"

#pragma pack (push,1)

// Autoenable flags
#define AEF_ACTIVE (1<<0)

@@ -24,13 +24,12 @@
#ifndef _COMPUTER_INFO_H_
#define _COMPUTER_INFO_H_


#if defined (__IRIX)
# include <sys/types.h>
#endif
#include "constants.h"

#include <stdint.h>
#include "constants.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>

#pragma pack(push,1)

@@ -71,9 +70,9 @@ typedef enum {
struct computer_hwinfo {
char name[MAXNAMELEN]; /* Name of the computer */
uint32_t id; /* Identification number */
unsigned char arch; /* type of architecture */
unsigned char os; /* type of operating system */
unsigned char proctype; /* type of processors */
uint8_t arch; /* type of architecture */
uint8_t os; /* type of operating system */
uint8_t proctype; /* type of processors */
uint32_t procspeed; /* speed of the processors */
uint16_t ncpus; /* number of processors that the computer has */
uint32_t speedindex; /* global speed index for making comparisons between different computers */
@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004 Jorge Daza Garcia-Blanes
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -16,22 +18,19 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
/* $Id$ */
// $Id$
//

#ifndef _COMPUTER_STATUS_H_
#define _COMPUTER_STATUS_H_

#ifdef __IRIX
# include <sys/types.h>
#else
# include <stdint.h>
#endif

#include <time.h>

#include "constants.h"
#include "task.h"

#include <time.h>
#include <sys/types.h>
#include <stdint.h>

#pragma pack(push,1)

struct computer_status {
@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004 Jorge Daza Garcia-Blanes
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -22,14 +24,16 @@
#ifndef _DATABASE_H_
#define _DATABASE_H_

#pragma pack(push,1)

#include "constants.h"
#include "job.h"
#include "computer.h"

#include <stdint.h>
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>

#pragma pack(push,1)

#define DB_VERSION 10 // Database version. This version must change when we change the job structure
#define DB_MAGIC 0xADDEEFBE // magic number
@@ -1,12 +1,14 @@
//
// Copyright (C) 2001,2002,2003,2004 Jorge Daza Garcia-Blanes
// Copyright (C) 2001,2002,2003,2004,2005,2006 Jorge Daza Garcia-Blanes
//
// This program is free software; you can redistribute it and/or modify
// This file is part of DrQueue
//
// DrQueue is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// DrQueue is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@@ -16,7 +18,8 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
/* $Id$ */
// $Id$
//

#include "drerrno.h"
#include "constants.h"
Oops, something went wrong.

0 comments on commit 8fe68af

Please sign in to comment.
You can’t perform that action at this time.