EMS.profile Problem in UEMS 15.99.8

With soon inclusion of the NEMS NMM-B model into the EMS package, WRF EMS changes its name and becomes UEMS.
Post Reply
Posts: 10
Joined: Tue Oct 18, 2011 2:40 pm

EMS.profile Problem in UEMS 15.99.8

Post by jackq7a » Tue Nov 07, 2017 4:03 am

I am having a problem installing UEMS 15.99.8. The install finishes with no problems, but after I put the following lines into my bashrc, log out and log back in, I am unable to open a terminal again. I am using Ubuntu 16.04

Code: Select all

     #  Set the UEMS V15.99.8 environment variables
     if [ -f /home/wrfems/uems/etc/EMS.profile ]; then
         . /home/wrfems/uems/etc/EMS.profile
I suspect the problem is the EMS.profile file since if I change the name to EM.profile in bashrc, the problem goes away. There is some problem happening in the EMS.profile file. I have no idea how it is supposed to be. I have tried the install using bash and tcsh shells with similar problems. I think the first line is a problem "UEMS=EMSDIR ; export UEMS" because it failed on tcsh install as well.

My EMS.profile file is this:

Code: Select all

#  This file is used to define some of the environment variables for the UEMS
#  If the UEMS was installed correctly then few changes are needed to this
#  file unless you really feel it's really, really necessary.
#  R.Rozumalski  Version 16.0 - The "helping me to help myself" release

#  The EMS variable below MUST be set correctly for everything to operate as
#  advertised. At least that is the plan. Note that this parameter should have
#  correctly set during installation but sometimes stuff just happens.

if [ ! -d $UEMS ] ; then
    echo "Can not find UEMS distribution -- Check location and modify uems/etc/EMS.profile"
    unset UEMS

#  We begin with some user-configurable parameters that serve the greater good of
#  almost all of humanity as well as the EMS, just the way it should be.

#     Setting the UEMS_LOCAL environment variable tells the UEMS that the default
#     location for the EMS_RUN directory (Default: uems/runs) is to be reassigned to
#     another location. You would set UEMS_LOCAL = 1 if the UEMS is being controlled
#     a "UEMS administrator" but there will be multiple users creating domains and
#     running simulations, such as in a classroom setting.
#     If UEMS_LOCAL is set, then the new locations for EMS_RUN and EMS_LOGS will be
#     defined by the RUNS_HOME variable below. Additionally, if the user is in
#     the development group then UEMS_LOCAL will be reset to 0.

#     In the event that UEMS_LOCAL = 1, RUNS_HOME will define the top level of the
#     user's working directory, i.e., where "uems/runs" and "uems/logs" will be
#     located. If UEMS_LOCAL is not defined (or 0) then RUNS_HOME will be ignored
#     and $EMS_RUN and $EMS_LOGS will be assigned thier default locations. If
#     UEMS_LOCAL = 1 but RUNS_HOME is not defined or invalid, then the top level
#     of the user's home directory, $env(HOME), will be used.
#     If a single large multi-user space is to be used for running the UEMS, it is
#     recommended that RUNS_HOME be set to something like "<path to space>/$env(USER)".

#     NCPUS defines the number of physical processors on that reside locally on your
#     local system. NCPUS does NOT define the total number of processors (NCPUS x cores),
#     nor does it define the processors used when running the model. That assignment
#     is accomplished in the run_ncpus.conf file that is part of the configuration
#     files for each computational domain created.  NCPUS is simply the number of
#     actual CPUs that you could touch if you were to open up the computer case and
#     move the large heat sinks. Most stand-alone workstations have either 1 or 2
#     physical CPUs although some most exotic and expensive mainboards can support
#     8 or more but you probably don't have one of those.

#     CORES defines the number of cores contained within each of those touchable CPUs.
#     The description of the processor type in the /proc/cpuinfo file might include
#     the number of cores such as "dual core", "Duo", "quad core", or "6-Core". If
#     you read a "tri-core" or "hepta-core" then you got problems. If you really don't
#     know how many cores there are on each CPU then try running the "sysinfo" command;
#     otherwise, look up your CPU on that internets thing.

#     Set DSKCHEC to "Yes" if you want the EMS to provide you with alerts should
#     your disk space usage exceed 5% remaining (95% usage). The routine will also
#     automatically terminate your simulation and provide you with a message (via email
#     too) when your usage reaches 100%. The default is "Yes".

#     USERS provides a list of users email address that will be used to contact in the
#     event of a disk space problem only (See DSKCHEC above). There is a second USERS
#     parameter available in the ems_autorun.conf file for each domain that allows you
#     to send email to a separate list of users in the event of a failed model run.
#     Individual users are separated by commas without spaces.  Leave USERS blank
#     if you don't want mail sent for ems_autorun issues.
#        setenv USERS user1@mailbox,user2@mailbox,user3@mailbox
#     If this is a "UEMS_LOCAL" configured system, then either set the USERS parameter
#     in the user's ~/.bash_profile or ~/.cshrc  files or you can try the $USER environment
#     variable in place of a hard-coded user name, i.e., setenv USERS $USER@mailbox
USERS=  ; export USERS

#     MAILEXE defines the routine to use when sending you informative messages or pearls
#     of nonsensical wisdom, which it tends to do from time to time. Just like a fortune
#     cookie that provides lottery numbers. Note that the email recipients are defined
#     in the ems_autorun.conf file located in the individual domain configuration files.
MAILEXE=/bin/mail  ; export MAILEXE

#     The EMS includes the NAWIPS the diagnostic and display system. Just because one
#     of the many mottos here at EMS world headquarters is "Giving more of what they
#     need, whether they need it or not!".
#     By default the EMS_NAWIPS setting is commented out. You may remove the '#' if you
#     want to use NAWIPS.UEMS=EMSDIR  ; export UEMS  If you have your own NAWIPS release installed and wish to
#     use it instead, you may either replace the path to the EMS provided release with
#     your own or leave EMS_NAWIPS blank and set the NAWIPS environment outside this file.
#EMS_NAWIPS=$UEMS/util/nawips   ; export EMS_NAWIPS

#     The HTTP_PROXY environment variable is used when your local network has a proxy
#     server which accepts http requests on some port other then 1080. Symptoms of this
#     problem would be if you are unable to connect to outside data sources via http
#     when running ems_prep or ems_autorun.  For most users this is not a problem, in
#     which case HTTP_PROXY should be left blank. If you know this is the case for
#     your system then set the HTTP_PROXY to:
#       HTTP_PROXY = <IP address of server>:<port used>
#     For example, if proxy server used port 80:
#       HTTP_PROXY =
#     If the proxy server requires a user name and password
#       HTTP_PROXY = <user>:<passwd>@<IP address>:<port used>

#     Setting MPICH_PORT_RANGE will override the default range of ports to use when communicating
#     to the other hosts while using MPICH2. If you want to change the default values, simply set
#     MPIEXEC_PORT_RANGE = <lowest port>:<highest port>, for example:
#         MPIEXEC_PORT_RANGE  = 50001:59999
#     The range specified below can be overridden from the run_ncpus.conf file with the
#     MPICH_PORT_RANGE parameter. Should you not do anything then MPICH2 will select the
#     ports to use all by itself and you will like it.  Leave commented out unless you plan
#     on using it.

#     FTP_PASSIVE specifies that all FTP transfers be done in either PASSIVE (1) or
#     non PASSIVE (0) mode.

#    If you plan on using the provided scripts to build your own executables for the UEMS,
#    then set COMPILER to the compiler being used. Current options are the Portland Group
#    ("PGI") or Intel ("INTEL") packages, one of which is hopefully installed on your
#    system (license required) and that you have the environment variables properly set.
#    If you do not plan on building your own executables then leave COMPILER commented
#    out.

#  ==================================================================================
#    End general user-configurable options - Unless you need to change EMS_RUNS
#  ==================================================================================

#  ----------------------------------------------------------------------------------
#  UEMS package environment variables - Here top level "UEMS" value is used to set
#  "EMS", which, in turn defines all the other environment variables. This is
#  done to avoid mashing of variables with older versions of the EMS still running
#  on a system.
#  ----------------------------------------------------------------------------------
    EMS=$UEMS                     ; export EMS
    EMS_HOME=$EMS                 ; export EMS_HOME

    EMS_BIN=$EMS_HOME/bin         ; export EMS_BIN
    EMS_DATA=$EMS_HOME/data       ; export EMS_DATA

    EMS_STRC=$EMS_HOME/strc       ; export EMS_STRC
    STRC_BIN=$EMS_STRC/EMSbin     ; export STRC_BIN
    STRC_PREP=$EMS_STRC/EMSprep   ; export STRC_PREP
    STRC_RUN=$EMS_STRC/EMSrun     ; export STRC_RUN
    STRC_POST=$EMS_STRC/EMSpost   ; export STRC_POST
    STRC_AUTO=$EMS_STRC/EMSauto   ; export STRC_AUTO
    STRC_UTIL=$EMS_STRC/EMSutils  ; export STRC_UTIL

    EMS_RUN=$EMS_HOME/runs        ; export EMS_RUN
    EMS_LOGS=$EMS_HOME/logs       ; export EMS_LOGS

    if [ $UEMS_LOCAL ] ; then
       #  You may change these if UEMS_LOCAL is set.  Notice that the default location
       #  is under the user's home directory; however, if there is to be an alternate
       #  location then use the RUNS_HOME variable to redefine the location.
       EMS_RUN=$RUNS_HOME/uems/runs    ; export EMS_RUN
       EMS_LOGS=$RUNS_HOME/uems/logs   ; export EMS_LOGS

       #  Create the directories (hopefully) if they do not exist
       `mkdir -p $EMS_RUN  >& /dev/null`
       `mkdir -p $EMS_LOGS >& /dev/null`

    EMS_UTIL=$EMS_HOME/util       ; export EMS_UTIL
    EMS_DOCS=$EMS_HOME/docs       ; export EMS_DOCS
    EMS_CONF=$EMS_HOME/conf       ; export EMS_CONF
    EMS_ETC=$EMS_HOME/etc         ; export EMS_ETC

    EMS_UBIN=$EMS_UTIL/bin        ; export EMS_UBIN
    EMS_MPI=$EMS_UTIL/mpich2      ; export EMS_MPI

    DATA_GEOG=$EMS_DATA/geog      ; export DATA_GEOG
    DATA_TBLS=$EMS_DATA/tables    ; export DATA_TBLS

    DW=$EMS_HOME/domwiz           ; export DW
    DW_BIN=$DW/bin                ; export DW_BIN
    DW_LIB=$DW/libs               ; export DW_LIB

    #  For those determined to build your own UEMS
    if [ ! $UEMS_LOCAL ] ; then
       EMS_BUILD=$EMS_UTIL/UEMSbuild ; export EMS_BUILD

       BUILD_SRC=$EMS_BUILD/src      ; export BUILD_SRC
       BUILD_LIBS=$EMS_BUILD/libs    ; export BUILD_LIBS
       BUILD_BIN=$EMS_BUILD/bin      ; export BUILD_BIN

       SRC_LIBS=$BUILD_SRC/libs      ; export SRC_LIBS
       SRC_UTILS=$BUILD_SRC/utils    ; export SRC_UTILS
       SRC_POST=$BUILD_SRC/post      ; export SRC_POST
       SRC_MODELS=$BUILD_SRC/models  ; export SRC_MODELS

       EWRF=$EMS_BUILD/src/models/wrf    ; export EWRF
       EWPS=$EMS_BUILD/src/models/wps    ; export EWPS
       EPOST=$EMS_BUILD/src/post/emsupp/src ; export EPOST
       EBUFR=$EMS_BUILD/src/post/emsbufr ; export EBUFR

    # Set the value of OMP_NUM_THREADS to be the number of 
    # cores * physical cpus

    MPSTKZ=512M                  ; export MPSTKZ
    OMP_STACKSIZE=64M            ; export OMP_STACKSIZE

#  use ulimit for bash

    unset limits
    ulimit -s unlimited

    ARCH=x64  ; export ARCH

    NO_STOP_MESSAGE=1  ; export NO_STOP_MESSAGE  #  for the PGF-compiled binaries
    UEMS_MODULE=0      ; export UEMS_MODULE

#  Set the GrADS environment variables
   GADDIR=$EMS_UTIL/grads/data        ; export GADDIR
   GAUDFT=$EMS_UTIL/grads/data/tables ; export GAUDFT
   GASCRP=$EMS_UTIL/grads/scripts     ; export GASCRP

#  Set the NAWIPS environment variables
   if [ $EMS_NAWIPS ] ; then
       NAWIPS=$EMS_NAWIPS    ; export NAWIPS
       unset EMS_NAWIPS
       if [ -e "$NAWIPS/Nawips.profile" ] ; then
          . $NAWIPS/Nawips.profile

#  NCVIEW environment variables
   UDUNITS2_XML_PATH=$EMS_UTIL/ncview/udunits/udunits2.xml ; export UDUNITS2_XML_PATH
   NCVIEWBASE=$EMS_UTIL/ncview/lib ; export NCVIEWBASE
   XAPPLRESDIR=$EMS_UTIL/ncview/app-defaults ; export XAPPLRESDIR
   alias  ncview='ncview -extra -minmax med -private -no1d'

   if [ -d $EMS_UTIL/ncview/app-defaults ] ; then
       if [ $XUSERFILESEARCHPATH ] ; then

#   Additions to HTTP_PROXY
   if [ $HTTP_PROXY ] ; then
       http_proxy=http://$HTTP_PROXY ; export http_proxy
       unset HTTP_PROXY

#  Set the compiler environment
   unset COMPLC
   unset COMP
   if [ $COMPILER ] ; then
      COMPLC=${COMPILER,,} ; export COMPLC
      COMP=${COMPLC^} ; export COMP
      unset COMPILER

#  Add Unified EMS executables and scripts to the existing path
export PATH

Posts: 10
Joined: Tue Oct 18, 2011 2:40 pm

Re: EMS.profile Problem in UEMS 15.99.8

Post by jackq7a » Tue Nov 07, 2017 4:04 am

I should add that there are no environment variables added at all.

Posts: 10
Joined: Tue Oct 18, 2011 2:40 pm

Re: EMS.profile Problem in UEMS 15.99.8

Post by jackq7a » Tue Nov 07, 2017 4:10 am

Add I just solved it crazile enough....after doing many different things in the file.

I just added the relative path(full path is /home/wrfems/uems)
UEMS=uems ; export UEMS

The environment variables are loaded. All is well. I hope this helps someone looking for a similar problem.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest