js1019 / normalmodes Goto Github PK
View Code? Open in Web Editor NEWNormal Modes at Planetary Scales
License: GNU Lesser General Public License v3.0
Normal Modes at Planetary Scales
License: GNU Lesser General Public License v3.0
Bringing to github our email communication. I asked:
we are interested in adding a validation phase that checks the output data
@js1019's answer:
I am not sure how to perform a validation. Are you suggesting a benchmark of some standard results from other platforms? The current output shows the relative errors. If the errors were small, ~10^-11, the users could be confident of their results
based on the above, I was wondering if we could add a script that automates these checks on the output log. We can work on a PR for adding this script, if you think this would be useful.
In attempting to run NormalModes under Open MPI, I notice that there is a Fortran --> C translation of an MPI_Comm
that is not happening correctly between NormalModes and ParMetis (http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview).
I filed a bug with ParMetis (see http://glaros.dtc.umn.edu/flyspray/task/174), but ParMetis appears to be abondonware (** see below), so I am filing the bug here for you, NormalModes maintainers. ๐
I represent a vendor partner mentoring one of the student teams for SC'19; they are attempting to run NormalModes with Open MPI. I also happen to be one of the core developers of Open MPI.
The problem is here:
geometry_mod::pnm_apply_parmetis()
is a Fortran subroutine that invokes ParMETIS_V3_PartKway()
.ParMETIS_V3_PartKway()
is an MPI communicator handle.geometry_mod::pnm_apply_parmetis()
passes in 0, which is actually the correct Fortran integer value for MPI_COMM_WORLD
.ParMETIS_V3_PartKway()
is a C function. The last parameter is of type (MPI_Comm*)
. THIS IS WRONGMPI defines MPI handles as INTEGER
s in the Fortran mpi
module (which is what geometry_mod
uses). The Fortran compiler/runtime will therefor pass that parameter as a pointer to an integer. MPI defines that this type must be received on the C side as (MPI_Fint*)
.
Specifically, ParMETIS does two things wrong:
(MPI_Comm*)
. It needs to be (MPI_Fint*)
.MPI_Comm_f2c()
on the (MPI_Fint)
to convert it to an (MPI_Comm)
.Unfortunately, ParMETIS does not do this: it just dereferences the (incorrect) (MPI_Comm*)
argument and tries to use it with C MPI API calls.
In MPICH-flavored MPI implementations, this just happens to work fine because MPICH MPI handles are integers in both C and Fortran.
Open MPI's C handles, however, are pointers (which has been valid since MPI-1.0 in 1994). As such, when NormalModes effectively passes MPI_COMM_WORLD
(which is defined to be integer value 0) to the ParMETIS function, ParMETIS dereferences it and gets a 0 back. When it passes 0 to the Open MPI C MPI API functions, they (correctly) interpret that as NULL and throw an MPI exception.
NOTE: The last release from ParMetis was in 2013. With a quick look through their bug tracker, it looks like the last time a maintainer assigned a bug was also back in 2013. I don't know for sure, but it looks like ParMetis is abondonware. ๐ข
If ParMETIS is abondonware and won't be fixed, I think the only real option you have is to write C wrappers around the ParMETIS calls -- i.e., you invoke the MPI handle f2c functions and then invoke the real underlying ParMETIS C API calls.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.