Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1695
Closed
Open
Issue created May 01, 2020 by Sultan M. Islam@EnigmaVoidX

Issue attemping to build OpenFoam 1912 on an armh8 device

Dear FOAMERS,

I posted this on the cfd forum and was told to file a bug here, so I will give you some background:

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

I was following this website

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:

'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:

'#------------------------------------------------------------------------------
# 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:

'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:

'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!

Edited May 01, 2020 by Sultan M. Islam
Assignee
Assign to
Time tracking