[SCore-users] IA32/IA64

kameyama at pccluster.org kameyama at pccluster.org
Fri Aug 22 20:34:14 JST 2003


In article <200308211727.01481.nick at streamline-computing.com> Nick Birkett <nick at streamline-computing.com> wrotes:
> nickb at cserver falcon]$ scout -F hosts -e scrun -nodes=4 ~/bin/hyd-3.04.027.pa
> r_op
> SCOUT: Spawning done.
> <1> ULT:ERROR Unable to open binary file (/opt/score/deploy/bin.ia64-redhat-l
> inux2_4/scored.exe)=0

Please apply following patch (this patch change under
score-src/SCore/mttl-ult/ult directory).

Note that I don't test this patch is correctory.
I testted only redhat Advance Workstation version 2.1 IA64 host (gcc 2./96)
and redhat 8 x86 host (gcc 3.2).
But there are not C++ naming compatibility between C++ compiler.
So I don't execute scored on adove environment.

                       from Kameyama Toyohisa
---------------------------------------cut here---------------------------------
Index: score-src/SCore/mttl-ult/ult/Makefile
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/Makefile,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- score-src/SCore/mttl-ult/ult/Makefile	5 Dec 2002 06:14:48 -0000	1.17
+++ score-src/SCore/mttl-ult/ult/Makefile	26 Jun 2003 09:56:19 -0000	1.18
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.17 2002/12/05 06:14:48 kameyama Exp $
+# $Id: Makefile,v 1.18 2003/06/26 09:56:19 kameyama Exp $
 # $PCCC_Release$
 # $PCCC_Copyright$
 #
@@ -110,8 +110,9 @@
 ### default targets
 
 BFD_TARGET = `case $(host_canonical) in \
-		i386-unknown-linux) echo elf32-i386;; \
-		alpha-unknown-linux) echo elf64-alpha;; \
+		i386-*-linux) echo elf32-i386;; \
+		alpha-*-linux) echo elf64-alpha;; \
+		ia64-*-linux) echo elf64-ia64-little;; \
 		esac`
 
 OBJDIR_RULE = lib
Index: score-src/SCore/mttl-ult/ult/heterosetup.c
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/heterosetup.c,v
retrieving revision 1.21
retrieving revision 1.24
diff -u -r1.21 -r1.24
--- score-src/SCore/mttl-ult/ult/heterosetup.c	24 Jan 2003 10:09:37 -0000	1.21
+++ score-src/SCore/mttl-ult/ult/heterosetup.c	22 Aug 2003 10:46:42 -0000	1.24
@@ -1,10 +1,10 @@
-static char rcsid[] = "$Id: heterosetup.c,v 1.21 2003/01/24 10:09:37 hori Exp $";
+static char rcsid[] = "$Id: heterosetup.c,v 1.24 2003/08/22 10:46:42 kameyama Exp $";
 /* 
  * $PCCC_Release$
  * $PCCC_Copyright$
  */
 /*
- * $Id: heterosetup.c,v 1.21 2003/01/24 10:09:37 hori Exp $
+ * $Id: heterosetup.c,v 1.24 2003/08/22 10:46:42 kameyama Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -78,6 +78,14 @@
 
 extern void mpcxx_FLreg(void*, char*);
 extern pmContext *score_pmnet[];
+#ifdef __ia64__
+struct ia64_functable {
+	void *addr;
+	void *gp;
+};
+extern struct ia64_functable *ia64_functable;
+extern int ia64_numfuncs;
+#endif
 
 mpcxx_nodeinfo	*mpcxx_allNodeInfo;
 mpcxx_nodecom	myNodeCom;
@@ -136,6 +144,7 @@
   u_short stmp;
   u_int ltmp;
 
+  ULT_DEBUG( 3, "<< recv_host_info()", host_info_count);
   while( 1 ) {
     while( 1 ) {
       st = pmReceive( score_pmnet[ULT_NETSET_NO], (caddr_t*) &buff, &size );
@@ -174,7 +183,7 @@
   if( st != PM_SUCCESS ) ULT_ERROR( "pmReleaseReceiveBuffer()=%d", st );
   host_info_count ++;
 
-  ULT_DEBUG( 0, "recv_host_info(%d)", node );
+  ULT_DEBUG( 0, ">>recv_host_info(%d)", node );
   return( 0 );
 }
 
@@ -189,9 +198,12 @@
     if( send_host_info( node ) == 0 ) node ++;
     if( host_info_count < numNode ) (void) recv_host_info();
   }
+  ULT_DEBUG( 3, "<< exchange_host_info(): node = %d", node);
   while( host_info_count < numNode ) {
     (void) recv_host_info();
+    ULT_DEBUG( 3, "<< exchange_host_info(): host_info_count = %d", host_info_count);
   }
+  ULT_TRACE( 3, ">> setup_host_info()");
 }
 
 static void setup_host_info( void ) {
@@ -278,8 +290,16 @@
 #endif /* defined(__NetBSD__) || defined(sunos) */
 
 #if defined(linux)
+#ifdef FALSE
+#undef FALSE
+#endif
 #include <bfd.h>
+#ifndef FALSE
 static boolean		dynamic = false;
+#else
+/* For redhat 9 */
+static bfd_boolean		dynamic = FALSE;
+#endif
 static char		*target = MPCXX_TARGET;
 
 static void
@@ -326,6 +346,27 @@
 	    }
 	}
     }
+#ifdef __ia64__
+#define GP_TABLE_NAME ".opd"
+    {
+        asection *section;
+	int section_size;
+
+	section = bfd_get_section_by_name(abfd, GP_TABLE_NAME);
+	if(!section) {
+	    ULT_ERROR("Unable to read IA64 function data (%s)", filename);
+	}
+	section_size = bfd_section_size(abfd, section);
+	ia64_functable = malloc(section_size);
+	if (!ia64_functable) {
+	    ULT_ERROR("Unable to allocate function data (%d bytes)",
+	        section_size);
+	}
+	bfd_get_section_contents(abfd, section, (char *)ia64_functable,
+	    0, section_size);
+	ia64_numfuncs = section_size / sizeof(struct ia64_functable);
+    }
+#endif
     bfd_close(abfd);
 }
 #endif /* defined(linux) */
Index: score-src/SCore/mttl-ult/ult/idle.c
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/idle.c,v
retrieving revision 1.16
retrieving revision 1.18
diff -u -r1.16 -r1.18
--- score-src/SCore/mttl-ult/ult/idle.c	21 Jan 2003 09:30:28 -0000	1.16
+++ score-src/SCore/mttl-ult/ult/idle.c	3 Apr 2003 03:14:26 -0000	1.18
@@ -2,9 +2,9 @@
  * $PCCC_Release$
  * $PCCC_Copyright$
  */
-static char rcsid[] = "$Id: idle.c,v 1.16 2003/01/21 09:30:28 hori Exp $";
+static char rcsid[] = "$Id: idle.c,v 1.18 2003/04/03 03:14:26 kameyama Exp $";
 /*
- * $Id: idle.c,v 1.16 2003/01/21 09:30:28 hori Exp $
+ * $Id: idle.c,v 1.18 2003/04/03 03:14:26 kameyama Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -70,7 +70,7 @@
   ult_switch_thread( ult_dequeue() ); /* suspend */
 }
 
-void score_setup_sysycall( void ) {
+void score_setup_syscall( void ) {
   extern void score_set_syscall_hook( void(*)(void), 
 				      void(*)(Syscall*) );
 
@@ -94,7 +94,7 @@
 
 #else 
 
-void score_setup_sysycall( void ) {
+void score_setup_syscall( void ) {
   return;
 }
 
Index: score-src/SCore/mttl-ult/ult/mpcrt.c
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/mpcrt.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- score-src/SCore/mttl-ult/ult/mpcrt.c	24 Jan 2003 10:09:37 -0000	1.32
+++ score-src/SCore/mttl-ult/ult/mpcrt.c	2 Apr 2003 06:34:25 -0000	1.33
@@ -2,9 +2,9 @@
  * $PCCC_Release$
  * $PCCC_Copyright$
  */
-static char rcsid[] = "$Id: mpcrt.c,v 1.32 2003/01/24 10:09:37 hori Exp $";
+static char rcsid[] = "$Id: mpcrt.c,v 1.33 2003/04/02 06:34:25 hori Exp $";
 /*
- * $Id: mpcrt.c,v 1.32 2003/01/24 10:09:37 hori Exp $
+ * $Id: mpcrt.c,v 1.33 2003/04/02 06:34:25 hori Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -64,8 +64,8 @@
 void score_set_signal_handler( int, void(*)() );
 void ult_setup_comm( void );
 void ult_exit( void );
-void score_setup_sysycall( void );
 void mpcxxHeteroEnvSetup( void );
+void score_setup_syscall( void );
 
 int ult_ignore_sync_error_flag = 0;
 
@@ -127,7 +127,7 @@
   mpcNullSyncCell.naddr = 0;
   ult_setup_comm();		/* numNode, myNode are set */
   mpcxxHeteroEnvSetup();	/* must be called after ult_setup_comm() */
-  score_setup_sysycall();	/* must be called after HeteroEnvSetup() */
+  score_setup_syscall();	/* must be called after HeteroEnvSetup() */
 }
 
 static void non_spmd_initialize( void ) {
Index: score-src/SCore/mttl-ult/ult/mpcxx.h
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/mpcxx.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- score-src/SCore/mttl-ult/ult/mpcxx.h	14 Dec 2001 07:30:22 -0000	1.8
+++ score-src/SCore/mttl-ult/ult/mpcxx.h	27 Mar 2003 06:15:14 -0000	1.9
@@ -3,7 +3,7 @@
  * $PCCC_Copyright$
  */
 /*
- * $Id: mpcxx.h,v 1.8 2001/12/14 07:30:22 kameyama Exp $
+ * $Id: mpcxx.h,v 1.9 2003/03/27 06:15:14 hori Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -58,9 +58,9 @@
 #include <mpcxx_thread_inlines.h>
 #include <mpcxx_sync_inlines.h>
 
-#ifdef __cplusplus
-
 #define STACKSIZE(SS)	int ult_stack_size=SS
+
+#ifdef __cplusplus
 
 #include <mpcxx_mttl.h>
 
Index: score-src/SCore/mttl-ult/ult/mpcxx_mttl.h
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/mpcxx_mttl.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- score-src/SCore/mttl-ult/ult/mpcxx_mttl.h	14 Dec 2001 07:30:22 -0000	1.28
+++ score-src/SCore/mttl-ult/ult/mpcxx_mttl.h	26 Jun 2003 09:56:19 -0000	1.29
@@ -3,7 +3,7 @@
  * $PCCC_Copyright$
  */
 /*
- * $Id: mpcxx_mttl.h,v 1.28 2001/12/14 07:30:22 kameyama Exp $
+ * $Id: mpcxx_mttl.h,v 1.29 2003/06/26 09:56:19 kameyama Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -4138,7 +4138,9 @@
 	char	*argp;
 	char	buf[MPCXX_MARSHAL_BUFSIZE];
 
+        ULT_DEBUG( 10, "invoke(%p)", (void*)_voidsinvoker0::invoke2);
 	argp = mpcxxFuncMarshal(buf, (void*)_voidsinvoker0::invoke2);
+        ULT_DEBUG( 10, "invoke(%p)", (void*)f);
 	argp = mpcxxFuncMarshal(argp, (void*) f);
 	mpcRemoteSyncInvoke(pe, 0, buf, argp - &buf[0], (char*) &dummy);
     } else if(MPCXX_NOTHING_SAME) {
Index: score-src/SCore/mttl-ult/ult/nlist.c
===================================================================
RCS file: /develop/cvsroot/score-src/SCore/mttl-ult/ult/nlist.c,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- score-src/SCore/mttl-ult/ult/nlist.c	14 Dec 2001 07:30:22 -0000	1.7
+++ score-src/SCore/mttl-ult/ult/nlist.c	22 Aug 2003 10:46:42 -0000	1.9
@@ -1,10 +1,10 @@
-static char rcsid[] = "$Id: nlist.c,v 1.7 2001/12/14 07:30:22 kameyama Exp $";
+static char rcsid[] = "$Id: nlist.c,v 1.9 2003/08/22 10:46:42 kameyama Exp $";
 /* 
  * $PCCC_Release$
  * $PCCC_Copyright$
  */
 /*
- * $Id: nlist.c,v 1.7 2001/12/14 07:30:22 kameyama Exp $
+ * $Id: nlist.c,v 1.9 2003/08/22 10:46:42 kameyama Exp $
  *
  * $RWC_Release: SCore Release 4.2.1 of SCore Cluster System Software (2001/11/13) $
  *
@@ -74,6 +74,14 @@
 
 funclist fl_name2addr[BUCKET_SIZE];
 funclist fl_addr2name[BUCKET_SIZE];
+#ifdef __ia64__
+struct ia64_functable {
+	void *addr;
+       	void *gp;
+};
+struct ia64_functable *ia64_functable;
+int ia64_numfuncs;
+#endif
 
 void	*
 mpcxxFLN2A(char *cp)
@@ -81,11 +89,24 @@
     int			ent;
     char		*sp = cp + 1;
     struct funclist	*flp;
+#ifdef __ia64__
+    struct ia64_functable *ft;
+    int i;
+#endif
 
     N2A_HASH(ent, sp);
     for (flp = &fl_name2addr[ent]; flp; flp = flp->next) {
 	if (strcmp(flp->symp, cp) == 0) {
+#ifdef __ia64__
+        for(ft = ia64_functable, i = 0; i < ia64_numfuncs;
+	    i++, ia64_functable ++) {
+		if(flp->addr == ft->addr)
+		    return((void *)ft);
+	}
+	return 0;
+#else
 	    return flp->addr;
+#endif /* ia64 */
 	}
     }
     return 0;
@@ -103,6 +124,16 @@
 	    return flp->symp;
 	}
     }
+#ifdef __ia64__
+    /* If this is a function, try again */
+    addr = *(void **)addr;
+    A2N_HASH(ent, addr);
+    for (flp = &fl_addr2name[ent]; flp; flp = flp->next) {
+	if (flp->addr == addr) {
+	    return flp->symp;
+	}
+    }
+#endif
     return 0;
 }
 
---------------------------------------cut here---------------------------------




More information about the SCore-users mailing list