Code Monkey home page Code Monkey logo

modelviewer-mf6's Introduction

modelviewer-mf6

Model Viewer for MODFLOW 6 Graphical User Interface

This is the development repository for the USGS Model Viewer for MODFLOW 6 Graphical User Interface. The official USGS distribution is available at USGS Release Page.

Building Model Viewer for MODFLOW 6

Prerequisites

  • CMake 3.21 or newer
  • Qt 5.15.2
  • VTK 9.1.0
  • Ninja build system
  • Visual Studio 2019 64-bit (windows)
  • gcc 64-bit (linux)
  • clang 64-bit (macOS)
  • curl

Building

Install Qt 5.15.2 for open source use (https://www.qt.io/download)

Download the VTK 9.1.0 Source (https://github.com/Kitware/VTK/releases/tag/v9.1.0)

Download the modelviewer-mf6 source version 1.1 or later

Copy the misc/CMakePresets-vtk-9.1.0-qt-5.15.2.json file to the top-level of the VTK source tree and rename it to CMakePresets.json.

Set the following environment variables or manually edit the default presets in the CMakePresets.json file:

$env{RUNNER_WORKSPACE}  = <location to build vtk>
$env{VTK_VER}           = 9.1.0
$env{AQT_VER}           = 5.15.2
$env{MV_VER}            = 1.1.x

On Linux run

# set environment vars
export RUNNER_WORKSPACE=${HOME}/work/modelviewer-mf6
export VTK_VER=9.1.0
export AQT_VER=5.15.2
export MV_VER=1.1.0   # greater than or equal to 1.1.0

# setup work space
mkdir -p ${RUNNER_WORKSPACE}
cd ${RUNNER_WORKSPACE}

# download and extract mvmf6 source
curl -fSLO https://github.com/MODFLOW-USGS/modelviewer-mf6/archive/refs/tags/${MV_VER}.tar.gz
tar xzf ./${MV_VER}.tar.gz

# download and extract VTK source
curl -fSLO https://github.com/Kitware/VTK/archive/refs/tags/v${VTK_VER}.tar.gz
tar xzf ./v${VTK_VER}.tar.gz

# copy cmake preset file to VTK directory
cp ./modelviewer-mf6-${MV_VER}/misc/CMakePresets-vtk-${VTK_VER}-qt-${AQT_VER}.json ./VTK-${VTK_VER}/CMakePresets.json
cd ./VTK-${VTK_VER}

# use cmake to build VTK with Qt
cmake --preset gcc_64
cmake --build --preset gcc_64 --config Release
cmake --install ${RUNNER_WORKSPACE}/qt5-vtk-${VTK_VER}-build --config Release

On macOS run

# set environment vars
export RUNNER_WORKSPACE=${HOME}/work/modelviewer-mf6
export VTK_VER=9.1.0
export AQT_VER=5.15.2
export MV_VER=1.1.0   # greater than or equal to 1.1.0

# setup work space
mkdir -p ${RUNNER_WORKSPACE}
cd ${RUNNER_WORKSPACE}

# download and extract mvmf6 source
curl -fSLO https://github.com/MODFLOW-USGS/modelviewer-mf6/archive/refs/tags/${MV_VER}.tar.gz
tar xzf ./${MV_VER}.tar.gz

# download and extract VTK source
curl -fSLO https://github.com/Kitware/VTK/archive/refs/tags/v${VTK_VER}.tar.gz
tar xzf ./v${VTK_VER}.tar.gz

# copy cmake preset file to VTK directory
cp ./modelviewer-mf6-${MV_VER}/misc/CMakePresets-vtk-${VTK_VER}-qt-${AQT_VER}.json ./VTK-${VTK_VER}/CMakePresets.json
cd ./VTK-${VTK_VER}

# use cmake to build VTK with Qt
cmake --preset clang_64
cmake --build --preset clang_64 --config Release
cmake --install $RUNNER_WORKSPACE/qt5-vtk-$VTK_VER-build --config Release

On Windows run

PowerShell

# set environment vars
${env:RUNNER_WORKSPACE}="${env:USERPROFILE}\work\modelviewer-mf6"
${env:VTK_VER}="9.1.0"
${env:AQT_VER}="5.15.2"
${env:MV_VER}="1.1.0"   # greater than or equal to 1.1.0

# setup work space
mkdir ${env:RUNNER_WORKSPACE}
cd ${env:RUNNER_WORKSPACE}

# download and extract source codes
curl -fSLO https://github.com/MODFLOW-USGS/modelviewer-mf6/archive/refs/tags/${env:MV_VER}.zip
7z x "${env:MV_VER}.zip"
curl -fSLO https://github.com/Kitware/VTK/archive/refs/tags/v${env:VTK_VER}.zip
7z x "v${env:VTK_VER}.zip"

# copy cmake preset file to VTK directory
cd .\VTK-${env:VTK_VER}
cp ..\modelviewer-mf6-${env:MV_VER}\misc\CMakePresets-vtk-${env:VTK_VER}-qt-${env:AQT_VER}.json .\CMakePresets.json

# use cmake to build VTK with Qt
cmake --preset win64_msvc2019_64
cmake --build --preset win64_msvc2019_64 --config Release
cmake --install ${env:RUNNER_WORKSPACE}/qt5-vtk-${env:VTK_VER}-build --config Release

# build mvmf6
cmake --preset win64_msvc2019_64
cmake --build --preset win64_msvc2019_64 --config Release
cmake --install _ninja --config Release

CMD

:: set environment vars
set RUNNER_WORKSPACE=%USERPROFILE%\work\modelviewer-mf6
set VTK_VER=9.1.0
set AQT_VER=5.15.2
set MV_VER=1.1.0

:: copy cmake preset file to VTK directory
cd .\VTK-%VTK_VER%
cp .\modelviewer-mf6-%MV_VER%\misc\CMakePresets-vtk-%VTK_VER%-qt-%AQT_VER%.json .\CMakePresets.json

:: use cmake to build VTK with Qt
cmake --preset win64_msvc2019_64
cmake --build --preset win64_msvc2019_64 --config Release
cmake --install %RUNNER_WORKSPACE%\qt5-vtk-%VTK_VER%-build --config Release

Build mvmf6

For all OSs set the following environment variables

  $env{VTK_DIR} = $env{RUNNER_WORKSPACE}/qt5-vtk-$env{VTK_VER}/lib/cmake
  $env{Qt5_DIR} = /home/runner/work/modelviewer-mf6/Qt/5.15.2/gcc_64

  Linux
  export Qt5_DIR=$RUNNER_WORKSPACE/Qt/$AQT_VER/gcc_64

Download (or clone) the modelviewer-mf6 source

Within the top-level directory of modelviewer-mf6 run

On Linux

  cmake --preset gcc_64
  cmake --build --preset gcc_64 --config Release
  cmake --install _ninja --config Release

Installing precompiled versions

On Linux run

cd ~/Downloads
export MV_VER=1.1.0
curl https://github.com/MODFLOW-USGS/modelviewer-mf6/releases/download/1.1.0/mvmf6-${MV_VER}-Linux.tar.gz
cd ~/.local
tar xzf ~/Downloads/mvmf6-${MV_VER}-Linux.tar.gz --strip-components=1
# Note
# may need to install libxcb-xinerama0
# sudo apt-get install libxcb-xinerama0      

Disclaimer

This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.

modelviewer-mf6's People

Contributors

github-actions[bot] avatar scharlton2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

scharlton2 mjreno

modelviewer-mf6's Issues

.mvmf6 file fails to load when not in the same directory as .nam file

See issue-51:

When loading issue-51.mvmf6 with the following layout and contents:

D:.
│   issue-51.mvmf6
└───r1
        ...
        greenport1.bhd
        greenport1.cbc
        ...
        greenport1.dis.grb
        ...
        greenport1.oc
        ...

issue-51.mvmf6:

Application name = Model Viewer
Version = MF6
Title = 
Model name = Modflow 6
File code count = 1
File code 1 = .\r1\greenport1.nam
Data type count = 1
...

Yields the following message:

"Error: Unable to open the oc file."

Toolbox->Grid gets screwed up occasionally

The activate check-boxes become randomly disabled and start behaving as radio buttons

I think it's due to a dll conflict of some kind(maybe with the dlls from the MFC version). I think I had the last MFC prerelease running when I started the most recent Qt version.

Restarting the computer fixes the problem (at least temporarily).

Need to lock MODFLOW output files when they are loaded in model viewer

See #66.

from chatGPT:

How do I lock a file so that no other programs can write to it?
There are a few ways to lock a file so that no other programs can write to it.

Using the file's properties: Depending on the operating system, you can use the file's properties to set it as read-only. This will prevent other programs from making changes to the file.

Using a third-party software: There are various third-party software available that allows you to lock files and folders, and set permissions for different users or programs.

Using command line: In windows, you can use the command "icacls" to set specific permissions on a file or folder, and also, "attrib +r" will set the read-only attribute on a file.
In Linux, you can use the command "chmod" to set specific permissions on a file or folder, and also, "chattr +i" will set the immutable attribute on a file.

It's important to note that while these methods can prevent other programs from making changes to the locked file, they will not prevent a user with administrative access from modifying the file.

How do I do it in c++?
In C++, you can use the "chmod" function to set specific permissions on a file. The "chmod" function is part of the "sys/stat.h" header file, which you will need to include in your program.

Here is an example of how you can use the "chmod" function to set the read-only permission on a file:

#include <iostream>
#include <sys/stat.h>

using namespace std;

int main() {
    // File path
    string filePath = "example.txt";

    // Set read-only permission (444)
    chmod(filePath.c_str(), S_IRUSR | S_IRGRP | S_IROTH);

    cout << "File set to read-only" << endl;

    return 0;
}

In this example, the "chmod" function is used to set the read-only permission (444) on a file called "example.txt". The file path is passed to the function as a C-style string using the "filePath.c_str()" method.

It's important to note that the above code will only set the read-only permissions for the current user, for other users or groups, you will need to add the relevant flags.

Also, it's possible that the chmod will not work in certain operating systems, you can use the _wchmod in windows to change the permissions of a file.

Keep in mind that you need administrative access to change the permissions of a file.

wouldn't the other process be able to call chmod and make it writeable?
Yes, that's correct. If another process has administrative access, it can change the permissions on the file and make it writable again.

Locking a file in a way that can't be overridden by another process with administrative access is a difficult task, because it would involve some sort of security feature that could only be implemented at the operating system level.

A common alternative is to use a file-locking mechanism provided by the operating system. For example, in Windows you can use the LockFileEx and UnlockFileEx functions, and in Linux you can use the flock function. These functions provide a way to lock a file for exclusive access by a single process, and can be used to prevent other processes from writing to the file while it is locked.

Another option is to use a third-party library that provide a more robust file-locking system.
Keep in mind that locking a file only ensures that no other process can modify it while it's locked, but it doesn't guarantee data consistency, for example, if a process crash while it's holding the lock, the file might be left in an inconsistent state.

How could it be done on macos?
On macOS, you can use the "chflags" command in the Terminal to set the "uchg" flag on a file, which makes it immutable and prevents any changes from being made to the file. This flag can only be unset by a user with root privileges.

Here's an example of how you can use the "chflags" command to make a file immutable:

chflags uchg /path/to/file

You can check if a file is immutable by running the command ls -lO /path/to/file and looking for "uchg" in the flags.

You can also use the chflags command to remove the immutable flag by calling

chflags nouchg /path/to/file

Keep in mind that like in other operating systems, making a file immutable only ensures that no other process can modify it while it's locked, but it doesn't guarantee data consistency, for example, if a process crash while it's holding the lock, the file might be left in an inconsistent state.

Also, even if the file is immutable, users with root privileges can still modify the file.

Another option is to use a third-party library that provide a more robust file-locking system.

Does macos have the flock functionality?
Yes, macOS does have the flock functionality. The "flock" function is a POSIX-compliant function that is available on macOS, as well as many other Unix-like operating systems.

The flock function can be used to lock a file for exclusive access by a single process, and can be used to prevent other processes from writing to the file while it is locked. Here's an example of how you can use the flock function to lock a file:

#include <sys/file.h>

int fd = open("/path/to/file", O_RDONLY);

int result = flock(fd, LOCK_EX);
if (result == 0) {
    // File locked successfully
    // Perform operations on the file
    // ...

    flock(fd, LOCK_UN);
} else {
    // Failed to lock the file
    // Handle the error
    // ...
}

close(fd);

In this example, the "flock" function is used to acquire an exclusive lock on the file, represented by the file descriptor "fd", and LOCK_EX flag. Once the operations on the file are done, the lock is released by calling flock with LOCK_UN flag.

It's important to note that while the flock function provides a way to lock a file for exclusive access by a single process, it doesn't guarantee data consistency, for example, if a process crash while it's holding the lock, the file might be left in an inconsistent state.

Another option is to use a third-party library that provide a more robust file-locking system.

Could this be done using the Qt framework?
Yes, it's possible to lock a file using the Qt framework. One way to accomplish this is by using the QFile class, which provides a way to read and write files, and the QLockFile class, which provides a platform-independent way to lock a file for exclusive access by a single process.

Here's an example of how you can use the QLockFile class to lock a file:

#include <QLockFile>

QLockFile lockFile("/path/to/file");

if (lockFile.tryLock()) {
    // File locked successfully
    // Perform operations on the file
    // ...
    lockFile.unlock();
} else {
    // Failed to lock the file
    // Handle the error
    // ...
}

In this example, the QLockFile object is created and passed the path to the file to be locked, then the tryLock method is called to attempt to lock the file. If the lock is acquired, the lock can be released using the unlock() method.

It's important to note that while the QLockFile class provides a way to lock a file for exclusive access by a single process, it doesn't guarantee data consistency, for example, if a process crash while it's holding the lock, the file might be left in an inconsistent state.

Another option is to use a third-party library that provide a more robust file-locking system.

Qt provides a lot of functionality to work with files and their access, you can use the QFile class to read, write and access the file, and the QLockFile class to lock the file, it's a platform-independent way that abstracts the system-specific way of locking files.

Scalar state changes to Solid when 'Default' Button for Color Bar is clicked

From version 0.0.0
Winver: Windows 10 Version 20H2 (OS Build 19042.1415)

Note this also occurs in Model Viewer 1.6

Steps to reproduce:

  1. Open test021_twri\twri.mvmf6 from issue-1.zip
  2. Click Toolbox->Color Bar->Limits
  3. Click Toolbox->Crop->Controls
  4. Press the 'Default' button of the Color Bar dialog
  5. Press the 'Yes' button

Before pressing 'Default'
image

After pressing 'Default'
image

Workaround:

  1. Click Show->Isosurfaces

Crop Dialog Broken

Toolbar->Crop bug due to bad Copy&Paste

Note how y-min is cropping in both the y AND x direction -- z has similar behavior

image

Update 'Loading Modflow 6 Data' documentation

From review:

"I have no objection to the abstract. However, the information about the requirements for the OC6 file should also be included in the help. I think the best place to put it would be in the "Loading Modflow 6 Data" topic."

image

No pathline option

There is no option to select a pathline file when viewing a model although there are several pathline menu items.

Fix broken links in documentation

From review:

I noticed the following issues in the help.

  • There are a broken links to "Pathlines", "Particles", and "line drawing overlay" in the topic "Data Visualization".
  • There is a broken link to "Exporting the Display as a VRML file in "Exporting and Printing".
  • SUTRA is mentioned in the help for "Solid" under "Data Visualization."

image

image

image

Toolbox->Grid (Dialog--Lines tab) is wrong when grid is DISV (ex-gwf-disvmesh.mvmf6)

MFC version

image

Note that if you press the down button of the layer input (Lines tab) while the subgrid is activated it gets in a bad state -> displays -1 and can't be changed.

Qt version

image

Note that all the activate checkboxes are enabled on the Qt version

Also note that if the down button is pressed on the layer input it asserts (This occurs after the subgrid has been activated/deactivated).

It seems that the Qt dialog needs quite a bit of work for DISV grids

Need to work on Linux build

Double-clicking on the bin/mvmf6 file yields:

Screenshot from 2022-10-01 23-17-23

$ file $(which mvmf6)
/home/charlton/.local/bin/mvmf6: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=71091a90f225c1c069b3fd6a936ec7b301e651db, for GNU/Linux 3.2.0, not stripped

$ file ~/Downloads/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/paraview
/home/charlton/Downloads/ParaView-5.10.1-MPI-Linux-Python3.9-x86_64/bin/paraview: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=b844b2a20d07dffa776c8f572fa823924e196369, not stripped

$ file $(which mvmf6)
/usr/bin/gedit: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e5c515893d1e8fea8d50218bf7ce0bb3f20ca144, for GNU/Linux 3.2.0, stripped

Need to limit some of the vtkInteractorStyle functionality

For example
Pressing the letter A when mvmf6 has the focus changes the vtkInteractorStyle to actor mode. In actor mode mouse events affect the actor under the mouse pointer rather than just the camera (camera mode).

Here the solid actor, the grid-lines actor and the axes actor have been rotated:

image

Memory leaks without opening or creating a new file

Running the Debug version and just exiting yields memory leaks:

Full output:
Output.zip

Abbreviated output:

'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\mvmf6.exe'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkInteractionStyle-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\mv.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkRenderingOpenGL-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkRenderingFreeType-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonCore-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkRenderingCore-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkRenderingLOD-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersModeling-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersExtraction-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersGeometry-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersSources-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersCore-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersGeneral-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonExecutionModel-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonTransforms-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonDataModel-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkImagingHybrid-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonMath-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkIOImage-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonSystem-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkfreetype-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkftgl-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtksys-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonColor-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonComputationalGeometry-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\psapi.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkCommonMisc-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkFiltersStatistics-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\mfc140d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkpng-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkmetaio-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtktiff-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkDICOMParser-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkzlib-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkjpeg-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkImagingFourier-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkalglib-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\wsock32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Users\charlton\source\repos\modflow\modelviewer-mf6\_vs2019\ModelViewer\Debug\vtkImagingCore-6.3d.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.19041.1110_none_792d1c772443f647\comctl32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbols loaded.
d:\a01\_work\4\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\docmgr.cpp(96) : AppMsg - Warning: registration database update failed for key 'MvMf6.Document'.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\TextShaping.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Unloaded 'C:\Windows\System32\AppXDeploymentClient.dll'
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_1c83a5d7cffd7bff\nvoglv64.dll'. 
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\wtsapi32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\cryptnet.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Symbols loaded.
The thread 0x7b44 has exited with code 0 (0x0).
The thread 0xc548 has exited with code 0 (0x0).
The thread 0xb2d0 has exited with code 0 (0x0).
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\DXCore.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\wldp.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\winsta.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll'
'mvmf6.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\comctl32.dll'. Symbols loaded.
d:\a01\_work\4\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\dlgdata.cpp(517) : AppMsg - Warning: initial dialog data is out of range.
d:\a01\_work\4\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\dlgdata.cpp(517) : AppMsg - Warning: initial dialog data is out of range.
d:\a01\_work\4\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\dlgdata.cpp(299) : AppMsg - Warning: skipping non-radio button in group.
d:\a01\_work\4\s\src\vctools\VC7Libs\Ship\ATLMFC\Src\MFC\dlgdata.cpp(299) : AppMsg - Warning: skipping non-radio button in group.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Symbols loaded.
'mvmf6.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Symbols loaded.
The thread 0x3794 has exited with code 0 (0x0).
The thread 0xd85c has exited with code 0 (0x0).
The thread 0xce14 has exited with code 0 (0x0).
The thread 0x8b3c has exited with code 0 (0x0).
The thread 0xbae0 has exited with code 0 (0x0).
The thread 0xc208 has exited with code 0 (0x0).
The thread 0xd6ec has exited with code 0 (0x0).
The thread 0x7abc has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
{105890} normal block at 0x0000024234D1DFD0, 5600 bytes long.
 Data: <            Open> 00 00 00 00 00 00 00 00 00 00 00 00 4F 70 65 6E 
{77937} normal block at 0x000002422EEA1980, 24 bytes long.
 Data: <         ! ,B   > 00 00 00 00 00 00 00 00 00 21 C1 2C 42 02 00 00 
{77936} normal block at 0x000002422CC9FD20, 8000 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{77935} normal block at 0x000002422EFAB840, 184 bytes long.
 Data: < *k             > D0 2A 6B 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77934} normal block at 0x000002422CC396C0, 1000 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{77933} normal block at 0x000002422CBF3B80, 168 bytes long.
 Data: <x{o             > 78 7B 6F 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77932} normal block at 0x000002422F04BDC0, 8000 bytes long.
 Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{77931} normal block at 0x000002422EFAB340, 184 bytes long.
 Data: < *k             > D0 2A 6B 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77930} normal block at 0x000002422EF1DE00, 72 bytes long.
 Data: < < |            > 10 3C AE 7C FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77929} normal block at 0x000002422EEA1C20, 24 bytes long.
 Data: <        `  ,B   > 00 00 00 00 00 00 00 00 60 1E C1 2C 42 02 00 00 
{77928} normal block at 0x000002422EEA0D20, 32 bytes long.
 Data: <H_k             > 48 5F 6B 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77927} normal block at 0x000002422EEA13E0, 24 bytes long.
 Data: <           ,B   > 00 00 00 00 00 00 00 00 10 1D C1 2C 42 02 00 00 
{77926} normal block at 0x000002422EEA0CC0, 32 bytes long.
 Data: <H_k             > 48 5F 6B 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
{77925} normal block at 0x000002422EEA1680, 24 bytes long.
 Data: <        0# ,B   > 00 00 00 00 00 00 00 00 30 23 C1 2C 42 02 00 00 
{77924} normal block at 0x000002422EEA1140, 32 bytes long.
 Data: <H_k             > 48 5F 6B 80 FB 7F 00 00 CD CD CD CD 01 00 00 00 
...

{211} normal block at 0x000002422CBD4960, 32 bytes long.
 Data: < 7 ,B   @  ,B   > 90 37 C1 2C 42 02 00 00 40 BA C2 2C 42 02 00 00 
{209} normal block at 0x000002422CC08230, 16 bytes long.
 Data: <p= {            > 70 3D EE 7B FB 7F 00 00 00 00 00 00 00 00 00 00 
{208} normal block at 0x000002422CC12790, 40 bytes long.
 Data: < ' ,B    ' ,B   > 90 27 C1 2C 42 02 00 00 90 27 C1 2C 42 02 00 00 
{207} normal block at 0x000002422CC08190, 16 bytes long.
 Data: <@H ,B           > 40 48 BD 2C 42 02 00 00 00 00 00 00 00 00 00 00 
{206} normal block at 0x000002422CC100D0, 112 bytes long.
 Data: <   ,B      ,B   > D0 00 C1 2C 42 02 00 00 D0 00 C1 2C 42 02 00 00 
{205} normal block at 0x000002422CBD4840, 24 bytes long.
 Data: <   ,B      ,B   > 90 81 C0 2C 42 02 00 00 D0 00 C1 2C 42 02 00 00 
{204} normal block at 0x000002422CC07EC0, 16 bytes long.
 Data: < A ,B           > 20 41 BD 2C 42 02 00 00 00 00 00 00 00 00 00 00 
{203} normal block at 0x000002422CC10020, 112 bytes long.
 Data: <   ,B      ,B   > 20 00 C1 2C 42 02 00 00 20 00 C1 2C 42 02 00 00 
{202} normal block at 0x000002422CBD4120, 24 bytes long.
 Data: < ~ ,B      ,B   > C0 7E C0 2C 42 02 00 00 20 00 C1 2C 42 02 00 00 
Object dump complete.
The program '[20936] mvmf6.exe' has exited with code 0 (0x0).

Update 'Head file' and 'Budget file' extensions

From review:

"The extensions used for the head and flow files are not standardized. I checked several models that had been sent to me by various users and identified the following additional extensions that have been used.

  • For head files .hed has been used.
  • for flow files, .ccf, .cbb, .bud and .bin have all been used.

You could consider adding them as supported extensions when the user attempts to specify the head and flow files directly."

image

image

image

image

Update Read the Docs

  • Move to MODFLOW-USGS/modelviewer-mf6 repo
  • Update the version number (1.2.0 -> 1.1.0)
  • Update the default branch to develop then to main

Update "about" information

Since we are going to start producing beta versions, it might be good to update the "about" window to reflect the build date so we can differentiate the evolving versions. The screen shot below is from the version downloaded yesterday.

image

The DbgHelp.dll file that ships in Windows is not redistributable.

The current windows dist (mvmf6-1.1.0-prerelease.99-win64) includes dbghelp.dll which cannot be redistributed:
see https://learn.microsoft.com/en-us/windows/win32/debug/dbghelp-versions

I don't think is should be required in release builds at all. Currently, the dll/so/dylib that are distributed are determined by using functions from BundleUtilities. Looks like one option is to use the IGNORE_ITEM list added to cmake 3.6. Best option is to get rid of it altogether.

see https://github.com/MODFLOW-USGS/modelviewer-mf6/actions/runs/4079455245/jobs/7030856815#step:13:312

Turns out this file is a 32-bit dll.

Using dumpbin:

 charlton@IGSKZWHWWSCHARL  ~  Downloads  mvmf6-1.1.0-prerelease.99-win64  bin 
❯ dumpbin /imports .\mvmf6.exe | Select-String \.dll

    mv.dll
    vtkGUISupportQt-9.1.dll
    vtkFiltersHybrid-9.1.dll
    Qt5Widgets.dll
    Qt5Gui.dll
    Qt5Core.dll
    vtkInteractionStyle-9.1.dll
    vtkIOImage-9.1.dll
    vtkRenderingFreeType-9.1.dll
    vtkRenderingOpenGL2-9.1.dll
    vtkRenderingUI-9.1.dll
    vtkRenderingCore-9.1.dll
    vtkCommonColor-9.1.dll
    vtkCommonExecutionModel-9.1.dll
    vtkCommonCore-9.1.dll
    SHLWAPI.dll
    USER32.dll
    MSVCP140.dll
    VCRUNTIME140.dll
    VCRUNTIME140_1.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-locale-l1-1-0.dll
    KERNEL32.dll
    SHELL32.dll
 charlton@IGSKZWHWWSCHARL  ~  Downloads  mvmf6-1.1.0-prerelease.99-win64  bin 
❯ dumpbin /imports .\mv.dll | Select-String \.dll

Dump of file .\mv.dll
    vtkRenderingLOD-9.1.dll
    vtkFiltersExtraction-9.1.dll
    Qt5Core.dll
    vtkFiltersModeling-9.1.dll
    vtkRenderingCore-9.1.dll
    vtkFiltersGeometry-9.1.dll
    vtkFiltersSources-9.1.dll
    vtkFiltersGeneral-9.1.dll
    vtkFiltersCore-9.1.dll
    vtkCommonExecutionModel-9.1.dll
    vtkCommonDataModel-9.1.dll
    vtkCommonMisc-9.1.dll
    vtkCommonTransforms-9.1.dll
    vtkCommonCore-9.1.dll
    MSVCP140.dll
    VCRUNTIME140.dll
    VCRUNTIME140_1.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    KERNEL32.dll

Its not directly related to mvmf6.exe or mv.dll

Dependency Walker -- (over 10 mins to load checkout: https://github.com/lucasg/Dependencies)

image

image

'Print Preview' doesn't work

From review:

"I tested Model Viewer for MODFLOW 6 with several MODFLOW 6 models that I created myself or were provided with MODFLOW 6. In all cases Model Viewer for MODFLOW 6 performed as expected except that "File|Print Preview" only displayed a blank page on two separate computers."

image

image

Update 'About Dialog'

from review:

"You may wish to change the credits in the "About" box to say that "Model Viewer for MODFLOW 6 was developed by" instead of "Model Viewer was developed by". In addition, although I worked on the original version of Model Viewer. I didn't work on Model Viewer for MODFLOW 6 so you could remove my name from the credits."

image

Release steps

Manual steps for 1.0.0-rc.1 -> 1.0.0-rc.2

  1. Update About dialog
    date: $((Get-Date -UFormat '%m/%d/%Y (compiled %b %d %Y %T)'))
    version: 1.0.0-rc.1 -> 1.0.0
    <- This is done by .\misc\set_versions.ps1 now (set $build to next build#)
    disclaimer: .\misc\about_disclaimer.ps1

  2. Update CMakeLists.txt
    VERSION 1.0.0
    <- This is done by .\misc\set_versions.ps1 now (set $build to next build#)

  3. Update DISCLAIMER.md

  4. Update README.md
    disclaimer: .\misc\about_disclaimer.ps1

  5. Update code.json
    "version": "1.0.0",
    "status": "Production",
    "downloadURL": "https://github.com/MODFLOW-USGS/modelviewer-mf6/releases/tag/1.0.0",
    "disclaimerURL": "https://github.com/MODFLOW-USGS/modelviewer-mf6/blob/1.0.0/DISCLAIMER.md",
    "metadataLastUpdated": "2022-04-12"

  6. Update About dialog and CMakeLists.txt
    .\misc\set_versions.ps1

  7. Set DIST_DIR in build.yml
    DIST_DIR: mvmf6-1.0.0 # automate this later

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.