LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2020, 05:39 AM   #1
jrch
Member
 
Registered: Mar 2006
Posts: 158

Rep: Reputation: 15
MESA Stellar Physics on Slackware - NOT the 'Graphics' Mesa...


Please note carefully, I am NOT talking here about the 'mesa' graphics package about which there are many posts in LQ / Slackware.

I'd like to install the 'MESA' stellar codes (mesa.sourceforge.net) on Slackware64 14.2, but get no hits when searching for MESA (NOT the graphcs program) on Slackware. I take this to indicate there are no 'MESA' Stellar science codes users on Slackware who post here.

This would be a complex undertaking and I'm still hoping someone here has recent experience putting MESA (mesa.sourceforge.net) on Slackware64, hopefully v14.2.

Thanks for any help.

jrc
 
Old 03-06-2020, 09:19 AM   #2
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,787

Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Hello jrch
I don't think you need a Slackbuild for Mesa. I think you just need a few slackbuilds for Ruby for which there are 50+ slackbuilds on Slackbuilds.org. Other than that you may need to install jekyll but that too can be installed via rubygem. I haven't done this myself so I could be mistaken but it appears to me Ruby is the key that installs what you need.
 
1 members found this post helpful.
Old 03-06-2020, 11:21 AM   #3
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
@jrch

Download the attached file, rename the .txt to .sh, make the script executable and run it.

It's not pretty but it works here.

If you prefer copy and paste then you can use this instead.

Code:
#!/bin/bash

set +eu

# Change this to suit your preference
WORKDIR="${HOME}/MESA"

# Change the version numbers and URLs if necessary
MESASDK_VER="20.3.1"
MESA_VER="r12778"
MESASDK_URL="http://www.astro.wisc.edu/~townsend/resource/download/mesasdk"

# Should be fine from here
MESA_URL="http://sourceforge.net/projects/mesa/files/releases"
DLCMD=$(which wget)
DLUSERAGENT=(--header="Accept: text/html" --user-agent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
DLPARM=(--content-disposition)
if [ ! -d ${WORKDIR} ]; then
    mkdir -p ${WORKDIR}
fi
cd ${WORKDIR}
if [ ! -z ${DLCMD} ]; then
    [[ ! -f mesasdk-x86_64-linux-${MESASDK_VER}.tar.gz ]] && ${DLCMD} \
        "${DLPARM[@]}" "${DLUSERAGENT[@]}" \
        ${MESASDK_URL}/mesasdk-x86_64-linux-${MESASDK_VER}.tar.gz
    [[ ! -f mesa-${MESA_VER}.zip ]] && ${DLCMD} \
        "${DLPARM[@]}" ${MESA_URL}/mesa-${MESA_VER}.zip/download
else
    echo "!-> Utility wget is not in your exec path - bailing out."
    exit 1
fi
echo "MESA SDK: Decompressing tarball"
export MESASDK_ROOT="${WORKDIR}/mesasdk"
[[ -d ${MESASDK_ROOT} ]] && rm -rf ${MESASDK_ROOT}
tar xf mesasdk-x86_64-linux-${MESASDK_VER}.tar.gz
echo "MESA SDK: Init"
[[ -f ${MESASDK_ROOT}/bin/mesasdk_init.sh ]] && source ${MESASDK_ROOT}/bin/mesasdk_init.sh
echo "MESA: Unzipping"
export MESA_DIR="${WORKDIR}/mesa-${MESA_VER}"
[[ -d mesa-${MESA_VER} ]] && rm -rf mesa-${MESA_VER}
unzip mesa-${MESA_VER}.zip
export OMP_NUM_THREADS="$(nproc)"
[[ -d ${MESA_DIR} ]] && cd ${MESA_DIR} && ./install

exit 0
Attached Files
File Type: txt mesa_1d_setup.txt (1.5 KB, 14 views)
 
1 members found this post helpful.
Old 03-11-2020, 01:28 PM   #4
jrch
Member
 
Registered: Mar 2006
Posts: 158

Original Poster
Rep: Reputation: 15
Thanks for replies. I apologize for being late to respond, have been fighting fluish - non corona but difficult.

Both responses look hopeful, will take a look.

jrc
 
Old 03-12-2020, 07:59 PM   #5
jrch
Member
 
Registered: Mar 2006
Posts: 158

Original Poster
Rep: Reputation: 15
Smile fskmh - about script

Hi fskmh -

I'd really like to try an install 'offline'. I've downloaded the new 'mesasdk-x86_64-linux-20.3.1.tar.gz', and the new version 'mesa-r12778.zip', and copied to another machine - offline.

I'm not good with scripts, so humor me if you will. I have used fortran and f90 for years. Looks like you set this script up to install as root. Can I just make a Mesa workdir in root filesystem, place the sdk.zip and the mesa.zip into workdir, cd into workdir, and then execute the rest as root beginning at

echo "MESA SDK: Decompressing tarball"
...
...

Hopefully this would 'be' the install, so I could go 'use' MESA as a user. Right?

- or maybe not.

One more question: What is the purpose of 'set +eu' near the top? I'm in the U.S. - do I need this?

Many thanks for your help...

jrc
 
Old 03-13-2020, 11:11 AM   #6
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
Hi jrc

No the script was intended for installation in a user's home directory.

First you should edit the WORKDIR variable at the top of the script to reflect the name of the directory you're going to install MESA into.

Then move those compressed archives into that directory and execute the script (which is using absolute and not relative paths - so it doesn't have to be in there).

The conditional checks in the script (the lines after "cd ${WORKDIR}") will be satisfied for the existence of the compressed archives and they will not be downloaded again. Decompression and installation of the SDK and then MESA itself will then occur.

The bash builtin "set" tweaks the behaviour of a script.
The option "-e" makes bash error out when files are not present or there's a syntax issue instead of parsing the remainder of the script.
The option "-u" makes bash error out when a variable that you have set is undefined (doesn't have a value). I have used it redundantly in the script (i.e. I still have conditional checks) because often when debugging a script there's a great temptation to turn -u off.

You certainly could alter "WORKDIR" to a global location (i.e. remove the prefix ${HOME}) and execute it as root, yes.

Last edited by fskmh; 03-13-2020 at 11:20 AM.
 
1 members found this post helpful.
Old 03-13-2020, 07:36 PM   #7
jrch
Member
 
Registered: Mar 2006
Posts: 158

Original Poster
Rep: Reputation: 15
Thumbs up Thank you

Thanks fskmh for the reply.

I'm going to study it and hopefully try to implement.

jrc
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: 2013 Was A Stellar Year For Mesa LXer Syndicated Linux News 0 12-26-2013 09:50 PM
LXer: Recover Linux Files In Few Clicks With Stellar Phoenix Linux Recovery LXer Syndicated Linux News 0 09-23-2008 11:50 PM
[SOLVED] graphics for stellar simulator bkelly Linux - General 5 05-04-2008 08:24 AM
Stellar Phoneix File Recovered? keysorsoze Linux - Software 2 12-23-2005 09:10 PM
Want stellar performances in Starcraft. futhark Linux - Games 4 08-25-2005 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration