Skip to content

Commit

Permalink
Merging develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightly Bot authored and cwsmith committed Aug 25, 2024
2 parents 8959c59 + 399ac8f commit 8449430
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: simmetrx_enabled_pr_comment_trigger_self_hosted

# Controls when the workflow will run
on:
issue_comment:
issue_comment:
types: [created]

# Allows you to run this workflow manually from the Actions tab
Expand All @@ -26,45 +26,79 @@ jobs:
ref: refs/pull/${{ github.event.issue.number }}/head
submodules: recursive
path: 'core_${{ github.event.issue.number }}'

- name: build
id: build

- name: build_sim
id: build_sim
shell: bash
run: |
set +e #avoid exiting when lua modules return non-zero on 'warning' messages
module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
module load gcc/12.3.0-iil3lno
module load mpich/4.1.1-xpoyz4t
module load simmetrix-simmodsuite/2024.0-240119dev-7abimo4
module load zoltan/3.83-hap4ggo
module load cmake/3.26.3-2duxfcd
set -e
cmake -S core_${{ github.event.issue.number }} \
-B ${RUNNER_TEMP}/buildSim \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_ZOLTAN=ON \
-DENABLE_SIMMETRIX=ON \
-DSIM_MPI=mpich4.1.1 \
-DSIM_PARASOLID=ON \
-DSIM_ACIS=ON \
-DSKIP_SIMMETRIX_VERSION_CHECK=ON \
-DMESHES=${{github.workspace}}/core_${{ github.event.issue.number }}/pumi-meshes \
-DIS_TESTING=ON \
-DSCOREC_CXX_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build ${RUNNER_TEMP}/buildSim -j 4
ctest --test-dir ${RUNNER_TEMP}/buildSim --output-on-failure
- name: build_sim_cgns
id: build_sim_cgns
shell: bash
run: |
set +e #avoid exiting when lua modules return non-zero on 'warning' messages
module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
module load gcc/12.3.0-iil3lno
module load gcc/12.3.0-iil3lno
module load mpich/4.1.1-xpoyz4t
module load simmetrix-simmodsuite/2024.0-240119dev-7abimo4
module load zoltan/3.83-hap4ggo
module load cmake/3.26.3-2duxfcd
module load cgns/develop-cc4dfwp
set -e
cmake -S core_${{ github.event.issue.number }} \
-B ${RUNNER_TEMP}/build \
-B ${RUNNER_TEMP}/buildSimCgns\
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_ZOLTAN=ON \
-DENABLE_SIMMETRIX=ON \
-DSIM_MPI=mpich4.1.1 \
-DSIM_PARASOLID=ON \
-DENABLE_CGNS=on \
-DSIM_ACIS=ON \
-DSKIP_SIMMETRIX_VERSION_CHECK=ON \
-DMESHES=${{github.workspace}}/core_${{ github.event.issue.number }}/pumi-meshes \
-DIS_TESTING=ON \
-DSCOREC_CXX_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build ${RUNNER_TEMP}/build -j 4
ctest --test-dir ${RUNNER_TEMP}/build --output-on-failure
-DCMAKE_BUILD_TYPE=Release
cmake --build ${RUNNER_TEMP}/buildSimCgns -j 4
ctest --test-dir ${RUNNER_TEMP}/buildSimCgns --output-on-failure
- name: Save Result Link
if: ${{ !cancelled() }} #prepare report unless the job was cancelled
run: |
mkdir -p ./pr
echo "${{ github.event.issue.number }}" > ./pr/issueNumber
echo -n "Test Result: ${{ steps.build.outcome }} " > ./pr/message
echo "[(details)](https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }})" >> ./pr/message
echo "[Build Log](https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }})" >> ./pr/message
echo "Simmetrix Test Result: ${{ steps.build_sim.outcome }} " > ./pr/message
echo "Simmetrix + CGNS Test Result: ${{ steps.build_sim_cgns.outcome }} " > ./pr/message
- name: Upload result
if: ${{ !cancelled() }} #upload unless the job was cancelled
Expand Down
4 changes: 2 additions & 2 deletions apf/apfCGNS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,11 @@ void WriteCGNS(const char *prefix, apf::Mesh *m, const apf::CGNSBCMap &cgnsBCMap
auto communicator = PCU_Get_Comm();
cgp_mpi_comm(communicator);
//
cgp_pio_mode(CGNS_ENUMV(CGP_INDEPENDENT));
cgp_pio_mode(CGP_INDEPENDENT);

CGNS cgns;
cgns.fname = std::string(prefix);
if (cgp_open(prefix, CGNS_ENUMV(CG_MODE_WRITE), &cgns.index))
if (cgp_open(prefix, CG_MODE_WRITE, &cgns.index))
cgp_error_exit();

{
Expand Down
9 changes: 6 additions & 3 deletions apf/apfElement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ void Element::getNodeData()

void Element::getElementNodeData(NewArray<double>& d)
{
d.allocated() ? d.resize(nen) : d.allocate(nen);
for (int i = 0; i < nen; i++)
d[i] = nodeData[i];
d.resize(nodeData.size());
// to get the iterator 1 past the end without indexing one past the
// end we get the address to the last element then do ptr arithmetic
// to get one past that. Indexing at nodeData.size() can lead to segfault
// as you are actually accessing that memory.
std::copy(&nodeData[0], (&nodeData[nodeData.size()-1])+1, &d[0]);
}

}//namespace apf
16 changes: 13 additions & 3 deletions cdash/nightly.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ SET(CTEST_TEST_TYPE Nightly)
set(CTEST_BUILD_CONFIGURATION RelWithDebInfo)

set(CTEST_NIGHTLY_START_TIME "17:00:00 EST")
set(CTEST_SITE "cranium.scorec.rpi.edu" )
set(CTEST_SITE "checkers.scorec.rpi.edu" )
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=SCOREC")
set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_BUILD_NAME "linux-gcc-${CTEST_BUILD_CONFIGURATION}")

set(CTEST_DASHBOARD_ROOT "/lore/cwsmith/nightlyBuilds/" )
set(CTEST_DASHBOARD_ROOT "/lore/smithc11/nightlyBuilds/" )
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_FLAGS -j4)

Expand Down Expand Up @@ -123,6 +123,11 @@ function(check_current_branch BRANCH_NAME CONFIG_OPTS
ERRVAR)
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}/${BRANCH_NAME}")

execute_process(COMMAND df -h /tmp OUTPUT_VARIABLE outVar)
message(STATUS "df result {\n${outVar}}")
execute_process(COMMAND pwd OUTPUT_VARIABLE outVar)
message(STATUS "pwd result output {\n${outVar}}")

ctest_configure(
BUILD "${CTEST_BINARY_DIRECTORY}/${BRANCH_NAME}"
SOURCE "${CTEST_SOURCE_DIRECTORY}/${CTEST_PROJECT_NAME}"
Expand All @@ -134,6 +139,11 @@ function(check_current_branch BRANCH_NAME CONFIG_OPTS
message("${BRANCH_NAME} config passed")
endif()

execute_process(COMMAND df -h /tmp OUTPUT_VARIABLE outVar)
message(STATUS "df result {\n${outVar}}")
execute_process(COMMAND pwd OUTPUT_VARIABLE outVar)
message(STATUS "pwd result output {\n${outVar}}")

ctest_build(
BUILD "${CTEST_BINARY_DIRECTORY}/${BRANCH_NAME}"
NUMBER_ERRORS NUM_BUILD_ERRORS
Expand Down Expand Up @@ -313,7 +323,7 @@ SET(CONFIGURE_OPTIONS-sim
"${CONFIGURE_OPTIONS}"
"-DENABLE_SIMMETRIX:BOOL=ON"
"-DSIM_PARASOLID:BOOL=ON"
"-DSIM_MPI:STRING=mpich3.3.2"
"-DSIM_MPI:STRING=mpich4.1.1"
)

setup_repo()
Expand Down
19 changes: 9 additions & 10 deletions cdash/nightly.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
#!/bin/bash -x
source /etc/profile
source /users/cwsmith/.bash_profile
source /users/smithc11/.bash_profile

#setup lmod
export PATH=/usr/share/lmod/lmod/libexec:$PATH

#setup spack modules
unset MODULEPATH

module unuse /opt/scorec/spack/lmod/linux-rhel7-x86_64/Core
module use /opt/scorec/modules
module use /opt/scorec/spack/v0154_2/lmod/linux-rhel7-x86_64/Core
module load gcc/10.1.0
module load mpich/3.3.2
module load simmetrix-simmodsuite/17.0-220516
module load zoltan/3.83-int32
module load cmake/3.20.0
module use /opt/scorec/spack/rhel9/v0201_4/lmod/linux-rhel9-x86_64/Core/
module load gcc/12.3.0-iil3lno
module load mpich/4.1.1-xpoyz4t
module load simmetrix-simmodsuite/2024.0-240119dev-7abimo4
module load zoltan/3.83-hap4ggo
module load cmake/3.26.3-2duxfcd
module load cgns/develop-cc4dfwp

#cdash output root
d=/lore/cwsmith/nightlyBuilds/
d=/lore/smithc11/nightlyBuilds/
cd $d
#remove compilation directories created by previous nightly.cmake runs
[ -d build ] && rm -rf build/
Expand Down
6 changes: 3 additions & 3 deletions cmake/FindSimModSuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ string(REGEX REPLACE
"${SIM_VERSION}")

set(MIN_VALID_SIM_VERSION 15.0.191017)
set(MAX_VALID_SIM_VERSION 2024.0.240219)
set(MAX_VALID_SIM_VERSION 2024.1.240606)
if( ${SKIP_SIMMETRIX_VERSION_CHECK} )
message(STATUS "Skipping Simmetrix SimModSuite version check."
" This may result in undefined behavior")
Expand Down Expand Up @@ -124,10 +124,10 @@ endif()
option(SIM_PARASOLID "Use Parasolid through Simmetrix" OFF)
if (SIM_PARASOLID)
set(MIN_SIM_PARASOLID_VERSION 290)
set(MAX_SIM_PARASOLID_VERSION 350)
set(MAX_SIM_PARASOLID_VERSION 361)
foreach(version RANGE
${MAX_SIM_PARASOLID_VERSION}
${MIN_SIM_PARASOLID_VERSION} -10)
${MIN_SIM_PARASOLID_VERSION} -1)
set(SIM_PARASOLID_VERSION ${version})
getSimCadLib("${SIMMODSUITE_INSTALL_DIR}/lib/${SIM_ARCHOS}"
SimParasolid${SIM_PARASOLID_VERSION} simParaLib FALSE)
Expand Down
10 changes: 5 additions & 5 deletions mds/mdsCGNS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ struct MeshDataGroup
if (components.size() == 1)
{
std::cout << "Scalar Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else if (components.size() == 3)
{
std::cout << "Vector Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else if (components.size() == 9)
{
std::cout << "Matrix Group has " << components.size() << " related componenets: " << std::endl;
for (const auto m : components)
for (const auto& m : components)
std::cout << "Field " << m.second.name << " @ " << m.second.si << " " << m.second.fi << std::endl;
}
else
Expand Down Expand Up @@ -1056,8 +1056,8 @@ apf::Mesh2 *DoIt(gmi_model *g, const std::string &fname, apf::CGNSBCMap &cgnsBCM
int cgid = -1;
auto comm = PCU_Get_Comm();
cgp_mpi_comm(comm);
cgp_pio_mode(CGNS_ENUMV(CGP_INDEPENDENT));
cgp_open(fname.c_str(), CGNS_ENUMV(CG_MODE_READ), &cgid);
cgp_pio_mode(CGP_INDEPENDENT);
cgp_open(fname.c_str(), CG_MODE_READ, &cgid);

int nbases = -1;
cg_nbases(cgid, &nbases);
Expand Down
2 changes: 1 addition & 1 deletion spr/spr.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

\section{Overview}
An SPR-based error estimation procedure is defined in detail
in Jie Wan's thesis.
in Section 2.2.2 of Jie Wan's RPI thesis.
We have reimplemented this system using the latest APF
libraries and it supports the Albany adaptive cycle.
This document details the inner workings of this estimator.
Expand Down
15 changes: 9 additions & 6 deletions test/convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <getopt.h>
#include <string.h>
#include <stdio.h>
#include <array> //std::array

using namespace std;

Expand Down Expand Up @@ -193,6 +194,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
int id = GEN_tag(gface);
if(id==ExtruRootId) ExtruRootFace=gface;
}
GFIter_delete(gfIter);
assert(ExtruRootFace != NULL);
// all of the work so far assumes translation extrusion. Rotation extrusion (sweeping extruded entiy over an arc of some angle about
// a given axis) is useful but this would require some code change. The principle is the same. Every root entity has another
Expand Down Expand Up @@ -246,7 +248,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
int nvert=i;
PList_delete(listV);

double coordNewPt[nvert][3];
std::vector<std::array<double,3>> coordNewPt(nvert,{0,0,0});
for(i=0; i< nvert ; i++) {
int* markedData;
if(!EN_getDataPtr((pEntity)vrts[i],myFather,(void**)&markedData)){ // not sure about marked yet
Expand Down Expand Up @@ -344,16 +346,16 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
}
PCU_ALWAYS_ASSERT(foundEETag != 0);
count2D++;
int* vtxData = new int[1];
int* vtxData = new int;
vtxData[0] = count2D;
EN_attachDataPtr((pEntity)vrts[i],myFather,(void*)vtxData);
V_coord(vrts[i],coordNewPt[i]);
V_coord(vrts[i],coordNewPt[i].data());

fprintf ( fcr, "%.15E %.15E %d %d %d %d \n", coordNewPt[i][0],coordNewPt[i][1], vClassDim, foundESTag, foundETag, foundEETag );
}
}

double coordFather[nvert][3];
std::vector<std::array<double,3>> coordFather(nvert,{0,0,0});
int fatherIds[4]; //store the ids of the fathers (vertices) on the root face
for(i=0; i< nvert ; i++) {
int* fatherIdPtr;
Expand All @@ -365,7 +367,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
}
assert(exists);
fatherIds[i] = fatherIdPtr[0];
V_coord(vrts[i],coordFather[i]);
V_coord(vrts[i],coordFather[i].data());
fprintf ( fcn, "%d ", fatherIds[i]);
}
fprintf ( fcn, "\n");
Expand Down Expand Up @@ -414,7 +416,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
}
}
my2Dfath=fatherIds[iMin];
int* vtxData = new int[1];
int* vtxData = new int;
vtxData[0] = my2Dfath;
EN_attachDataPtr((pEntity)sonVtx,myFather,(void*)vtxData);
}
Expand All @@ -424,6 +426,7 @@ void addFathersTag(pGModel simModel, pParMesh sim_mesh, apf::Mesh* simApfMesh, c
}
PList_delete(faces);
} //end root face iterator
FIter_delete(fIter);
}
apf::MeshSIM* cake = reinterpret_cast<apf::MeshSIM*>(simApfMesh);
cake->createIntTag("fathers2D", myFather, 1);
Expand Down
1 change: 0 additions & 1 deletion test/generate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ pNativeModel loadNativeModel() {
}

void simStart() {
SimModel_start();
SimPartitionedMesh_start(NULL,NULL);
if(should_log)
Sim_logOn("generate_sim.log");
Expand Down
Loading

0 comments on commit 8449430

Please sign in to comment.