MDSplus (with globus) user software installation on 64-bit machines
May 16, 2006


/usr/bin/mhd:/usr/pppl/doc/SGI/mdsplus-v1.7-6-gt4.0.2-fg-mhd

randerso@mhd:~> module purge
randerso@mhd:~> module load globus intel_fc intel_cc java freetds
randerso@mhd:~> module list
Currently Loaded Modulefiles:
  1) intel_cc/9.0.032    3) intel_fc/9.0.033    5) freetds/0.63
  2) globus/gt4.0.2-fg   4) java/1.4.2_11

2006-05-16 -- MDSplus build for SGI RHEL 3 64-bit

     DOWNLOAD MDSPLUS

# On MHD as randerso
cd /local/randerso
ps=MDSguest
cvs -q -d :pserver:MDSguest:$ps@www.mdsplus.org:/mdsplus/repos co mdsplus
/bin/mv -i mdsplus mdsplus-v1.7-6-gt4.0.2-fg
/bin/mkdir mdsplus
/bin/mv -i mdsplus-v1.7-6-gt4.0.2-fg mdsplus

     ALLOW BUILD AS RANDERSO

# On MHD as root
/bin/mkdir -p /usr/pppl/prog/mdsplus
/bin/ln -s /local/randerso/mdsplus/v1.7-6-gt4.0.2-fg \
    /usr/pppl/prog/mdsplus/mdsplus-v1.7-6-gt4.0.2-fg 

     BUILD

# On MHD as randerso

OLDLANG=$LANG
export  LANG=C

export CC=icc
export CFLAGS="-w -mp -cxxlib-gcc -gcc-version=330 -ftz"
export F77=ifort
export FFLAGS="-O -w -mp -fpe0"
export SYBASE=$FREETDS_HOME
JDKDIR=$JAVA_HOME
cd /usr/pppl/prog/mdsplus/v1.7-6-gt4.0.2-fg

export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
export CLASSPATH=`pwd`/javatraverser:$CLASSPATH

# Fix configure for fortran and java
/bin/cp -ip configure{,.orig}
/bin/cp -ip configure{,.new}
/bin/vi configure.new
/usr/bin/diff configure.new configure.orig
4503,4529d4502
< *ia64*linux*) CFLAGS="$CFLAGS -fpic";
<        if (test "$F77" = "ifort" ) then
<          FORLD="$F77";
<          FFLAGS="$FFLAGS --shared"
<          LOC="loc"
<          LDSHARE=" ";
<          LDARC=" ";
<        else
<          FORLD="g77"
<          FFLAGS="$FFLAGS -fpic -Wno-globals -fno-backslash";
<          LDSHARE="-Wl,-Bdynamic ";
<          LDARC="-Wl,-Bstatic ";
<        fi
<        CAMSHR="camshr";
<        LD_LDSHARE="-Bdynamic ";
<        LD_LDARC="-Bstatic ";
<        LINKSHARED="-shared ";
<        LIBPATH="LD_LIBRARY_PATH";
<        FOR_LDFLAGS="";
<        FEXECLIBDIR="-L";
<        SHARETYPE=".so";
<        TAR_EXCLUDE="--exclude";
<        jni_inc_dir="$jdk_dir/include";
<        jni_md_inc_dir="$jdk_dir/include/linux";
<        JVM="-L$jdk_dir/jre/lib/ia64/server  -ljvm -L$jdk_dir/jre/lib/ia64 -ljava -L$jdk_dir/jre/lib/ia64/native_threads -lhpi";<        HUP_TO_XINETD="/etc/rc.d/init.d/xinetd restart";
<        HUP_TO_INETD="kill -HUP \`/sbin/pidof inetd\`";;
/bin/cp -ip configure.new configure

# Fix dyname_syb.c for sybase substitute freetds
file=mdssql/dynamic_syb.c
/bin/cp -ip $file{,.orig}
/bin/cp -ip $file{,.new}
/bin/vi $file.new
 /usr/bin/diff $file{.new,.orig}
21,23d20
< #ifndef ERREXIT
< #define ERREXIT 1
< #endif
/bin/cp -ip $file{.new,}

# Fix mdsdcl/Makefile.in
file=mdsdcl/Makefile.in
/bin/cp -ip $file{,.orig}
/bin/cp -ip $file{,.new}
/bin/vi $file.new
/usr/bin/diff $file{.new,.orig}
53c53
<       env @LIBPATH@=@MAKESHLIBDIR@:$(LD_LIBRARY_PATH) @MAKEBINDIR@cdu < mdsdcl_tables.ocld
---
>       env @LIBPATH@=@MAKESHLIBDIR@ @MAKEBINDIR@cdu < mdsdcl_tables.ocld
/bin/cp -ip $file{.new,}

# Fix camshr/Makefile.in
file=camshr/Makefile.in
/bin/cp -ip $file{,.orig}
/bin/cp -ip $file{,.new}
/bin/vi $file.new
/usr/bin/diff $file.new $file.orig
96c96
<       env @LIBPATH@=@MAKESHLIBDIR@:$(LD_LIBRARY_PATH) @MAKEBINDIR@cdu < cts_commands.ocld
---
>       env @LIBPATH@=@MAKESHLIBDIR@ @MAKEBINDIR@cdu < cts_commands.ocld
103c103
<       $(CC) -g -nostartfiles -shared -Wl,-soname=lib$(LIBRARYNAME)@SHARETYPE@.$(MAJOR) \
---
>       $(CC) -g -nostartfiles -shared -W1,-soname,lib$(LIBRARYNAME)@SHARETYPE@.$(MAJOR) \
/bin/cp -ip $file{.new,}

# Fix ccl/Makefile.in
file=ccl/Makefile.in
/bin/cp -ip $file{,.orig}
/bin/cp -ip $file{,.new}
/bin/vi $file.new
/usr/bin/diff $file.new $file.orig
38c38
<       env @LIBPATH@=@MAKESHLIBDIR@:$(LD_LIBRARY_PATH) @MAKEBINDIR@cdu < ccl_commands.ocld
---
>       env @LIBPATH@=@MAKESHLIBDIR@ @MAKEBINDIR@cdu < ccl_commands.ocld


38c38
<       env @LIBPATH@=@MAKESHLIBDIR@:$(LD_LIBRARY_PATH) @MAKEBINDIR@cdu < ccl_commands.ocld
---
>       env @LIBPATH@=@MAKESHLIBDIR@ @MAKEBINDIR@cdu < ccl_commands.ocld
/bin/cp -ip $file{.new,}

# Fix tcl/Makefile.in
file=tcl/Makefile.in
/bin/cp -ip $file{,.orig}
/bin/cp -ip $file{,.new}
/bin/vi $file.new
/usr/bin/diff $file.new $file.orig
76c76
<       env @LIBPATH@=@MAKESHLIBDIR@:$(LD_LIBRARY_PATH) @MAKEBINDIR@cdu < tcl_commands.ocld
---
>       env @LIBPATH@=@MAKESHLIBDIR@ @MAKEBINDIR@cdu < tcl_commands.ocld
/bin/cp -ip $file{.new,}

./configure --with-xio=$GLOBUS_LOCATION:gcc64 --with-jdk=$JAVA_HOME \
   1>configure_lew.log 2>configure_lew.err &
/usr/bin/find . -name makefile-header -exec rm -f '{}' \;
/usr/bin/make 1>make_lew.log 2>make_lew.err &

2006-05-16 ler MOVE PERMANENTLY

# On MHD as root
cd /usr/pppl/prog/mdsplus
/bin/rm -i v1.7-6-gt4.0.2-fg
/bin/mv -i /local/randerso/mdsplus/mdsplus-v1.7-6-gt4.0.2-fg v1.7-6-gt4.0.2-fg
/bin/chown -R root.root v1.7-6-gt4.0.2-fg 

                MAKE MODULES FILE

/bin/mkdir /usr/pppl/Modules/modulefiles/mdsplus
/bin/cat > /usr/pppl/Modules/modulefiles/mdsplus/v1.7-6-gt4.0.2-fg <<'END'
#%Module
## mdsplus v1.7-6-gt4.0.2-fg  modulefile
##
proc ModulesHelp {} {
puts stderr "This module loads MDSplus v1.7-6-gt4.0.2-fg enabled"
}
module-whatis "MDSplus v1.7-6-gt4.0.2-fg"
 
conflict mdsplus
 
if { ! [ is-loaded globus/gt4.0.2-fg  ] } {
        module load globus/gt4.0.2-fg
}
 
set mdsplushome "/usr/pppl/prog/mdsplus/v1.7-6-gt4.0.2-fg"
 
set-alias dwscope        "${mdsplushome}/bin/dwscope"
set-alias dwscope_remote "${mdsplushome}/bin/dwscope_remote"
set-alias traverser      "${mdsplushome}/bin/traverser"
 
setenv MDSPLUS        "${mdsplushome}"
setenv MDSPLUS_DIR    "${mdsplushome}"
setenv MDSPLUS_ROOT   "${mdsplushome}"
setenv MDS_PATH       "${mdsplushome}/tdi"
setenv MDS_SHLIB_PATH "${mdsplushome}/lib"
setenv XAPPLRESDIR  "${mdsplushome}"
 
prepend-path MANPATH         "${mdsplushome}/man"
prepend-path PATH            "${mdsplushome}/bin"
prepend-path LD_LIBRARY_PATH "${mdsplushome}/lib"
prepend-path LD_RUN_PATH     "${mdsplushome}/lib"
prepend-path INCLUDE_PATH    "${mdsplushome}/include"
prepend-path C_INCLUDE_PATH  "${mdsplushome}/include"
prepend-path IDL_PATH        "+${mdsplushome}/idl"
END

/bin/cat > /usr/pppl/Modules/modulefiles/mdsplus/.version <<'END'
#%Module1.0
##
##  The desired version
##
set ModulesVersion "v1.7-6-gt4.0.2-fg"
END

                   TEST

# On MHD as randerso
module load mdsplus
module load intel_cc
export CC=icc
export CFLAGS="-w -mp -cxxlib-gcc -gcc-version=330 -ftz"
cd /u/randerso/A/TestMDSplus/LRanderson_001
##/bin/cp -ip make_pppl_mdslib_ctest_args_64bit make_pppl_mdslib_ctest_args_sgi
##/bin/vi make_pppl_mdslib_ctest_args_sgi
./make_pppl_mdslib_ctest_args_sgi
./pppl_mdslib_ctest_args _transpgrid transp_tftr 1015580101
myproxy-get-delegation -s cert.fusiongrid.org -l lranderson
Enter MyProxy pass phrase:
A proxy has been received for user lranderson in /tmp/x509up_u4540
-bash-2.05b$ ./pppl_mdslib_ctest_args _transpgrid.pppl.gov transp_tftr 1015580101
number of args=4
host=_transpgrid.pppl.gov, tree=transp_tftr, shot=1015580101
*** Connecting to: _transpgrid.pppl.gov ... ok
*** Opening tree: transp_tftr, shot: 1015580101 ... ok
*** Getting value of runid
result: 101558A01 ... ok