Better support for F90 in charmc. Also, fixed the semantics of persistent
authorMilind Bhandarkar <milind@cs.uiuc.edu>
Sun, 15 Oct 2000 07:49:34 +0000 (07:49 +0000)
committerMilind Bhandarkar <milind@cs.uiuc.edu>
Sun, 15 Oct 2000 07:49:34 +0000 (07:49 +0000)
communication in AMPI. TODO: Improve the efficiency of persistent comms in
AMPI.

src/QuickThreads/mkfiles/irix5-cc
src/arch/mpi-origin/conv-mach.sh
src/arch/origin2000/conv-mach.sh
src/langs/ampi/ampi.C
src/libs/ck-libs/ampi/ampi.C
src/scripts/charmc

index ef98354925a97d4bb821f4ca28d6496a8052f002..17149d00200c391166690dbbb2efb3432cb0f1d1 100644 (file)
@@ -1,6 +1,6 @@
 
-CC=cc -32 -I. -O
-AS=as -32
+CC=cc -n32 -I. -O
+AS=as -n32
 
 all: qt stp testpgm
 
@@ -8,8 +8,8 @@ qt: md/mips.h qt.c md/mips-irix5.s
        rm -f qtmd.h
        ln -s md/mips.h qtmd.h
        $(CC) -c -o qt.o qt.c
-       $(AS) -o qtmds.o md/mips-irix5.s
-       ar q libqt.a qt.o qtmds.o
+       $(CC) -c -o qtmds.o md/mips-irix5.s
+       ar  q libqt.a qt.o qtmds.o
 
 stp:
        $(CC) -c stp.c
index 5ffb90667ade6323b518c43e1ae25a709ca9c3cb..182645032a8b9e453c2c0eb4ec669f5df9861886 100644 (file)
@@ -9,6 +9,8 @@ CMK_CXX='CC -64 -woff 1171 '
 CMK_CXXPP='CC -E -64 '
 CMK_CF77='f77'
 CMK_CF90='f90'
+CMK_F90_DEBUG='-g'
+CMK_F90_OPTIMIZE='-O3 -r10000 -INLINE:all -TARG:platform=ip27 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed '
 CMK_C_DEBUG='-g'
 CMK_C_OPTIMIZE='-O3 -r10000 -INLINE:all -TARG:platform=ip27 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed '
 CMK_CXX_DEBUG='-g'
index 11467518623be00c0e93dcf96598de996f2fb1bf..35d00195dc9fe6b66de9393cdf772b51f2fa8225 100644 (file)
@@ -9,6 +9,7 @@ CMK_CXX='CC -64 '
 CMK_CXXPP='CC -E -64 '
 CMK_CF77='f77'
 CMK_CF90='f90'
+CMK_F90_DEBUG='-g'
 CMK_C_DEBUG='-g'
 CMK_C_OPTIMIZE='-O3 -r10000 -INLINE:all -TARG:platform=ip27 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed '
 CMK_CXX_DEBUG='-g'
@@ -32,3 +33,7 @@ CMK_CPP_SUFFIX="i"
 CMK_XLATPP='charmxlat++ -w '
 CMK_QT='origin'
 CMK_XIOPTS=''
+CMK_F90OBJS='fmain.o'
+CMK_F90LIBS='-L/usr/lib64 -lfortran -lftn'
+CMK_MOD_NAME_ALLCAPS=1
+CMK_MOD_EXT='mod'
index 1e69ed55d8879ebc606ce6593e3eb78f3b6086bf..1cc72c62b5e7e27c8ae7a3c53d5cbb59c17cfe47 100644 (file)
@@ -126,8 +126,8 @@ ampi::recv(int t1, int t2, void* buf, int count, int type)
     start_running();
   }
   if (msg->length < len) {
-    CkError("AMPI: Expecting message of length %d, received %d\n",
-            len, msg->length);
+    CkError("AMPI: (type=%d, count=%d) Expecting message of length %d, received %d\n",
+            type, count, len, msg->length);
     CkAbort("Exiting.\n");
   }
   ddt->serialize((char*)buf, (char*)msg->data, count, (-1));
@@ -463,7 +463,10 @@ int AMPI_Start(AMPI_Request *reqnum)
   if(req->sndrcv == 1) { // send request
     ptr->send(req->tag, ptr->getIndex(), req->buf, req->count, req->type, 
               req->proc);
-  } // recv request is handled in waitall
+  } else {
+    ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
+  }
+  // NO: recv request is handled in waitall
   return 0;
 }
 
@@ -476,10 +479,10 @@ int AMPI_Waitall(int count, AMPI_Request *request, AMPI_Status *sts)
     if(request[i] == (-1))
       continue;
     if(request[i] < 100) { // persistent request
-      PersReq *req = &(ptr->requests[request[i]]);
-      if(req->sndrcv == 2) { // recv request
-        ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
-      }
+      // PersReq *req = &(ptr->requests[request[i]]);
+      // if(req->sndrcv == 2) { // recv request
+        // ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
+      // }
     } else { // irecv request
       int index = request[i] - 100;
       PersReq *req = &(ptr->irequests[index]);
index 1e69ed55d8879ebc606ce6593e3eb78f3b6086bf..1cc72c62b5e7e27c8ae7a3c53d5cbb59c17cfe47 100644 (file)
@@ -126,8 +126,8 @@ ampi::recv(int t1, int t2, void* buf, int count, int type)
     start_running();
   }
   if (msg->length < len) {
-    CkError("AMPI: Expecting message of length %d, received %d\n",
-            len, msg->length);
+    CkError("AMPI: (type=%d, count=%d) Expecting message of length %d, received %d\n",
+            type, count, len, msg->length);
     CkAbort("Exiting.\n");
   }
   ddt->serialize((char*)buf, (char*)msg->data, count, (-1));
@@ -463,7 +463,10 @@ int AMPI_Start(AMPI_Request *reqnum)
   if(req->sndrcv == 1) { // send request
     ptr->send(req->tag, ptr->getIndex(), req->buf, req->count, req->type, 
               req->proc);
-  } // recv request is handled in waitall
+  } else {
+    ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
+  }
+  // NO: recv request is handled in waitall
   return 0;
 }
 
@@ -476,10 +479,10 @@ int AMPI_Waitall(int count, AMPI_Request *request, AMPI_Status *sts)
     if(request[i] == (-1))
       continue;
     if(request[i] < 100) { // persistent request
-      PersReq *req = &(ptr->requests[request[i]]);
-      if(req->sndrcv == 2) { // recv request
-        ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
-      }
+      // PersReq *req = &(ptr->requests[request[i]]);
+      // if(req->sndrcv == 2) { // recv request
+        // ptr->recv(req->tag, req->proc, req->buf, req->count, req->type);
+      // }
     } else { // irecv request
       int index = request[i] - 100;
       PersReq *req = &(ptr->irequests[index]);
index cdf0fdc3c2752fe22d7e3a1a9441083d9e3673b4..1096b02bbdf3d99690dca8c07f3e03843bec0821 100755 (executable)
@@ -30,12 +30,14 @@ SAVE=""
 PURIFY=""
 OVERRIDE_CC=""
 OVERRIDE_CXX=""
+OVERRIDE_F90=""
 OVERRIDE_LD=""
 OVERRIDE_LDXX=""
 OPTS_CPP=""
 OPTS_LDRO="" 
 OPTS_CC=""
 OPTS_CXX="" 
+OPTS_F90=""
 OPTS_LD=""  
 OPTS_LDXX=""  
 OBJECT=""
@@ -254,6 +256,11 @@ do
                shift
                ;;
 
+       "-f90")
+               OVERRIDE_F90="$1"
+               shift
+               ;;
+
        "-ld")
                OVERRIDE_LD="$1"
                shift
@@ -284,6 +291,11 @@ do
                shift
                ;;
 
+       "-f90-option")
+               OPTS_F90="$OPTS_F90 $1"
+               shift
+               ;;
+
        "-ld-option")
                OPTS_LD="$OPTS_LD $1"
                shift
@@ -327,12 +339,14 @@ do
                OPTS_CPP="$OPTS_CPP $arg"
                OPTS_CC="$OPTS_CC  $arg"
                OPTS_CXX="$OPTS_CXX $arg"
+               OPTS_F90="$OPTS_F90 $arg"
                ;;
 
        -I*)
                OPTS_CPP="$OPTS_CPP $arg"
                OPTS_CC="$OPTS_CC  $arg"
                OPTS_CXX="$OPTS_CXX $arg"
+               OPTS_F90="$OPTS_F90 $arg"
                ;;
 
        -LANG*)
@@ -340,6 +354,7 @@ do
                OPTS_CPP="$OPTS_CPP  $arg"
                OPTS_CC="$OPTS_CC   $arg"
                OPTS_CXX="$OPTS_CXX  $arg"
+               OPTS_F90="$OPTS_F90  $arg"
                ;;
        -L*)
                OPTS_LDRO="$OPTS_LDRO $arg"
@@ -362,6 +377,7 @@ do
        "-pg")
                OPTS_CC="$OPTS_CC $arg"
                OPTS_CXX="$OPTS_CXX $arg"
+               OPTS_F90="$OPTS_F90 $arg"
                OPTS_LD="$OPTS_LD $arg"
                OPTS_LDXX="$OPTS_LDXX $arg"
                ;;
@@ -369,6 +385,7 @@ do
        -O*)
                OPTS_CC="$OPTS_CC $arg"
                OPTS_CXX="$OPTS_CXX $arg"
+               OPTS_F90="$OPTS_F90 $arg"
                ;;
 
        -l*)
@@ -393,6 +410,7 @@ do
                OPTS_CPP="$OPTS_CPP  $arg"
                OPTS_CC="$OPTS_CC   $arg"
                OPTS_CXX="$OPTS_CXX  $arg"
+               OPTS_F90="$OPTS_F90  $arg"
                OPTS_LD="$OPTS_LD   $arg"
                OPTS_LDXX="$OPTS_LDXX $arg"
                OPTS_LDRO="$OPTS_LDRO $arg"
@@ -516,6 +534,7 @@ then
     CMK_CC="$CMK_SEQ_CC -DCMK_SEQUENTIAL=1 "
     CMK_LD="$CMK_SEQ_LD"
     CMK_CXX="$CMK_SEQ_CXX -DCMK_SEQUENTIAL=1 " 
+    CMK_F90="$CMK_SEQ_F90 -DCMK_SEQUENTIAL=1 " 
     CMK_LDXX="$CMK_SEQ_LDXX" 
     if [ -n "$CMK_SEQ_AR" ]
     then
@@ -537,6 +556,11 @@ then
     CMK_CXX="$OVERRIDE_CXX $CMK_CXX "
 fi
 
+if [ -n "$OVERRIDE_F90" ]
+then
+    CMK_F90="$OVERRIDE_F90 $CMK_F90 "
+fi
+
 if [ -n "$OVERRIDE_LD" ]
 then
     CMK_LD="$OVERRIDE_LD $CMK_LD"
@@ -557,6 +581,7 @@ if [ -n "$DEBUG_MODE" ]
 then
     OPTS_CC="$CMK_C_DEBUG $OPTS_CC"
     OPTS_CXX="$CMK_CXX_DEBUG $OPTS_CXX"
+    OPTS_F90="$CMK_F90_DEBUG $OPTS_F90"
     OPTS_LD="$CMK_C_DEBUG $OPTS_LD"
     OPTS_LDXX="$CMK_CXX_DEBUG $OPTS_LDXX"
 fi
@@ -565,6 +590,7 @@ if [ -n "$OPTIMIZE_MODE" ]
 then
     OPTS_CC="$CMK_C_OPTIMIZE $OPTS_CC"
     OPTS_CXX="$CMK_CXX_OPTIMIZE $OPTS_CXX"
+    OPTS_F90="$CMK_F90_OPTIMIZE $OPTS_F90"
     OPTS_LD="$CMK_C_OPTIMIZE $OPTS_LD"
     OPTS_LDXX="$CMK_CXX_OPTIMIZE $OPTS_LDXX"
 fi
@@ -722,14 +748,11 @@ do
                NU_OBJ=$BASE.o
                ;;
        *.f|*.F)
-               Do $CMK_CF77 -I$CHARMINC -c $FILE -o $BASE.o
+               Do $CMK_CF90 $OPTS_F90 -freeform -I$CHARMINC -c $FILE -o $BASE.o
                NU_OBJ=$BASE.o
                ;;
-       *.f90)
-               Do $CMK_CF90 -I$CHARMINC -c $BASE.f90 -o $BASE.o
-               ;;
-       *.F90)
-               Do $CMK_CF90 -I$CHARMINC -c $BASE.F90 -o $BASE.o
+       *.f90|*.F90)
+               Do $CMK_CF90 $OPTS_F90 -I$CHARMINC -c $FILE -o $BASE.o
                ;;
        *.fc|*.FC)
                Abort "I'm not yet smart enough to compile $FILE"