Skip to content

Commit 0703284

Browse files
authored
Merge pull request #843 from I2PC/release-3.23.11
Release-3.23.11 Nereus
2 parents fc7d10b + 886c492 commit 0703284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2113
-1317
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ jobs:
1212
build:
1313
# The type of runner that the job will run on
1414
runs-on: ubuntu-22.04
15-
16-
# Steps represent a sequence of tasks that will be executed as part of the job
17-
# Disabling shallow clone is recommended for improving relevancy of reporting
1815
steps:
1916
# Installing apt dependencies
2017
- name: Install dependencies
@@ -26,32 +23,34 @@ jobs:
2623
- uses: actions/setup-python@v4
2724
with:
2825
python-version: '3.9.15' # Version range or exact version of a Python version to use, using SemVer's version range syntax
29-
26+
27+
3028
# Installing Python dependencies
3129
- name: Install python dependencies
3230
run: |
3331
python -m pip install --upgrade pip
3432
pip install scons numpy
35-
33+
3634
# Installing CUDA
37-
- uses: Jimver/cuda-toolkit@v0.2.10
35+
- uses: Jimver/cuda-toolkit@v0.2.11
3836
id: cuda-toolkit
3937
with:
40-
cuda: '11.7.0'
41-
linux-local-args: '[ "--toolkit" ]'
42-
38+
cuda: '11.8.0'
39+
method: network
40+
sub-packages: '["nvcc", "toolkit"]'
41+
4342
# Using CCache to speed C/C++ compilation
44-
- name: Install ccache
45-
uses: hendrikmuhs/ccache-action@v1.2
43+
- uses: hendrikmuhs/ccache-action@v1.2
4644

4745
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
48-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
4947
with:
5048
fetch-depth: 0
5149

5250
# Compiling Xmipp in the Pull Request branch
53-
- name: Compile Xmipp
51+
- name: Compile Xmipp will all dependencies in branch ${{ github.head_ref }} (if such branch exists, default is devel)
5452
env:
53+
BRANCH_NAME: ${{ github.head_ref }}
5554
CIBuild: 1
5655
BUILD_TESTS: True
57-
run: ./xmipp noAsk
56+
run: ./xmipp all br=$BRANCH_NAME noAsk || (cat compileLOG.txt && false)

.github/workflows/scanBuild.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ gmon.out
6060
/src/xmipp/tests/data
6161
*.conf
6262
xmippEnv.json
63+
compile_commands.json
6364
*.tgz
6465

6566
# Ignore version file
@@ -71,3 +72,6 @@ xmippEnv.json
7172
compileLOG.txt
7273
reportInstallation.tar.gz
7374
xmipp_version.txt
75+
76+
# Compilation database
77+
compile_commands.json

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,42 @@
1-
## Release 3.23.07 - voting
1+
## Release 3.23.11 - Nereus
2+
### Xmipp Programs
3+
4+
- New programs
5+
- local_volume_adjustment: This program modifies a volume in order to adjust its intensity locally to a reference volume
6+
- subtomo_subtraction: New program with mpi version
7+
- Programs updated
8+
- tomo_extract_subtomogram: Accept target box size
9+
- convert_from_pdb: Added cif support
10+
- phantom_movies: Adding more options: circle and cross
11+
- angular_neighbourhood: Modified to output the result in the best symmetry group
12+
- batch_deep_misalignment: Detection: GPU option
13+
- Programs fixed
14+
- volume_from_pdb: Bug fix in dealing with orig=0, Detection of contrast inverted maps
15+
- tomo_extract_particles: Stack fixes, dose fixes
16+
- image_convert: Fixed issue when providing a metadata file as input
17+
- volume_substraction: Change NaNs generated by a division between 0 by 0s.
18+
19+
### Installation and user guide
20+
- Disabled downloading 380MB file not required
21+
- Clarifying the requirements
22+
- More robust thread execution in the installator
23+
- Fixed bug collecting versions
24+
- Removed auto updater from libcifpp
25+
26+
### More Xmipp
27+
- Upgraded CUDA toolkit in DLTK 1.0
28+
- Fix PDB read: This fixes a bug where pdbs whose atom name start in position 12 (in base 0)
29+
- CUDA 12.2 supported (not full tested)
30+
- Fixed PDB reading for shorter PDBs
31+
- Allow not compiling xmipp to debug changes in python scripts
32+
- Xmipp will now be able to read any volume with any values of those fields correctly.
33+
- Fixed pixel size not being properly stored
34+
- Fixed MetaData to avoid dangling references
35+
- Added compatibility for undefined axis sequences in MRC files
36+
- Added option to write mirrors in angularDistance
37+
38+
39+
## Release 3.23.07 - Morpheus
240
### Xmipp Programs
341
- New programs
442
- image_peak_high_contrast(for detecting high contrast regions in tomographic reconstruction)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![Build Status](https://github.com/I2PC/xmipp/actions/workflows/main.yml/badge.svg)](https://github.com/I2PC/xmipp/actions/workflows/main.yml)
1+
[![Build Status](https://github.com/I2PC/xmipp/actions/workflows/build.yml/badge.svg)](https://github.com/I2PC/xmipp/actions/workflows/build.yml)
22

33
# Xmipp
4-
<a href="https://github.com/I2PC/xmipp"><img src="https://github.com/I2PC/scipion-em-xmipp/blob/devel/xmipp3/xmipp_logo_original.png" alt="drawing" width="330" align="left"></a>
4+
<a href="https://github.com/I2PC/xmipp"><img src="https://github.com/I2PC/scipion-em-xmipp/blob/devel/xmipp3/xmipp_logo.png" alt="drawing" width="330" align="left"></a>
55

66

77

@@ -17,7 +17,7 @@ The recommended way for users (not developers) to install and use Xmipp is via t
1717
## Installation requirements
1818
### Supported OS
1919
We have tested Xmipp compilation on the following operating systems:
20-
[Ubuntu 16.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-16.04), [Ubuntu 18.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-18.04), [Ubuntu 20.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-20.04), [Ubuntu 22.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-22.04), [Centos 7](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-CentOS-7-9.2009). Visit the OS wiki page for more details.
20+
[Ubuntu 18.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-18.04), [Ubuntu 20.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-20.04), [Ubuntu 22.04](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-Ubuntu-22.04), [Centos 7](https://github.com/I2PC/xmipp/wiki/Installing-Xmipp-on-CentOS-7-9.2009). Visit the OS wiki page for more details.
2121

2222
While compilation and execution might be possible on other systems, it might not be straightforward. If you encounter a problem, please refer to known and fixed [issues](https://github.com/I2PC/xmipp/issues?q=is%3Aissue). Let us know if something is not working.
2323

@@ -26,7 +26,7 @@ At least 2 processors are required to run Xmipp. In some virtual machine tools o
2626

2727
### Software dependencies
2828
#### Compiler
29-
Xmipp requires C++17 compatible compiler. We recommend GCC, we have good experience with GCC-8.3 in any case a version > 8 is required. If use GCC-10.3 and CUDA=11 and experience issues, [please change the compiler version](https://github.com/NVIDIA/nccl/issues/494). If use GCC-11 and experience issues, [please visit this.](https://github.com/I2PC/xmipp/issues/583). For more details about the compilation proces and installation of gcc, please visit [compiler](https://github.com/I2PC/xmipp/wiki/Compiler)
29+
Xmipp requires C++17 compatible compiler. We recommend GCC with G++, we have good experience with GCC/G++-8.4 in any case a version >= 8.4 is required. If use GCC/G++-10.3 and CUDA=11 and experience issues, [please change the compiler version](https://github.com/NVIDIA/nccl/issues/494). If use GCC-11 and experience issues, [please visit this](https://github.com/I2PC/xmipp/issues/583). For more details about the compilation proces and installation of gcc, please visit [compiler](https://github.com/I2PC/xmipp/wiki/Compiler)
3030

3131
#### Cmake
3232
Xmipp requires Cmake 3.16 or above. To update it please [visit](https://github.com/I2PC/xmipp/wiki/Cmake-update-and-install)
@@ -47,7 +47,7 @@ We sometimes see issues regarding the HDF5 dependency. Please visit the [HDF5 Tr
4747

4848
`pip install scons` in the enviroment that xmipp will be compiled (scipion3 if you will run Xmipp within Scipion)
4949

50-
Also a compiler will be required (`sudo apt install gcc-8 g++-8`)
50+
Also a compiler will be required (`sudo apt install gcc-10 g++-10`)
5151

5252
## Standalone installation
5353
Standalone installation of Xmipp is recommended for researchers and developers. This installation allows you to use Xmipp without Scipion, however, in the next section it is explained how to link it with Scipion. Xmipp script automatically downloads several dependencies and then creates a configuration file that contains paths and flags used during the compilation. Please refer to the [Xmipp configuration](https://github.com/I2PC/xmipp/wiki/Xmipp-configuration) guide for more info.

scripts/config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from .utils import *
3131
from.environment import Environment
3232

33-
3433
class Config:
3534
FILE_NAME = 'xmipp.conf'
3635
KEY_USE_DL = 'USE_DL'
@@ -43,9 +42,9 @@ class Config:
4342
OPT_NVCC = 'NVCC'
4443
OPT_NVCC_LINKFLAGS = 'NVCC_LINKFLAGS'
4544
OPT_NVCC_CXXFLAGS = 'NVCC_CXXFLAGS'
46-
MINIMUM_GCC_VERSION = 8
45+
MINIMUM_GCC_VERSION = '8.4.0'
4746
MINIMUM_CUDA_VERSION = 10.1
48-
vGCC = ['12.2', '12.1',
47+
vGCC = ['12.3', '12.2', '12.1',
4948
'11.3', '11.2', '11.1', '11',
5049
'10.4', '10.3', '10.2', '10.1', '10',
5150
'9.4', '9.3', '9.2', '9.1', '9',
@@ -55,7 +54,7 @@ class Config:
5554
'11.0-11.0': vGCC[vGCC.index('9.4'):],
5655
'11.1-11.4': vGCC[vGCC.index('10.4'):],
5756
'11.5-11.8': vGCC[vGCC.index('11.2'):],
58-
'12.0-12.1': vGCC[vGCC.index('12.2'):],
57+
'12.0-12.3': vGCC[vGCC.index('12.3'):],
5958
}
6059
CMAKE_VERSION_REQUIRED = '3.16'
6160

@@ -306,8 +305,9 @@ def _config_compiler(self):
306305
self.configDict["DEBUG"] = "False"
307306
if self.configDict["CC"] == "" and checkProgram("gcc")[0]:
308307
self.configDict["CC"] = "gcc"
309-
if get_GCC_version("gcc")[0] < Config.MINIMUM_GCC_VERSION:
310-
print(red("gcc version required >= 8, detected gcc {}".format(get_GCC_version("gcc")[0])))
308+
if versionToNumber(get_GCC_version("gcc")[1]) < versionToNumber(Config.MINIMUM_GCC_VERSION):
309+
print(red("gcc version required >= {}, detected gcc {}".format(
310+
Config.MINIMUM_GCC_VERSION, get_GCC_version("gcc")[0])))
311311
else:
312312
print(green('gcc {} detected'.format(get_GCC_version("gcc")[0])))
313313
self._set_cxx()
@@ -440,7 +440,7 @@ def _ensure_GCC_GPP_version(self, compiler):
440440
if gccVersion == '':
441441
return False, 3
442442
print(green('Detected ' + compiler + " in version " + fullVersion + '.'))
443-
if gccVersion < Config.MINIMUM_GCC_VERSION:
443+
if versionToNumber(fullVersion) < versionToNumber(Config.MINIMUM_GCC_VERSION):
444444
return False, 4
445445
return True, 0
446446

@@ -564,8 +564,8 @@ def _set_nvcc_cxx(self, nvcc_version):
564564
candidates, resultBool = self._get_compatible_GCC(nvcc_version)
565565
if not resultBool:
566566
print(yellow('CUDA version {} not compatible with Xmipp. Please '
567-
'install CUDA>={}'.format(Config.MINIMUM_CUDA_VERSION,
568-
nvcc_version)), *candidates, sep=", ")
567+
'install CUDA>={} and not higher than the maximum version required by the compiler'.format(nvcc_version,
568+
Config.MINIMUM_CUDA_VERSION)), *candidates, sep=", ")
569569
print('gcc candidates based on nvcc version:', *candidates, sep=", ")
570570
return
571571

scripts/utils.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def runJob(cmd, cwd='./', show_output=True, log=None, show_command=True,
192192
else:
193193
progresL = progresLines
194194
line = p.stdout.readline().decode("utf-8")
195-
if line != '':
195+
if line:
196196
log.append(line)
197197
write_compileLog(line, COMPILE_LOG)
198198

@@ -208,8 +208,8 @@ def runJob(cmd, cwd='./', show_output=True, log=None, show_command=True,
208208
str2Print = line + "\n" + printProgressBar(prg)
209209
print(f"{yellow(str2Print)}", end=UP)
210210
n += 1
211-
if not line:
212-
if p.poll() == 0:
211+
else:
212+
if p.wait() == 0:
213213
if printProgress:
214214
print(printProgressBar(100))
215215
return True
@@ -232,7 +232,7 @@ def runJob(cmd, cwd='./', show_output=True, log=None, show_command=True,
232232
log.append(l)
233233
if in_parallel:
234234
return p
235-
elif 0 == p.poll():
235+
elif 0 == p.wait():
236236
return True
237237
else:
238238
if show_output is False and log is None:
@@ -433,6 +433,15 @@ def version_tuple(versionStr):
433433
# Convert the list of numerical parts to a tuple and return it
434434
return tuple(numerical_parts)
435435

436+
437+
def versionToNumber(strVersion):
438+
listVersion = strVersion.split('.')
439+
numberVersion = int(listVersion[0]) * 100 + int(listVersion[1]) * 10
440+
try:
441+
numberVersion = numberVersion + int(listVersion[2]) * 1
442+
except Exception:
443+
pass
444+
return numberVersion
436445
def checkCMakeVersion(minimumRequired=None):
437446
"""
438447
### This function checks if the current installed version, if installed, is above the minimum required version.
@@ -502,4 +511,4 @@ def errorList(errorNum):
502511
'and https://github.com/I2PC/xmipp/wiki/Cmake-troubleshoting ']
503512

504513
]
505-
return errorList[errorNum]
514+
return errorList[errorNum]

sonar-project.properties

100755100644
Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
sonar.projectKey=Xmipp
2-
sonar.projectName=Xmipp
1+
projectKey=I2PC_xmipp
2+
sonar.organization=i2pc
3+
4+
# This is the name and version displayed in the SonarCloud UI.
35
sonar.projectVersion=3.0
46

5-
#sonar.log.level=DEBUG
7+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
8+
sonar.sources=src/
9+
sonar.tests=src/
610

7-
sonar.sources=./src/
8-
# don't use .gitignore for auto exclusion, as it doesn't work properly and exclude almost everything
11+
# Don't use .gitignore for auto exclusion, as it doesn't work properly and exclude almost everything
912
sonar.scm.exclusions.disabled=true
13+
1014
# NOTE - be careful with excusion rules. If you include formerly excluded folder, all files that include
1115
# headers from it will be analyzed again! https://community.sonarsource.com/t/sonarscanner-cache-not-working-properly/29451
12-
sonar.inclusions=**/xmipp/**, **/xmippViz/**
13-
sonar.exclusions=**/external/**, **/programs/**, **/tests/**, **/legacy/**
16+
sonar.inclusions=xmipp, scripts/**/*
17+
sonar.exclusions=src/**/external/**/*, src/**/legacy/**/*, src/**/resources/**/*, src/**/tests/**/*
18+
sonar.test.inclusions=src/**/tests/**/*
19+
sonar.test.exclusions=src/**/*
1420

1521
# see https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
16-
17-
sonar.java.binaries=./src/xmippViz/java/build/xmipp
18-
sonar.java.libraries=./src/xmippViz/java/lib/*.jar
1922
sonar.cfamily.build-wrapper-output=bw-outputs
23+
24+
# Python version to analyze Python code
25+
sonar.python.version=3

src/xmipp/SConstruct

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ env = Environment(ENV=os.environ,
7171
BUILDERS=Environment()['BUILDERS'],
7272
tools=['Make', 'AutoConfig'],
7373
toolpath=[join('install', 'scons-tools')])
74+
env.SetOption('warn', 'no-duplicate-environment') # Supress warnings for compilation database (due to the way we create the environments)
7475
# TODO: BUILDERS var added from the tricky creation of a new environment.
7576
# If not, they lose default builders like "Program", which are needed later
7677
# (by CheckLib and so on). See http://www.scons.org/doc/2.0.1/HTML/scons-user/x3516.html
@@ -296,6 +297,18 @@ def addCppLibrary(env, name, dirs=[], tars=[], untarTargets=['configure'], patte
296297

297298
env2.Alias(name, lastTarget)
298299

300+
# Compilation database for libraries and shared libraries
301+
env2['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
302+
env2.SetOption('warn', 'no-duplicate-environment')
303+
env2.Tool('compilation_db')
304+
xmipp_path = os.path.dirname(os.path.dirname(os.getcwd()))
305+
cdb = env2.CompilationDatabase(os.path.join(xmipp_path, 'compile_commands.json'))
306+
Alias('cdb', cdb)
307+
BUILD_TARGETS.append('cdb')
308+
program = env2.Program(**libraryArgs)
309+
env2.Depends(program, deps)
310+
311+
299312
return lastTarget
300313

301314

@@ -426,6 +439,14 @@ def addProgram(env, name, src=None, pattern=None, installDir=None,
426439
appendUnique(libPathsCopy, external_libdirs) # This order is important, because if we should use Scipion libs, these will be before the system libs
427440
appendUnique(libPathsCopy, env.get('LIBPATH', '').split(os.pathsep))
428441
env2 = Environment()
442+
443+
# Compilation database for programs
444+
env2.SetOption('warn', 'no-duplicate-environment')
445+
env2.Tool('compilation_db')
446+
xmipp_path = os.path.dirname(os.path.dirname(os.getcwd()))
447+
cdb = env2.CompilationDatabase(os.path.join(xmipp_path, 'compile_commands.json'))
448+
Alias('cdb', cdb)
449+
429450
env2['ENV']['LD_LIBRARY_PATH'] = env['ENV'].get('LD_LIBRARY_PATH', '')
430451
env2['ENV']['PATH'] = env['ENV']['PATH']
431452

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/***************************************************************************
2+
*
3+
* Authors: Estrella Fernandez Gimenez (me.fernandez@cnb.csic.es)
4+
*
5+
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6+
*
7+
* This program is free software; you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation; either version 2 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program; if not, write to the Free Software
19+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20+
* 02111-1307 USA
21+
*
22+
* All comments concerning this program package may be sent to the
23+
* e-mail address 'xmipp@cnb.csic.es'
24+
***************************************************************************/
25+
26+
#include <reconstruction/local_volume_adjust.cpp>
27+
28+
RUN_XMIPP_PROGRAM(ProgLocalVolumeAdjust)

0 commit comments

Comments
 (0)