JCSDA / spack-stack

Creative Commons Zero v1.0 Universal
27 stars 44 forks source link

Add SCOTCH: package for mesh/graph partitioning #465

Closed MatthewMasarik-NOAA closed 1 year ago

MatthewMasarik-NOAA commented 1 year ago

Please describe the package or library you would like to add to spack-stack.
SCOTCH is a mesh/graph partitioning package hosted on Gitlab, https://gitlab.inria.fr/scotch/scotch.
It's use case is to perform domain decomposition for WW3 unstructured grid configurations. Unstructured
grids are under development for GFSv17-wave.

What applications will be using this package or library?
WAVEWATCHIII (WW3).

Is there already a package or library in spack-stack that provides this, or related, functionality?
The functionality provided is not available otherwise in a package or library. SCOTCH is an NCO-approved
replacement for the package ParMetis, which has been used
for WW3 unstructured decomposition, but unable to receive NCO approval.

Additional context
NA

Will This Package be Needed in a NOAA Operational Application?
Yes.

WCOSS System Software Request Checklist

General questions:

Supervisor or sponsor of the requester: Avichal Mehra (Lynker: Bin Liu)

Software name and version, specific URL to the software: SCOTCH v7.0.2 https://gitlab.inria.fr/scotch/scotch

Software type - New or Upgrade existing?: New

Justification ( List NPS models using the software): WAVEWATCHIII (WW3) Completion Time requested: As soon as possible.

Software License including all Dependency Software Licenses: https://gitlab.inria.fr/scotch/scotch/-/blob/master/LICENSE_en.txt

Support contact(s) who must have a WCOSS account: @MatthewMasarik-NOAA, @JessicaMeixner-noaa.

Dependency Software list: Modules used on Hera

cmake/3.20.1                                                                                                   
intel/2022.1.2                                                                                                 
impi/2022.1.2                                                                                                  
hpc/1.2.0                                                                                                      
hpc-intel/2022.1.2                                                                                             
hpc-impi/2022.1.2                                                                                              
hdf5/1.10.6                                                                                                    
netcdf/4.7.4                                                                                                   
gnu/9.2.0                                                                                                      

Installation instructions: Spack installation instruction are still
in progress. Installation using hpc-stack are:

# https://gitlab.inria.fr/scotch/scotch.git

cd scotch

module purge
module load cmake/3.20.1
module load intel/2022.1.2
module load impi/2022.1.2
module use  /scratch1/NCEPDEV/nems/role.epic/hpc-stack/libs/intel-2022.1.2/modulefiles/stack
module load hpc/1.2.0
module load hpc-intel/2022.1.2
module load hpc-impi/2022.1.2
module load hdf5/1.10.6
module load netcdf/4.7.4
module load gnu/9.2.0

mkdir build && cd build
cmake -DCMAKE_Fortran_COMPILER=ifort            \
      -DCMAKE_C_COMPILER=icc                    \
      -DCMAKE_INSTALL_PREFIX=<path-to>/install  \
      -DCMAKE_BUILD_TYPE=Release ..             |& tee cmake.out
make  VERBOSE=1                                 |& tee make.out
make  install                                      

Test and verification instructions: Currently in progress.

Note: NCO has already approved this package. This package is needed
asap, so if the information below here is still needed, we work to
answer them but needed to get the process in motion as it is needed
for GFSv17 development.

Technical Review Checklist for open source software - Review the source code to answer the following questions

Licenses for the requested software and its dependencies:

Licenses - confirm the software Licenses are acceptable

Maturity

Acceptable - Stable, production, or equivalent

Self-contained

No external http, https, ftp, or other URI exists except that in comments

No binary files in the package unless they are in the approved list

No publicly disclosed cybersecurity vulnerabilities and exposures

Searching https://cve.mitre.org/cve/

Security High Level Checklists

Is it prohibited by DHS/DOC/NOAA/NWS

Is it provided by a trusted source? Trusted sources include other NWS, NOAA, or DOC, agencies, or other Federal agencies that operate at a FISMA high or equivalent level. Additionally, trusted sources could be third-party agencies through which there is an existing SLA on file (such as RedHat).

Is software support offered (is it being updated and patched).

If maintained by a private entity, does the entity operate in a foreign country, especially a prohibited foreign country (China, Russia, Iran, North Korea, etc.).

Is there sufficient documentation to support maintenance

Are there known vulnerabilities or weaknesses

Is there a need for privileged processes

Are there software dependencies, are those dependencies approved or do they have any security concerns

Are there any other concerns related to SA, SI, and SC control families

climbfuji commented 1 year ago

@MatthewMasarik-NOAA I am looking at the license, I know it is compatible with GPL, but do you know if it is compatible with Apache 2?

This is an important question, because JCSDA software is licensed as Apache 2, and as https://www.apache.org/licenses/GPL-compatibility.html explains, Apache 2 is compatible one-way with GPLv3 (namely when including Apache 2 software in a GPLv3 product), but not the other way (i.e. including GPLv3 in Apache 2, where including can be as basic as "linking to").

If scotch is a 3rd-party dependency for WW3 and therefore the UFS, we'll need to know (1) what the compatibility of CeCILL-C free/libre with Apache is (yes/one-way/both-ways), and (2) how scotch gets used ("inline", i.e. compiled into the UFS code, vs "offline", i.e. used as a separate preprocessor step to generated meshes).

Any insight you can provide will be greatly appreciated. Thanks!

JessicaMeixner-NOAA commented 1 year ago

We have built WW3 with SCOTCH via CI with spack (see here: ) In this, the specs for SCOTCH are: - scotch@7.0.1+mpi+metis~shared The metis and mpi dependency seem to be important as we were not able to build WW3 without this.

climbfuji commented 1 year ago

We have built WW3 with SCOTCH via CI with spack (see here: ) In this, the specs for SCOTCH are: - scotch@7.0.1+mpi+metis~shared The metis and mpi dependency seem to be important as we were not able to build WW3 without this.

Wow, now I am confused, I thought scotch was being used because NCO didn't want metis? Or am I wrong?

JessicaMeixner-NOAA commented 1 year ago

The "metis" here is an option that builds the "you aren't using metis easy to use interface for your transition away". Not actually using the metis library which is super confusing!

Also to your question about licence, this sounds like a question for experts in the topic, of which I am not. I can pass you to the link that has more info.

arunchawla-NOAA commented 1 year ago

@climbfuji

I thought of pasting the email response I got from the developers of the library a long time ago but that was a disaster in formatting so I am forwarding it to you

JessicaMeixner-NOAA commented 1 year ago

On orion, a new module has been created, so that we can use later gcc with intel, to load:

module load contrib/0.1
module load noaa-gcc/10.2.0
climbfuji commented 1 year ago

Note. Issue https://github.com/NOAA-EMC/spack-stack/issues/336 is more or less a duplicate of this issue, but provides additional information.