Difference between revisions of "Installation/swak4Foam/Installing On/Ubuntu"

From OpenFOAMWiki
(Kick started this page, but this still needs some considerable tweaking...)
 
m (make*.log -> log.make* - this makes it easier to tell apart from the script names)
 
(11 intermediate revisions by the same user not shown)
Line 15: Line 15:
  
  
== Ubuntu 12.04 ==
+
== Ubuntu 10.04 to 13.10 ==
  
'''Discussion thread where you can ask questions about these steps''': ''None available at the moment.''
+
'''Discussion thread where you can ask questions about these steps''': {{Installation/NoThreadAskForum}}
  
'''Note''': The following instructions have only been tested in Ubuntu 12.04 x86_64.
 
 
Steps:
 
Steps:
 
<ol>
 
<ol>
 
<li>Install the necessary packages:
 
<li>Install the necessary packages:
<bash>sudo apt-get install build-essential bison flex</bash>
+
<bash>sudo apt-get install build-essential bison flex subversion git mercurial wget</bash>
 +
The following packages are optional, depending on where you download it from:
 +
* {{tt|subversion}} - If you're going to download from an SVN repository.
 +
* {{tt|git}} - If you're going to download from a Git repository.
 +
* {{tt|mercurial}} - If you're going to download from a Mercurial repository.
 +
* {{tt|wget}} - If you're going to download a snapshot directly from the command line.
 +
 
 +
You might only know which optional package you'll need, when following the instructions from the following step.
 
</li>
 
</li>
<li>Go into a good working folder. For example, {{tt|$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION}}:
+
 
<bash>mkdir -p $FOAM_RUN
+
<li>Now, to download and unpack {{tt|swak4Foam}}, please follow the respective instructions from this page: [[Installation/swak4Foam/Downloading]] - once you've completed the download and unpacking process, then you can proceed to the following step.
cd "$HOME/OpenFOAM/$USER-$WM_PROJECT_VERSION"</bash>
+
</li>
+
<li>Now, to download swak4Foam, there are several versions and sources from which you can download... TODO
+
 
</li>
 
</li>
 +
 
<li>Now let's build {{tt|swak4Foam}}:
 
<li>Now let's build {{tt|swak4Foam}}:
 
<bash>#Go into swak4Foam's main source folder
 
<bash>#Go into swak4Foam's main source folder
Line 36: Line 40:
  
 
# This next command will take a while...
 
# This next command will take a while...
./Allwmake > make.log 2>&1
+
./Allwmake > log.make 2>&1
  
 
#Run it a second time for getting a summary of the installation
 
#Run it a second time for getting a summary of the installation
./Allwmake > make.log 2>&1
+
./Allwmake > log.make 2>&1
</bash></li>
+
</bash>
  
<li>TODO: give link to page that explains how to figure out what means what.</li>
+
{{Installation/swak4Foam/TipAboutNCOMPPROCS}}
 +
</li>
  
<li>One way to check if the installation of {{tt|swak4Foam}} went well, is to check the version by simply entering:
+
<li>If you're not familiar with OpenFOAM's build process, namely to check if everything built as intended, then check the instructions given at this page: [[Installation/swak4Foam/Understanding Error Messages]]
<bash>funkySetFields</bash>
+
</li>
This ends with an error message, but below the usual OpenFOAM-banner you find the version of {{tt|swak4Foam}} and the release date. If there is no swak-version then the installation is older than 0.2.0 (the first version to have this banner).
+
 
 +
<li>If everything went well, then head onto the main {{tt|swak4Foam}} page: [[Contrib/swak4Foam]]</li>
 +
 
 +
</ol>
 +
 
 +
'''Discussion thread where you can ask questions about these steps''': {{Installation/NoThreadAskForum}}
 +
 
 +
 
 +
== Ubuntu 14.04 to 15.10 ==
 +
 
 +
'''Discussion thread where you can ask questions about these steps''': {{Installation/NoThreadAskForum}}
 +
 
 +
Steps:
 +
<ol>
 +
<li>Install the necessary packages:
 +
<bash>sudo apt-get install build-essential flex subversion git mercurial wget</bash>
 +
The following packages are optional, depending on where you download it from:
 +
* {{tt|subversion}} - If you're going to download from an SVN repository.
 +
* {{tt|git}} - If you're going to download from a Git repository.
 +
* {{tt|mercurial}} - If you're going to download from a Mercurial repository.
 +
* {{tt|wget}} - If you're going to download a snapshot directly from the command line.
 +
 
 +
You might only know which optional package you'll need, when following the instructions from the following step.
 +
</li>
 +
 
 +
<li>Now, to download and unpack {{tt|swak4Foam}}, please follow the respective instructions from this page: [[Installation/swak4Foam/Downloading]] - once you've completed the download and unpacking process, then you can proceed to the following step.
 +
</li>
 +
 
 +
<li>Now let's build the dependencies that are needed, because the more Ubuntu versions have a {{tt|bison}} version that is too new, therefore we need to build an older one:
 +
<bash>#Go into swak4Foam's main source folder
 +
cd swak4Foam
 +
 
 +
#build the custom bison
 +
./maintainanceScripts/compileRequirements.sh
 +
</bash>
 +
</li>
 +
 
 +
<li>Now let's build {{tt|swak4Foam}}:
 +
<bash># This next command will take a while...
 +
./Allwmake > log.make 2>&1
 +
 
 +
#Run it a second time for getting a summary of the installation
 +
./Allwmake > log.make 2>&1
 +
</bash>
 +
 
 +
{{Installation/swak4Foam/TipAboutNCOMPPROCS}}
 +
</li>
  
On the other hand, if it only shows a message stating:
+
<li>If you're not familiar with OpenFOAM's build process, namely to check if everything built as intended, then check the instructions given at this page: [[Installation/swak4Foam/Understanding Error Messages]]
<bash>funkySetFields: command not found</bash>
+
then that means that it did not build as intended. If this is the case, then check the instructions in the next step.
+
 
</li>
 
</li>
  
<li>The other way to check if everything went well, is to look at the contents of the file "make.log". You can edit the file to check if there are any error messages, e.g. by running:
+
<li>If everything went well, then head onto the main {{tt|swak4Foam}} page: [[Contrib/swak4Foam]]</li>
<bash>gedit make.log</bash>
+
The output can be a bit difficult to understand, but in swak4Foam's case, there are two ,
+
  
<bash>#Create a tarball in case you've seen any errors (it's the first error that matters)
 
#or if you don't understand the output
 
#and attach the file "make.log.tar.gz" to a post in the designated thread
 
tar -czf make.log.tar.gz make.log
 
</bash></li>
 
 
</ol>
 
</ol>
  
'''Discussion thread where you can ask questions about these steps''': ''None available at the moment.''
+
'''Discussion thread where you can ask questions about these steps''': {{Installation/NoThreadAskForum}}
  
  
 
[[Category:Installing swak4Foam]]
 
[[Category:Installing swak4Foam]]

Latest revision as of 17:00, 30 April 2016

1 Introduction

This page is dedicated to explaining how to install swak4Foam in Ubuntu.

If you do not yet feel comfortable using Linux, then perhaps you better first read the page Working with the Shell and train a bit with the shell/terminal environments, so you can have a better perception of the steps shown below.


2 Copy-Paste steps

A few notes before you start copy-pasting:

  1. Lines that start with # don't have to be copy-pasted. They are just comments to let you know what's going on.
  2. One wrong character is enough for breaking this guide, so make sure you can read the characters properly or that the installed language system does not break the copied characters!


2.1 Ubuntu 10.04 to 13.10

Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.

Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential bison flex subversion git mercurial wget

    The following packages are optional, depending on where you download it from:

    • subversion - If you're going to download from an SVN repository.
    • git - If you're going to download from a Git repository.
    • mercurial - If you're going to download from a Mercurial repository.
    • wget - If you're going to download a snapshot directly from the command line.

    You might only know which optional package you'll need, when following the instructions from the following step.

  2. Now, to download and unpack swak4Foam, please follow the respective instructions from this page: Installation/swak4Foam/Downloading - once you've completed the download and unpacking process, then you can proceed to the following step.
  3. Now let's build swak4Foam:
    #Go into swak4Foam's main source folder
    cd swak4Foam
     
    # This next command will take a while...
    ./Allwmake > log.make 2>&1
     
    #Run it a second time for getting a summary of the installation
    ./Allwmake > log.make 2>&1
    Tip
    If using a GCC or ICC compiler (and not clang), then before running Allwmake, the following command can define the number of cores to be used for a faster build process:
    export WM_NCOMPPROCS=4
    Where 4 means that the machine has got 4 processor cores. Using a value larger than the number of cores the machine has got, can risk using more memory than the machine has got and leading to a freeze or crash.
  4. If you're not familiar with OpenFOAM's build process, namely to check if everything built as intended, then check the instructions given at this page: Installation/swak4Foam/Understanding Error Messages
  5. If everything went well, then head onto the main swak4Foam page: Contrib/swak4Foam

Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.


2.2 Ubuntu 14.04 to 15.10

Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.

Steps:

  1. Install the necessary packages:
    sudo apt-get install build-essential flex subversion git mercurial wget

    The following packages are optional, depending on where you download it from:

    • subversion - If you're going to download from an SVN repository.
    • git - If you're going to download from a Git repository.
    • mercurial - If you're going to download from a Mercurial repository.
    • wget - If you're going to download a snapshot directly from the command line.

    You might only know which optional package you'll need, when following the instructions from the following step.

  2. Now, to download and unpack swak4Foam, please follow the respective instructions from this page: Installation/swak4Foam/Downloading - once you've completed the download and unpacking process, then you can proceed to the following step.
  3. Now let's build the dependencies that are needed, because the more Ubuntu versions have a bison version that is too new, therefore we need to build an older one:
    #Go into swak4Foam's main source folder
    cd swak4Foam
     
    #build the custom bison
    ./maintainanceScripts/compileRequirements.sh
  4. Now let's build swak4Foam:
    # This next command will take a while...
    ./Allwmake > log.make 2>&1
     
    #Run it a second time for getting a summary of the installation
    ./Allwmake > log.make 2>&1
    Tip
    If using a GCC or ICC compiler (and not clang), then before running Allwmake, the following command can define the number of cores to be used for a faster build process:
    export WM_NCOMPPROCS=4
    Where 4 means that the machine has got 4 processor cores. Using a value larger than the number of cores the machine has got, can risk using more memory than the machine has got and leading to a freeze or crash.
  5. If you're not familiar with OpenFOAM's build process, namely to check if everything built as intended, then check the instructions given at this page: Installation/swak4Foam/Understanding Error Messages
  6. If everything went well, then head onto the main swak4Foam page: Contrib/swak4Foam

Discussion thread where you can ask questions about these steps: No thread available. Please a create a new thread in the forum.