Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/mcstas-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ jobs:
id: setup-linux
if: matrix.method == 'source' && runner.os == 'Linux'
run: |
sudo apt -y install libgsl-dev libnexus-dev
sudo apt -y install libgsl-dev libhdf5-dev

- name: Setup (macOS, source build)
id: setup-macos
if: matrix.method == 'source' && runner.os == 'macOS'
run: |
brew install bison flex gfortran gsl homebrew/science/nexusformat
brew install bison flex gfortran gsl hdf5

- name: Setup (Windows, source build)
id: setup-Windows
Expand Down Expand Up @@ -161,7 +161,6 @@ jobs:
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/opt/homebrew/lib -I/opt/homebrew/include"; fi
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/usr/local/lib -I/usr/local/include"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex -DCMAKE_Fortran_COMPILER=${HOMEBRW}/gfortran/bin/gfortran"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
if [ "$RUNNER_OS" == "Windows" ]; then export MPIINC=`cygpath -m -s "${MSMPI_INC}"`; export MPILIB=`cygpath -m -s "${MSMPI_LIB64}"`; export EXTRA_ARGS_FOR_CMAKE="-DMPILIBDIR=${MPILIB} -DMPIINCLUDEDIR=${MPIINC}"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcstas \
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/mcxtrace-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
id: setup-linux
if: matrix.method == 'source' && runner.os == 'Linux'
run: |
sudo apt -y install libgsl-dev libxrl-dev libnexus-dev
sudo apt -y install libgsl-dev libxrl-dev libhdf5-dev

- name: Setup (macOS, source build)
id: setup-macos
Expand All @@ -95,7 +95,7 @@ jobs:
# cause build-issues. Will soon port basictest scripts to conda
# for Windows/Linux
run: |
brew install bison flex gfortran gsl
brew install bison flex gfortran gsl hdf5
#if [ "${{ matrix.os }}" != "macos-15" ];
#then
# brew tap tschoonj/tap
Expand Down Expand Up @@ -169,7 +169,6 @@ jobs:
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/opt/homebrew/lib -I/opt/homebrew/include"; export XRLFLAGS="-lxrl -L/opt/homebrew/lib -I/opt/homebrew/include"; fi
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/usr/local/lib -I/usr/local/include"; export XRLFLAGS="-lxrl -L/usr/local/lib -I/usr/local/include"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex -DCMAKE_Fortran_COMPILER=${HOMEBRW}/gfortran/bin/gfortran"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
if [ "$RUNNER_OS" == "Windows" ]; then export MPIINC=`cygpath -m -s "${MSMPI_INC}"`; export MPILIB=`cygpath -m -s "${MSMPI_LIB64}"`; export EXTRA_ARGS_FOR_CMAKE="-DMPILIBDIR=${MPILIB} -DMPIINCLUDEDIR=${MPIINC}"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcxtrace \
Expand Down
44 changes: 0 additions & 44 deletions 3rdparty/nexus-package/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/nexus-package/cmake

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/nexus-package/nexus-code

This file was deleted.

10 changes: 0 additions & 10 deletions 3rdparty/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ else
git clone https://github.com/mctools/ncrystal.git
fi

if [ -d nexus-code ]; then
echo Updating existing NeXus clone
cd nexus-code
git pull
cd ..
else
echo Cloning NeXus
git clone https://github.com/nexusformat/code nexus-code
fi

if [ -d xraylib ]; then
echo Updating existing xraylib clone
cd xraylib
Expand Down
1 change: 0 additions & 1 deletion buildscripts/build_pkg_ghostbsd
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ export MCINSTALL_PREFIX=/usr/local

./mkdist mcstas-ncrystal ${1} 3rdparty/ncrystal-package "" ghostbsd "" -- pkg
./mkdist mcstas-mcpl ${1} 3rdparty/mcpl-package "" ghostbsd "" -- pkg
./mkdist mcstas-nexus ${1} 3rdparty/nexus-package "" ghostbsd "" -- pkg

2 changes: 1 addition & 1 deletion cmake/Modules/InstallMCCODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ macro(installMCCODE)

# update definitions to match choices
if (USE_NEXUS)
AppendDef(HAVE_NEXUS="-DUSE_NEXUS -lNeXus")
AppendDef(HAVE_NEXUS="-DUSE_NEXUS -lhdf5")
AppendDef(USE_NEXUS)
endif()

Expand Down
6 changes: 0 additions & 6 deletions cmake/Modules/MCUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ macro(setupMCCODE FLAVOR)
set(WINDOWS true)
endif()

# Set Nexus linking flag
if(USE_NEXUS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lNeXus")
set(CMAKE_C_LFLAGS "${CMAKE_C_LFLAGS} -lNeXus")
endif()

# Set 32-bit flags
if(ARCH EQUAL "i386")
set(CMAKE_C_FLAGS "-m32")
Expand Down
10 changes: 5 additions & 5 deletions cmake/Modules/PlatformDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ function( detect_platform_variables resultvarname )
provide_var( MPICC )


#NeXus-flags:
#NeXus-flags: NeXus output is written with HDF5 (NEXUSLIB/NEXUSINCLUDE: where libhdf5 and hdf5.h are)
if ( NOT NEXUSFLAGS )
set(NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5")#?? should probably have another value
set(NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5")
if ( MCCODE_BUILD_CONDA_PKG )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -I\$\{CONDA_PREFIX\}/include/nexus -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lNeXus -lhdf5" )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lhdf5" )
endif()
if ( WINDOWS )
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
set( NEXUSFLAGS " /DUSE_NEXUS /DNX_COMPRESSION=NX_COMP_LZW_LVL1 /DH5_BUILT_AS_DYNAMIC_LIB /I\$\{CONDA_PREFIX\}/Library/include/nexus /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib NeXus.lib hdf5.lib" )
set( NEXUSFLAGS " /DUSE_NEXUS /DNX_COMPRESSION=NX_COMP_LZW_LVL1 /DH5_BUILT_AS_DYNAMIC_LIB /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib hdf5.lib" )
else()
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -DH5_BUILT_AS_DYNAMIC_LIB -I\$\{CONDA_PREFIX\}/Library/include/nexus -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lNeXus -lhdf5" )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -DH5_BUILT_AS_DYNAMIC_LIB -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lhdf5" )
endif()
endif()
if ( NEXUSLIB )
Expand Down
6 changes: 2 additions & 4 deletions cmake/toolchains/deb32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(MPILIB "mpi")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
6 changes: 2 additions & 4 deletions cmake/toolchains/deb64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPILIB "mpi")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
6 changes: 2 additions & 4 deletions cmake/toolchains/deb64arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(MPILIB "mpi")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
2 changes: 1 addition & 1 deletion cmake/toolchains/mac-silicon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set(XRLFLAGS "-IGETPATH(miniconda3/include) -Wl,-rpath,GETPATH(miniconda3/lib) -
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(NEXUSLIB "GETPATH(miniconda3/lib)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include/nexus)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include)")
set(MCCODE_CFLAGS "-g -O2 -DNDEBUG -lm -std=c99")
set(EDITOR "open")
2 changes: 1 addition & 1 deletion cmake/toolchains/mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set(XRLFLAGS "-IGETPATH(miniconda3/include) -Wl,-rpath,GETPATH(miniconda3/lib) -
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(NEXUSLIB "GETPATH(miniconda3/lib)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include/nexus)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include)")
set(MCCODE_CFLAGS "-g -O2 -DNDEBUG -lm -std=c99")
set(EDITOR "open")
4 changes: 2 additions & 2 deletions cmake/toolchains/mingw64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ set(MPILIB "msmpi")
set(MCCODE_CFLAGS "-flto -O3 -mtune=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "start")

# NeXus location defaults
set(NEXUSINCLUDE "GETPATH(../miniconda3/Library/include/nexus)")
# HDF5 location for NeXus output
set(NEXUSINCLUDE "GETPATH(../miniconda3/Library/include)")
set(NEXUSLIB "GETPATH(../miniconda3/Library/lib)")

# HDFviewer
Expand Down
Loading
Loading