Coder Social home page Coder Social logo

Comments (12)

platipodium avatar platipodium commented on July 25, 2024

Loading modules.

We can either use an openmpi or an intelmpi toolchain, the modules.

Common modules

module load hdf5
module load netcdf-c
module load netcdf-fortran
module load git
module load intel-oneapi-compilers

Openmpi versus intelmpi

module load intel-oneapi-mpi
module swap intel-oneapi-mpi openmpi

from schism.

platipodium avatar platipodium commented on July 25, 2024

Here's a first cmake fragment for Levante

###DKRZ Levante

set (SCHISM_EXE_BASENAME pschism_LEVANTE CACHE STRING "Base name (modules and file extension to be added of the executable. If you want a machine name, add it here")

###Relative paths won't work
set(CMAKE_Fortran_COMPILER ifort CACHE PATH "Path to serial Fortran compiler")
set(CMAKE_C_COMPILER icc  CACHE PATH "Path to serial Fortran compiler")
#set(NetCDF_FORTRAN_DIR "$ENV{NETCDF_FORTRAN}"  CACHE PATH "Path to NetCDF Fortran library")
#set(NetCDF_C_DIR "$ENV{NETCDF}" CACHE PATH "Path to NetCDF C library")
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -mcmodel=medium  -mtune=core-avx2" CACHE STRING "Fortran flags" FORCE)

#Compiler flags for openmpi
#set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -mcmodel=medium -assume byterecl" CACHE STRING "Fortran flags" FORCE)

from schism.

platipodium avatar platipodium commented on July 25, 2024

I uploaded a makefile fragment Make.defs.levante.openmpi that circumvents the messed-up mamba paths introduced by the (needed) python3 module.

NFCONFIG=$(shell module unload python3; which nf-config; module load python3)
NCCONFIG=$(shell module unload python3; which nc-config; module load python3)
$(info $(ENV) uses as for netCDF C config $(NCCONFIG))
$(info $(ENV) uses as for netCDF Fortran config $(NFCONFIG))

CDFLIBS = $(shell $(NFCONFIG) --flibs) $(shell $(NCCONFIG) --libs)
$(info $(ENV) uses netCDF with CDFLIBS=$(CDFLIBS))
CDFMOD = -I$(shell $(NFCONFIG) --includedir)
$(info $(ENV) uses netCDF with CDFMOD=$(CDFMOD))

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

Thx to Carsten's magic, we now have a working toolkit (based on gcc) on Levante! Use

(1) modules.levante in src/Utility/Cluster_files (you can source modules.levante)
(2) cmake file is SCHISM.local.levante.gcc
(3) batch script is run_levante_ompi in src/Utility/Cluster_files

That's it. I'm still looking at performance for large core counts.

from schism.

platipodium avatar platipodium commented on July 25, 2024

They installed a new toolchain with intel:

the system administrator has installed the missing libraries on levante. Please try to re-build your application using the following modules:

hdf5/1.12.1-intel-oneapi-mpi-2021.5.0-intel-2021.5.0
netcdf-c/4.8.1-intel-oneapi-mpi-2021.5.0-intel-2021.5.0
netcdf-fortran/4.5.3-intel-oneapi-mpi-2021.5.0-intel-2021.5.0
parallel-netcdf/1.12.2-intel-oneapi-mpi-2021.5.0-intel-2021.5.0

The path to the shared netCDF-Fortran library can be coded in the binary using the following flag:

-Wl,-rpath,/sw/spack-levante/netcdf-fortran-4.5.3-r5r3ev/lib/

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

from schism.

platipodium avatar platipodium commented on July 25, 2024

I currently get (with gcc toolchain)

/sw/spack-levante/netcdf-fortran-4.5.3-jlxcfz/lib/libnetcdff.so: undefined reference to `_gfortran_os_error_at@GFORTRAN_10'
objdump -t /sw/spack-levante/netcdf-fortran-4.5.3-jlxcfz/lib/libnetcdff.so |grep gfort
0000000000000000       F *UND*	0000000000000000              _gfortran_os_error_at@@GFORTRAN_10

from schism.

platipodium avatar platipodium commented on July 25, 2024

Solved this by adding the following lines to local CMake config:

# To avoid dynamic loading of wrong standard library, force these to static
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")

from https://stackoverflow.com/questions/24648357/compiling-a-static-executable-with-cmake

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

We have updated the module, cmake and batch script files for Levante. At the moment, both Intel and gcc work well for meshes of any size. Intel is faster.

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

from schism.

josephzhang8 avatar josephzhang8 commented on July 25, 2024

Issues resolved.

from schism.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.