exoclime / helios-k Goto Github PK
View Code? Open in Web Editor NEWUltrafast opacity calculator for exoplanetary atmospheres.
Home Page: https://helios-k2.readthedocs.io/
License: GNU General Public License v3.0
Ultrafast opacity calculator for exoplanetary atmospheres.
Home Page: https://helios-k2.readthedocs.io/
License: GNU General Public License v3.0
Hi,
I am not able to complete the test run. I got an "Initial error = 2 = out of memory" error (see below).
My configuration is :
Thanks in advance for your help.
Jean-Charles
PS: here is the output
[lacuna@node50 HELIOS-K-master]$ ./heliosk
There is 1 CUDA Device
Name:GeForce RTX 2080 Ti, Major:7, Minor:5, Max threads per Block:1024, Max x dim:1024
, #Multiprocessors:68, Clock Rate:1545000, Memory Clock Rate:7000000, Global Memory:11554717696, Shared memory per block: 49152
1000 0 0.001 1e+06
Version: 2.04
Using device 0
Runtime Version 10010
Driver Version 10020
GIT Describe:
Build Date: Mon Sep 14 16:49:01 CEST 2020
Build Path: /net/GSP/users/lacuna/HELIOS-K-master
Build System: Linux node50.lam.fr 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build Compute Capability: SM=30
name = i
T = 100
P = 1
cia System = -
pathToData = data/
numin = 0
numax = 1000
dnu = 0.001
Nnu per bin = 200000
Number of points: 1000000
cutMode = 0
cut = 25
doResampling = 0
nC = 20
doTransmission = 0
nTr = 1000
dTr = 0.05
doStoreFullK = 1
pathToK =
dostoreK = 0
nbins = 5
kmin = 0
qalphaL = 1
gammaF = 1
doMean = 0
Units = 0
Replace files = 1
profile = 1
doTuning = 1
def_TOL = 1.43e-17
def_TOLf = 2.48e-12
def_nthmax = 1048576
def_nlmax = 32768
def_maxlines = 1048576
def_maxfiles = 500
def_NmaxSample = 100
Read Molecule param file: |01_hit16| 0 1
mean mass 18.0153
Read Molecule param file: |01_hit16| 0 1
Species Name = 01_hit16
dataBase = 0
Molecule Number = 1
default L = 0
default n = 0
Read partition function: data/q1.txt
Q 0 T0: 99, T1: 100, q0: 34.6424, q1: 35.1531, q 35.1531
Read partition function: data/q2.txt
Q 1 T0: 99, T1: 100, q0: 34.9291, q1: 35.4441, q 35.4441
Read partition function: data/q3.txt
Q 2 T0: 99, T1: 100, q0: 208.762, q1: 211.84, q 211.84
Read partition function: data/q4.txt
Q 3 T0: 99, T1: 100, q0: 169.885, q1: 172.414, q 172.414
Read partition function: data/q5.txt
Q 4 T0: 99, T1: 100, q0: 171.985, q1: 174.547, q 174.547
Read partition function: data/q6.txt
Q 5 T0: 99, T1: 100, q0: 1025.95, q1: 1041.22, q 1041.22
Read partition function: data/q129.txt
Q 6 T0: 99, T1: 100, q0: 200.436, q1: 203.437, q 203.437
mean mass 18.0153, Sscale 1
Initial error = 2 = out of memory
The docs say that the pressure in param.dat
are in atmospheres. I just want to confirm that pressure is actually in atmospheres, and not in bars.
If input pressure is in atmospheres, can you update the relevant line in the docs to be more explicit, including a link to the wiki page on standard atmospheres:
P: Pressure in Standard Atmospheres
Just seems like a units mistake I'm and other are bound to make. Many think in bars, and not Standard Atmospheres.
What is x
in the resampling script? It isn't defined earlier in the script
https://github.com/exoclime/HELIOS-K/blame/master/docs/helios_k/resampling.rst#L77
The code searches for multiple occurrences of character '__' in the .trans file in Exomol to identify whether the line list is split in wavenumber ranges. However, this specific line list has a naming exception ('12C-16O__Li2015__E2.trans.bz2') which causes the code to fail when entering the 'if' block inside of the function 'transitionRanges'.
When I try to compile HELIOS-K by typing "make SM=30" at the command prompt, I get errors that seem to relate to the functions "atomicMin" and "atomicMax" (full output below). Any suggestions would be welcome - many thanks.
ianboxv2:~/Downloads/HELIOS-K-master> make SM=30
nvcc -arch sm_30 --compiler-options -Wall -o heliosk heliosk.cu -DGIT_DESCRIBE=""git describe
"" -DBUILD_DATE=""date
"" -DBUILD_SYSTEM=""uname -a
"" -DBUILD_PATH=""pwd
"" -DBUILD_SM="30"
fatal: not a git repository (or any of the parent directories): .git
voigt.h(1706): error: no instance of overloaded function "atomicMin" matches the argument list
argument types are: (long long *, long long)voigt.h(1707): error: no instance of overloaded function "atomicMax" matches the argument list
argument types are: (long long *, long long)2 errors detected in the compilation of "/tmp/tmpxft_00007733_00000000-8_heliosk.cpp1.ii".
Makefile:19: recipe for target 'heliosk' failed
make: *** [heliosk] Error 1
When I try using the binsFile
option, trying to reproduce the example in the docs, I get the following error from the GPU
Kb error = 9 = invalid configuration argument
my param.dat file:
name = i
T = 100.0
P = 1.0
PFile = -
Species Name = 01_hit16
SpeciesFile = -
ciaSystem = -
pathToData = data/
numin = 0.0
numax = 1000.0
dnu = 0.001
Nnu per bin = 0
cutMode = 0
cut = 25.0
doResampling = 0
nC = 20
doTransmission = 0
nTr = 1000
dTr = 0.05
doStoreFullK = 1
pathToK =
doStoreSK = 2
nbins = 5
binsFile = bins.dat
OutputEdgesFile = edges.dat
kmin = 0.0
qalphaL = 1.0
gammaF = 1.0
doMean = 0
Units = 0
ReplaceFiles = 1
profile = 1
subLorentzianfile = -
removePlinth = 0
doTuning = 1
My bins.dat
and edges.dat
are identical to the examples docs.
TL;DR - Wanted to compile this on Win10 using VS, managed to get it partially working, requesting an official (supported) way to do it.
Unfortunately for myself, I'm not very familiar with this sort of tasks, so I had to fix compiler errors incrementally, probably crudely, though with some success (got heliosk.cu
to compile). I'm providing the steps I took in case anybody else needs this:
<HELIOS-K ROOT>/sys
folder:time.h
:#pragma once
#ifndef _TIMES_H
#include "sys/times.h"
#endif
times.h
:#ifndef _TIMES_H
#define _TIMES_H
#ifdef _WIN32
#include <sys/timeb.h>
#include <sys/types.h>
#include <winsock2.h>
int gettimeofday(struct timeval* t,void* timezone)
{ struct _timeb timebuffer;
_ftime( &timebuffer );
t->tv_sec=timebuffer.time;
t->tv_usec=1000*timebuffer.millitm;
return 0;
}
// from linux's sys/times.h
//#include <features.h>
#define __need_clock_t
#include <time.h>
/* Structure describing CPU time used by a process and its children. */
struct tms {
clock_t tms_utime; /* User CPU time. */
clock_t tms_stime; /* System CPU time. */
clock_t tms_cutime; /* User CPU time of dead children. */
clock_t tms_cstime; /* System CPU time of dead children. */
};
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of DST correction */
};
/* Store the CPU time used by this process and all its
dead children (and their dead children) in BUFFER.
Return the elapsed real time, or (clock_t) -1 for errors.
All times are in CLK_TCKths of a second. */
clock_t times (struct tms *__buffer) {
__buffer->tms_utime = clock();
__buffer->tms_stime = 0;
__buffer->tms_cstime = 0;
__buffer->tms_cutime = 0;
return __buffer->tms_utime;
}
typedef long long suseconds_t ;
#endif
#endif
heliosk.cu
, replaced the lines#include <sys/time.h>
#include <sys/resource.h>
with
#ifdef __GNUC__
#define LINUX
#else
#define WINDOWS
#endif
#ifdef WINDOWS
#include "sys/time.h"
#else
#include <sys/time.h>
#include <sys/resource.h>
#endif
Makefile
:SM=35
ARCH = -arch sm_$(SM)
source = heliosk.cu
headers = define.h ISO.h resample.h host.h voigt.h
all: heliosk
heliosk: $(source) $(headers)
nvcc $(ARCH) -o heliosk $(source)
# nvcc --ptxas-options=-v $(ARCH) -o heliosk $(source)
# nvcc --compiler-options -Wall $(ARCH) -o heliosk $(source)
nmake SM=30
There is a typo in the documentation.
Under the requirements of 'nist_Lines2.py' in 'HELIOS-K/docs/helios_k/compilation.rst' 'csh' is listed as a requirement.
However, the python file needs 'csv'.
Since 'csh' is an existing package a fix would be nice to avoid confusion.
When compiling HELIOS-K (simply make SM=61
), I encountered several times the following fatal error:
/usr/local/cuda/bin/../targets/x86_64-linux/include/thrust/detail/config/cpp_dialect.h:128:13: warning: Thrust requires at least C++14. Define THRUST_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message. [enabled by default]
THRUST_COMPILER_DEPRECATION(C++14);
^
.....
make: *** [heliosk] Error 1
Compiling hitran.cpp
with clang++ instead of GNU g++ produces different results. The cause has to do with this line here:
Line 116 in 8e768db
When I compile with GNU g++ with the warnings flag enabled, I get
(petit) nicholas@Nicholass-MacBook-Air-6 HELIOS-K % /opt/homebrew/bin/g++-12 hitran.cpp -o hitran -Wall
hitran.cpp: In function 'int main(int, char**)':
hitran.cpp:90:14: warning: unused variable 'c' [-Wunused-variable]
90 | char c[4];
| ^
hitran.cpp:96:14: warning: unused variable 'skip' [-Wunused-variable]
96 | char skip[4];
| ^~~~
hitran.cpp:116:32: warning: '%s' directive writing up to 3 bytes into a region of size 1 [-Wformat-overflow=]
116 | sprintf(iiso, "%s", &iii[2]);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~
hitran.cpp:116:24: note: 'sprintf' output between 1 and 4 bytes into a destination of size 1
116 | sprintf(iiso, "%s", &iii[2]);
Hi, I am trying to calculate opacities of CO2 from CDSD-4000, and when I use ./hitran -M 02 -in cdsd
command to generate .param files and binary files, it fails. I found in hitran.cpp it has an upper limit (which is 100000000 rows)reading linelists that ./hitran cannot deal with very larger linelist.
We get rid of this issue by changing the loop conditions:
diff --git a/hitran.cpp b/hitran.cpp
index dae8649..e596981 100644
--- a/hitran.cpp
+++ b/hitran.cpp
@@ -279,7 +279,7 @@ int main(int argc, char *argv[]){
char skip[161];
for(int i = 0; i < 100000000; ++i){
for(unsigned long int i = 0;; ++i){
if(fgets(c1, 3, dataFile) == NULL){
int nnu;
@@ -289,7 +289,7 @@ int main(int argc, char *argv[]){
else{
nnu = range1;
}
printf("end %d %g %g %d %d\n", i, nu, nuOld, count, nnu);
printf("end %lu %g %g %d %d\n", i, nu, nuOld, count, nnu);
filesCount[nFiles] = count;
filesRange[nFiles] = nnu;
++nFiles;
Fix them, Brett!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.