CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] swak4foam on supercomputers with OpenFOAM 6

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2019, 11:32
Default swak4foam on supercomputers with OpenFOAM 6
  #1
New Member
 
Join Date: Nov 2015
Posts: 1
Rep Power: 0
matteo.chiatto is on a distinguished road
Hi guys,
I'm trying to install swak4foam on my local account of a supercomputer. I have already installed OpenFOAM 6 downloading the source pack from https://openfoam.org/version/6, and I cloned swak4foam for OF6 typing the command


hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam -u develop


The problem is that I was forced to compile OF in the OpenFOAM-6 directory, while the libraries of swak4foam are installed in the <username>-6 directory. Is it possible to change the destination of swak4foam libraries by modifying the Allwmake file?


Thank you in advance.
matteo.chiatto is offline   Reply With Quote

Old   January 9, 2019, 18:51
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: There are several ways you can do this, but it really depends on how exactly OpenFOAM was installed. For example, the convention in OpenFOAM is to have 3 types of folders for binaries:
  1. The ones for OpenFOAM itself, defined by the environment variables "FOAM_LIBBIN" and "FOAM_APPBIN".
  2. The ones for the user, for his/her own custom binaries, defined by the environment variables "FOAM_USER_LIBBIN" and "FOAM_USER_APPBIN".
  3. The ones meant to be installed at the site, namely binaries that are to be shared with everyone, but are not part of OpenFOAM itself, defined by the environment variables "FOAM_SITE_LIBBIN" and "FOAM_SITE_APPBIN", usually aiming to the base folder "$FOAM_INST_DIR/site".
So the trick can be to do the following commands, assuming that you agree with the default site path:
Code:
(
    export FOAM_USER_LIBBIN=$FOAM_SITE_LIBBIN
    export FOAM_USER_APPBIN=$FOAM_SITE_APPBIN
    ./Allwmake
)
This way it's built but deploying to the designated site paths. The parenthesis allow you to test right away within a subshell and without having to hack into the Allwmake script... although I'm assuming you're using Bash as the shell.




Or you can rely on swak4Foam's own "swakConfiguration" file to define the configuration you want to use... so by running these commands:
Code:
echo 'export FOAM_USER_LIBBIN=$FOAM_SITE_LIBBIN' >> swakConfiguration
echo 'export FOAM_USER_APPBIN=$FOAM_SITE_APPBIN' >> swakConfiguration


./Allwmake
you should get the same result.


Either way, OpenFOAM's default settings will add the variable "FOAM_SITE_LIBBIN" into the "LD_LIBRARY_PATH" variable on the shell, along with "FOAM_SITE_APPBIN" into "PATH". That way it should work out of the box without additional hacks...
__________________
wyldckat is offline   Reply With Quote

Old   February 24, 2019, 17:46
Default
  #3
New Member
 
Max
Join Date: Feb 2017
Posts: 11
Rep Power: 9
xneop is on a distinguished road
Hi wyldckat,
i have problem install swak4Foam, i am using openfoam 6 and later on i used an alias of6 , i followed the instruction you wrote above and this is a screen of the entries and the response

alain@alain-Inspiron-5570:~/swak4Foam$ echo 'export FOAM_USER_LIBBIN=$FOAM_SITE_LIBBIN' >> swakConfiguration
alain@alain-Inspiron-5570:~/swak4Foam$ echo 'export FOAM_USER_APPBIN=$FOAM_SITE_APPBIN' >> swakConfiguration
alain@alain-Inspiron-5570:~/swak4Foam$ ./Allwmake
Current OpenFOAM version is .
This is a clean install

/home/alain/swak4Foam/privateRequirements/bin existing. Prepending to PATH-variable (private version of Bison)

Reading variables from 'swakConfiguration'
Using python2.7 at /usr/bin/python2.7-config for python2
Using our own Lua at /home/alain/swak4Foam/privateRequirements
Checking swak4Foam-version and generating file
Swak version is 0.4.3
hg info: 7ed4be75fffd+ (develop)
./Allwmake: Zeile 70: wmake: Befehl nicht gefunden

Requirements for Library not satisfied. I see no sense in going on
Check the README before you go on to ask. And search: Most likely your problem occurred to 5 other people before and has been solved on the MessageBoard
alain@alain-Inspiron-5570:~/swak4Foam$

please what i am doing wrong?
xneop is offline   Reply With Quote

Old   February 24, 2019, 18:45
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
Translating the relevant error message:
Quote:
Originally Posted by xneop View Post
./Allwmake: Zeile 70: wmake: Befehl nicht gefunden
to English
Quote:
Line 70: wmake: command not found
means that either the shell enviroment for OpenFOAM 6 is not properly loaded or the installation that you are using only provides the final binaries.

Questions:
  1. What does this command tell you?
    Code:
    alias of6
  2. What do the following commands give you:
    Code:
    of6
    which wmake
    which blockMesh
  3. What about this:
    Code:
    cd $WM_PROJECT_DIR
    ls -l wmake/
__________________
wyldckat is offline   Reply With Quote

Old   August 2, 2020, 21:11
Default Installing swak4foam on a cluster
  #5
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 7
Bodo1993 is on a distinguished road
Hi all,
I have used the following commands to install swak4foam in a frontal node in a cluster.
hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam
cd swak4Foam
./AllwmakeAll

The swak4foam was installed at the home directory. I then loaded openfoam v6 to the cluster, but it seems that it did not recognize the swak4foam installation. The error:
"funkySetFields: command not found"

I am wondering if there is any especial treatment to make swak4foam working on the cluster. I did the same steps on my local machine and it is working well.

I appreciate your assistance.
Bodo1993 is offline   Reply With Quote

Old   December 27, 2020, 17:26
Default
  #6
Senior Member
 
Join Date: Jul 2019
Posts: 148
Rep Power: 7
Bodo1993 is on a distinguished road
Hi, I would appreciate any reply. Thanks.
Bodo1993 is offline   Reply With Quote

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Started with OpenFOAM wyldckat OpenFOAM 26 June 21, 2024 07:54
[swak4Foam] swak4Foam for openfoam 5 linox OpenFOAM Community Contributions 16 February 16, 2020 06:13
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 20:20
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 12:50


All times are GMT -4. The time now is 03:32.