#!/bin/csh # # 7 May 2010 - GAMESS' compile/link configuration script. # 21 May 2010 ES corrected 3 bugs # 1. This script asks questions about FORTRAN, math libraries, and # message passing libraries. The answers to these questions are # used by 'compall' and 'comp' and 'compddi' and 'lked', so those # scripts should not require additional customizations. # # 2. This script does **NOT** set up the 'rungms' execution script! # That must be attended to by hand, following comments inside it. # # the following will always be set by this script. set GMS_TARGET='' set GMS_PATH='' set GMS_FORTRAN='' set GMS_MATHLIB='' set GMS_DDI_COMM='' # the following may optionally be set to non-blank below, # but will be left uninitialized in many cases. set GMS_MATHLIB_PATH='' set GMS_IFORT_VERNO='' set GMS_MKL_VERNO='' set GMS_SUN_OS_VERNO='' set GMS_SUN_FORT_VERNO='' set GMS_BG_MODEL='' set GMS_MPI_LIB='' set GMS_MPI_PATH='' set GMS_OFED_PATH='' set GMS_ARMCI_PATH='' # # ----- Step 1: get GMS_TARGET and GMS_PATH values ----- # echo "This script asks a few questions, depending on your computer system," echo "to set up compiler names, libraries, message passing libraries," echo "and so forth." echo " " echo "You can quit at any time by pressing control-C, and then ." echo " " echo "Please open a second window by logging into your target machine," echo "in case this script asks you to 'type' a command to learn something" echo "about your system software situation. All such extra questions will" echo "use the word 'type' to indicate it is a command for the other window." echo " " echo -n "After the new window is open, please hit to go on." set reply=$< tput clear # echo " GAMESS can compile on the following 32 bit or 64 bit machines:" echo "axp64 - Alpha chip, Compaq's compiler, running Tru64 or Linux" echo "cray-xt - Cray's massively parallel system, running CNL" echo "hpux32 - HP PA-RISC chips (old models only), running HP-UX" echo "hpux64 - HP Intel or PA-RISC chips, running HP-UX" echo "ibm32 - IBM (old models only), running AIX" echo "ibm64 - IBM, Power3 chip or newer, running AIX or Linux" echo "ibm64-sp - IBM SP parallel system, running AIX" echo "ibm-bg - IBM Blue Gene (P or L model), these are 32 bit systems" echo "linux32 - Linux (any 32 bit distribution), for x86 (old systems only)" echo "linux64 - Linux (any 64 bit distribution), for x86_64 or ia64 chips" echo " AMD/Intel chip Linux machines are sold by many companies" echo "mac32 - Apple Mac, any chip, running OS X 10.4 or older" echo "mac64 - Apple Mac, any chip, running OS X 10.5 or newer" echo "sgi32 - Silicon Graphics Inc., MIPS chip only, running Irix" echo "sgi64 - Silicon Graphics Inc., MIPS chip only, running Irix" echo "sun32 - Sun ultraSPARC chips (old models only), running Solaris" echo "sun64 - Sun ultraSPARC or Opteron chips, running Solaris" echo " type 'uname -a' to partially clarify your computer's flavor." echo -n "please enter your target machine name: " set GMS_TARGET=$< tput clear # A number of targets in compall/comp/lked are omitted above. # They are for old systems and/or not well tested systems, namely # cray-x1, cray-pvp, cray-t3e, cray-xd1, # fuji-pp32, fuji-pp64, necsx # These could be tried by creating a gamess.config which sets only # the basic variables GMS_PATH and GMS_TARGET...no other values # are looked at by these old compiling clauses, so just this: # #!/bin/csh # setenv GMS_TARGET fuji-pp64 # setenv GMS_PATH /u1/mike/gamess badgmspath: echo "Where is the GAMESS software on your system?" echo "A typical response might be /u1/mike/gamess," echo "most probably the correct answer is `pwd`" echo " " echo -n "GAMESS directory? [`pwd`] " set GMS_PATH=$< if (null$GMS_PATH == null) set GMS_PATH=`pwd` # if (-d $GMS_PATH) then tput clear else echo "That directory name doesn't seem to exist, please try again." goto badgmspath endif echo "Setting up GAMESS compile and link for GMS_TARGET=$GMS_TARGET" echo "GAMESS software is located at GMS_PATH=$GMS_PATH" echo " " # # ----- Step 2: get compiler and math library values ----- # # We must set GMS_FORTRAN and GMS_MATHLIB for each target. # For vendor Unix, these may not need to be very precise. As an # example, IBM sets the math library to simply "essl" as 'lked' # knows how to spell the correct incantation such as '-lessl'. # For Linux, we ask enough questions to get very precise values, # as 'comp' and 'lked' don't otherwise know what to do. # # Depending on the situation, we may set a few other values as well. # switch ($GMS_TARGET) case axp64: echo " Compiling on 'axp64' is straightforward." echo "This target assumes the use of the Digital/Compaq/HP compiler." echo "The FORTRAN compiler is named 'f77' under OSF1/Tru64/Digital Unix," echo "The FORTRAN compiler is named 'fort' if you are running under Linux." echo "These are the same even though the names are different." echo "The math library named CXML or DXML will be used if that is installed," echo "otherwise a simple FORTRAN substitute will be used." echo "So, there are no further questions about FORTRAN or math libraries." # the actual choices can be made by the 'comp' script, no need to ask. set GMS_FORTRAN="f77" if (`uname` == Linux) set GMS_FORTRAN="fort" set GMS_MATHLIB="DXML/CXML" breaksw # the two Cray systems do not use directly GMS_FORTRAN or GMS_MATHLIB, # so set them only generically here. case cray-x1: echo "Compilation on the Cray-X1 will use Cray FORTRAN and Cray math libraries" echo "There are no further configuration questions." set GMS_FORTRAN=ftn set GMS_MATHLIB='system math library' breaksw # 'comp' and 'lked' show several compiler choices and arch choices. # It might be useful to set GMS_FORTRAN to the specific compiler, # and hardwire the 'ftn' alias to that instead? The 'comp' script # shows richer choices than 'lked', not sure we know enough to try # this yet. But most importantly, the DDI that works on the XT # line has not been merged into the main DDI development line, so # the DDI distributed with GAMESS simply DOES NOT WORK ON THE XT. # # It may be useful to set a GMS_XT_MODEL to 3, 4, 5, or 6 here, # again to avoid hand-editing in comp/lked. # Probably I don't understand the math library choice, either, # is the ACML the only possibility? It seems to be searched # for without any need to ask for its location, amen to that. # case cray-xt: tput clear echo "Compilation on the Cray-XT is a little rough around the edges." echo " " echo "There are no further configuration questions, but the installation" echo "may require manual changes to scripts, and a replacement DDI." echo " " echo "Please e-mail to Mike Schmidt, mike@si.msg.chem.iastate.edu" echo "asking for the special DDI that runs on Cray-XT, and other info." echo " " echo -n "hit after you have read this message." set reply=$< set GMS_FORTRAN=ftn set GMS_MATHLIB=acml breaksw # it seems unlikely anyone has a PA-RISC box old enough to be hpux32, # but allow it, with a reminder that hpux64 might be a better choice. # GMS_FORTRAN and GMS_MATHLIB need be set only generically here. case hpux32: echo "Any HP-UX system is likely to function properly as 'hpux64'." echo "Chances are that you should have selected the 64 bit target, to use" echo "more than 2 GBytes of memory in a run. Please rerun this script" echo "if you decide to change your mind and choose 'hpux64'." echo -n "hit after you have read this message." set reply=$< # case hpux64: echo " Compiling for $GMS_TARGET is straightforward." echo "This target assumes the use of the HP's FORTRAN compiler: f90" if ($GMS_TARGET == hpux32) echo "HP's math library will be used: libblas" if ($GMS_TARGET == hpux64) echo "HP's math library will be used: veclib" echo "So, there are no further questions about FORTRAN or math libraries." # the actual exact library names are chosen by the 'comp' script set GMS_FORTRAN="f90" if ($GMS_TARGET == hpux32) set GMS_MATHLIB="libblas" if ($GMS_TARGET == hpux64) set GMS_MATHLIB="veclib" breaksw # it seems unlikely anyone would have a machine old enough to be ibm32, # so warn that ibm32 is silly, then let it fall into the ibm64 stuff. # GMS_FORTRAN and GMS_MATHLIB need be set only generically here. case ibm32: echo "Any Power3 or newer chip is likely to function properly as 'ibm64'." echo "Chances are that you should have selected the 64 bit target, to use" echo "more than 2 GBytes of memory in a run. This script is now changing" echo "to 'ibm64' instead." echo -n "hit after you have read this message." set reply=$< case ibm64: echo " Compiling on IBM equipment is straightforward." echo "The operating system may be AIX or Linux, either one will work." echo "This target assumes the use of IBM's compiler, xlf" echo "This target will use the ESSL math library, if that is installed," echo "or a slow FORTRAN substitute otherwise." echo "So, there are no further questions about FORTRAN or math libraries." set GMS_FORTRAN=xlf set GMS_MATHLIB=essl breaksw # the SP platform's scripting uses only GMS_PATH and GMS_TARGET, # and probably doesn't ever need to know anything else. # GMS_FORTRAN and GMS_MATHLIB need be set only generically here. case ibm64-sp: echo "The SP platform will use IBM's FORTRAN compiler xlf," echo "IBM's math library essl, and IBM's MPI/LAPI product poe." echo "there are no further questions about this system." set GMS_FORTRAN=mpxlf set GMS_MATHLIB=essl breaksw # IBM Blue Gene. original model was L, current is P, but Q is coming. # Perhaps the only L model left is the one on ISU's campus, so L # scripting is pretty much specific to ours. # The P model is Intrepid at Argonne, but we certainly hope that # the scripting for the P works more generically. case ibm-bg: badbgmodel: echo "The Blue Gene platform has two models, L (older) and P." echo -n "Which model do you have? " set GMS_BG_MODEL=$< if ($GMS_BG_MODEL == l) set GMS_BG_MODEL=L if ($GMS_BG_MODEL == p) set GMS_BG_MODEL=P # switch ($GMS_BG_MODEL) case L: echo "Scripting for BG/L is customized to Iowa State's old L model," echo "which does not have the ESSL library, so we use Goto's BLAS." echo "The messaging layer will be ARMCI 1.4, built by the user (you)." set GMS_FORTRAN=blrts_xlf set GMS_BG_C=blrts_xlc set GMS_MATHLIB=goto echo "ARMCI source code can be obtained from" echo " -the right URL should go here-" echo "What is the path name where ARMCI is located? This should" echo "look like the following:" echo " /some/path/leading/to/armci-1-4" echo -n "ARMCI path name? " set GMS_ARMCI_PATH=$< # note, ARMCI include files are located at $GMS_ARMCI_PATH/src if (-e $GMS_ARMCI_PATH/lib/BGL/libarmci.a) then echo "The ARMCI library already exists, good." else echo " " echo "The ARMCI library does not yet exist, unfortunately." echo "You should create this library by" echo " make TARGET=BGL ARMCI_NETWORK=BGMLMPI" echo "while in the $GMS_ARMCI_PATH/src subdirectory." echo "The command above should create an ARMCI library named" echo " $GMS_ARMCI_PATH/lib/BGL/libarmci.a" echo "Please build ARMCI immediately after running this 'config'," echo "before proceeding to GAMESS' compall/compddi/lked steps." echo " " echo -n "hit to continue after digesting this message." set reply=$< endif breaksw case P: echo "Scripting for BG/P uses IBM's node-specific FORTRAN," echo "IBM's ESSL math library, and IBM's MPI library." set GMS_FORTRAN=bgxlf_r set GMS_BG_C=bgxlc_r set GMS_MATHLIB=essl breaksw default: echo "You didn't provide a valid Blue Gene model name, try again." echo " " goto badbgmodel breaksw endsw echo " " echo "You may wish to execute the following script" echo " chdir ~/gamess" echo " misc/ibm-bg/ibmbg.size" echo "to remove memory for EFP and PCM solvation models from the binary," echo "before proceeding to GAMESS' compall/compddi/lked steps." echo "This saves memory on the BG nodes for gas phase calculations," echo "if you do not intend to run solvated systems." echo " " echo -n "hit to continue after digesting this message." set reply=$< # echo " " echo "The Blue Gene platform will use IBM's FORTRAN compiler, $GMS_FORTRAN" echo "The Blue Gene platform will use IBM's C compiler, $GMS_BG_C" if ($GMS_BG_MODEL == L) then echo "The math library will be Goto's BLAS library" else echo "The math library will be IBM's $GMS_MATHLIB" endif echo "There are no further questions about this system." # next one was just for purpose of printing a message unset GMS_BG_C breaksw case linux32: case linux64: # # for Linux, we have to get a FORTRAN choice, and a math library choice. # The lack of a single compiler or library choice in Linux is in # fact the major motivation for this configuration script. badlinuxfortran: echo "Linux offers many choices for FORTRAN compilers, including the GNU" echo "compiler set ('g77' in old versions of Linux, or 'gfortran' in" echo "current versions), which are included for free in Unix distributions." echo " " echo "There are also commercial compilers, namely Intel's 'ifort'," echo "Portland Group's 'pgf77', and Pathscale's 'pathf90'. The last" echo "two are not common, and aren't as well tested as the others." echo " " echo "type 'rpm -aq | grep gcc' to check on all GNU compilers, including gcc" echo "type 'which gfortran' to look for GNU's gfortran (a very good choice)," echo "type 'which g77' to look for GNU's g77," echo "type 'which ifort' to look for Intel's compiler," echo "type 'which pgf77' to look for Portland Group's compiler," echo "type 'which pathf90' to look for Pathscale's compiler." echo -n "Please enter your choice of FORTRAN: " set GMS_FORTRAN=$< echo " " switch ($GMS_FORTRAN) case g77: # we expect this choice only on rather old 32 bit kernels set GMS_TARGET=linux32 echo "g77 does not support unit numbers higher than 99," echo " so runtyp=tdhfx jobs will fail" echo "g77 does not support quadruple precision," echo " so heavy element DK3 resolution of the identity will fail" echo "but everything else will work." echo "g77 will use target=linux32." breaksw case gfortran: echo "gfortran is very robust, so this is a wise choice." echo "gfortran does not support quadruple precision," echo " so heavy element DK3 resolution of the identity will fail" echo "but everything else will work." breaksw case ifort: # -assume byterecl compile flag appeared at version 8 # -vec-report0 compile flag appeared at version 10 # -Vaxlib library disappeared at version 10 # compilers and math library were bundled together at version 11, # under completely different path names. # ifort was called ifc or efc before version 8, lets ignore that now. echo "Use of 'ifort' requires additional information since library" echo "names, and compiler flags, are version number specific." echo "note: ifort is typically installed at /opt/intel/fce -or- fc," echo " or in newer versions, at /opt/intel/Compiler" echo " " echo "Type 'which ifort' and note the version number in the reply." echo "Please enter only the main version number, such as 8, 9, 10, 11." echo -n "Version? " set GMS_IFORT_VERNO=$< breaksw case pgf77: echo "pgf77 does not support quadruple precision," echo " so heavy element DK3 resolution of the identity will fail" echo "but everything else should work." echo "This compiler is not commonly used with GAMESS, so" echo "please be careful verifying the test examples all work." echo "pgf77 will use target=linux64." breaksw case pathf90: # we only know how to use this one for 64 bit kernels echo "This compiler is not commonly used with GAMESS, so" echo "please be careful verifying the test examples all work." echo "pathf90 will use target=linux64." set GMS_TARGET=linux64 breaksw default: echo "You didn't provide a valid FORTRAN compiler name, try again." echo " " goto badlinuxfortran breaksw endsw echo -n "hit to continue to the math library setup." set reply=$< # # we are still doing linux32/linux64, now choosing math library tput clear badlinuxmathlib: echo "Linux distributions do not include a standard math library." echo " " echo "There are several reasonable add-on library choices," echo " MKL from Intel for 32 or 64 bit Linux (very fast)" echo " ACML from AMD for 32 or 64 bit Linux (free)" echo " ATLAS from www.rpmfind.net for 32 or 64 bit Linux (free)" echo "and one very unreasonable option, namely 'none', which will use" echo "some slow FORTRAN routines supplied with GAMESS. Choosing 'none'" echo "will run MP2 jobs 2x slower, or CCSD(T) jobs 5x slower." echo " " echo "Some typical places (but not the only ones) to find math libraries are" if ($GMS_TARGET == linux32) then echo "Type 'ls /opt/intel/mkl' to look for MKL" echo "Type 'ls /opt/intel/Compiler' to look for MKL" echo "Type 'ls -d /opt/acml*' to look for ACML" echo "Type 'ls /usr/lib/atlas' to look for Atlas" else echo "Type 'ls /opt/intel/mkl' to look for MKL" echo "Type 'ls /opt/intel/Compiler' to look for MKL" echo "Type 'ls -d /opt/acml*' to look for ACML" echo "Type 'ls /usr/lib64/atlas' to look for Atlas" endif echo " " echo -n "Enter your choice of 'mkl' or 'atlas' or 'acml' or 'none': " set GMS_MATHLIB=$< # switch ($GMS_MATHLIB) case none: set GMS_MATHLIB_PATH='' breaksw case mkl: echo " " echo "The exact MKL libraries needed depend on its version number," echo "and also on the kind of chip, so there are more questions..." # badmkl: echo "First, where is your MKL software installed? For example" echo " /opt/intel/mkl -or-" echo " /opt/intel/Compiler -or-" echo " /your/sites/nonstandard/path " echo "Don't type any numbers that might exist in these directories!" echo -n "MKL pathname: " set mklhead=$< if (!(-d $mklhead)) then echo " " echo "The directory $mklhead does not exist." echo " " goto badmkl endif # echo "Second, it is possible to have multiple version of MKL" echo "installed, but often there is only one version installed." echo "Your system seems to have the following version(s):" ls $mklhead echo "Please enter the version number you prefer, giving all decimals!" echo -n "MKL version? " set version=$< set mklroot=undefined if ($mklhead == /opt/intel/Compiler) then # when MKL is installed with the compilers. # I haven't seen one of these yet, it could be that the # number below /opt/intel/Compiler is the compiler version, # and the next number is the MKL version itself??? echo "New MKL libraries include a minor version as well," echo "which is/are the following on your machine:" ls $mklhead/$version echo -n "Enter one of the minor versions listed above: " set minor=$< set mklroot=$mklhead/$version/$minor/mkl/lib else # when MKL is installed as a separate product. set mklroot=$mklhead/$version/lib endif # either way, we have now found the spot, be certain! if (!(-d $mklroot)) then echo "Your choices say MKL software should exist at" echo " $mklroot" echo "but this does not seem to exist on your system." echo " " echo "Please try again..." goto badmkl endif # The library files needed depend only on the major version number. # get major version number, as many as three decimal places may exist set GMS_MKL_VERNO=$version:r set GMS_MKL_VERNO=$GMS_MKL_VERNO:r set GMS_MKL_VERNO=$GMS_MKL_VERNO:r # # lib path for MKL also has chip-specific parts badintelchip: echo "2. Type 'uname -p' (or 'uname -m' if you use Ubuntu)," echo " noting the chip type as one of the following:" echo " 'i386' or 'x86_64' or 'ia64'." echo -n "chip? " set chip=$< switch ($chip) case i386: set GMS_MATHLIB_PATH=$mklroot/32 breaksw case x86_64: set GMS_MATHLIB_PATH=$mklroot/em64t breaksw case ia64: set GMS_MATHLIB_PATH=$mklroot/64 breaksw default: echo "You didn't provide a valid chip name, try again" goto badintelchip breaksw endsw # # as of MKL version 10, we can explicitly link serial-only libraries. if($GMS_MKL_VERNO <= 9) then echo " " echo "MKL, up to and including version 9, requires the following" echo "setting at run time: setenv MKL_SERIAL yes (in 'rungms')" echo "in order to defeat openMP thread usage by the MKL library." echo " " echo -n "hit after you have digested this warning. " set reply=$< endif breaksw case atlas: # we know exactly where the i386/x86_64 RPMs install to: if ($GMS_TARGET == linux32) set GMS_MATHLIB_PATH=/usr/lib/atlas if ($GMS_TARGET == linux64) set GMS_MATHLIB_PATH=/usr/lib64/atlas breaksw case acml: badacml: echo "Type 'ls -d /opt/acml*' and note the full path, with version no." echo -n "enter that pathname, please: " set acmlpath=$< if (!(-d $acmlpath)) then echo " " echo "The directory $acmlpath does not exist." echo " " goto badacml endif # ACML pathnames are, for example: # /opt/acml4.4.0/gfortran32/lib for 32 bits # /opt/acml4.4.0/gfortran64_int64/lib for 64 bits switch ($GMS_FORTRAN) case gfortran: set GMS_MATHLIB_PATH=$acmlpath/gfortran breaksw case ifort: set GMS_MATHLIB_PATH=$acmlpath/ifort breaksw case pathf90: set GMS_MATHLIB_PATH=$acmlpath/pathscale breaksw case pgf77: set GMS_MATHLIB_PATH=$acmlpath/pgi breaksw default: echo "unknown FORTRAN compiler at ACML setup" goto xxx breaksw endsw # tack on requirement of both 32/64 bit address space and 64 bit args if ($GMS_TARGET == linux32) then set GMS_MATHLIB_PATH=${GMS_MATHLIB_PATH}32 else set GMS_MATHLIB_PATH=${GMS_MATHLIB_PATH}64_int64 endif # and then the final component of the path name is just 'lib'. set GMS_MATHLIB_PATH=$GMS_MATHLIB_PATH/lib if (!(-d $GMS_MATHLIB_PATH)) then echo "The target=$GMS_TARGET and FORTRAN compiler=$GMS_FORTRAN" echo "requires ACML libraries in directory $GMS_MATHLIB_PATH," echo "but this does not seem to exist." echo "Please download this from www.amd.com/acml, then try again." exit 33 endif breaksw default: echo "You didn't provide a valid math library name, try again." echo " " goto badlinuxmathlib breaksw # endsw echo "Math library '$GMS_MATHLIB' will be taken from $GMS_MATHLIB_PATH" breaksw # just above has finally ended the very long linux32/linux64 section # the GMS_MATHLIB need only be set generically for Apple. case mac32: echo "Compiling on Apple equipment is straightforward." echo "Information about installing FORTRAN can be found in the 'comp' script." echo " " echo "32 bit compilation can use 'gfortran' under 10.5, or 'g77' under any." echo -n "Please enter your choice 'g77' or 'gfortran': " set GMS_FORTRAN=$< echo " " echo "This target will use the vecLib framework math library, standard in OS X." echo "If your OS X is 10.5 or higher, consider switching to the 'mac64' target." set GMS_MATHLIB=vecLib breaksw case mac64: echo "Compiling on Apple equipment is straightforward." echo "Information about installing FORTRAN can be found in the 'comp' script." echo " " echo "This target assumes the use of the GNU compiler, gfortran." echo "This target will use the vecLib framework math library, standard in OS X." echo "So, there are no further questions about FORTRAN or math libraries." echo " " echo "Your OS X version must be 10.5 or higher to run GAMESS in 64 bit mode." set GMS_FORTRAN=gfortran set GMS_MATHLIB=vecLib breaksw # GMS_MATHLIB need be set only generically for SGI. case sgi32: case sgi64: echo "This compiling target means a MIPS-based computer running IRIX." echo "These old systems have names like Indy or Origin or Challenge." echo " SGI has not sold these in many years! " echo "If you have a newer system from SGI, named Altix or XE, with" echo "an Intel processor, it will be running a version of Linux." echo "For these newer SGI systems, the correct target is 'linux64'." echo " " echo "Please hit , then to exit, to change to 'linux64'." echo -n "Please hit just if you really have a IRIX/MIPS system. " set reply=$< echo " Compiling for $GMS_TARGET is straightforward." echo "Please type 'which f77' or 'which f90' to learn your compiler's name." echo -n "Compiler? " set GMS_FORTRAN=$< echo "SGI's math library will be used: blas" echo "There are no further questions about FORTRAN or math libraries." set GMS_MATHLIB="blas" breaksw # GMS_MATHLIB need be set only generically for Sun Solaris. case sun32: case sun64: echo "Type 'uname -sr' to detect your Solaris version...this will show as 5.x" echo "The 5 part is meaningless, so please ignore it." echo "The decimal place is the major Solaris release number, please give it." echo "Hence your reply will be 6 or 7 or 8 or 9 or 10, just an integer." echo -n "Solaris version? " set GMS_SUN_OS_VERNO=$< # # 1998's Solaris 7 was the first release with reliable 64-bit software, # so let's make sure any Sun bought since then does a 64 bit compile. if ($GMS_SUN_OS_VERNO <= 6) then set GMS_FORTRAN=f77 if ($GMS_TARGET == sun64) then echo "Compile target is being reset to sun32 on this very old Solaris." set GMS_TARGET=sun32 endif else set GMS_FORTRAN=f90 if ($GMS_TARGET == sun32) then echo "Compile target is being reset to sun64 on this Solaris platform." set GMS_TARGET=sun64 endif endif # set GMS_MATHLIB=sunperf # echo " " echo "Sun's compiler suite is named WorkShop, Forte, or Sun Studio," echo "depending on your Solaris version's age." echo "It contains a math library which will be used by GAMESS, automatically." echo "The FORTRAN compiler will be f77 for Solaris 6 or older systems." echo "The FORTRAN compiler will be f90 for Solaris 7 or newer systems." if ($GMS_FORTRAN == f90) then echo "Sun changed the flags for 64 bit compilation at f90 version 8.3" echo "Type 'f90 -V' (capital vee) to display your FORTRAN's version number." echo "The version appears somewhere on the first line of the response," echo "and is a value like 2.0 in 1998, 7.0 in 2002, and 8.3 in 2009." echo -n "Please enter full version number, including decimal point: " set GMS_SUN_FORT_VERNO=$< endif breaksw default: echo "missing $GMS_TARGET setup, please fill in" exit 12 breaksw endsw # # ----- Step 3: test their compiler setup by creating actvte.x ----- # #####if (-e tools/actvte.x) goto skip_actvte # echo " " echo -n "please hit to compile the GAMESS source code activator " set reply=$< tput clear # if (-e tools/actvte.code) then # sed -e "s/^\*UNX/ /" tools/actvte.code > actvte.f # # Cray vectors need to pick at least *SNG and maybe *PSX lines. # note that Cray-XT should not do this, only Cray systems # where a 64 bit floating point is a REAL data type. if ($GMS_TARGET == cray-x1) then mv -f actvte.f temp.f sed -e "s/^\*SNG/ /" -e "s/^\*PSX/ /" temp.f > actvte.f rm -f temp.f endif # switch ($GMS_FORTRAN) # this one isn't smart enough to search its own libraries! case ifort: set echo $GMS_FORTRAN -o tools/actvte.x actvte.f -Vaxlib unset echo breaksw # IBM BG uses a different compiler for interactive programs # on the front end, compared to code running on nodes # For 'command not found' errors from the following, # add explicit path like /opt/ibmcmp/xlf/9.1/bin below, # or better yet, take action to have this on your path. case blrts_xlf: case bgxlf_r: xlf -o tools/actvte.x actvte.f breaksw default: set echo $GMS_FORTRAN -o tools/actvte.x actvte.f unset echo breaksw endsw rm -f actvte.f if (-e actvte.o) rm -f actvte.o if (-x tools/actvte.x) then echo "Source code activator was successfully compiled." else echo "Something went wrong building tools/actvte.x" echo "typing mistakes in your responses to this script?" echo "your path setup doesn't include the FORTRAN compiler?" echo "fatal error, exiting." exit endif else echo "Warning...source code activation program does not exist." echo "please provide $GMS_PATH/tools/actvte.code," echo "or a pre-compiled binary for it: $GMS_PATH/tools/actvte.x" echo "fatal error, exiting." exit endif # #####skip_actvte: # # ----- Step 4: acquire data necessary to use MPI instead of sockets ----- # Note: # a) We try asking about MPI choices only for linux64 clusters. # b) For now, vendor workstations fall back to TCP/IP sockets. # c) High end machines using MPI or other sophisticated libraries force # their usage inside 'compddi', but it looks good if we generate the # right name for the config file for what is going to be hardwired. # set GMS_DDI_COMM='sockets' if ($GMS_TARGET == cray-x1) set GMS_DDI_COMM='shmem' if ($GMS_TARGET == cray-xt) set GMS_DDI_COMM='mpi' if ($GMS_TARGET == ibm-bg) then if ($GMS_BG_MODEL == L) set GMS_DDI_COMM='armci' if ($GMS_BG_MODEL == P) set GMS_DDI_COMM='mpi' endif if ($GMS_TARGET == ibm-sp) set GMS_DDI_COMM='lapi' if ($GMS_TARGET == sgi64) set GMS_DDI_COMM='shmem' # if ($GMS_TARGET == linux64) then echo " " echo -n "please hit to to set up your network for Linux clusters." set reply=$< tput clear top_of_comm_choice: echo " " echo "If you have a slow network, like Gigabit Ethernet (GE)," echo "or you have so few nodes you won't be running in parallel," echo "or your system has no MPI library installed," echo "or if you want a fail-safe compile/link and easy execution," echo " choose 'sockets'" echo "to use good old standard TCP/IP networking." echo " " echo "If you have an expensive but fast network like Infiniband (IB)," echo "and if you have an MPI library installed correctly," echo " choose 'mpi'." echo " " echo -n "communication library ('sockets' or 'mpi')? " set GMS_DDI_COMM=$< switch ($GMS_DDI_COMM) case sockets: breaksw case mpi: # Although not listed below, other choices can be made: # openmpi, mpich2 # See readme.ddi for their status, which can be summarized as # mpich2 has not been able to be tested on IB, # but has been found to be usable on 10GE. # openMPI does --not-- work properly. tput clear echo "The MPI libraries which work well on linux64/Infiniband are" echo " Intel's MPI (impi)" echo " MVAPICH2" echo " SGI's mpt from ProPack, on Altix/ICE systems" echo "Other libraries may work, please see 'readme.ddi' for info." echo "The choices listed above will compile and link easily," echo "and are known to run correctly and efficiently." echo "" echo "Enter 'sockets' if you just changed your mind about trying MPI." echo "" echo -n "Enter MPI library (impi, mvapich2, mpt, sockets): " set GMS_MPI_LIB=$< if ($GMS_MPI_LIB == sockets) then set GMS_DDI_COMM=sockets unset GMS_MPI_LIB endif breaksw default: echo "the only two choices are 'sockets' and 'mpi', try again..." goto top_of_comm_choice breaksw endsw if ($GMS_DDI_COMM == sockets) goto done_with_comm_choice # make sure everything after this works with lower case names if ($GMS_MPI_LIB == iMPI) set GMS_MPI_LIB=impi if ($GMS_MPI_LIB == MVAPICH2) set GMS_MPI_LIB=mvapich2 if ($GMS_MPI_LIB == openMPI) set GMS_MPI_LIB=openmpi if ($GMS_MPI_LIB == MPICH2) set GMS_MPI_LIB=mpich2 if ($GMS_MPI_LIB == MPT) set GMS_MPI_LIB=mpt # # Sys/Admin might have put the MPI library almost anywhere! # Both /opt and /usr/local are very reasonable places to hunt. # We show some known locations of MPI libraries below, and # 'mpich2' could be at /opt/mpich2/gnu # 'openmpi' could be at /usr/mpi/gcc/openmpi-1.3.0 tput clear top_enter_mpi_path: echo " " echo "MPI can be installed in many places, so let's find $GMS_MPI_LIB" echo "The person who installed your MPI can tell you where it really is." echo " " echo "impi is probably located at a directory like" echo " /opt/intel/impi/3.2" echo "mvapich2 could be almost anywhere, perhaps some directory like" echo " /usr/mpi/gcc/mvapich2-1.2p1" echo "mpt is probably located at a directory like" echo " /opt/sgi/mpt/mpt-1.26" echo -n "Please enter your MPI's location: " set GMS_MPI_PATH=$< if (!(-d $GMS_MPI_PATH)) then echo "pathname $GMS_MPI_PATH does not exist. please try again" goto top_enter_mpi_path endif # # in principle, MPI libraries using Infiniband or iWarp need # a lower level library "Open Fabrics Enterprise Distribution" # to handle communications on the device. # This is a bit murky! # On our system, we needed to explicitly link OFED for MVAPICH2, # but iMPI and openMPI either don't need OFED, or found it w/o # needing to specify the libraries. # For now, we'll ask about OFED only for MVAPICH2... # set ofedlibs=false if ($GMS_MPI_LIB == mvapich2) set ofedlibs=true if ($ofedlibs == true) then echo " " echo "$GMS_MPI_LIB requires a lower level library named OFED to handle" echo "the network device. The 'Open Fabrics Enterprise Distribution'" echo "handles Infiniband and other fast network connections." echo " See www.openfabrics.org for more information." echo "Typical places to find OFED's libraries might include" echo " /usr/lib64" echo " /opt/ofed/lib64" echo "One of the OFED libraries you are looking for is libibverbs.so" echo " " echo -n "Please enter your OFED's location: " set GMS_OFED_PATH=$< if (!(-d $GMS_OFED_PATH)) then echo "The pathname $GMS_OFED_PATH does not exist." echo "Please install OFED, and then try 'config' again." exit 44 endif endif endif # done_with_comm_choice: # # ----- Step 5: output what we learned into a 'configuration file' ----- # set cf=install.info # echo '#\!/bin/csh' > $cf echo "# compilation configuration for GAMESS" >> $cf echo "# generated on `hostname`" >> $cf echo "# generated at `date`" >> $cf echo "setenv GMS_PATH $GMS_PATH" >> $cf echo "# machine type" >> $cf echo "setenv GMS_TARGET $GMS_TARGET" >> $cf if (null$GMS_BG_MODEL != null) \ echo "setenv GMS_BG_MODEL $GMS_BG_MODEL" >> $cf echo "# FORTRAN compiler setup" >> $cf echo "setenv GMS_FORTRAN $GMS_FORTRAN" >> $cf if (null$GMS_IFORT_VERNO != null) \ echo "setenv GMS_IFORT_VERNO $GMS_IFORT_VERNO" >> $cf if (null$GMS_SUN_FORT_VERNO != null) \ echo "setenv GMS_SUN_FORT_VERNO $GMS_SUN_FORT_VERNO" >> $cf if (null$GMS_SUN_OS_VERNO != null) \ echo "setenv GMS_SUN_OS_VERNO $GMS_SUN_OS_VERNO" >> $cf echo "# mathematical library setup" >> $cf echo "setenv GMS_MATHLIB $GMS_MATHLIB" >> $cf if (null$GMS_MATHLIB_PATH != null) \ echo "setenv GMS_MATHLIB_PATH $GMS_MATHLIB_PATH" >> $cf if (null$GMS_MKL_VERNO != null) \ echo "setenv GMS_MKL_VERNO $GMS_MKL_VERNO" >> $cf echo "# parallel message passing model setup" >> $cf echo "setenv GMS_DDI_COMM $GMS_DDI_COMM" >> $cf if (null$GMS_MPI_LIB != null) \ echo "setenv GMS_MPI_LIB $GMS_MPI_LIB" >> $cf if (null$GMS_MPI_PATH != null) \ echo "setenv GMS_MPI_PATH $GMS_MPI_PATH" >> $cf if (null$GMS_OFED_PATH != null) \ echo "setenv GMS_OFED_PATH $GMS_OFED_PATH" >> $cf if (null$GMS_ARMCI_PATH != null) \ echo "setenv GMS_ARMCI_PATH $GMS_ARMCI_PATH" >> $cf # echo " " echo "Your configuration for GAMESS compilation is now in $cf" echo "Please follow the directions in $GMS_PATH/misc/readme.unix..."