{"action":"created","issue":{"url":"https://api.github.com/repos/desihub/desisim/issues/398","repository_url":"https://api.github.com/repos/desihub/desisim","labels_url":"https://api.github.com/repos/desihub/desisim/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/desihub/desisim/issues/398/comments","events_url":"https://api.github.com/repos/desihub/desisim/issues/398/events","html_url":"https://github.com/desihub/desisim/issues/398","id":346507966,"node_id":"MDU6SXNzdWUzNDY1MDc5NjY=","number":398,"title":"Adding BALs does not work when generating full DESI with quickquasars","user":{"login":"andreufont","id":3873863,"node_id":"MDQ6VXNlcjM4NzM4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3873863?v=4","gravatar_id":"","url":"https://api.github.com/users/andreufont","html_url":"https://github.com/andreufont","followers_url":"https://api.github.com/users/andreufont/followers","following_url":"https://api.github.com/users/andreufont/following{/other_user}","gists_url":"https://api.github.com/users/andreufont/gists{/gist_id}","starred_url":"https://api.github.com/users/andreufont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreufont/subscriptions","organizations_url":"https://api.github.com/users/andreufont/orgs","repos_url":"https://api.github.com/users/andreufont/repos","events_url":"https://api.github.com/users/andreufont/events{/privacy}","received_events_url":"https://api.github.com/users/andreufont/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-01T08:55:27Z","updated_at":"2018-08-02T13:54:02Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi @LuzGarciaP @alxogm @paulmartini @forero @julienguy \r\n\r\nSomething quite strange is going on. For instance, when I run a single quickquasars script with the option --balprob 0.12, everything works fine, and indeed I get some spectra with BAL features.\r\n\r\nHowever, when I run the full slurm script to generate a full DESI simulation (see attached script, based on the original one by Julien Guy), I get the following error message:\r\nAttributeError: 'NoneType' object has no attribute 'insert_bals'\r\n\r\nIt looks like somehow, the BAL object that should be created in line 503 is not created, and a None object is passed to simulate_one_pixel.\r\n\r\nCan you reproduce this error? Any idea for how to fix it?\r\n\r\n--- slurm script ---\r\n\r\n#!/bin/bash -l\r\n\r\n#SBATCH -C haswell   \r\n#SBATCH --partition=debug\r\n#SBATCH --account=desi\r\n#SBATCH --nodes=40\r\n#SBATCH --time=00:30:00\r\n#SBATCH --job-name=lyasim\r\n#SBATCH --output=lyasim.log\r\n\r\nseed=123\r\ndownsampling=0.40\r\nidir=/project/projectdirs/desi/mocks/lya_forest/london/v2.0/\r\noutdir=/project/projectdirs/desi/mocks/lya_forest/london/v2.0/quick-1.7/\r\nnodes=40 # CHECK MATCHING #SBATCH --nodes ABOVE !!!!\r\nnthreads=4 # TO BE TUNED ; CAN HIT NODE MEMORY LIMIT ; 4 is max on edison for nside=16 and ~50 QSOs/deg2\r\n\r\nif [ ! -d $outdir ] ; then\r\n    mkdir -p $outdir\r\nfi    \r\nif [ ! -d $outdir/logs ] ; then\r\n    mkdir -p $outdir/logs\r\nfi\r\nif [ ! -d $outdir/spectra-16 ] ; then\r\n    mkdir -p $outdir/spectra-16\r\nfi\r\n\r\necho \"get list of skewers to run ...\"\r\n\r\nfiles=`\\ls -1 $idir/*/*/transmission*.fits`\r\nnfiles=`echo $files | wc -w`\r\nnfilespernode=$((nfiles/nodes+1))\r\n\r\necho \"n files =\" $nfiles\r\necho \"n files per node =\" $nfilespernode\r\n\r\nfirst=1\r\nlast=$nfilespernode\r\nfor node in `seq $nodes` ; do\r\n    echo \"starting node $node\"\r\n\r\n    # list of files to run\r\n    if (( $node == $nodes )) ; then\r\n\tlast=\"\"\r\n    fi\r\n    echo ${first}-${last}\r\n    tfiles=`echo $files | cut -d \" \" -f ${first}-${last}`\r\n    first=$(( first + nfilespernode ))\r\n    last=$(( last + nfilespernode ))\r\n    command=\"srun -N 1 -n 1 -c $nthreads  quickquasars --exptime 4000. -i $tfiles --zmin 1.8 --nproc $nthreads --outdir $outdir/spectra-16 --downsampling $downsampling --zbest --mags --desi-footprint --seed $seed --balprob 0.12\"\r\n    echo $command\r\n    echo \"log in $outdir/logs/node-$node.log\"\r\n    \r\n    $command >& $outdir/logs/node-$node.log &\r\n    \r\n\r\ndone\r\n\r\nwait\r\necho \"END\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/desihub/desisim/issues/comments/409934136","html_url":"https://github.com/desihub/desisim/issues/398#issuecomment-409934136","issue_url":"https://api.github.com/repos/desihub/desisim/issues/398","id":409934136,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTkzNDEzNg==","user":{"login":"andreufont","id":3873863,"node_id":"MDQ6VXNlcjM4NzM4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3873863?v=4","gravatar_id":"","url":"https://api.github.com/users/andreufont","html_url":"https://github.com/andreufont","followers_url":"https://api.github.com/users/andreufont/followers","following_url":"https://api.github.com/users/andreufont/following{/other_user}","gists_url":"https://api.github.com/users/andreufont/gists{/gist_id}","starred_url":"https://api.github.com/users/andreufont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreufont/subscriptions","organizations_url":"https://api.github.com/users/andreufont/orgs","repos_url":"https://api.github.com/users/andreufont/repos","events_url":"https://api.github.com/users/andreufont/events{/privacy}","received_events_url":"https://api.github.com/users/andreufont/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T13:54:02Z","updated_at":"2018-08-02T13:54:02Z","author_association":"CONTRIBUTOR","body":"Hi @julienguy - I checked the new version, it works great. I already added a version with BALs in \r\n/project/projectdirs/desi/mocks/lya_forest/london/v2.0/quick-1.8"}}
{"actor":{"display_login":"andreufont"}}