(file) Return to jsoc_machine.csh CVS log (file) (dir) Up to [Development] / JSOC / build

File: [Development] / JSOC / build / jsoc_machine.csh (download) / (as text)
Revision: 1.3, Fri May 18 07:40:45 2012 UTC (10 years, 6 months ago) by kehcheng
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_DRMSLATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-4, Ver_8-3, Ver_8-2, Ver_8-12, Ver_8-11, Ver_8-10, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, NetDRMS_Ver_LATEST, NetDRMS_Ver_9-5, NetDRMS_Ver_9-41, NetDRMS_Ver_9-4, NetDRMS_Ver_9-3, NetDRMS_Ver_9-2, NetDRMS_Ver_9-1, NetDRMS_Ver_9-0, NetDRMS_Ver_8-8, NetDRMS_Ver_8-7, NetDRMS_Ver_8-6, NetDRMS_Ver_8-5, NetDRMS_Ver_8-4, NetDRMS_Ver_8-3, NetDRMS_Ver_8-2, NetDRMS_Ver_8-12, NetDRMS_Ver_8-11, NetDRMS_Ver_8-10, NetDRMS_Ver_8-1, NetDRMS_Ver_8-0, NetDRMS_Ver_7-1, NetDRMS_Ver_7-0, NetDRMS_Ver_6-4, NetDRMS_Ver_6-3, HEAD
Changes since 1.2: +6 -1 lines
add linux_avx

#! /bin/csh -f
if ( ! $?JSOC_MACHINE ) then

  # Get host name, OS and CPU.
  set OS = `uname -s`
  switch ("$OS")
    case "Linux*":
      set CPU = `uname -m`
      breaksw
    case "Darwin":
      set CPU = `uname -p`
      breaksw
    default:
      set CPU = `uname -p`
      breaksw
  endsw

  if ( $OS == "Linux" ) then
    switch ("$CPU")
    case "i686":
    case "i386":
    case "ia32":
      echo linux_ia32
      breaksw
    case "ia64":
      echo linux_ia64
      breaksw
    case "x86_64":
    case "em64t":
      /bin/grep -qw avx /proc/cpuinfo
      if ( $? ) then
	echo linux_x86_64
      else
	echo linux_avx
      endif
      breaksw
    default:
      echo custom
      breaksw
    endsw
  else if ( $OS == "Darwin" ) then
    switch ("$CPU")
    case "powerpc":
      echo mac_osx_ppc
      breaksw
    case "i386":
      echo mac_osx_ia32
      breaksw
    default:
      echo custom
    endsw
  else
     echo custom
  endif

else
    echo $JSOC_MACHINE
endif

Karen Tian
Powered by
ViewCVS 0.9.4