Skip to content

Commit

Permalink
Merge Pull Request #12975 from gsjaardema/Trilinos/SEACAS-snapshot-20…
Browse files Browse the repository at this point in the history
…24-05-01

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Seacas snapshot 2024 05 01'
PR Author: gsjaardema
  • Loading branch information
trilinos-autotester authored May 2, 2024
2 parents d915dea + df7d33d commit dd6e404
Show file tree
Hide file tree
Showing 199 changed files with 2,258 additions and 2,155 deletions.
8 changes: 3 additions & 5 deletions packages/seacas/Jamfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#---------------------------------------------------------------
# Copyright(C) 1999-2020 National Technology & Engineering Solutions
# Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
Expand Down Expand Up @@ -1385,7 +1385,6 @@ lib aprepro_lib
/tpl/netcdf-c//netcdf
/tpl/fmt//fmt
: <define>EXODUS_SUPPORT
<define>FMT_SUPPORT
[ ifdevbuild
# Any parameters within this 'ifdevbuild' block apply to development
# builds only and will not be present for user builds.
Expand All @@ -1398,7 +1397,6 @@ lib aprepro_lib
]
:
: <define>EXODUS_SUPPORT
<define>FMT_SUPPORT
[ ifdevbuild
# Any parameters within this 'ifdevbuild' block apply to development
# builds only and will not be present for user builds.
Expand Down Expand Up @@ -1866,7 +1864,7 @@ exe Utst_database_io
[ glob $(seacas-root)/libraries/ioss/src/utest/Utst_IofxDatabaseIO.C ]
ioinit
/tpl/netcdf-c//netcdf
/tpl/gtest//gtest
/tpl/googletest//gtest
: <tag>@utility-exec-tag
;

Expand All @@ -1876,7 +1874,7 @@ exe Utst_textmesh
ioinit
iotm
/tpl/netcdf-c//netcdf
/tpl/gtest//gtest
/tpl/googletest//gtest
/mpi//mpi
: <tag>@sierra-exec-tag
;
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/applications/ejoin/EJ_index_sort.C
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace {

size_t ndx = 0;

using TT = typename std::remove_cv<T>::type;
using TT = typename std::remove_cv_t<T>;
TT small = v[iv[0]];
for (size_t i = 1; i < N; i++) {
if (v[iv[i]] < small) {
Expand Down
17 changes: 14 additions & 3 deletions packages/seacas/applications/epu/EP_ExodusFile.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions
* Copyright(C) 1999-2021, 2023, 2024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -129,12 +129,23 @@ void Excn::ExodusFile::close_all()
}
}

void Excn::ExodusFile::unlink_temporary_files()
void Excn::ExodusFile::unlink_input_files()
{
fmt::print("\n\tUnlinking {}\n\t ...", filenames_[0]);
for (int p = 0; p < partCount_; p++) {
unlink(filenames_[p].c_str());
}
fmt::print("\n\tUnlinking {}\n\n", filenames_[partCount_ - 1]);
}

void Excn::ExodusFile::handle_temporary_files(bool delete_them)
{
for (int p = 0; p < partCount_; p++) {
if (fileids_[p] >= 0) {
ex_close(fileids_[p]);
unlink(filenames_[p].c_str());
if (delete_them) {
unlink(filenames_[p].c_str());
}
fileids_[p] = -1;
}
}
Expand Down
5 changes: 3 additions & 2 deletions packages/seacas/applications/epu/EP_ExodusFile.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2023 National Technology & Engineering Solutions
* Copyright(C) 1999-, 20242024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -30,7 +30,8 @@ namespace Excn {
static int io_word_size() { return ioWordSize_; }
operator int() const;
static int max_name_length() { return maximumNameLength_; }
static void unlink_temporary_files();
static void handle_temporary_files(bool delete_them);
static void unlink_input_files();

private:
int myProcessor_;
Expand Down
32 changes: 27 additions & 5 deletions packages/seacas/applications/epu/EP_SystemInterface.C
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ namespace {

Excn::SystemInterface::SystemInterface(int rank) : myRank_(rank) { enroll_options(); }

bool Excn::SystemInterface::remove_file_per_rank_files() const
{
if (removeFilePerRankFiles_) {
if (partCount_ <= 0 && startPart_ == 0 && subcycle_ == -1 && cycle_ == -1) {
return true;
}
else {
fmt::print("\nNot removing the file-per-rank input files due to presence of "
"start/part/subcycle options.\n\n");
return false;
}
}
else {
return false;
}
}

void Excn::SystemInterface::enroll_options()
{
options_.usage("[options] basename");
Expand Down Expand Up @@ -105,6 +122,10 @@ void Excn::SystemInterface::enroll_options()
"\t\tthey are automatically deleted unless -keep_temporary is specified.",
nullptr);

options_.enroll("remove_file_per_rank_files", GetLongOption::NoValue,
"Remove the input file-per-rank files after they have successfully been joined.",
nullptr);

options_.enroll(
"verify_valid_file", GetLongOption::NoValue,
"Reopen the output file right after closing it to verify that the file is valid.\n"
Expand Down Expand Up @@ -374,11 +395,12 @@ bool Excn::SystemInterface::parse_options(int argc, char **argv)
sumSharedNodes_ = options_.retrieve("sum_shared_nodes") != nullptr;
append_ = options_.retrieve("append") != nullptr;

subcycle_ = options_.get_option_value("subcycle", subcycle_);
cycle_ = options_.get_option_value("cycle", cycle_);
subcycleJoin_ = options_.retrieve("join_subcycles") != nullptr;
keepTemporary_ = options_.retrieve("keep_temporary") != nullptr;
verifyValidFile_ = options_.retrieve("verify_valid_file") != nullptr;
subcycle_ = options_.get_option_value("subcycle", subcycle_);
cycle_ = options_.get_option_value("cycle", cycle_);
subcycleJoin_ = options_.retrieve("join_subcycles") != nullptr;
keepTemporary_ = options_.retrieve("keep_temporary") != nullptr;
removeFilePerRankFiles_ = options_.retrieve("remove_file_per_rank_files") != nullptr;
verifyValidFile_ = options_.retrieve("verify_valid_file") != nullptr;

if (options_.retrieve("map") != nullptr) {
mapIds_ = true;
Expand Down
2 changes: 2 additions & 0 deletions packages/seacas/applications/epu/EP_SystemInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace Excn {
bool output_shared_nodes() const { return outputSharedNodes_; }
bool is_auto() const { return auto_; }
bool keep_temporary() const { return keepTemporary_; }
bool remove_file_per_rank_files() const;
bool verify_valid_file() const { return verifyValidFile_; }
int max_open_files() const
{
Expand Down Expand Up @@ -158,6 +159,7 @@ namespace Excn {
bool outputSharedNodes_{false};
bool auto_{false};
bool keepTemporary_{false};
bool removeFilePerRankFiles_{false};
bool verifyValidFile_{false};
bool addNodalCommunicationMap_{false};

Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/applications/epu/EP_Version.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2023 National Technology & Engineering Solutions
* Copyright(C) 1999-2024 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand All @@ -11,6 +11,6 @@

static const std::array<std::string, 3> qainfo{
"epu -- E Pluribus Unum",
"6.08",
"2024/03/07",
"6.09",
"2024/04/18",
};
11 changes: 7 additions & 4 deletions packages/seacas/applications/epu/epu.C
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ int main(int argc, char *argv[])

ExodusFile::close_all();
#if ENABLE_PARALLEL_EPU
MPI_Barrier(MPI_COMM_WORLD); // CHECK: ALLOW MPI_COMM_WORLD
MPI_Barrier(MPI_COMM_WORLD); // CHECK: ALLOW MPI_COMM_WORLD
#endif
}
else {
Expand Down Expand Up @@ -664,9 +664,12 @@ int main(int argc, char *argv[])
}
}

if (error == 0 && !interFace.keep_temporary()) {
ExodusFile::unlink_temporary_files();
}
bool delete_temp = error == 0 && !interFace.keep_temporary();
ExodusFile::handle_temporary_files(delete_temp);
}

if (error == 0 && interFace.remove_file_per_rank_files()) {
ExodusFile::unlink_input_files();
}

time_t end_time = std::time(nullptr);
Expand Down
14 changes: 11 additions & 3 deletions packages/seacas/applications/explore/exp_comand.f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
C Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions
C Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
Expand Down Expand Up @@ -149,7 +149,7 @@ SUBROUTINE COMAND (A, IA, EXODUS, DBNAME, QAREC, INFO,
CHARACTER*80 DUMLIN
character*2048 OUTPUT, LCOUTPUT

CHARACTER*(MXSTLN) CMDTBL(15), SELTBL(15), LISTBL(38)
CHARACTER*(MXSTLN) CMDTBL(15), SELTBL(15), LISTBL(41)
SAVE CMDTBL, SELTBL, LISTBL, KINVC, KINVS
C --CMDTBL - the valid commands table
C --SELTBL - the valid SELECT options table
Expand All @@ -170,7 +170,7 @@ SUBROUTINE COMAND (A, IA, EXODUS, DBNAME, QAREC, INFO,
4 'GVARS ', 'NVARS ', 'EVARS ', 'NSVARS ', 'SSVARS ',
5 ' ' /
DATA LISTBL /
1 'TITLE ', 'VARS ',
1 'TITLE ', 'VARS ', 'QAINFO ', 'QA', 'INFORMATION',
2 'COORDINA', 'MAP ', 'NMAP ', 'NODEMAP ',
3 'BLOCKS ', 'MATERIAL', 'LINK ', 'CONNECTI', 'ATTRIBUT',
4 'NSETS ', 'NNODES ', 'NFACTORS', 'INVCON ',
Expand Down Expand Up @@ -791,8 +791,16 @@ SUBROUTINE COMAND (A, IA, EXODUS, DBNAME, QAREC, INFO,

ELSE IF (LISTYP .EQ. 'QA') THEN

CALL PRQA ('Q', NOUT, NQAREC, QAREC, NINFO, INFO)

ELSE IF (LISTYP .EQ. 'QAINFO') THEN

CALL PRQA ('*', NOUT, NQAREC, QAREC, NINFO, INFO)

ELSE IF (LISTYP .EQ. 'INFORMATION') THEN

CALL PRQA ('I', NOUT, NQAREC, QAREC, NINFO, INFO)

C *** EXODUS Print Commands ***

ELSE IF (LISTYP .EQ. 'NAMES') THEN
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/applications/explore/exp_qainfo.blk
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ C See packages/seacas/LICENSE for details
QAINFO(2) = ' '
QAINFO(3) = ' '

QAINFO(2)(:8) = '20240304'
QAINFO(3)(:8) = ' 4.01'
QAINFO(2)(:8) = '20240418'
QAINFO(3)(:8) = ' 4.02'

c..Dynamic dimensioning of block names+other changes
c..compress output of distribution factors
Expand Down
7 changes: 7 additions & 0 deletions packages/seacas/applications/grepos/gp_inimap.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SUBROUTINE INIMAP(LEN, MAP)
INTEGER MAP(*)
DO I=1, LEN
MAP(I) = I
end do
end

21 changes: 17 additions & 4 deletions packages/seacas/applications/grepos/gp_mapvar.f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
C Copyright(C) 1999-2020 National Technology & Engineering Solutions
C Copyright(C) 1999-2020, 2024 National Technology & Engineering Solutions
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
Expand Down Expand Up @@ -26,14 +26,27 @@ subroutine mapvar(nold, nnew, nvar, map, vars, scr)
real vars(*)
c real vars(nold, nvar)
real scr(*)
logical isseq

C ... VARS should really be a doubly-dimensioned array (NOLD, NVAR),
C The dimensions need to be in this order so we can read them
C in using exgev and exgnv. But, this order doesn't work very
C in using exgnv. But, this order doesn't work very
C well when trying to reduce the size of NOLD

C ... TODO: Need to use the truth table to make sure variables
C exist for each element.
isseq = .false.
if (nold .eq. nnew) then
isseq = .true.
do i=1, nnew
if (map(i) .ne. i) then
isseq = .false.
end if
end do
end if

if (isseq) then
return
end if

do 30 ivar = 1, nvar
do 10 i = 1, nnew
scr(i) = vars(map(i) + nold * (ivar-1) )
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/applications/grepos/gp_qainfo.blk
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ C See packages/seacas/LICENSE for details

C -*- Mode: fortran -*-
QAINFO(1) = 'Grepos '
QAINFO(2) = '2024/03/19 '
QAINFO(3) = ' 1.94 '
QAINFO(2) = '2024/04/09 '
QAINFO(3) = ' 1.95 '
6 changes: 0 additions & 6 deletions packages/seacas/applications/grepos/grepos.f
Original file line number Diff line number Diff line change
Expand Up @@ -1292,12 +1292,6 @@ PROGRAM GREPOS
$ /,9x,'if you need this capability.')
END

SUBROUTINE INIMAP(LEN, MAP)
INTEGER MAP(*)
DO 10 I=1, LEN
MAP(I) = I
10 CONTINUE
END
subroutine exgqaw(ndb, qarec, ierr)
include 'gp_params.blk'
character*(mxstln) qarec(4, *)
Expand Down
Loading

0 comments on commit dd6e404

Please sign in to comment.