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

[OpenFOAM.com] Building OpenFOAM V1912 on armh8/arm64

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By EternalSeekerX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2020, 02:48
Question Building OpenFOAM V1912 on armh8/arm64
  #1
Senior Member
 
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 137
Rep Power: 10
EternalSeekerX is on a distinguished road
Dear FOAMERS,

I am attemping to build up openfoam v1912 and I ran into a hitch.

I was following this website: https://gitlab.com/arm-hpc/packages/...rsion-1912-arm

I wget both the openfoam and thirparty archives and then extracted it into my /opt/OpenFOAM directory.

I then edited bashrc to point to this directory.

When I source the bashrc I get this error:

Code:
root@localhost:/opt/OpenFoam/OpenFOAM-v1912# source etc/bashrc
[localhost:08533] opal_ifinit: ioctl(SIOCGIFHWADDR) failed with errno=13
No completion added for /opt/OpenFoam/OpenFOAM-v1912/platforms/linuxARM64ArmDPInt64Opt/bin
... incorrect platform, or not yet compiled?
root@localhost:/opt/OpenFoam/OpenFOAM-v1912#]
I went back into bashrc and changed these lines:

Code:
#------------------------------------------------------------------------------
# Configuration environment variables.
# Override with <prefs.sh> instead of editing here.

# [WM_COMPILER_TYPE] - Compiler location:
# = system | ThirdParty
export WM_COMPILER_TYPE=system

# [WM_COMPILER] - Compiler:
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-5] | Gcc7[1-4] | Gcc8[12] |
#   Clang | Clang3[7-9] | Clang[4-6]0 | Icc | Cray | Arm | Pgi
export WM_COMPILER=Arm

# [WM_PRECISION_OPTION] - Floating-point precision:
# = DP | SP | SPDP
export WM_PRECISION_OPTION=DP

# [WM_LABEL_SIZE] - Label size in bits:
# = 32 | 64
export WM_LABEL_SIZE=64 

# [WM_COMPILE_OPTION] - Optimised(default), debug, profiling, other:
# = Opt | Debug | Prof
# Other is processor or packaging specific (eg, OptKNL)
export WM_COMPILE_OPTION=Opt

# [WM_MPLIB] - MPI implementation:
# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM |
#   HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
# Also possible to use INTELMPI-xyz etc and define your own wmake rule
export WM_MPLIB=SYSTEMOPENMPI


#------------------------------------------------------------------------------
# (advanced / legacy)

# [WM_PROJECT] - This project is "OpenFOAM" - do not change
export WM_PROJECT=OpenFOAM

# [projectDir] - directory containing this OpenFOAM version.
# \- When this file is located as $WM_PROJECT_DIR/etc/bashrc, the next lines
#    should work when sourced by BASH or ZSH shells. If this however fails,
#    set one of the fallback values to an appropriate path.
#
#    This can be removed if an absolute path is provided for WM_PROJECT_DIR
#    later on in this file
# --
projectDir="${BASH_SOURCE:-${ZSH_NAME:+$0}}";
[ -n "$projectDir" ] && projectDir="$(\cd $(dirname $projectDir)/.. && \pwd -L)" ||\
# projectDir="$HOME/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION"
projectDir="/opt/openFoam/OpenFOAM-$WM_PROJECT_VERSION"
# projectDir="/usr/local/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION"
################################################################################
Then i proceed to run foamsyscheck:
Code:
root@localhost:/opt/OpenFoam/OpenFOAM-v1912# foamSystemCheck

Checking basic system...
-----------------------------------------------------------------------
Shell:           
ERROR: Cannot identify the current shell.
       OpenFOAM v1912 is compatible
       with csh, tcsh, ksh and bash.

Host:            localhost
OS:              Linux version 4.9.186-17655189
User:            root


System check: FAIL
==================
Your system is not currently compatible with OpenFOAM installation 
requirements. Review the error messages and consult the documentation
for further instructions.

root@localhost:/opt/OpenFoam/OpenFOAM-v1912#
I looked around and some people have said system check is stringent so i just went ahead with Allmake:

Code:
root@localhost:/opt/OpenFoam/OpenFOAM-v1912# ./Allwmake -j -s -l
Logging wmake -all output to 'log.linuxARM64ArmDPInt64Opt'

Compiling enabled on 8 cores
gcc=/bin/gcc
clang=
mpirun=/bin/mpirun
make=/bin/make
cmake=/bin/cmake
wmake=/opt/OpenFoam/OpenFOAM-v1912/wmake/wmake
m4=/bin/m4
flex=/bin/flex

compiler=unknown

========================================
2020-05-01 02:44:49 -0400
Starting compile OpenFOAM-v1912 Allwmake
  Arm system compiler
  linuxARM64ArmDPInt64Opt, with SYSTEMOPENMPI openmpi-system
========================================

    lemon: lemon.c
armclang -mcpu=native -DOPENFOAM=1912 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -ffp-contract=fast -ffast-math -O3 -armpl   -fPIC lemon.c -o /opt/OpenFoam/OpenFOAM-v1912/wmake/platforms/linuxARM64Arm/lemon
make: armclang: Command not found
make: *** [Makefile:88: /opt/OpenFoam/OpenFOAM-v1912/wmake/platforms/linuxARM64Arm/lemon] Error 127
Done logging to 'log.linuxARM64ArmDPInt64Opt'
root@localhost:/opt/OpenFoam/OpenFOAM-v1912#
So based on that It seems like compiler type and clang is missing. Idk where I can find out which compiler I need for arm64 and which clang to choose. Anyone built openfoam on arm64 that knows the flags i need and where to specify?

Thanks!

Bonus: I assume these same configuration should be used for OpenFoam V7 and foam-extend?
EternalSeekerX is offline   Reply With Quote

Old   May 1, 2020, 03:56
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Could you please report the error in one of the issue trackers? The links below may help.
HPE is offline   Reply With Quote

Old   May 1, 2020, 18:28
Default Reported the error to gitlab linked in your sig
  #3
Senior Member
 
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 137
Rep Power: 10
EternalSeekerX is on a distinguished road
Quote:
Originally Posted by HPE View Post
Could you please report the error in one of the issue trackers? The links below may help.
Hello HPE,

I reported the error. Is this a bug you think?
EternalSeekerX is offline   Reply With Quote

Old   May 2, 2020, 05:43
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
some answer thereat: https://develop.openfoam.com/Develop...am/issues/1695
HPE is offline   Reply With Quote

Old   May 4, 2020, 15:17
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by EternalSeekerX View Post
Dear FOAMERS,

I am attemping to build up openfoam v1912 and I ran into a hitch.

I was following this website: https://gitlab.com/arm-hpc/packages/...rsion-1912-arm

Please note that the information given on the ARM site is for using the armclang compiler. This is a clang-based compiler with ARM-specific optimizations, but is not the same as running a regular clang on an ARM system. If the command "armclang" is accessible on your system, you can use it, otherwise stick to gcc or clang which you quite likely do have on your system.
I cannot say if the armclang performance is significantly different to what regular gcc or clang provide.
olesen is offline   Reply With Quote

Old   May 5, 2020, 16:46
Default I see
  #6
Senior Member
 
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 137
Rep Power: 10
EternalSeekerX is on a distinguished road
Quote:
Originally Posted by olesen View Post
Please note that the information given on the ARM site is for using the armclang compiler. This is a clang-based compiler with ARM-specific optimizations, but is not the same as running a regular clang on an ARM system. If the command "armclang" is accessible on your system, you can use it, otherwise stick to gcc or clang which you quite likely do have on your system.
I cannot say if the armclang performance is significantly different to what regular gcc or clang provide.
So I understood what you said. I decided to redownload the tar and start fresh.

I untar into /opt/OpenFOAM.
Edited bashrc to point to that directory.
Sourced etc/bashrc
And then ran. /Allwmake -j

It was running until this error:

Code:
In file included from /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/VectorSpace.H:270,                                     from /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/Field.H:50,                                            from /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/scalarField.H:41,                                      from /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/dimensionSet.H:48,                                     from /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/dimensionedType.H:43,                                  from lnInclude/ddtScheme.H:45,                          from finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtScheme.H:50,                                            from finiteVolume/ddtSchemes/boundedDdtScheme/boundedDdtSchemes.C:28:                          /opt/OpenFoam/OpenFOAM-v1912/src/OpenFOAM/lnInclude/VectorSpaceI.H:346:13: note: because ‘Foam::SymmTensor<double>’ has user-provided ‘void Foam::VectorSpace<Form, Cmpt, Ncmpts>::operator=(const Foam::VectorSpace<Form, Cmpt, Ncmpts>&) [with Form = Foam::SymmTensor<double>; Cmpt = double; unsigned char Ncmpts = 6]’                       346 | inline void Foam::VectorSpace<Form, Cmpt, Ncmpts>::operator=                                                  |             ^~~~                                g++: fatal error: Killed signal terminated program cc1plus                                                      compilation terminated.                                 make: *** [/opt/OpenFoam/OpenFOAM-v1912/wmake/rules/General/transform:35: /opt/OpenFoam/OpenFOAM-v1912/build/linuxARM64GccDPInt32Opt/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.o] Error 1                                                 make: *** Waiting for unfinished jobs....               root@localhost:/opt/OpenFoam/OpenFOAM-v1912#
What could cause this fatal error?

I did notice this during build in the beginning:

Code:
========================================
KAHIP decomposition
./makeKAHIP: 64: local: -DWM_DP: bad variable name

    ---------------------------------------------------
    Optional component (KAHIP) had build issues
    OpenFOAM will nonetheless remain largely functional
    ---------------------------------------------------


========================================
METIS decomposition
Missing sources: 'metis-5.1.0'
Possible download locations for METIS :
    http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
    http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz

    ---------------------------------------------------
    Optional component (METIS) had build issues
    OpenFOAM will nonetheless remain largely functional
    ---------------------------------------------------


========================================
CGAL/boost
    CGAL  include: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/CGAL-4.9.1/include
    CGAL  library: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/CGAL-4.9.1/lib64
    boost include: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/boost_1_64_0/include
    boost library: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/boost_1_64_0/lib64

========================================
FFTW
    fftw include: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/fftw-3.3.7/include
    fftw library: /opt/OpenFoam/ThirdParty-v1912/platforms/linuxARM64Gcc/fftw-3.3.7/lib64

========================================
ADIOS2
./makeAdios2: 64: local: -DWM_DP: bad variable name

    ---------------------------------------------------
    Optional component (ADIOS2) had build issues
    OpenFOAM will nonetheless remain largely functional
    ---------------------------------------------------


========================================
Done ThirdParty Allwmake
========================================
EternalSeekerX is offline   Reply With Quote

Old   May 6, 2020, 19:41
Default Fixed the Issue!
  #7
Senior Member
 
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 137
Rep Power: 10
EternalSeekerX is on a distinguished road
Great news, I was able to compile and install OpenFOAM-v1912 arm64 directly inside my Ubuntu 19.10 install inside a Proot Container running on an Android Phone.

So what I did differently this time was:

-First made sure give termux (my terminal to launch the container) wakelock such that android doesn't kill the session
-Downloading the latest tar file named OpenFOAM-v1912200314.tar.gz (kept the original Thirdparty-v1912.tar.gz as it was unchanged)
-Untar into my new directory located in /opt/OpenFOAM
- [Optional: I hear its not needed as this is automated] I did go into the etc/bashrc and un-commented the build directory pointing to openfoam in opt and commented the build directory pointing to openfoam in $Home
- sourced etc/bashrc in terminal (my terminal was already in the OpenFOAM-v1912 directory)
- Did foamSystemCheck command and noticed that for me that openfoam cannot figure out which shell I am using (I am using bash), and this is due to permissions with proot containers (it shouldn't be an issue)
- ran ./Allwmake -j4 -l (I chose 4 because anything higher would cause resource issues with my soc)
- It build correctly and I was able to run foamInstallationTest and even commands such as blockMesh/simpleFoam/etc.
-Finally i edited in my bashrc in my home directory with this line:
Code:
alias of1912='source /opt/OpenFOAM/OpenFOAM-v1912/etc/bashrc';
And voila I was done, now whenever i launch terminal, i just type in of1912 and i can use openfoam.

I created a run directory and then copied over a few tutorials to test.
elbow, pitzDaily, airFOIL2D, simpleCar, rotarDisk all ran using both manual commands and there Allrun scripts.

ParaFoam worked out of the box with my Paraview 5.8.0 (installed from Ubuntu Repo using apt-get)

I was able to visualize this all on a phone:
https://imgur.com/Ph62I0z

The only issue I have is that motorBike didn't run correctly with Allrun, it ran to quickly and when I tried to open results, paraview didn't have the data for p,U,nu,etc. I even ran it manually using blockMesh > snappyHexMesh (it took around 800 seconds to run) > SimpleFoam, and it still couldnt find the proper results in paraview. I chalk this down to openmpi support for my device.

However largely everything else works
HPE likes this.
EternalSeekerX 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 25 August 14, 2022 13:55
[ANSYS Meshing] Creating a 2D Mesh with Ansys Workbench for OpenFOAM v1912 fanta ANSYS Meshing & Geometry 1 April 4, 2020 08:59
[OpenFOAM] selecting cmake-Version when building Paraview from OpenFOAM molli123 ParaView 0 September 13, 2018 08:33
[OpenFOAM.org] Building OpenFOAM 3.0 on ArchLinux coldice OpenFOAM Installation 8 January 31, 2016 11:39
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


All times are GMT -4. The time now is 08:11.