Closed hkershaw-brown closed 1 month ago
@hkershaw-brown I'm getting some errors when running test_libraries.sh
/glade/derecho/scratch/masmith/DART/assimilation_code/modules/utilities/mpi_utilities_mod.f90(1862): error #6404: This name does not have a type, and must have an explicit type. [SYSTEM]
rc = system(trim(shell_name)//' '//trim(execute)//' '//char(0))
---------^
/glade/derecho/scratch/masmith/DART/assimilation_code/modules/utilities/mpi_utilities_mod.f90(2033): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MPI_UTILITIES_MOD]
use mpi_utilities_mod, only : get_dart_mpi_comm
-----^
I'll keep looking into these, but I thought I'd let you know now to see if you might already know the causes.
@mjs2369 are you running with a gfortran mkmf.template but the intel module on Derecho?
@mjs2369 are you running with a gfortran mkmf.template but the intel module on Derecho?
Yep, duh. Though I did have to add the mpif08 argument to lines that run quickbuild (22, 36, and 44) in test_libraries.sh to get it compile with gfortran. But the script is still erroring out while trying to run filter for the first time on line 62 (the no lib build):
ar: creating libdart.a
a - algorithm_info_mod.o
a - bnrh_distribution_mod.o
a - netcdf_utilities_mod.o
a - schedule_mod.o
a - io_filenames_mod.o
.... (a bunch more files)
a - direct_netcdf_mod.o
a - distribution_params_mod.o
a - assert_mod.o
No host list provided
I haven't been able to figure out why this is happening yet
Some last questions/comments other than the error are:
I think minimal docs in the like you mentioned in the body of the PR sound like the way to go, but I think they might make more sense in Compiling DART instead of "DART Build System".
We aren't supporting compiling DART as a library for Windows, right? The mkmf.template.gfortran is only for osx and linux, and I believe that Windows uses different file extensions for library files (static libraries are .lib in Windows instead of .a)
ar: creating libdart.a a - algorithm_info_mod.o a - bnrh_distribution_mod.o a - netcdf_utilities_mod.o a - schedule_mod.o a - io_filenames_mod.o .... (a bunch more files) a - direct_netcdf_mod.o a - distribution_params_mod.o a - assert_mod.o No host list provided
I haven't been able to figure out why this is happening yet
Are you trying to run an mpi job on the Derecho login nodes?
Some last questions/comments other than the error are:
- I think minimal docs in the like you mentioned in the body of the PR sound like the way to go, but I think they might make more sense in Compiling DART instead of "DART Build System".
So this isn't a feature for general use. It would be for people developing tools that use DART. I think the build system docs (developers section) is the place for it.
- We aren't supporting compiling DART as a library for Windows, right? The mkmf.template.gfortran is only for osx and linux, and I believe that Windows uses different file extensions for library files (static libraries are .lib in Windows instead of .a)
No we're not supporting DART as a library for windows. If people want to use DART on windows, then I'd recommend using WSL.
@hkershaw-brown mpif90 mpif08
Description:
Buildtools for compiling dart as a library (libdart.a or libdart.so)
SiParCS 2024 Anh Pham and Suman Shekhar students used dart as a static library.
There are other people interested in having dart as a library, so this provides buildtools so they don't have to create Makefiles by hand.
This pull request has a developer test directory 'library' which has a shared lib build and a static lib build and a little test script to demo building and linking filter.
Not sure what level of docs to add, maybe just a section in DART build system for people who want to play with a library.
Fixes issue
no issue
Types of changes
Documentation changes needed?
Tests
DART/developer_tests/library/test_libraries.sh does a bitwise test for filter (regular build vs. static library vs shared library) edit: also did a paranoia check that -fPIC was bitwise for a regular build of filter.
Checklist for merging
Checklist for release
Testing Datasets