Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2022-03-16 11:51:13

VonPire
Member
Registered: 2021-01-14
Posts: 33

How to use Intel compilers and AMD mathlibs with SalomeMeca container?

Hello,

I have just build new workstation (CPU: AMD Epyc 7443, RAM: 256Gb ECC 3200-DDR4) and the code_aster performance is quite poor even I use MPI version of Code_aster.

I have managed to build and instal newest Code_aster 16.1.8 MPI version to Salome Meca container with "default" prerequisites. However I would like to build Code-aster MPI version to Salome Meca container with AMD math libraries (AOCL) and AMD (AOCC) or Intel compilers. I don't have any experience of doing this previously with any machine so help/tips would be welcome.

Here is old thread that are talking about the same thing, but in the time (2010) when there wasn't .sif / container version:
htt ps://www.code-aster.org/forum2/viewtopic.php?id=13616  (Please remove the space from the beginning)

What is the correct file/files that I should modify ? Before .sif / container time the right file was setup.py or setup.cfg.

Where I can find these files ?

Has anyone tested these AMD's AOCL libraries or AOCC compilers ?

Can somebody help or give tips with this ?

Edit:

Here are the links to the AOCC and AOCL documentations:
AOCC:
htt ps://developer.amd.com/wp-content/resources/57222_AOCC_UG_Rev_3.2.pdf (Please remove the space from the beginning)
AOCL:
htt ps://developer.amd.com/wp-content/resources/57404_AOCL_UG_Rev_3.1.pdf (Please remove the space from the beginning)

Best regards,
VonPire

Last edited by VonPire (2022-03-16 20:42:05)

Offline

#2 2022-03-22 12:22:37

VonPire
Member
Registered: 2021-01-14
Posts: 33

Re: How to use Intel compilers and AMD mathlibs with SalomeMeca container?

Hello,

I'm still stuck with this. I even tried to compile "aster-full-src-15.2.0" std version with Intel oneApi compilers, but there was error with aster installation. Everything else (MUMPS,med, hdf5,etc.) was installed successfully. 

Here is some setup.log details:

Compiler variables for aster (set as environment variables):
export               CC='/opt/intel/oneapi/compiler/2022.0.2/linux/bin/intel64/icc'
export           CFLAGS='-O3 -traceback -fPIC'
export       CFLAGS_DBG='-g  -traceback -fPIC'
export    CFLAGS_OPENMP='-openmp'
export              CXX='/opt/intel/oneapi/compiler/2022.0.2/linux/bin/intel64/icpc'
export           CXXLIB='-L/usr/lib/gcc/x86_64-linux-gnu/9 -lstdc++'
export          DEFINED='LINUX64 _USE_INTEL_IFORT _USE_OPENMP _DISABLE_MATHLIB_FPE'
export              F90='/opt/intel/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort'
export         F90FLAGS='-O3 -fpe0 -traceback -fPIC'
export     F90FLAGS_DBG='-g  -fpe0 -traceback -fPIC'
export      F90FLAGS_I8=' -i8 -r8'
export  F90FLAGS_OPENMP='-openmp'
export               LD='/opt/intel/oneapi/compiler/2022.0.2/linux/bin/intel64/ifort'
export          LDFLAGS='-nofor_main'
export   LDFLAGS_OPENMP='-openmp'
export          MATHLIB='-Wl,--start-group -L/opt/intel/oneapi/mkl/2022.0.2/lib/intel64 -lmkl_intel_lp64 -L/opt/intel/oneapi/mkl/2022.0.2/lib/intel64 -lmkl_sequential -L/opt/intel/oneapi/mkl/2022.0.2/lib/intel64 -lmkl_core -Wl,--end-group'
export         OTHERLIB='-L/usr/lib/x86_64-linux-gnu -lpthread -L/usr/lib/x86_64-linux-gnu -lz -L/usr/lib/x86_64-linux-gnu -lpthread'

Filling cache...                                                       [  OK  ]
Checking permissions...                                                [  OK  ]

>>> Extraction <<<

entering directory '/tmp/install_aster.1717957'
Extracting aster-15.2.0.tgz...                                         [  OK  ]
--- 30900 files extracted
leaving directory '/tmp/install_aster.1717957'

>>> Configuration <<<

entering directory '/tmp/install_aster.1717957/aster-15.2.0'
leaving directory '/tmp/install_aster.1717957/aster-15.2.0'

>>> Configuration <<<

entering directory '/tmp/install_aster.1717957/aster-15.2.0'
leaving directory '/tmp/install_aster.1717957/aster-15.2.0'

>>> Configuration <<<

entering directory '/tmp/install_aster.1717957/aster-15.2.0'
Command line : export PATH=/tmp/tmp86r0b7_q:${PATH} ; . env.d/aster_full_std.sh ; ./waf configure --install-tests --prefix=/home/USER/aster/15.2
configure aster installation...                                       
Command output :
configure aster installation...                                        [FAILED]
Exit code : 1
readlink: missing operand

In the config.log for some reason aster wants to use gfortran even ifort was set up:

/usr/bin/gfortran
----------------------------------------
Checking for C compiler version
icc 20.2.1
----------------------------------------
Checking for Fortran compiler version
gfortran 9.4.0
----------------------------------------
fortran link verbose flag
==>
        PROGRAM MAIN
        END

<==
[1/2] Compiling build/std/.conf_check_e01dd803d6cb274f73e8aa4a2b8a1f70/test.f

['/usr/bin/gfortran', '-O3', '-fpe0', '-traceback', '-fPIC', '-c', '-o/tmp/install_aster.1717957/aster-15.2.0/build/std/.conf_check_e01dd803d6cb274f73e8aa4a2b8a1f70/testbuild/release/test.f.1.o', '/tmp/install_aster.1717957/aster-15.2.0/build/std/.conf_check_e01dd803d6cb274f73e8aa4a2b8a1f70/test.f']
err: gfortran: error: unrecognized command line option ‘-fpe0’
gfortran: error: unrecognized command line option ‘-traceback’

from /tmp/install_aster.1717957/aster-15.2.0: Test does not build: Traceback (most recent call last):
  File "/tmp/install_aster.1717957/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Configure.py", line 335, in run_build
    bld.compile()
  File "/tmp/install_aster.1717957/aster-15.2.0/.waf3-2.0.20-df7687050314fa98c5daa534cb234b8c/waflib/Build.py", line 176, in compile
    raise Errors.BuildError(self.producer.error)
waflib.Errors.BuildError: Build failed
-> task in 'testprog' failed with exit status 1 (run with -v to display more information)

from /tmp/install_aster.1717957/aster-15.2.0: The configuration failed
==>
        PROGRAM MAIN
        END


So I'm not able to install even "aster-full-src-15.2.0" with Intel OneApi compilers. Tips and help would be welcome.

Best regards,
VonPire

Last edited by VonPire (2022-03-22 13:26:45)

Offline

#3 2022-03-23 10:31:12

VonPire
Member
Registered: 2021-01-14
Posts: 33

Re: How to use Intel compilers and AMD mathlibs with SalomeMeca container?

Hello,

My monolog continues, I got some progress:

I managed to install aster-full-src-14.6.0-1 (without MPI) with Intel OneAPi compilers and Intel mkl, but precise same method and settings doesn't work with unstable aster-full-src-15.2 version.

Next thing is to test AMD AOCL mathlibraries if they would work with Codeaster. After that trying to build MPI version with intel compilers and custom mathlibs.

Best regards.
VonPire

Offline

#4 2022-03-23 13:52:03

nicolas_p
Member
Registered: 2020-04-14
Posts: 55

Re: How to use Intel compilers and AMD mathlibs with SalomeMeca container?

You have this error:

['/usr/bin/gfortran', '-O3', '-fpe0', '-traceback', '-fPIC', '-c', '-o/tmp/install_aster.1717957/aster-15.2.0/build/std/.conf_check_e01dd803d6cb274f73e8aa4a2b8a1f70/testbuild/release/test.f.1.o', '/tmp/install_aster.1717957/aster-15.2.0/build/std/.conf_check_e01dd803d6cb274f73e8aa4a2b8a1f70/test.f']
err: gfortran: error: unrecognized command line option ‘-fpe0’
gfortran: error: unrecognized command line option ‘-traceback’

You try to use gfortran (from gcc I suppose from the localization) and not ifort as you expect.

first option: try to understand why you use gcc and not ifort
second option: modify building script to remove option  ‘-fpe0’ and ‘-traceback’ that cause the error

Offline

#5 2022-03-24 21:01:47

VonPire
Member
Registered: 2021-01-14
Posts: 33

Re: How to use Intel compilers and AMD mathlibs with SalomeMeca container?

Hello Nicolas,

Thank you for your answer.

Yes, I know that aster tries to use gfortran instead of ifort, even I set ifort correctly in setup.cfg. The same Intel compilers+ Intel MKL setup.cfg works fine with aster-full-src-14.6.0-1. I got 30% more performance with that Intel setup.cfg in one core 14.6 version.

Maybe we can forget the aster-full-src-15.2, because there is no any benefit to get it working. aster-full-src-15.2 has old mumps 5.2.1 version which isn't compatible anymore with the newest aster-src from sourceforge. Newest aster-src have MUMPS 5.4.1c.

Next question is how can I build codeaster MPI version with Intel compilers and Intel MKL to salome-meca .sif container ?

Best regards.
VonPire

Last edited by VonPire (2022-03-24 21:28:36)

Offline