Recent Posts

Pages: 1 2 3 4 5 6 7 8 9 10
1
Windows / Enabling the Windows Subsystem for Linux and installing the Rhyolite-MELTS GUI
« Last post by Paula on November 17, 2017, 04:08:40 pm »
Work in progress

For 64-bit Windows 10 with the Fall Creators update (version 1709; released October 17th, 2017), it is possible to enable the 'Windows Subsystem for Linux' (WSL) and use the latest rhyolite-MELTS version linked on the Linux Download site. This a more detailed version of the instructions on the alphaMELTS links page. Things that you should type at the command line are in quote boxes; names you should substitute are in italics and comments are preceded by ellipsis (...). Note that by 'command line', we mean the Ubuntu bash shell that opens when you click the 'ubuntu' program and not the Windows Command Prompt (cmd.exe).

Enable the WSL and install ubuntu
  • Open Settings (click either the Start button in the bottom LH corner or the Notification icon in the bottom RH corner; then click the cog icon). Type 'Windows features' in the search box and then select 'Turn Windows features on or off'. Scroll down and check the box beside 'Windows Subsystem for Linux'; click OK and reboot. If 'Windows Subsystem for Linux' has '(beta)' next to it then you do not have the Fall Creators update installed.
  • Open the Windows Store and search for 'ubuntu'. Select 'Get'. If you have any installation issues then consult this slightly out of date installation guide for troubleshooting (predates Fall Creators update).
  • Select 'Launch'. You will be prompted to enter a username and password for Linux. The username is case sensitive; it may, or may not, be the same as your Windows username but you should avoid spaces or special characters in it. The password should be different to your Windows password; you will need to enter it when installing or updating software at the Linux command line.
  • We recommend you select 'Pin to Start' and/or 'Pin to taskbar' for the ubuntu executable. If you want to do 'Pin to Start' at a later date, just open the Windows Store and search for 'ubuntu' again.
    Set up the ubuntu command line
    • Open ubuntu, if it is not already open. Right-click on the ubuntu icon in the upper left-hand corner and choose Properties. Make sure that 'QuickEdit Mode' is checked. Now you can select text, including commands in these instructions (using control-c) and then paste them to the command line by right-clicking the mouse or trackpad in the ubuntu window.
    • Note that you can use ubuntu commands and Linux software to modify your regular files on Windows. Generally, you should not use Windows programs to modify the ubuntu files (by which we mean the ubuntu system files and the files in your ubuntu home space). So, it's a good idea to keep all your working files in your usual Windows folders and set up links so that you can access them from the command line:
      Quote
      ln -sf /mnt/c/Users/your_windows_username/Downloads .
      ... the space between 'Downloads' and '.' is required
      ... if you copy and paste the command then use the left arrow and delete to replace 'your_windows_username' with the actual name of the folder that your Windows files are stored in
      You can now switch to the folder by typing 'cd Downloads'. If you don't want the link to be called 'Downloads' then replace '.' with your choice of link name e.g. 'MyFiles'. 'ln' stands for 'link'; '-s' is for 'symbolic', so if you delete the link you do not delete the original file (much like Windows shortcuts); '-f' is for 'force', which makes no difference at this point but should you change your mind about where you want the 'MyFiles' link to point to, then is required to overwrite the original.
    • Substitute 'Downloads' and repeat the above for any other folders that you would like to be able to access from the command line while running rhyolite-MELTS, such as 'Documents' or 'Desktop'.

    Install alphaMELTS (optional)
    If you want to install alphaMELTS, then if you do that now it will do the next steps for you. Download the alphamelts_wsl_version.zip file, unzip it, and put it in 'Downloads' (or your choice of folder, as long as you have set up a link to it in ubuntu). Open ubuntu, if it is not already open. Navigate to the folder where alphamelts_wsl_version.zip is using 'cd' (which stands for 'change directory'). E.g:
    Quote
    cd Downloads
    cd alphamelts_

    ... if you press the 'tab' key at this point it should complete the folder name
    ... depending how you extracted the files, you may to repeat the previous command to descend into the folder where the .command scripts are
    ./install.command
    Choose the default settings offered by install.command (press 'enter' to each folder suggesion, and then 'y' when it asks whether to continue with the installation). This means it will make a 'bin' folder for you (to put links in), set the Path to include the 'bin' folder, and set up the DISPLAY variable that rhyolite-MELTS will need. Close ubuntu (type 'exit' or use the X in the top right hand corner) and open it again.

    If you did not install alphaMELTS
    This step make a 'bin' folder, which is short for 'binary' and is a folder where we will put a link (shortcut) to rhyolite-MELTS. It will set the Path to include the 'bin' folder,  so that you can run rhyolite-MELTS from anywhere on the system. It also sets up the DISPLAY variable that rhyolite-MELTS will need. Open ubuntu, if it is not already open:
    Quote
    cd
    ... this just ensures that you are in your ubuntu home directory
    mkdir bin
    ... which means make a directory called 'bin' (where 'directory' is what is called 'folder' on Windows)
    wget magmasource.caltech.edu/gitlist/alphaMELTS.git/raw/master/profile
    ... this downloads a settings file because going through a Windows-based browser causes problems with line-endings etc.
    cat profile
    This last command just prints the file we just downloaded, so we can check that it looks OK before using it. The output should look like this:
    Quote
    # ~/.profile: executed by the command interpreter for login shells.
    # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
    # exists.

    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
        export PATH
    fi

    # For the Rhyolite-MELTS graphical user interface on the Windows Subsystem for Linux with Xming
    if [[ $(uname -r) =~ Microsoft ]] ; then
       export DISPLAY=:0
    fi

    # For the Rhyolite-MELTS graphical user interface on Macs, using the 10.8+ or 10.12+ executable:
    # If you get "Segmentation fault: 11" (10.8+) or "Illegal instruction: 4" (10.12+)
    # then try uncommenting the following line and using the 10.8+ executable.

    #export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace:$DYLD_LIBRARY_PATH
    If it does then type you can continue:
    Quote
    mv profile .profile
    ... where there is a space before the '.' but not after; a file beginning with with '.' is a hidden file in Linux
    exit
    ... this closes ubuntu; when you next open it the settings file will be read and acted upon

    Download and set up rhyolite-MELTS and some helper software
    • Download the 64-bit Ubuntu 14.04 rhyolite-MELTS/pMELTS executable


      and unzip the file. You can choose a different location (see forum) but, assuming the executable is in the 'Downloads' folder, type 'ln -sf Downloads/Melts-rhyolite-public bin/Melts-rhyolite' at the command line.
      Type 'sudo apt install libxft2 libxt6' at the command line, enter your Linux password when prompted and choose 'y' to install the necessary packages.
      You will need to install an X server. We use Xming, which requires a small donation. Once you have a Donor Password, go to Releases. Download and run the Xming-64 installer. Next download and install the Xming-fonts installer; make sure to install to the same location (should be 'C:\Program Files\Xming' by default).
      Start Xming by double-clicking. Test rhyolite-MELTS by typing 'Melts-rhyolite' at the command line and 'n' to select version 1.02. The GUI window should open; consult the forum if it doesn't or if it does but is very small (which can happen on very high resolution screens).
      You do not need to repeat all these steps next time. Just open the ubuntu program and type 'Melts-rhyolite'. If you get a message about updates being available for ubuntu then type 'sudo apt update', enter your password, then 'sudo apt upgrade', 'y', 'sudo apt distupgrade', 'y'.



    [/list][/list]
    2
    Hi James,

    Great! I'll keep you posted. Are you on the same email address as your profile shows?

    Paula
    3
    Paula-

    Thanks for the very thorough response. You are correct that I use a python wrapper to run MELTS. I was inquiring for a future project that I'm looking to get into, once that is approaching in a few months, I'd love to check out the python specific MELTS packages you're developing.

    -James
    4
    Hi,

    Sorry for the delay in replying. There are various options, especially if you use Python... which I seem to remember you do.

    There is a beta of alphaMELTS 2 that includes the rhyoliteMELTS thermodynamic models in the virtual machine alphaMELTS, but I wouldn't really recommend trying it. It's really more alpha than beta, and it predates MELTS having gone open source in April of this year:

    https://gitlab.com/ENKI-portal/xMELTS/

    Despite the name, the xMELTS repository on GitLab is actually for RhyoliteMELTS 1.02, 1.10, and 1.20 and the pMELTS model. There are various packages you can build, which would provide a scriptable interfaces to RhyoliteMELTS; you can see the GitLab site for more details.  There is also a simple PyMELTS package, which has its own README for build instructions. If you check out the linux_pymelts branch (which isn't really Linux-specific) then I've added the GUI's "Find Liquidus" functionality and isentropic calculations to PyMELTS, as well as accumulated minor bug fixes to the code as a whole. There's a Jupyter Notebook example of the 'tutorial' example that is featured on the General Usage board here, and which we started with in each of the alphaMELTS workshops.

    A version of alphaMELTS 2 / libalphaMELTS that incorporates the public MELTS code linked above, plus some features of pHMELTS etc. is close to ready. I've been busy with other things the last few months but hope to get a 'proper' beta out soon. I have included the existing PyMELTS wrappers, and intend to add ones specific to alphaMELTS. So, if you get some calculations working on PyMELTS from ENKI you will be able to transfer it to the more fully featured alphaMELTS engine with few, if any, changes.

    Within the context of ENKI (enki-portal.org), PyMELTS has been superseded by the PhaseObjC thermoengine. The equilibration routines use the MELTS family of models but you can also perform calculations using the Berman, Holland and Powell, or Stixrude-Lithgow-Bertelloni endmember databases. You can request an account on the ENKI-portal hub from Mark Ghiorso to try it out (the server is currently down but normal service should be resumed this evening, apparently). In the meantime you can browse the documentation and Notebook examples under Documentation->Thermoengine. The nice thing about the hub is that it can be accessed from any web browser so is platform independent.

    The libpHMELTS library will be written in C++ and loosely based on / ported from PhaseObjC, so will also include RhyoliteMELTS etc. We will try to make the Python interface to libpHMELTS similar to the PhaseObjC one, but we'll have to see how PhaseObjC evolves over time. At the moment it uses Rubicon to interface with the underlying Objective C, which means offline access is limited for now (currently Mac only). Either way, it is unlikely that the PhaseObjC and libpHMELTS interfaces will be as close to each other as the corresponding PyMELTS and libalphaMELTS ones.

    Hope that helps. If you are interested in getting going on PyMELTS, or trying out the Python<->libpHMELTS interface when I get to it, then let me know.

    Paula
    5
    MELTS, pMELTS and pHMELTS algorithms / Re: From trace element to major element
    « Last post by jschools on November 09, 2017, 09:28:44 am »
    Thank you!

    Joe
    6
    Melting processes / Re: Creating phase diagrams on rhyolite-MELTS
    « Last post by Paula on November 08, 2017, 07:22:57 pm »
    Hi,

    Sorry for the delay in replying. It turns out that version of MELTS_Excel that I was using (only for pulling in the melts.out and .tbl files; not for actual MELTS calculations) only works with Excel 2011 on Mac. I'm trying to update it to work with Excel 2016 and hope to post this very soon.

    I don't know whether reading in .melts input files has been implemented yet. It isn't in the latest version I have. The website is having some issues today so I'll check when it's back up. Otherwise, I think you just have to copy and paste the values.

    Paula
    7
    MELTS, pMELTS and pHMELTS algorithms / Re: From trace element to major element
    « Last post by Paula on November 08, 2017, 01:49:52 pm »
    Hi Joe,

    Apologies for the delay in replying - I was at a DCO workshop. Your approach sounds fine to me, as there are few solid phases for K2O to go into in the MELTS system. It is how I would do the calculation!

    Cheers,
    Paula
    8
    Scientific discussion / Re: paper combining multiphase flow with AlphaMELTS
    « Last post by Paula on November 08, 2017, 01:40:29 pm »
    Hi Max,

    Thanks so much for posting this!

    Paula
    9
    Website issues / Re: The '/alphaMELTS/archive.php' page does not exist on the MAGMA site.
    « Last post by Paula on November 08, 2017, 01:32:56 pm »
    Hi Ron,

    It does exist at https://magmasource.caltech.edu/alphamelts/archive.php but the redirection to lowercase letters is not working for some reason. Still looking into that but, in the meantime, I've changed the original link to point to 'alphamelts' instead of 'alphaMELTS'.

    Thanks for drawing my attention to the problem!

    Paula
    10
    Website issues / The '/alphaMELTS/archive.php' page does not exist on the MAGMA site.
    « Last post by rongxu on November 08, 2017, 06:18:34 am »
    Hi Paula,

    when i tried to do some short course exercises from "https://magmasource.caltech.edu/alphamelts/1/exercises-for-melts.htm", i found the liked "alphaMELTS archive page" does not exist (see "https://magmasource.caltech.edu/alphaMELTS/archive.php"), could you fix this?

    thanks

    ron
    Pages: 1 2 3 4 5 6 7 8 9 10